import "github.com/chromedp/cdproto/indexeddb"
Package indexeddb provides the Chrome DevTools Protocol commands, types, and events for the IndexedDB domain.
Generated by the cdproto-gen command.
easyjson.go indexeddb.go types.go
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.
type ClearObjectStoreParams struct { SecurityOrigin string `json:"securityOrigin"` // Security origin. DatabaseName string `json:"databaseName"` // Database name. ObjectStoreName string `json:"objectStoreName"` // Object store name. }
ClearObjectStoreParams clears all entries from an object store.
func ClearObjectStore(securityOrigin string, databaseName string, objectStoreName string) *ClearObjectStoreParams
ClearObjectStore clears all entries from an object store.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-clearObjectStore
parameters:
securityOrigin - Security origin. databaseName - Database name. objectStoreName - Object store name.
func (p *ClearObjectStoreParams) Do(ctx context.Context) (err error)
Do executes IndexedDB.clearObjectStore against the provided context.
func (v ClearObjectStoreParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ClearObjectStoreParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ClearObjectStoreParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ClearObjectStoreParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
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
func (v DatabaseWithObjectStores) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DatabaseWithObjectStores) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DatabaseWithObjectStores) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DatabaseWithObjectStores) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DeleteDatabaseParams struct { SecurityOrigin string `json:"securityOrigin"` // Security origin. DatabaseName string `json:"databaseName"` // Database name. }
DeleteDatabaseParams deletes a database.
func DeleteDatabase(securityOrigin string, databaseName string) *DeleteDatabaseParams
DeleteDatabase deletes a database.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteDatabase
parameters:
securityOrigin - Security origin. databaseName - Database name.
func (p *DeleteDatabaseParams) Do(ctx context.Context) (err error)
Do executes IndexedDB.deleteDatabase against the provided context.
func (v DeleteDatabaseParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DeleteDatabaseParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DeleteDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DeleteDatabaseParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DeleteObjectStoreEntriesParams struct { SecurityOrigin string `json:"securityOrigin"` DatabaseName string `json:"databaseName"` ObjectStoreName string `json:"objectStoreName"` KeyRange *KeyRange `json:"keyRange"` // Range of entry keys to delete }
DeleteObjectStoreEntriesParams delete a range of entries from an object store.
func DeleteObjectStoreEntries(securityOrigin string, databaseName string, objectStoreName string, keyRange *KeyRange) *DeleteObjectStoreEntriesParams
DeleteObjectStoreEntries delete a range of entries from an object store.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteObjectStoreEntries
parameters:
securityOrigin databaseName objectStoreName keyRange - Range of entry keys to delete
func (p *DeleteObjectStoreEntriesParams) Do(ctx context.Context) (err error)
Do executes IndexedDB.deleteObjectStoreEntries against the provided context.
func (v DeleteObjectStoreEntriesParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DeleteObjectStoreEntriesParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DeleteObjectStoreEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DeleteObjectStoreEntriesParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DisableParams struct{}
DisableParams disables events from backend.
func Disable() *DisableParams
Disable disables events from backend.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-disable
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes IndexedDB.disable against the provided context.
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams struct{}
EnableParams enables events from backend.
func Enable() *EnableParams
Enable enables events from backend.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-enable
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes IndexedDB.enable against the provided context.
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetMetadataParams struct { SecurityOrigin string `json:"securityOrigin"` // Security origin. DatabaseName string `json:"databaseName"` // Database name. ObjectStoreName string `json:"objectStoreName"` // Object store name. }
GetMetadataParams gets metadata of an object store.
func GetMetadata(securityOrigin string, databaseName string, objectStoreName string) *GetMetadataParams
GetMetadata gets metadata of an object store.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-getMetadata
parameters:
securityOrigin - Security origin. databaseName - Database name. objectStoreName - Object store name.
func (p *GetMetadataParams) Do(ctx context.Context) (entriesCount float64, keyGeneratorValue float64, err error)
Do executes IndexedDB.getMetadata against the provided context.
returns:
entriesCount - the entries count keyGeneratorValue - the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.
func (v GetMetadataParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetMetadataParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetMetadataParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetMetadataParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetMetadataReturns struct { EntriesCount float64 `json:"entriesCount,omitempty"` // the entries count KeyGeneratorValue float64 `json:"keyGeneratorValue,omitempty"` // the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true. }
GetMetadataReturns return values.
func (v GetMetadataReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetMetadataReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *GetMetadataReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetMetadataReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Key struct { Type KeyType `json:"type"` // Key type. Number float64 `json:"number,omitempty"` // Number value. String string `json:"string,omitempty"` // String value. Date float64 `json:"date,omitempty"` // Date value. Array []*Key `json:"array,omitempty"` // Array value. }
Key Key.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-Key
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
type KeyPath struct { Type KeyPathType `json:"type"` // Key path type. String string `json:"string,omitempty"` // String value. Array []string `json:"array,omitempty"` // Array value. }
KeyPath key path.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#type-KeyPath
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
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 (t KeyPathType) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (t KeyPathType) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (t KeyPathType) String() string
String returns the KeyPathType as string value.
func (t *KeyPathType) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *KeyPathType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type KeyRange struct { Lower *Key `json:"lower,omitempty"` // Lower bound. Upper *Key `json:"upper,omitempty"` // 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
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
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.
MarshalEasyJSON satisfies easyjson.Marshaler.
MarshalJSON satisfies json.Marshaler.
String returns the KeyType as string value.
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
UnmarshalJSON satisfies json.Unmarshaler.
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
func (v ObjectStore) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ObjectStore) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ObjectStore) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ObjectStore) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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
func (v ObjectStoreIndex) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ObjectStoreIndex) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ObjectStoreIndex) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ObjectStoreIndex) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RequestDataParams struct { SecurityOrigin string `json:"securityOrigin"` // Security origin. DatabaseName string `json:"databaseName"` // Database name. ObjectStoreName string `json:"objectStoreName"` // Object store name. IndexName string `json:"indexName"` // Index name, empty string for object store data requests. SkipCount int64 `json:"skipCount"` // Number of records to skip. PageSize int64 `json:"pageSize"` // Number of records to fetch. KeyRange *KeyRange `json:"keyRange,omitempty"` // Key range. }
RequestDataParams requests data from object store or index.
func RequestData(securityOrigin string, databaseName string, objectStoreName string, indexName string, skipCount int64, pageSize int64) *RequestDataParams
RequestData requests data from object store or index.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestData
parameters:
securityOrigin - Security origin. databaseName - Database name. objectStoreName - Object store name. indexName - Index name, empty string for object store data requests. skipCount - Number of records to skip. pageSize - Number of records to fetch.
func (p *RequestDataParams) Do(ctx context.Context) (objectStoreDataEntries []*DataEntry, hasMore bool, err error)
Do executes IndexedDB.requestData against the provided context.
returns:
objectStoreDataEntries - Array of object store data entries. hasMore - If true, there are more entries to fetch in the given range.
func (v RequestDataParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestDataParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *RequestDataParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestDataParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (p RequestDataParams) WithKeyRange(keyRange *KeyRange) *RequestDataParams
WithKeyRange key range.
type RequestDataReturns struct { ObjectStoreDataEntries []*DataEntry `json:"objectStoreDataEntries,omitempty"` // Array of object store data entries. HasMore bool `json:"hasMore,omitempty"` // If true, there are more entries to fetch in the given range. }
RequestDataReturns return values.
func (v RequestDataReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestDataReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *RequestDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestDataReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RequestDatabaseNamesParams struct { SecurityOrigin string `json:"securityOrigin"` // Security origin. }
RequestDatabaseNamesParams requests database names for given security origin.
func RequestDatabaseNames(securityOrigin string) *RequestDatabaseNamesParams
RequestDatabaseNames requests database names for given security origin.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabaseNames
parameters:
securityOrigin - Security origin.
Do executes IndexedDB.requestDatabaseNames against the provided context.
returns:
databaseNames - Database names for origin.
func (v RequestDatabaseNamesParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestDatabaseNamesParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *RequestDatabaseNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestDatabaseNamesParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RequestDatabaseNamesReturns struct { DatabaseNames []string `json:"databaseNames,omitempty"` // Database names for origin. }
RequestDatabaseNamesReturns return values.
func (v RequestDatabaseNamesReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestDatabaseNamesReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *RequestDatabaseNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestDatabaseNamesReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RequestDatabaseParams struct { SecurityOrigin string `json:"securityOrigin"` // Security origin. DatabaseName string `json:"databaseName"` // Database name. }
RequestDatabaseParams requests database with given name in given frame.
func RequestDatabase(securityOrigin string, databaseName string) *RequestDatabaseParams
RequestDatabase requests database with given name in given frame.
See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabase
parameters:
securityOrigin - Security origin. databaseName - Database name.
func (p *RequestDatabaseParams) Do(ctx context.Context) (databaseWithObjectStores *DatabaseWithObjectStores, err error)
Do executes IndexedDB.requestDatabase against the provided context.
returns:
databaseWithObjectStores - Database with an array of object stores.
func (v RequestDatabaseParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestDatabaseParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *RequestDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestDatabaseParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RequestDatabaseReturns struct { DatabaseWithObjectStores *DatabaseWithObjectStores `json:"databaseWithObjectStores,omitempty"` // Database with an array of object stores. }
RequestDatabaseReturns return values.
func (v RequestDatabaseReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v RequestDatabaseReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *RequestDatabaseReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *RequestDatabaseReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
Package indexeddb imports 8 packages (graph) and is imported by 3 packages. Updated 2021-01-07. Refresh now. Tools for package owners.