indexeddb

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2024 License: MIT Imports: 5 Imported by: 9 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package indexeddb implements the IndexedDB domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the IndexedDB domain with the connection set to conn.

Types

type ClearObjectStoreArgs

type ClearObjectStoreArgs 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.
}

ClearObjectStoreArgs represents the arguments for ClearObjectStore in the IndexedDB domain.

func NewClearObjectStoreArgs

func NewClearObjectStoreArgs(databaseName string, objectStoreName string) *ClearObjectStoreArgs

NewClearObjectStoreArgs initializes ClearObjectStoreArgs with the required arguments.

func (*ClearObjectStoreArgs) SetSecurityOrigin added in v0.35.0

func (a *ClearObjectStoreArgs) SetSecurityOrigin(securityOrigin string) *ClearObjectStoreArgs

SetSecurityOrigin sets the SecurityOrigin optional argument. At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (*ClearObjectStoreArgs) SetStorageBucket added in v0.35.0

func (a *ClearObjectStoreArgs) SetStorageBucket(storageBucket storage.Bucket) *ClearObjectStoreArgs

SetStorageBucket sets the StorageBucket optional argument. Storage bucket. If not specified, it uses the default bucket.

func (*ClearObjectStoreArgs) SetStorageKey added in v0.35.0

func (a *ClearObjectStoreArgs) SetStorageKey(storageKey string) *ClearObjectStoreArgs

SetStorageKey sets the StorageKey optional argument. 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.

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.

type DeleteDatabaseArgs

type DeleteDatabaseArgs 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.
}

DeleteDatabaseArgs represents the arguments for DeleteDatabase in the IndexedDB domain.

func NewDeleteDatabaseArgs

func NewDeleteDatabaseArgs(databaseName string) *DeleteDatabaseArgs

NewDeleteDatabaseArgs initializes DeleteDatabaseArgs with the required arguments.

func (*DeleteDatabaseArgs) SetSecurityOrigin added in v0.35.0

func (a *DeleteDatabaseArgs) SetSecurityOrigin(securityOrigin string) *DeleteDatabaseArgs

SetSecurityOrigin sets the SecurityOrigin optional argument. At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (*DeleteDatabaseArgs) SetStorageBucket added in v0.35.0

func (a *DeleteDatabaseArgs) SetStorageBucket(storageBucket storage.Bucket) *DeleteDatabaseArgs

SetStorageBucket sets the StorageBucket optional argument. Storage bucket. If not specified, it uses the default bucket.

func (*DeleteDatabaseArgs) SetStorageKey added in v0.35.0

func (a *DeleteDatabaseArgs) SetStorageKey(storageKey string) *DeleteDatabaseArgs

SetStorageKey sets the StorageKey optional argument. Storage key.

type DeleteObjectStoreEntriesArgs added in v0.15.3

type DeleteObjectStoreEntriesArgs 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"`             // No description.
	ObjectStoreName string          `json:"objectStoreName"`          // No description.
	KeyRange        KeyRange        `json:"keyRange"`                 // Range of entry keys to delete
}

DeleteObjectStoreEntriesArgs represents the arguments for DeleteObjectStoreEntries in the IndexedDB domain.

func NewDeleteObjectStoreEntriesArgs added in v0.15.3

func NewDeleteObjectStoreEntriesArgs(databaseName string, objectStoreName string, keyRange KeyRange) *DeleteObjectStoreEntriesArgs

NewDeleteObjectStoreEntriesArgs initializes DeleteObjectStoreEntriesArgs with the required arguments.

func (*DeleteObjectStoreEntriesArgs) SetSecurityOrigin added in v0.35.0

func (a *DeleteObjectStoreEntriesArgs) SetSecurityOrigin(securityOrigin string) *DeleteObjectStoreEntriesArgs

SetSecurityOrigin sets the SecurityOrigin optional argument. At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (*DeleteObjectStoreEntriesArgs) SetStorageBucket added in v0.35.0

func (a *DeleteObjectStoreEntriesArgs) SetStorageBucket(storageBucket storage.Bucket) *DeleteObjectStoreEntriesArgs

SetStorageBucket sets the StorageBucket optional argument. Storage bucket. If not specified, it uses the default bucket.

func (*DeleteObjectStoreEntriesArgs) SetStorageKey added in v0.35.0

SetStorageKey sets the StorageKey optional argument. Storage key.

type GetMetadataArgs added in v0.23.0

type GetMetadataArgs 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.
}

GetMetadataArgs represents the arguments for GetMetadata in the IndexedDB domain.

func NewGetMetadataArgs added in v0.23.0

func NewGetMetadataArgs(databaseName string, objectStoreName string) *GetMetadataArgs

NewGetMetadataArgs initializes GetMetadataArgs with the required arguments.

func (*GetMetadataArgs) SetSecurityOrigin added in v0.35.0

func (a *GetMetadataArgs) SetSecurityOrigin(securityOrigin string) *GetMetadataArgs

SetSecurityOrigin sets the SecurityOrigin optional argument. At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (*GetMetadataArgs) SetStorageBucket added in v0.35.0

func (a *GetMetadataArgs) SetStorageBucket(storageBucket storage.Bucket) *GetMetadataArgs

SetStorageBucket sets the StorageBucket optional argument. Storage bucket. If not specified, it uses the default bucket.

