Documentation ¶
Index ¶
- type ClearObjectStoreCommand
- type ClearObjectStoreCommandFn
- type ClearObjectStoreReturn
- type DataEntry
- type DatabaseWithObjectStores
- type DeleteDatabaseCommand
- type DeleteDatabaseCommandFn
- type DeleteDatabaseReturn
- type DisableCommand
- type DisableCommandFn
- type DisableReturn
- type EnableCommand
- type EnableCommandFn
- type EnableReturn
- type IndexedDBAgent
- func (agent *IndexedDBAgent) Name() string
- func (agent *IndexedDBAgent) ProcessCommand(id int64, targetId string, funcName string, data *json.RawMessage)
- func (agent *IndexedDBAgent) SetClearObjectStoreHandler(handler func(ClearObjectStoreCommand))
- func (agent *IndexedDBAgent) SetDeleteDatabaseHandler(handler func(DeleteDatabaseCommand))
- func (agent *IndexedDBAgent) SetDisableHandler(handler func(DisableCommand))
- func (agent *IndexedDBAgent) SetEnableHandler(handler func(EnableCommand))
- func (agent *IndexedDBAgent) SetRequestDataHandler(handler func(RequestDataCommand))
- func (agent *IndexedDBAgent) SetRequestDatabaseHandler(handler func(RequestDatabaseCommand))
- func (agent *IndexedDBAgent) SetRequestDatabaseNamesHandler(handler func(RequestDatabaseNamesCommand))
- type Key
- type KeyPath
- type KeyPathTypeEnum
- type KeyRange
- type KeyTypeEnum
- type ObjectStore
- type ObjectStoreIndex
- type RequestDataCommand
- type RequestDataCommandFn
- type RequestDataReturn
- type RequestDatabaseCommand
- type RequestDatabaseCommandFn
- type RequestDatabaseNamesCommand
- type RequestDatabaseNamesCommandFn
- type RequestDatabaseNamesReturn
- type RequestDatabaseReturn
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 (c *ClearObjectStoreCommand) Respond(r *ClearObjectStoreReturn)
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 (a *ClearObjectStoreCommandFn) Load() func(ClearObjectStoreCommand)
func (*ClearObjectStoreCommandFn) Store ¶
func (a *ClearObjectStoreCommandFn) Store(fn func(ClearObjectStoreCommand))
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 (c *DeleteDatabaseCommand) Respond(r *DeleteDatabaseReturn)
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 (a *DeleteDatabaseCommandFn) Load() func(DeleteDatabaseCommand)
func (*DeleteDatabaseCommandFn) Store ¶
func (a *DeleteDatabaseCommandFn) Store(fn func(DeleteDatabaseCommand))
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 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 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 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 (c *RequestDatabaseCommand) Respond(r *RequestDatabaseReturn)
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 (a *RequestDatabaseCommandFn) Load() func(RequestDatabaseCommand)
func (*RequestDatabaseCommandFn) Store ¶
func (a *RequestDatabaseCommandFn) Store(fn func(RequestDatabaseCommand))
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 (c *RequestDatabaseNamesCommand) Respond(r *RequestDatabaseNamesReturn)
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 (a *RequestDatabaseNamesCommandFn) Load() func(RequestDatabaseNamesCommand)
func (*RequestDatabaseNamesCommandFn) Store ¶
func (a *RequestDatabaseNamesCommandFn) Store(fn func(RequestDatabaseNamesCommand))
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.
}
Click to show internal directories.
Click to hide internal directories.