func (c *IndexedDB) GetMetadataWithParams(ctx context.Context, v *IndexedDBGetMetadataParams) (float64, float64, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.getMetadata", Params: v})
	if err != nil {
		return 0, 0, err
	}
	var chromeData struct {
		Result struct {
			EntriesCount      float64
			KeyGeneratorValue float64
		}
	}
	if resp == nil {
		return 0, 0, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return 0, 0, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return 0, 0, err
	}
	return chromeData.Result.EntriesCount, chromeData.Result.KeyGeneratorValue, nil
}
GetMetadataWithParams - Gets metadata of an object store
Returns -  entriesCount - the entries count keyGeneratorValue - the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.
package gcdapi
import (
	"context"
	"github.com/wirepair/gcd/v2/gcdmessage"
)
type IndexedDBDatabaseWithObjectStores struct {
	Name         string                  `json:"name"`          
	Version      float64                 `json:"version"`       
	ObjectStores []*IndexedDBObjectStore `json:"objectStores"`  
}
type IndexedDBObjectStore struct {
	Name          string                       `json:"name"`           
	KeyPath       *IndexedDBKeyPath            `json:"keyPath"`        
	AutoIncrement bool                         `json:"autoIncrement"`  
	Indexes       []*IndexedDBObjectStoreIndex `json:"indexes"`        
}
type IndexedDBObjectStoreIndex struct {
	Name       string            `json:"name"`        
	KeyPath    *IndexedDBKeyPath `json:"keyPath"`     
	Unique     bool              `json:"unique"`      
	MultiEntry bool              `json:"multiEntry"`  
}
type IndexedDBKey struct {
	Type   string          `json:"type"`              
	Number float64         `json:"number,omitempty"`  
	String string          `json:"string,omitempty"`  
	Date   float64         `json:"date,omitempty"`    
	Array  []*IndexedDBKey `json:"array,omitempty"`   
}
type IndexedDBKeyRange struct {
	Lower     *IndexedDBKey `json:"lower,omitempty"`  
	Upper     *IndexedDBKey `json:"upper,omitempty"`  
	LowerOpen bool          `json:"lowerOpen"`        
	UpperOpen bool          `json:"upperOpen"`        
}
type IndexedDBDataEntry struct {
	Key        *RuntimeRemoteObject `json:"key"`         
	PrimaryKey *RuntimeRemoteObject `json:"primaryKey"`  
	Value      *RuntimeRemoteObject `json:"value"`       
}
type IndexedDBKeyPath struct {
	Type   string   `json:"type"`              
	String string   `json:"string,omitempty"`  
	Array  []string `json:"array,omitempty"`   
}
type IndexedDB struct {
	target gcdmessage.ChromeTargeter
}
func NewIndexedDB(target gcdmessage.ChromeTargeter) *IndexedDB {
	c := &IndexedDB{target: target}
	return c
}
type IndexedDBClearObjectStoreParams struct {
	SecurityOrigin string `json:"securityOrigin"`
	DatabaseName string `json:"databaseName"`
	ObjectStoreName string `json:"objectStoreName"`
}
func (c *IndexedDB) ClearObjectStoreWithParams(ctx context.Context, v *IndexedDBClearObjectStoreParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.clearObjectStore", Params: v})
}
func (c *IndexedDB) ClearObjectStore(ctx context.Context, securityOrigin string, databaseName string, objectStoreName string) (*gcdmessage.ChromeResponse, error) {
	var v IndexedDBClearObjectStoreParams
	v.SecurityOrigin = securityOrigin
	v.DatabaseName = databaseName
	v.ObjectStoreName = objectStoreName
	return c.ClearObjectStoreWithParams(ctx, &v)
}
type IndexedDBDeleteDatabaseParams struct {
	SecurityOrigin string `json:"securityOrigin"`
	DatabaseName string `json:"databaseName"`
}
func (c *IndexedDB) DeleteDatabaseWithParams(ctx context.Context, v *IndexedDBDeleteDatabaseParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.deleteDatabase", Params: v})
}
func (c *IndexedDB) DeleteDatabase(ctx context.Context, securityOrigin string, databaseName string) (*gcdmessage.ChromeResponse, error) {
	var v IndexedDBDeleteDatabaseParams
	v.SecurityOrigin = securityOrigin
	v.DatabaseName = databaseName
	return c.DeleteDatabaseWithParams(ctx, &v)
}
type IndexedDBDeleteObjectStoreEntriesParams struct {
	SecurityOrigin string `json:"securityOrigin"`
	DatabaseName string `json:"databaseName"`
	ObjectStoreName string `json:"objectStoreName"`
	KeyRange *IndexedDBKeyRange `json:"keyRange"`
}
func (c *IndexedDB) DeleteObjectStoreEntriesWithParams(ctx context.Context, v *IndexedDBDeleteObjectStoreEntriesParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.deleteObjectStoreEntries", Params: v})
}
func (c *IndexedDB) DeleteObjectStoreEntries(ctx context.Context, securityOrigin string, databaseName string, objectStoreName string, keyRange *IndexedDBKeyRange) (*gcdmessage.ChromeResponse, error) {
	var v IndexedDBDeleteObjectStoreEntriesParams
	v.SecurityOrigin = securityOrigin
	v.DatabaseName = databaseName
	v.ObjectStoreName = objectStoreName
	v.KeyRange = keyRange
	return c.DeleteObjectStoreEntriesWithParams(ctx, &v)
}
func (c *IndexedDB) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.disable"})
}
func (c *IndexedDB) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.enable"})
}
type IndexedDBRequestDataParams struct {
	SecurityOrigin string `json:"securityOrigin"`
	DatabaseName string `json:"databaseName"`
	ObjectStoreName string `json:"objectStoreName"`
	IndexName string `json:"indexName"`
	SkipCount int `json:"skipCount"`
	PageSize int `json:"pageSize"`
	KeyRange *IndexedDBKeyRange `json:"keyRange,omitempty"`
}
func (c *IndexedDB) RequestDataWithParams(ctx context.Context, v *IndexedDBRequestDataParams) ([]*IndexedDBDataEntry, bool, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "IndexedDB.requestData", Params: v})
	if err != nil {
		return nil, false, err
	}
	var chromeData struct {
		Result struct {
			ObjectStoreDataEntries []*IndexedDBDataEntry
			HasMore                bool
		}
	}
	if resp == nil {
		return nil, false, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, false, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, false, err
	}
	return chromeData.Result.ObjectStoreDataEntries, chromeData.Result.HasMore, nil
}
func (c *IndexedDB) RequestData(ctx context.Context, securityOrigin string, databaseName string, objectStoreName string, indexName string, skipCount int, pageSize int, keyRange *IndexedDBKeyRange) ([]*IndexedDBDataEntry, bool, error) {
	var v IndexedDBRequestDataParams
	v.SecurityOrigin = securityOrigin
	v.DatabaseName = databaseName
	v.ObjectStoreName = objectStoreName
	v.IndexName = indexName
	v.SkipCount = skipCount
	v.PageSize = pageSize
	v.KeyRange = keyRange
	return c.RequestDataWithParams(ctx, &v)
}
type IndexedDBGetMetadataParams struct {
	SecurityOrigin string `json:"securityOrigin"`
	DatabaseName string `json:"databaseName"`
	ObjectStoreName string `json:"objectStoreName"`
}