indexeddb

package
v0.158.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 3 Imported by: 4

Documentation

Overview

Package indexeddb provides the Chrome DevTools Protocol commands, types, and events for the IndexedDB domain.

Generated by the pdlgen command.

Index

Constants

View Source
const (
	CommandClearObjectStore         = "IndexedDB.clearObjectStore"
	CommandDeleteDatabase           = "IndexedDB.deleteDatabase"
	CommandDeleteObjectStoreEntries = "IndexedDB.deleteObjectStoreEntries"
	CommandDisable                  = "IndexedDB.disable"
	CommandEnable                   = "IndexedDB.enable"
	CommandRequestData              = "IndexedDB.requestData"
	CommandGetMetadata              = "IndexedDB.getMetadata"
	CommandRequestDatabase          = "IndexedDB.requestDatabase"
	CommandRequestDatabaseNames     = "IndexedDB.requestDatabaseNames"
)

Command names.

Variables

ClearObjectStore clears all entries from an object store.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-clearObjectStore

DeleteDatabase deletes a database.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteDatabase

DeleteObjectStoreEntries delete a range of entries from an object store.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteObjectStoreEntries

View Source
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}

Disable disables events from backend.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-disable

Enable enables events from backend.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-enable

GetMetadata gets metadata of an object store.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-getMetadata

RequestData requests data from object store or index.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestData

RequestDatabase requests database with given name in given frame.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabase

RequestDatabaseNames requests database names for given security origin.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabaseNames

Functions

This section is empty.

Types

type ClearObjectStoreParams

type ClearObjectStoreParams struct {
	SecurityOrigin  string          `json:"securityOrigin,omitempty,omitzero"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey      string          `json:"storageKey,omitempty,omitzero"`     // Storage key.
	StorageBucket   *storage.Bucket `json:"storageBucket,omitempty,omitzero"`  // Storage bucket. If not specified, it uses the default bucket.
	DatabaseName    string          `json:"databaseName"`                      // Database name.
	ObjectStoreName string          `json:"objectStoreName"`                   // Object store name.
}

ClearObjectStoreParams are the parameters of the command IndexedDB.clearObjectStore.

type DataEntry

type DataEntry struct {
	Key        *runtime.RemoteObject `json:"key"`        // Key object.
	PrimaryKey *runtime.RemoteObject `json:"primaryKey"` // Primary key object.
	Value      *runtime.RemoteObject `json:"value"`      // Value object.
}

DataEntry data entry.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-DataEntry

type DatabaseWithObjectStores

type DatabaseWithObjectStores struct {
	Name         string         `json:"name"`         // Database name.
	Version      float64        `json:"version"`      // Database version (type is not 'integer', as the standard requires the version number to be 'unsigned long long')
	ObjectStores []*ObjectStore `json:"objectStores"` // Object stores in this database.
}

DatabaseWithObjectStores database with an array of object stores.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-DatabaseWithObjectStores

type DeleteDatabaseParams

type DeleteDatabaseParams struct {
	SecurityOrigin string          `json:"securityOrigin,omitempty,omitzero"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey     string          `json:"storageKey,omitempty,omitzero"`     // Storage key.
	StorageBucket  *storage.Bucket `json:"storageBucket,omitempty,omitzero"`  // Storage bucket. If not specified, it uses the default bucket.
	DatabaseName   string          `json:"databaseName"`                      // Database name.
}

DeleteDatabaseParams are the parameters of the command IndexedDB.deleteDatabase.

type DeleteObjectStoreEntriesParams

type DeleteObjectStoreEntriesParams struct {
	SecurityOrigin  string          `json:"securityOrigin,omitempty,omitzero"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey      string          `json:"storageKey,omitempty,omitzero"`     // Storage key.
	StorageBucket   *storage.Bucket `json:"storageBucket,omitempty,omitzero"`  // Storage bucket. If not specified, it uses the default bucket.
	DatabaseName    string          `json:"databaseName"`
	ObjectStoreName string          `json:"objectStoreName"`
	KeyRange        *KeyRange       `json:"keyRange"` // Range of entry keys to delete
}

DeleteObjectStoreEntriesParams are the parameters of the command IndexedDB.deleteObjectStoreEntries.

type GetMetadataParams

type GetMetadataParams struct {
	SecurityOrigin  string          `json:"securityOrigin,omitempty,omitzero"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey      string          `json:"storageKey,omitempty,omitzero"`     // Storage key.
	StorageBucket   *storage.Bucket `json:"storageBucket,omitempty,omitzero"`  // Storage bucket. If not specified, it uses the default bucket.
	DatabaseName    string          `json:"databaseName"`                      // Database name.
	ObjectStoreName string          `json:"objectStoreName"`                   // Object store name.
}

GetMetadataParams are the parameters of the command IndexedDB.getMetadata.

type GetMetadataResult added in v0.157.3

type GetMetadataResult struct {
	EntriesCount      float64 `json:"entriesCount,omitempty,omitzero"`      // the entries count
	KeyGeneratorValue float64 `json:"keyGeneratorValue,omitempty,omitzero"` // the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.
}

GetMetadataResult is the result of the command IndexedDB.getMetadata.

type Key

type Key struct {
	Type   KeyType  `json:"type"`                      // Key type.
	Number *float64 `json:"number,omitempty,omitzero"` // Number value.
	String string   `json:"string,omitempty,omitzero"` // String value.
	Date   *float64 `json:"date,omitempty,omitzero"`   // Date value.
	Array  []*Key   `json:"array,omitempty,omitzero"`  // Array value.
}

