indexeddb

package
v0.0.0-...-fe04f09 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 9 Imported by: 4

Documentation

Overview

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

Generated by the cdproto-gen 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

This section is empty.

Functions

This section is empty.

Types

type ClearObjectStoreParams

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

ClearObjectStoreParams clears all entries from an object store.

func ClearObjectStore

func ClearObjectStore(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:

databaseName - Database name.
objectStoreName - Object store name.

func (*ClearObjectStoreParams) Do

func (p *ClearObjectStoreParams) Do(ctx context.Context) (err error)

Do executes IndexedDB.clearObjectStore against the provided context.

func (ClearObjectStoreParams) MarshalEasyJSON

func (v ClearObjectStoreParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ClearObjectStoreParams) MarshalJSON

func (v ClearObjectStoreParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ClearObjectStoreParams) UnmarshalEasyJSON

func (v *ClearObjectStoreParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ClearObjectStoreParams) UnmarshalJSON

func (v *ClearObjectStoreParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (ClearObjectStoreParams) WithSecurityOrigin

func (p ClearObjectStoreParams) WithSecurityOrigin(securityOrigin string) *ClearObjectStoreParams

WithSecurityOrigin at least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (ClearObjectStoreParams) WithStorageBucket

func (p ClearObjectStoreParams) WithStorageBucket(storageBucket *storage.Bucket) *ClearObjectStoreParams

WithStorageBucket storage bucket. If not specified, it uses the default bucket.

func (ClearObjectStoreParams) WithStorageKey

func (p ClearObjectStoreParams) WithStorageKey(storageKey string) *ClearObjectStoreParams

WithStorageKey storage key.

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

func (DataEntry) MarshalEasyJSON

func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DataEntry) MarshalJSON

func (v DataEntry) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DataEntry) UnmarshalEasyJSON

func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DataEntry) UnmarshalJSON

func (v *DataEntry) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

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

func (DatabaseWithObjectStores) MarshalEasyJSON

func (v DatabaseWithObjectStores) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DatabaseWithObjectStores) MarshalJSON

func (v DatabaseWithObjectStores) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DatabaseWithObjectStores) UnmarshalEasyJSON

func (v *DatabaseWithObjectStores) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DatabaseWithObjectStores) UnmarshalJSON

func (v *DatabaseWithObjectStores) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DeleteDatabaseParams

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

DeleteDatabaseParams deletes a database.

func DeleteDatabase

func DeleteDatabase(databaseName string) *DeleteDatabaseParams

DeleteDatabase deletes a database.

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

parameters:

databaseName - Database name.

func (*DeleteDatabaseParams) Do

func (p *DeleteDatabaseParams) Do(ctx context.Context) (err error)

Do executes IndexedDB.deleteDatabase against the provided context.

func (DeleteDatabaseParams) MarshalEasyJSON

func (v DeleteDatabaseParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DeleteDatabaseParams) MarshalJSON

func (v DeleteDatabaseParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DeleteDatabaseParams) UnmarshalEasyJSON

func (v *DeleteDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DeleteDatabaseParams) UnmarshalJSON

func (v *DeleteDatabaseParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DeleteDatabaseParams) WithSecurityOrigin

func (p DeleteDatabaseParams) WithSecurityOrigin(securityOrigin string) *DeleteDatabaseParams

WithSecurityOrigin at least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (DeleteDatabaseParams) WithStorageBucket

func (p DeleteDatabaseParams) WithStorageBucket(storageBucket *storage.Bucket) *DeleteDatabaseParams

WithStorageBucket storage bucket. If not specified, it uses the default bucket.

func (DeleteDatabaseParams) WithStorageKey

func (p DeleteDatabaseParams) WithStorageKey(storageKey string) *DeleteDatabaseParams

WithStorageKey storage key.

type DeleteObjectStoreEntriesParams

