Documentation
¶
Overview ¶
Package indexeddb implements the IndexedDB domain.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type ClearObjectStoreArgs
- type DataEntry
- type DatabaseWithObjectStores
- type DeleteDatabaseArgs
- type Key
- type KeyPath
- type KeyRange
- type ObjectStore
- type ObjectStoreIndex
- type RequestDataArgs
- type RequestDataReply
- type RequestDatabaseArgs
- type RequestDatabaseNamesArgs
- type RequestDatabaseNamesReply
- type RequestDatabaseReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClearObjectStoreArgs ¶
type ClearObjectStoreArgs struct {
SecurityOrigin string `json:"securityOrigin"` // Security origin.
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(securityOrigin string, databaseName string, objectStoreName string) *ClearObjectStoreArgs
NewClearObjectStoreArgs initializes ClearObjectStoreArgs with the required arguments.
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 int `json:"version"` // Database version.
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"` // Security origin.
DatabaseName string `json:"databaseName"` // Database name.
}
DeleteDatabaseArgs represents the arguments for DeleteDatabase in the IndexedDB domain.
func NewDeleteDatabaseArgs ¶
func NewDeleteDatabaseArgs(securityOrigin string, databaseName string) *DeleteDatabaseArgs
NewDeleteDatabaseArgs initializes DeleteDatabaseArgs with the required arguments.
type Key ¶
type Key struct {
Type string `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.
type KeyPath ¶
type KeyPath struct {
Type string `json:"type"` // Key path 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"` // 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 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(securityOrigin string, 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.
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"` // Security origin.
DatabaseName string `json:"databaseName"` // Database name.
}
RequestDatabaseArgs represents the arguments for RequestDatabase in the IndexedDB domain.
func NewRequestDatabaseArgs ¶
func NewRequestDatabaseArgs(securityOrigin string, databaseName string) *RequestDatabaseArgs
NewRequestDatabaseArgs initializes RequestDatabaseArgs with the required arguments.
type RequestDatabaseNamesArgs ¶
type RequestDatabaseNamesArgs struct {
SecurityOrigin string `json:"securityOrigin"` // Security origin.
}
RequestDatabaseNamesArgs represents the arguments for RequestDatabaseNames in the IndexedDB domain.
func NewRequestDatabaseNamesArgs ¶
func NewRequestDatabaseNamesArgs(securityOrigin string) *RequestDatabaseNamesArgs
NewRequestDatabaseNamesArgs initializes RequestDatabaseNamesArgs with the required arguments.
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.