db

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: BSD-2-Clause Imports: 3 Imported by: 6

Documentation

Overview

Package db provides type definitions for use with the Chrome IndexedDB protocol

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/

Index

Constants

This section is empty.

Variables

View Source
var KeyPathType = keyPathTypeEnum{
	Null:   keyPathTypeNull,
	String: keyPathTypeString,
	Array:  keyPathTypeArray,
}

KeyPathType provides named acces to the KeyPathTypeEnum values.

View Source
var KeyType = keyTypeEnum{
	Number: keyTypeNumber,
	String: keyTypeString,
	Date:   keyTypeDate,
	Array:  keyTypeArray,
}

KeyType provides named acces to the KeyTypeEnum values.

Functions

This section is empty.

Types

type ClearObjectStoreParams

type ClearObjectStoreParams struct {
	// Security origin.
	SecurityOrigin string `json:"securityOrigin"`

	// Database name.
	DatabaseName string `json:"databaseName"`

	// Object store name.
	ObjectStoreName string `json:"objectStoreName"`
}

ClearObjectStoreParams represents IndexedDB.clearObjectStore parameters.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-clearObjectStore

type ClearObjectStoreResult

type ClearObjectStoreResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

ClearObjectStoreResult represents the result of calls to IndexedDB.clearObjectStore.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-clearObjectStore

type DataEntry

type DataEntry struct {
	// Key object.
	Key *runtime.RemoteObject `json:"key"`

	// Primary key object.
	PrimaryKey *runtime.RemoteObject `json:"primaryKey"`

	// Value object.
	Value *runtime.RemoteObject `json:"value"`
}

DataEntry is a data entry.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#type-DataEntry

type DatabaseWithObjectStores

type DatabaseWithObjectStores struct {
	// Database name.
	Name string `json:"name"`

	// Database version.
	Version int `json:"version"`

	// Object stores in this database.
	ObjectStores []*ObjectStore `json:"objectStores"`
}

DatabaseWithObjectStores is a database with an array of object stores.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#type-DatabaseWithObjectStores

type DeleteDatabaseParams

type DeleteDatabaseParams struct {
	// Security origin.
	SecurityOrigin string `json:"securityOrigin"`

	// Database name.
	DatabaseName string `json:"databaseName"`

	// Object store name.
	ObjectStoreName string `json:"objectStoreName"`
}

DeleteDatabaseParams represents IndexedDB.deleteDatabase parameters.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-deleteDatabase

type DeleteDatabaseResult

type DeleteDatabaseResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

DeleteDatabaseResult represents the result of calls to IndexedDB.deleteDatabase.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-deleteDatabase

type DeleteObjectStoreEntriesParams

type DeleteObjectStoreEntriesParams struct {
	// Security origin.
	SecurityOrigin string `json:"securityOrigin"`

	// Database name.
	DatabaseName string `json:"databaseName"`
}

DeleteObjectStoreEntriesParams represents IndexedDB.deleteObjectStoreEntries parameters.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-deleteObjectStoreEntries

type DeleteObjectStoreEntriesResult

type DeleteObjectStoreEntriesResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

DeleteObjectStoreEntriesResult represents the result of calls to IndexedDB.deleteObjectStoreEntries.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-deleteObjectStoreEntries

type DisableResult

type DisableResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

DisableResult represents the result of calls to IndexedDB.disable.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-disable

type EnableResult

type EnableResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

EnableResult represents the result of calls to IndexedDB.enable.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-enable

type Key

type Key struct {
	// Key type. Allowed values:
	//	- number
	//	- string
	//	- date
	//	- array
	Type KeyTypeEnum `json:"type"`

	// Optional. Number value.
	Number float64 `json:"number,omitempty"`

	// Optional. String value.
	String string `json:"string,omitempty"`

	// Optional. Date value.
	Date float64 `json:"date,omitempty"`

	// Optional. Array value.
	Array []*Key `json:"array,omitempty"`
}

Key is a key.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#type-Key

type KeyPath

type KeyPath struct {
	// Key path type. Allowed values:
	//	- null
	//	- string
	//	- array
	Type KeyPathTypeEnum `json:"type"`

	// Optional. String value.
	String string `json:"string,omitempty"`

	// Optional. Array value.
	Array []string `json:"array,omitempty"`
}

KeyPath is a key path.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#type-KeyPath

type KeyPathTypeEnum

type KeyPathTypeEnum int