func (*GetMetadataArgs) SetStorageKey added in v0.35.0

func (a *GetMetadataArgs) SetStorageKey(storageKey string) *GetMetadataArgs

SetStorageKey sets the StorageKey optional argument. Storage key.

type GetMetadataReply added in v0.23.0

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

GetMetadataReply represents the return values for GetMetadata in the IndexedDB domain.

type Key

type Key struct {
	// Type Key type.
	//
	// Values: "number", "string", "date", "array".
	Type   string   `json:"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.

type KeyPath

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

KeyPath Key path.

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.

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.

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.

type RequestDataArgs

type RequestDataArgs 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       int             `json:"skipCount"`                // Number of records to skip.
	PageSize        int             `json:"pageSize"`                 // Number of records to fetch.
	KeyRange        *KeyRange       `json:"keyRange,omitempty"`       // Key range.
}

RequestDataArgs represents the arguments for RequestData in the IndexedDB domain.

func NewRequestDataArgs

func NewRequestDataArgs(databaseName string, objectStoreName string, indexName string, skipCount int, pageSize int) *RequestDataArgs

NewRequestDataArgs initializes RequestDataArgs with the required arguments.

func (*RequestDataArgs) SetKeyRange

func (a *RequestDataArgs) SetKeyRange(keyRange KeyRange) *RequestDataArgs

SetKeyRange sets the KeyRange optional argument. Key range.

func (*RequestDataArgs) SetSecurityOrigin added in v0.35.0

func (a *RequestDataArgs) SetSecurityOrigin(securityOrigin string) *RequestDataArgs

SetSecurityOrigin sets the SecurityOrigin optional argument. At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (*RequestDataArgs) SetStorageBucket added in v0.35.0

func (a *RequestDataArgs) SetStorageBucket(storageBucket storage.Bucket) *RequestDataArgs

SetStorageBucket sets the StorageBucket optional argument. Storage bucket. If not specified, it uses the default bucket.

func (*RequestDataArgs) SetStorageKey added in v0.35.0

func (a *RequestDataArgs) SetStorageKey(storageKey string) *RequestDataArgs

SetStorageKey sets the StorageKey optional argument. Storage key.

type RequestDataReply

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

RequestDataReply represents the return values for RequestData in the IndexedDB domain.

type RequestDatabaseArgs

type RequestDatabaseArgs 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.
}

RequestDatabaseArgs represents the arguments for RequestDatabase in the IndexedDB domain.

func NewRequestDatabaseArgs

func NewRequestDatabaseArgs(databaseName string) *RequestDatabaseArgs

NewRequestDatabaseArgs initializes RequestDatabaseArgs with the required arguments.

func (*RequestDatabaseArgs) SetSecurityOrigin added in v0.35.0

func (a *RequestDatabaseArgs) SetSecurityOrigin(securityOrigin string) *RequestDatabaseArgs

SetSecurityOrigin sets the SecurityOrigin optional argument. At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (*RequestDatabaseArgs) SetStorageBucket added in v0.35.0

func (a *RequestDatabaseArgs) SetStorageBucket(storageBucket storage.Bucket) *RequestDatabaseArgs

SetStorageBucket sets the StorageBucket optional argument. Storage bucket. If not specified, it uses the default bucket.

func (*RequestDatabaseArgs) SetStorageKey added in v0.35.0

func (a *RequestDatabaseArgs) SetStorageKey(storageKey string) *RequestDatabaseArgs

SetStorageKey sets the StorageKey optional argument. Storage key.

type RequestDatabaseNamesArgs

type RequestDatabaseNamesArgs 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.
}

RequestDatabaseNamesArgs represents the arguments for RequestDatabaseNames in the IndexedDB domain.

func NewRequestDatabaseNamesArgs

func NewRequestDatabaseNamesArgs() *RequestDatabaseNamesArgs

NewRequestDatabaseNamesArgs initializes RequestDatabaseNamesArgs with the required arguments.

func (*RequestDatabaseNamesArgs) SetSecurityOrigin added in v0.35.0

func (a *RequestDatabaseNamesArgs) SetSecurityOrigin(securityOrigin string) *RequestDatabaseNamesArgs

SetSecurityOrigin sets the SecurityOrigin optional argument. At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.

func (*RequestDatabaseNamesArgs) SetStorageBucket added in v0.35.0

func (a *RequestDatabaseNamesArgs) SetStorageBucket(storageBucket storage.Bucket) *RequestDatabaseNamesArgs

SetStorageBucket sets the StorageBucket optional argument. Storage bucket. If not specified, it uses the default bucket.

func (*RequestDatabaseNamesArgs) SetStorageKey added in v0.35.0

func (a *RequestDatabaseNamesArgs) SetStorageKey(storageKey string) *RequestDatabaseNamesArgs

SetStorageKey sets the StorageKey optional argument. Storage key.

type RequestDatabaseNamesReply

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

RequestDatabaseNamesReply represents the return values for RequestDatabaseNames in the IndexedDB domain.

type RequestDatabaseReply

type RequestDatabaseReply struct {
	DatabaseWithObjectStores DatabaseWithObjectStores `json:"databaseWithObjectStores"` // Database with an array of object stores.
}

RequestDatabaseReply represents the return values for RequestDatabase in the IndexedDB domain.

Jump to

Keyboard shortcuts

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