type DeleteObjectStoreEntriesParams struct {
	SecurityOrigin  string          `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey      string          `json:"storageKey,omitempty"`     // Storage key.
	StorageBucket   *storage.Bucket `json:"storageBucket,omitempty"`  // 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 delete a range of entries from an object store.

func DeleteObjectStoreEntries

func DeleteObjectStoreEntries(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:

databaseName
objectStoreName
keyRange - Range of entry keys to delete

func (*DeleteObjectStoreEntriesParams) Do

Do executes IndexedDB.deleteObjectStoreEntries against the provided context.

func (DeleteObjectStoreEntriesParams) MarshalEasyJSON

func (v DeleteObjectStoreEntriesParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DeleteObjectStoreEntriesParams) MarshalJSON

func (v DeleteObjectStoreEntriesParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DeleteObjectStoreEntriesParams) UnmarshalEasyJSON

func (v *DeleteObjectStoreEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DeleteObjectStoreEntriesParams) UnmarshalJSON

func (v *DeleteObjectStoreEntriesParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (DeleteObjectStoreEntriesParams) WithSecurityOrigin

func (p DeleteObjectStoreEntriesParams) WithSecurityOrigin(securityOrigin string) *DeleteObjectStoreEntriesParams

WithSecurityOrigin at least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (DeleteObjectStoreEntriesParams) WithStorageBucket

func (p DeleteObjectStoreEntriesParams) WithStorageBucket(storageBucket *storage.Bucket) *DeleteObjectStoreEntriesParams

WithStorageBucket storage bucket. If not specified, it uses the default bucket.

func (DeleteObjectStoreEntriesParams) WithStorageKey

WithStorageKey storage key.

type DisableParams

type DisableParams struct{}

DisableParams disables events from backend.

func Disable

func Disable() *DisableParams

Disable disables events from backend.

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

func (*DisableParams) Do

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes IndexedDB.disable against the provided context.

func (DisableParams) MarshalEasyJSON

func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON

func (v DisableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON

func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON

func (v *DisableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams

type EnableParams struct{}

EnableParams enables events from backend.

func Enable

func Enable() *EnableParams

Enable enables events from backend.

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

func (*EnableParams) Do

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes IndexedDB.enable against the provided context.

func (EnableParams) MarshalEasyJSON

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetMetadataParams

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

GetMetadataParams gets metadata of an object store.

func GetMetadata

func GetMetadata(databaseName string, objectStoreName string) *GetMetadataParams

GetMetadata gets metadata of an object store.

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

parameters:

databaseName - Database name.
objectStoreName - Object store name.

func (*GetMetadataParams) Do

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 (GetMetadataParams) MarshalEasyJSON

func (v GetMetadataParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetMetadataParams) MarshalJSON

func (v GetMetadataParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetMetadataParams) UnmarshalEasyJSON

func (v *GetMetadataParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetMetadataParams) UnmarshalJSON

func (v *GetMetadataParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (GetMetadataParams) WithSecurityOrigin

func (p GetMetadataParams) WithSecurityOrigin(securityOrigin string) *GetMetadataParams

WithSecurityOrigin at least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (GetMetadataParams) WithStorageBucket

func (p GetMetadataParams) WithStorageBucket(storageBucket *storage.Bucket) *GetMetadataParams

WithStorageBucket storage bucket. If not specified, it uses the default bucket.

func (GetMetadataParams) WithStorageKey

func (p GetMetadataParams) WithStorageKey(storageKey string) *GetMetadataParams

WithStorageKey storage key.

type GetMetadataReturns

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 (GetMetadataReturns) MarshalEasyJSON

func (v GetMetadataReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetMetadataReturns) MarshalJSON

func (v GetMetadataReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetMetadataReturns) UnmarshalEasyJSON

func (v *GetMetadataReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetMetadataReturns) UnmarshalJSON

func (v *GetMetadataReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Key

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

func (Key) MarshalEasyJSON

func (v Key) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Key) MarshalJSON

func (v Key) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Key) UnmarshalEasyJSON

func (v *Key) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Key) UnmarshalJSON

func (v *Key) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type KeyPath

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

func (KeyPath) MarshalEasyJSON

func (v KeyPath) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (KeyPath) MarshalJSON

func (v KeyPath) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*KeyPath) UnmarshalEasyJSON

func (v *KeyPath) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*KeyPath) UnmarshalJSON

func (v *KeyPath) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type KeyPathType

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) MarshalEasyJSON

func (t KeyPathType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (KeyPathType) MarshalJSON

func (t KeyPathType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (KeyPathType) String

func (t KeyPathType) String() string

String returns the KeyPathType as string value.

func (*KeyPathType) UnmarshalEasyJSON

func (t *KeyPathType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*KeyPathType) UnmarshalJSON

func (t *KeyPathType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type KeyRange

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

func (KeyRange) MarshalEasyJSON

func (v KeyRange) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (KeyRange) MarshalJSON

func (v KeyRange) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*KeyRange) UnmarshalEasyJSON

func (v *KeyRange) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*KeyRange) UnmarshalJSON

func (v *KeyRange) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type KeyType

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) MarshalEasyJSON

func (t KeyType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (KeyType) MarshalJSON

func (t KeyType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (KeyType) String

func (t KeyType) String() string

String returns the KeyType as string value.

func (*KeyType) UnmarshalEasyJSON

func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*KeyType) UnmarshalJSON

func (t *KeyType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

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

func (ObjectStore) MarshalEasyJSON

func (v ObjectStore) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ObjectStore) MarshalJSON

func (v ObjectStore) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ObjectStore) UnmarshalEasyJSON

func (v *ObjectStore) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ObjectStore) UnmarshalJSON

func (v *ObjectStore) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

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

func (ObjectStoreIndex) MarshalEasyJSON

func (v ObjectStoreIndex) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ObjectStoreIndex) MarshalJSON

func (v ObjectStoreIndex) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ObjectStoreIndex) UnmarshalEasyJSON

func (v *ObjectStoreIndex) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ObjectStoreIndex) UnmarshalJSON

func (v *ObjectStoreIndex) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestDataParams

type RequestDataParams struct {
	SecurityOrigin  string          `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	StorageKey      string          `json:"storageKey,omitempty"`     // Storage key.
	StorageBucket   *storage.Bucket `json:"storageBucket,omitempty"`  // 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"`                // 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

func RequestData(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:

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 (*RequestDataParams) Do

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 (RequestDataParams) MarshalEasyJSON

func (v RequestDataParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestDataParams) MarshalJSON

func (v RequestDataParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestDataParams) UnmarshalEasyJSON

func (v *RequestDataParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestDataParams) UnmarshalJSON

func (v *RequestDataParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (RequestDataParams) WithKeyRange

func (p RequestDataParams) WithKeyRange(keyRange *KeyRange) *RequestDataParams

WithKeyRange key range.

func (RequestDataParams) WithSecurityOrigin

func (p RequestDataParams) WithSecurityOrigin(securityOrigin string) *RequestDataParams

WithSecurityOrigin at least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (RequestDataParams) WithStorageBucket

func (p RequestDataParams) WithStorageBucket(storageBucket *storage.Bucket) *RequestDataParams

WithStorageBucket storage bucket. If not specified, it uses the default bucket.

func (RequestDataParams) WithStorageKey

func (p RequestDataParams) WithStorageKey(storageKey string) *RequestDataParams

WithStorageKey storage key.

type RequestDataReturns

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 (RequestDataReturns) MarshalEasyJSON

func (v RequestDataReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestDataReturns) MarshalJSON

func (v RequestDataReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestDataReturns) UnmarshalEasyJSON

func (v *RequestDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestDataReturns) UnmarshalJSON

func (v *RequestDataReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestDatabaseNamesParams

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

RequestDatabaseNamesParams requests database names for given security origin.

func RequestDatabaseNames

func RequestDatabaseNames() *RequestDatabaseNamesParams

RequestDatabaseNames requests database names for given security origin.

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

parameters:

func (*RequestDatabaseNamesParams) Do

func (p *RequestDatabaseNamesParams) Do(ctx context.Context) (databaseNames []string, err error)

Do executes IndexedDB.requestDatabaseNames against the provided context.

returns:

databaseNames - Database names for origin.

func (RequestDatabaseNamesParams) MarshalEasyJSON

func (v RequestDatabaseNamesParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestDatabaseNamesParams) MarshalJSON

func (v RequestDatabaseNamesParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestDatabaseNamesParams) UnmarshalEasyJSON

func (v *RequestDatabaseNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestDatabaseNamesParams) UnmarshalJSON

func (v *RequestDatabaseNamesParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (RequestDatabaseNamesParams) WithSecurityOrigin

func (p RequestDatabaseNamesParams) WithSecurityOrigin(securityOrigin string) *RequestDatabaseNamesParams

WithSecurityOrigin at least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (RequestDatabaseNamesParams) WithStorageBucket

func (p RequestDatabaseNamesParams) WithStorageBucket(storageBucket *storage.Bucket) *RequestDatabaseNamesParams

WithStorageBucket storage bucket. If not specified, it uses the default bucket.

func (RequestDatabaseNamesParams) WithStorageKey

func (p RequestDatabaseNamesParams) WithStorageKey(storageKey string) *RequestDatabaseNamesParams

WithStorageKey storage key.

type RequestDatabaseNamesReturns

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

RequestDatabaseNamesReturns return values.

func (RequestDatabaseNamesReturns) MarshalEasyJSON

func (v RequestDatabaseNamesReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestDatabaseNamesReturns) MarshalJSON

func (v RequestDatabaseNamesReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestDatabaseNamesReturns) UnmarshalEasyJSON

func (v *RequestDatabaseNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestDatabaseNamesReturns) UnmarshalJSON

func (v *RequestDatabaseNamesReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestDatabaseParams

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

RequestDatabaseParams requests database with given name in given frame.

func RequestDatabase

func RequestDatabase(databaseName string) *RequestDatabaseParams

RequestDatabase requests database with given name in given frame.

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

parameters:

databaseName - Database name.

func (*RequestDatabaseParams) Do

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 (RequestDatabaseParams) MarshalEasyJSON

func (v RequestDatabaseParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestDatabaseParams) MarshalJSON

func (v RequestDatabaseParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestDatabaseParams) UnmarshalEasyJSON

func (v *RequestDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestDatabaseParams) UnmarshalJSON

func (v *RequestDatabaseParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (RequestDatabaseParams) WithSecurityOrigin

func (p RequestDatabaseParams) WithSecurityOrigin(securityOrigin string) *RequestDatabaseParams

WithSecurityOrigin at least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (RequestDatabaseParams) WithStorageBucket

func (p RequestDatabaseParams) WithStorageBucket(storageBucket *storage.Bucket) *RequestDatabaseParams

WithStorageBucket storage bucket. If not specified, it uses the default bucket.

func (RequestDatabaseParams) WithStorageKey

func (p RequestDatabaseParams) WithStorageKey(storageKey string) *RequestDatabaseParams

WithStorageKey storage key.

type RequestDatabaseReturns

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

RequestDatabaseReturns return values.

func (RequestDatabaseReturns) MarshalEasyJSON

func (v RequestDatabaseReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestDatabaseReturns) MarshalJSON

func (v RequestDatabaseReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestDatabaseReturns) UnmarshalEasyJSON

func (v *RequestDatabaseReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestDatabaseReturns) UnmarshalJSON

func (v *RequestDatabaseReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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