KeyPathTypeEnum represents the key path type. Allowed values:

  • KeyPathType.Null "null"
  • KeyPathType.String "string"
  • KeyPathType.Array "array"

https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental/#type-ScreenshotParams

func (KeyPathTypeEnum) MarshalJSON

func (enum KeyPathTypeEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (KeyPathTypeEnum) String

func (enum KeyPathTypeEnum) String() string

String implements Stringer

func (*KeyPathTypeEnum) UnmarshalJSON

func (enum *KeyPathTypeEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type KeyRange

type KeyRange struct {
	// Optional. Lower bound.
	Lower *Key `json:"lower,omitempty"`

	// Optional. Upper bound.
	Upper *Key `json:"upper,omitempty"`

	// If true lower bound is open.
	LowerOpen bool `json:"lowerOpen"`

	// If true upper bound is open.
	UpperOpen bool `json:"upperOpen"`
}

KeyRange is a key range.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#type-KeyRange

type KeyTypeEnum

type KeyTypeEnum int

KeyTypeEnum represents the key type. Allowed values:

  • KeyType.Number "number"
  • KeyType.String "string"
  • KeyType.Date "date"
  • KeyType.Array "array"

https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental/#type-ScreenshotParams

func (KeyTypeEnum) MarshalJSON

func (enum KeyTypeEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (KeyTypeEnum) String

func (enum KeyTypeEnum) String() string

String implements Stringer

func (*KeyTypeEnum) UnmarshalJSON

func (enum *KeyTypeEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type ObjectStore

type ObjectStore struct {
	// Object store name.
	Name string `json:"name"`

	// Object store key path.
	KeyPath *KeyPath `json:"keyPath"`

	// If true, object store has auto increment flag set.
	AutoIncrement bool `json:"autoIncrement"`

	// Indexes in this object store.
	Indexes []*ObjectStoreIndex `json:"indexes"`
}

ObjectStore is a object store

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#type-ObjectStore

type ObjectStoreIndex

type ObjectStoreIndex struct {
	// Index name.
	Name string `json:"name"`

	// Index key path.
	KeyPath *KeyPath `json:"keyPath"`

	// If true, index is unique.
	Unique bool `json:"unique"`

	// If true, index allows multiple entries for a key.
	MultiEntry bool `json:"multiEntry"`
}

ObjectStoreIndex is an object store index.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#type-ObjectStoreIndex

type RequestDataParams

type RequestDataParams struct {
	// Security origin.
	SecurityOrigin string `json:"securityOrigin"`

	// Database name.
	DatabaseName string `json:"databaseName"`

	// Object store name.
	ObjectStoreName string `json:"objectStoreName"`

	// Index name, empty string for object store data requests.
	IndexName string `json:"indexName"`

	// Number of records to skip.
	SkipCount int `json:"skipCount"`

	// Number of records to fetch.
	PageSize int `json:"pageSize"`

	// Optional. Key range.
	KeyRange *KeyRange `json:"keyRange,omitempty"`
}

RequestDataParams represents IndexedDB.requestData parameters.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-requestData

type RequestDataResult

type RequestDataResult struct {
	// Array of object store data entries.
	ObjectStoreDataEntries []*DataEntry `json:"objectStoreDataEntries"`

	// If true, there are more entries to fetch in the given range.
	HasMore bool `json:"hasMore"`

	// Error information related to executing this method
	Err error `json:"-"`
}

RequestDataResult represents the result of calls to IndexedDB.requestData.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-requestData

type RequestDatabaseNamesParams

type RequestDatabaseNamesParams struct {
	// Security origin.
	SecurityOrigin string `json:"securityOrigin"`
}

RequestDatabaseNamesParams represents IndexedDB.requestDatabaseNames parameters.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-requestDatabaseNames

type RequestDatabaseNamesResult

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

	// Error information related to executing this method
	Err error `json:"-"`
}

RequestDatabaseNamesResult represents the result of calls to IndexedDB.requestDatabaseNames.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-requestDatabaseNames

type RequestDatabaseParams

type RequestDatabaseParams struct {
	// Security origin.
	SecurityOrigin string `json:"securityOrigin"`

	// Database name.
	DatabaseName string `json:"databaseName"`
}

RequestDatabaseParams represents IndexedDB.requestDatabase parameters.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-requestDatabase

type RequestDatabaseResult

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

	// Error information related to executing this method
	Err error `json:"-"`
}

RequestDatabaseResult represents the result of calls to IndexedDB.requestDatabase.

https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB/#method-requestDatabase

Jump to

Keyboard shortcuts

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