Key Key.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-Key

type KeyPath

type KeyPath struct {
	Type   KeyPathType `json:"type"`                      // Key path type.
	String string      `json:"string,omitempty,omitzero"` // String value.
	Array  []string    `json:"array,omitempty,omitzero"`  // Array value.
}

KeyPath key path.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-KeyPath

type KeyPathType added in v0.157.1

type KeyPathType string

KeyPathType key path type.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-KeyPath

const (
	KeyPathTypeNull   KeyPathType = "null"
	KeyPathTypeString KeyPathType = "string"
	KeyPathTypeArray  KeyPathType = "array"
)

KeyPathType values.

func (KeyPathType) String added in v0.157.1

func (t KeyPathType) String() string

String returns the KeyPathType as string value.

type KeyRange

type KeyRange struct {
	Lower     *Key `json:"lower,omitempty,omitzero"` // Lower bound.
	Upper     *Key `json:"upper,omitempty,omitzero"` // Upper bound.
	LowerOpen bool `json:"lowerOpen"`                // If true lower bound is open.
	UpperOpen bool `json:"upperOpen"`                // If true upper bound is open.
}

KeyRange key range.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-KeyRange

type KeyType added in v0.157.1

type KeyType string

KeyType key type.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-Key

const (
	KeyTypeNumber KeyType = "number"
	KeyTypeString KeyType = "string"
	KeyTypeDate   KeyType = "date"
	KeyTypeArray  KeyType = "array"
)

KeyType values.

func (KeyType) String added in v0.157.1

func (t KeyType) String() string

String returns the KeyType as string value.

type ObjectStore

type ObjectStore struct {
	Name          string              `json:"name"`          // Object store name.
	KeyPath       *KeyPath            `json:"keyPath"`       // Object store key path.
	AutoIncrement bool                `json:"autoIncrement"` // If true, object store has auto increment flag set.
	Indexes       []*ObjectStoreIndex `json:"indexes"`       // Indexes in this object store.
}

ObjectStore object store.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-ObjectStore

type ObjectStoreIndex

type ObjectStoreIndex struct {
	Name       string   `json:"name"`       // Index name.
	KeyPath    *KeyPath `json:"keyPath"`    // Index key path.
	Unique     bool     `json:"unique"`     // If true, index is unique.
	MultiEntry bool     `json:"multiEntry"` // If true, index allows multiple entries for a key.
}

ObjectStoreIndex object store index.

See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-ObjectStoreIndex

type RequestDataParams

type RequestDataParams struct {
	SecurityOrigin  string          `json:"securityOrigin,omitempty,omitzero"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey      string          `json:"storageKey,omitempty,omitzero"`     // Storage key.
	StorageBucket   *storage.Bucket `json:"storageBucket,omitempty,omitzero"`  // Storage bucket. If not specified, it uses the default bucket.
	DatabaseName    string          `json:"databaseName"`                      // Database name.
	ObjectStoreName string          `json:"objectStoreName"`                   // Object store name.
	IndexName       string          `json:"indexName,omitempty,omitzero"`      // Index name. If not specified, it performs an object store data request.
	SkipCount       int64           `json:"skipCount"`                         // Number of records to skip.
	PageSize        int64           `json:"pageSize"`                          // Number of records to fetch.
	KeyRange        *KeyRange       `json:"keyRange,omitempty,omitzero"`       // Key range.
}

RequestDataParams are the parameters of the command IndexedDB.requestData.

type RequestDataResult added in v0.157.3

type RequestDataResult struct {
	ObjectStoreDataEntries []*DataEntry `json:"objectStoreDataEntries,omitempty,omitzero"` // Array of object store data entries.
	HasMore                bool         `json:"hasMore"`                                   // If true, there are more entries to fetch in the given range.
}

RequestDataResult is the result of the command IndexedDB.requestData.

type RequestDatabaseNamesParams

type RequestDatabaseNamesParams struct {
	SecurityOrigin string          `json:"securityOrigin,omitempty,omitzero"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey     string          `json:"storageKey,omitempty,omitzero"`     // Storage key.
	StorageBucket  *storage.Bucket `json:"storageBucket,omitempty,omitzero"`  // Storage bucket. If not specified, it uses the default bucket.
}

RequestDatabaseNamesParams are the parameters of the command IndexedDB.requestDatabaseNames.

type RequestDatabaseNamesResult added in v0.157.3

type RequestDatabaseNamesResult struct {
	DatabaseNames []string `json:"databaseNames,omitempty,omitzero"` // Database names for origin.
}

RequestDatabaseNamesResult is the result of the command IndexedDB.requestDatabaseNames.

type RequestDatabaseParams

type RequestDatabaseParams struct {
	SecurityOrigin string          `json:"securityOrigin,omitempty,omitzero"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey     string          `json:"storageKey,omitempty,omitzero"`     // Storage key.
	StorageBucket  *storage.Bucket `json:"storageBucket,omitempty,omitzero"`  // Storage bucket. If not specified, it uses the default bucket.
	DatabaseName   string          `json:"databaseName"`                      // Database name.
}

RequestDatabaseParams are the parameters of the command IndexedDB.requestDatabase.

type RequestDatabaseResult added in v0.157.3

type RequestDatabaseResult struct {
	DatabaseWithObjectStores *DatabaseWithObjectStores `json:"databaseWithObjectStores,omitempty,omitzero"` // Database with an array of object stores.
}

RequestDatabaseResult is the result of the command IndexedDB.requestDatabase.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL