indexeddb

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MIT Imports: 4 Imported by: 0

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"`  // 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      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"` // 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 DeleteObjectStoreEntriesArgs added in v0.15.3

type DeleteObjectStoreEntriesArgs struct {
	SecurityOrigin  string   `json:"securityOrigin"`  // No description.
	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(securityOrigin string, databaseName string, objectStoreName string, keyRange KeyRange) *DeleteObjectStoreEntriesArgs

NewDeleteObjectStoreEntriesArgs initializes DeleteObjectStoreEntriesArgs with the required arguments.

type GetMetadataArgs added in v0.23.0

type GetMetadataArgs struct {
	SecurityOrigin  string `json:"securityOrigin"`  // Security origin.
	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(securityOrigin string, databaseName string, objectStoreName string) *GetMetadataArgs

NewGetMetadataArgs initializes GetMetadataArgs with the required arguments.

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"`     // 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.

Jump to

Keyboard shortcuts

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