blob: 4aedd27f2bd18a157e43fbf636c26add8213c7a6 [file] [log] [blame] [edit]
// Code generated by cdpgen. DO NOT EDIT.
package indexeddb
// ClearObjectStoreArgs represents the arguments for ClearObjectStore in the IndexedDB domain.
type ClearObjectStoreArgs struct {
SecurityOrigin string `json:"securityOrigin"` // Security origin.
DatabaseName string `json:"databaseName"` // Database name.
ObjectStoreName string `json:"objectStoreName"` // Object store name.
}
// NewClearObjectStoreArgs initializes ClearObjectStoreArgs with the required arguments.
func NewClearObjectStoreArgs(securityOrigin string, databaseName string, objectStoreName string) *ClearObjectStoreArgs {
args := new(ClearObjectStoreArgs)
args.SecurityOrigin = securityOrigin
args.DatabaseName = databaseName
args.ObjectStoreName = objectStoreName
return args
}
// DeleteDatabaseArgs represents the arguments for DeleteDatabase in the IndexedDB domain.
type DeleteDatabaseArgs struct {
SecurityOrigin string `json:"securityOrigin"` // Security origin.
DatabaseName string `json:"databaseName"` // Database name.
}
// NewDeleteDatabaseArgs initializes DeleteDatabaseArgs with the required arguments.
func NewDeleteDatabaseArgs(securityOrigin string, databaseName string) *DeleteDatabaseArgs {
args := new(DeleteDatabaseArgs)
args.SecurityOrigin = securityOrigin
args.DatabaseName = databaseName
return args
}
// DeleteObjectStoreEntriesArgs represents the arguments for DeleteObjectStoreEntries in the IndexedDB domain.
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
}
// NewDeleteObjectStoreEntriesArgs initializes DeleteObjectStoreEntriesArgs with the required arguments.
func NewDeleteObjectStoreEntriesArgs(securityOrigin string, databaseName string, objectStoreName string, keyRange KeyRange) *DeleteObjectStoreEntriesArgs {
args := new(DeleteObjectStoreEntriesArgs)
args.SecurityOrigin = securityOrigin
args.DatabaseName = databaseName
args.ObjectStoreName = objectStoreName
args.KeyRange = keyRange
return args
}
// RequestDataArgs represents the arguments for RequestData in the IndexedDB domain.
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.
}
// NewRequestDataArgs initializes RequestDataArgs with the required arguments.
func NewRequestDataArgs(securityOrigin string, databaseName string, objectStoreName string, indexName string, skipCount int, pageSize int) *RequestDataArgs {
args := new(RequestDataArgs)
args.SecurityOrigin = securityOrigin
args.DatabaseName = databaseName
args.ObjectStoreName = objectStoreName
args.IndexName = indexName
args.SkipCount = skipCount
args.PageSize = pageSize
return args
}
// SetKeyRange sets the KeyRange optional argument. Key range.
func (a *RequestDataArgs) SetKeyRange(keyRange KeyRange) *RequestDataArgs {
a.KeyRange = &keyRange
return a
}
// RequestDataReply represents the return values for RequestData in the IndexedDB domain.
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.
}
// GetMetadataArgs represents the arguments for GetMetadata in the IndexedDB domain.
type GetMetadataArgs struct {
SecurityOrigin string `json:"securityOrigin"` // Security origin.
DatabaseName string `json:"databaseName"` // Database name.
ObjectStoreName string `json:"objectStoreName"` // Object store name.
}
// NewGetMetadataArgs initializes GetMetadataArgs with the required arguments.
func NewGetMetadataArgs(securityOrigin string, databaseName string, objectStoreName string) *GetMetadataArgs {
args := new(GetMetadataArgs)
args.SecurityOrigin = securityOrigin
args.DatabaseName = databaseName
args.ObjectStoreName = objectStoreName
return args
}
// GetMetadataReply represents the return values for GetMetadata in the IndexedDB domain.
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.
}
// RequestDatabaseArgs represents the arguments for RequestDatabase in the IndexedDB domain.
type RequestDatabaseArgs struct {
SecurityOrigin string `json:"securityOrigin"` // Security origin.
DatabaseName string `json:"databaseName"` // Database name.
}
// NewRequestDatabaseArgs initializes RequestDatabaseArgs with the required arguments.
func NewRequestDatabaseArgs(securityOrigin string, databaseName string) *RequestDatabaseArgs {
args := new(RequestDatabaseArgs)
args.SecurityOrigin = securityOrigin
args.DatabaseName = databaseName
return args
}
// RequestDatabaseReply represents the return values for RequestDatabase in the IndexedDB domain.
type RequestDatabaseReply struct {
DatabaseWithObjectStores DatabaseWithObjectStores `json:"databaseWithObjectStores"` // Database with an array of object stores.
}
// RequestDatabaseNamesArgs represents the arguments for RequestDatabaseNames in the IndexedDB domain.
type RequestDatabaseNamesArgs struct {
SecurityOrigin string `json:"securityOrigin"` // Security origin.
}
// NewRequestDatabaseNamesArgs initializes RequestDatabaseNamesArgs with the required arguments.
func NewRequestDatabaseNamesArgs(securityOrigin string) *RequestDatabaseNamesArgs {
args := new(RequestDatabaseNamesArgs)
args.SecurityOrigin = securityOrigin
return args
}
// RequestDatabaseNamesReply represents the return values for RequestDatabaseNames in the IndexedDB domain.
type RequestDatabaseNamesReply struct {
DatabaseNames []string `json:"databaseNames"` // Database names for origin.
}