indexeddb

package
v0.0.0-...-076f285 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClearObjectStoreCommand

type ClearObjectStoreCommand struct {
	DestinationTargetID string

	SecurityOrigin  string `json:"securityOrigin"`  // Security origin.
	DatabaseName    string `json:"databaseName"`    // Database name.
	ObjectStoreName string `json:"objectStoreName"` // Object store name.
	// contains filtered or unexported fields
}

func (*ClearObjectStoreCommand) Initalize

func (c *ClearObjectStoreCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*ClearObjectStoreCommand) Respond

func (*ClearObjectStoreCommand) RespondWithError

func (c *ClearObjectStoreCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type ClearObjectStoreCommandFn

type ClearObjectStoreCommandFn struct {
	// contains filtered or unexported fields
}

func (*ClearObjectStoreCommandFn) Load

func (*ClearObjectStoreCommandFn) Store

type ClearObjectStoreReturn

type ClearObjectStoreReturn struct {
}

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

type DatabaseWithObjectStores

type DatabaseWithObjectStores struct {
	Name         string        `json:"name"`         // Database name.
	Version      int64         `json:"version"`      // Database version.
	ObjectStores []ObjectStore `json:"objectStores"` // Object stores in this database.
}

type DeleteDatabaseCommand

type DeleteDatabaseCommand struct {
	DestinationTargetID string

	SecurityOrigin string `json:"securityOrigin"` // Security origin.
	DatabaseName   string `json:"databaseName"`   // Database name.
	// contains filtered or unexported fields
}

func (*DeleteDatabaseCommand) Initalize

func (c *DeleteDatabaseCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DeleteDatabaseCommand) Respond

func (*DeleteDatabaseCommand) RespondWithError

func (c *DeleteDatabaseCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DeleteDatabaseCommandFn

type DeleteDatabaseCommandFn struct {
	// contains filtered or unexported fields
}

func (*DeleteDatabaseCommandFn) Load

func (*DeleteDatabaseCommandFn) Store

type DeleteDatabaseReturn

type DeleteDatabaseReturn struct {
}

type DisableCommand

type DisableCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*DisableCommand) Initalize

func (c *DisableCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DisableCommand) Respond

func (c *DisableCommand) Respond()

func (*DisableCommand) RespondWithError

func (c *DisableCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DisableCommandFn

type DisableCommandFn struct {
	// contains filtered or unexported fields
}

func (*DisableCommandFn) Load

func (a *DisableCommandFn) Load() func(DisableCommand)

func (*DisableCommandFn) Store

func (a *DisableCommandFn) Store(fn func(DisableCommand))

type DisableReturn

type DisableReturn struct {
}

type EnableCommand

type EnableCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*EnableCommand) Initalize

func (c *EnableCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*EnableCommand) Respond

func (c *EnableCommand) Respond()

func (*EnableCommand) RespondWithError

func (c *EnableCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type EnableCommandFn

type EnableCommandFn struct {
	// contains filtered or unexported fields
}

func (*EnableCommandFn) Load

func (a *EnableCommandFn) Load() func(EnableCommand)

func (*EnableCommandFn) Store

func (a *EnableCommandFn) Store(fn func(EnableCommand))

type EnableReturn

type EnableReturn struct {
}

type IndexedDBAgent

type IndexedDBAgent struct {
	// contains filtered or unexported fields
}

func NewAgent

func NewAgent(conn *shared.Connection) *IndexedDBAgent

func (*IndexedDBAgent) Name

func (agent *IndexedDBAgent) Name() string

func (*IndexedDBAgent) ProcessCommand

func (agent *IndexedDBAgent) ProcessCommand(id int64, targetId string, funcName string, data *json.RawMessage)

func (*IndexedDBAgent) SetClearObjectStoreHandler

func (agent *IndexedDBAgent) SetClearObjectStoreHandler(handler func(ClearObjectStoreCommand))

func (*IndexedDBAgent) SetDeleteDatabaseHandler

func (agent *IndexedDBAgent) SetDeleteDatabaseHandler(handler func(DeleteDatabaseCommand))

func (*IndexedDBAgent) SetDisableHandler

func (agent *IndexedDBAgent) SetDisableHandler(handler func(DisableCommand))

func (*IndexedDBAgent) SetEnableHandler

func (agent *IndexedDBAgent) SetEnableHandler(handler func(EnableCommand))

Commands Sent From Frontend

func (*IndexedDBAgent) SetRequestDataHandler

func (agent *IndexedDBAgent) SetRequestDataHandler(handler func(RequestDataCommand))

func (*IndexedDBAgent) SetRequestDatabaseHandler

func (agent *IndexedDBAgent) SetRequestDatabaseHandler(handler func(RequestDatabaseCommand))

func (*IndexedDBAgent) SetRequestDatabaseNamesHandler

func (agent *IndexedDBAgent) SetRequestDatabaseNamesHandler(handler func(RequestDatabaseNamesCommand))

type Key

type Key struct {
	Type   KeyTypeEnum `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.
}

type KeyPath

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

type KeyPathTypeEnum

type KeyPathTypeEnum string
const (
	KeyPathTypeNull   KeyPathTypeEnum = "null"
	KeyPathTypeString KeyPathTypeEnum = "string"
	KeyPathTypeArray  KeyPathTypeEnum = "array"
)

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

type KeyTypeEnum

type KeyTypeEnum string
const (
	KeyTypeNumber KeyTypeEnum = "number"
	KeyTypeString KeyTypeEnum = "string"
	KeyTypeDate   KeyTypeEnum = "date"
	KeyTypeArray  KeyTypeEnum = "array"
)

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

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

type RequestDataCommand

type RequestDataCommand struct {
	DestinationTargetID string

	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.
	// contains filtered or unexported fields
}

func (*RequestDataCommand) Initalize

func (c *RequestDataCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*RequestDataCommand) Respond

func (c *RequestDataCommand) Respond(r *RequestDataReturn)

func (*RequestDataCommand) RespondWithError

func (c *RequestDataCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type RequestDataCommandFn

type RequestDataCommandFn struct {
	// contains filtered or unexported fields
}

func (*RequestDataCommandFn) Load

func (a *RequestDataCommandFn) Load() func(RequestDataCommand)

func (*RequestDataCommandFn) Store

func (a *RequestDataCommandFn) Store(fn func(RequestDataCommand))

type RequestDataReturn

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

type RequestDatabaseCommand

type RequestDatabaseCommand struct {
	DestinationTargetID string

	SecurityOrigin string `json:"securityOrigin"` // Security origin.
	DatabaseName   string `json:"databaseName"`   // Database name.
	// contains filtered or unexported fields
}

func (*RequestDatabaseCommand) Initalize

func (c *RequestDatabaseCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*RequestDatabaseCommand) Respond

func (*RequestDatabaseCommand) RespondWithError

func (c *RequestDatabaseCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type RequestDatabaseCommandFn

type RequestDatabaseCommandFn struct {
	// contains filtered or unexported fields
}

func (*RequestDatabaseCommandFn) Load

func (*RequestDatabaseCommandFn) Store

type RequestDatabaseNamesCommand

type RequestDatabaseNamesCommand struct {
	DestinationTargetID string

	SecurityOrigin string `json:"securityOrigin"` // Security origin.
	// contains filtered or unexported fields
}

func (*RequestDatabaseNamesCommand) Initalize

func (c *RequestDatabaseNamesCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*RequestDatabaseNamesCommand) Respond

func (*RequestDatabaseNamesCommand) RespondWithError

func (c *RequestDatabaseNamesCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type RequestDatabaseNamesCommandFn

type RequestDatabaseNamesCommandFn struct {
	// contains filtered or unexported fields
}

func (*RequestDatabaseNamesCommandFn) Load

func (*RequestDatabaseNamesCommandFn) Store

type RequestDatabaseNamesReturn

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

type RequestDatabaseReturn

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

Jump to

Keyboard shortcuts

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