Documentation
¶
Overview ¶
Package extensions provides the Chrome DevTools Protocol commands, types, and events for the Extensions domain.
Defines commands and events for browser extensions.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type ClearStorageItemsParams
- func (p *ClearStorageItemsParams) Do(ctx context.Context) (err error)
- func (v ClearStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v ClearStorageItemsParams) MarshalJSON() ([]byte, error)
- func (v *ClearStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ClearStorageItemsParams) UnmarshalJSON(data []byte) error
- type GetStorageItemsParams
- func (p *GetStorageItemsParams) Do(ctx context.Context) (data easyjson.RawMessage, err error)
- func (v GetStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetStorageItemsParams) MarshalJSON() ([]byte, error)
- func (v *GetStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetStorageItemsParams) UnmarshalJSON(data []byte) error
- func (p GetStorageItemsParams) WithKeys(keys []string) *GetStorageItemsParams
- type GetStorageItemsReturns
- type LoadUnpackedParams
- func (p *LoadUnpackedParams) Do(ctx context.Context) (id string, err error)
- func (v LoadUnpackedParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v LoadUnpackedParams) MarshalJSON() ([]byte, error)
- func (v *LoadUnpackedParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *LoadUnpackedParams) UnmarshalJSON(data []byte) error
- type LoadUnpackedReturns
- type RemoveStorageItemsParams
- func (p *RemoveStorageItemsParams) Do(ctx context.Context) (err error)
- func (v RemoveStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v RemoveStorageItemsParams) MarshalJSON() ([]byte, error)
- func (v *RemoveStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *RemoveStorageItemsParams) UnmarshalJSON(data []byte) error
- type SetStorageItemsParams
- func (p *SetStorageItemsParams) Do(ctx context.Context) (err error)
- func (v SetStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SetStorageItemsParams) MarshalJSON() ([]byte, error)
- func (v *SetStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SetStorageItemsParams) UnmarshalJSON(data []byte) error
- type StorageArea
Constants ¶
const ( CommandLoadUnpacked = "Extensions.loadUnpacked" CommandGetStorageItems = "Extensions.getStorageItems" CommandRemoveStorageItems = "Extensions.removeStorageItems" CommandClearStorageItems = "Extensions.clearStorageItems" CommandSetStorageItems = "Extensions.setStorageItems" )
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClearStorageItemsParams ¶
type ClearStorageItemsParams struct { ID string `json:"id"` // ID of extension. StorageArea StorageArea `json:"storageArea"` // StorageArea to remove data from. }
ClearStorageItemsParams clears extension storage in the given storageArea.
func ClearStorageItems ¶
func ClearStorageItems(id string, storageArea StorageArea) *ClearStorageItemsParams
ClearStorageItems clears extension storage in the given storageArea.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-clearStorageItems
parameters:
id - ID of extension. storageArea - StorageArea to remove data from.
func (*ClearStorageItemsParams) Do ¶
func (p *ClearStorageItemsParams) Do(ctx context.Context) (err error)
Do executes Extensions.clearStorageItems against the provided context.
func (ClearStorageItemsParams) MarshalEasyJSON ¶
func (v ClearStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ClearStorageItemsParams) MarshalJSON ¶
func (v ClearStorageItemsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ClearStorageItemsParams) UnmarshalEasyJSON ¶
func (v *ClearStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ClearStorageItemsParams) UnmarshalJSON ¶
func (v *ClearStorageItemsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetStorageItemsParams ¶
type GetStorageItemsParams struct { ID string `json:"id"` // ID of extension. StorageArea StorageArea `json:"storageArea"` // StorageArea to retrieve data from. Keys []string `json:"keys,omitempty"` // Keys to retrieve. }
GetStorageItemsParams gets data from extension storage in the given storageArea. If keys is specified, these are used to filter the result.
func GetStorageItems ¶
func GetStorageItems(id string, storageArea StorageArea) *GetStorageItemsParams
GetStorageItems gets data from extension storage in the given storageArea. If keys is specified, these are used to filter the result.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-getStorageItems
parameters:
id - ID of extension. storageArea - StorageArea to retrieve data from.
func (*GetStorageItemsParams) Do ¶
func (p *GetStorageItemsParams) Do(ctx context.Context) (data easyjson.RawMessage, err error)
Do executes Extensions.getStorageItems against the provided context.
returns:
data
func (GetStorageItemsParams) MarshalEasyJSON ¶
func (v GetStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetStorageItemsParams) MarshalJSON ¶
func (v GetStorageItemsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetStorageItemsParams) UnmarshalEasyJSON ¶
func (v *GetStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetStorageItemsParams) UnmarshalJSON ¶
func (v *GetStorageItemsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (GetStorageItemsParams) WithKeys ¶
func (p GetStorageItemsParams) WithKeys(keys []string) *GetStorageItemsParams
WithKeys keys to retrieve.
type GetStorageItemsReturns ¶
type GetStorageItemsReturns struct {
Data easyjson.RawMessage `json:"data,omitempty"`
}
GetStorageItemsReturns return values.
func (GetStorageItemsReturns) MarshalEasyJSON ¶
func (v GetStorageItemsReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetStorageItemsReturns) MarshalJSON ¶
func (v GetStorageItemsReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetStorageItemsReturns) UnmarshalEasyJSON ¶
func (v *GetStorageItemsReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetStorageItemsReturns) UnmarshalJSON ¶
func (v *GetStorageItemsReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type LoadUnpackedParams ¶
type LoadUnpackedParams struct {
Path string `json:"path"` // Absolute file path.
}
LoadUnpackedParams installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.
func LoadUnpacked ¶
func LoadUnpacked(path string) *LoadUnpackedParams
LoadUnpacked installs an unpacked extension from the filesystem similar to --load-extension CLI flags. Returns extension ID once the extension has been installed. Available if the client is connected using the --remote-debugging-pipe flag and the --enable-unsafe-extension-debugging flag is set.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-loadUnpacked
parameters:
path - Absolute file path.
func (*LoadUnpackedParams) Do ¶
func (p *LoadUnpackedParams) Do(ctx context.Context) (id string, err error)
Do executes Extensions.loadUnpacked against the provided context.
returns:
id - Extension id.
func (LoadUnpackedParams) MarshalEasyJSON ¶
func (v LoadUnpackedParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (LoadUnpackedParams) MarshalJSON ¶
func (v LoadUnpackedParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*LoadUnpackedParams) UnmarshalEasyJSON ¶
func (v *LoadUnpackedParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LoadUnpackedParams) UnmarshalJSON ¶
func (v *LoadUnpackedParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type LoadUnpackedReturns ¶
type LoadUnpackedReturns struct {
ID string `json:"id,omitempty"` // Extension id.
}
LoadUnpackedReturns return values.
func (LoadUnpackedReturns) MarshalEasyJSON ¶
func (v LoadUnpackedReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (LoadUnpackedReturns) MarshalJSON ¶
func (v LoadUnpackedReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*LoadUnpackedReturns) UnmarshalEasyJSON ¶
func (v *LoadUnpackedReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LoadUnpackedReturns) UnmarshalJSON ¶
func (v *LoadUnpackedReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RemoveStorageItemsParams ¶
type RemoveStorageItemsParams struct { ID string `json:"id"` // ID of extension. StorageArea StorageArea `json:"storageArea"` // StorageArea to remove data from. Keys []string `json:"keys"` // Keys to remove. }
RemoveStorageItemsParams removes keys from extension storage in the given storageArea.
func RemoveStorageItems ¶
func RemoveStorageItems(id string, storageArea StorageArea, keys []string) *RemoveStorageItemsParams
RemoveStorageItems removes keys from extension storage in the given storageArea.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-removeStorageItems
parameters:
id - ID of extension. storageArea - StorageArea to remove data from. keys - Keys to remove.
func (*RemoveStorageItemsParams) Do ¶
func (p *RemoveStorageItemsParams) Do(ctx context.Context) (err error)
Do executes Extensions.removeStorageItems against the provided context.
func (RemoveStorageItemsParams) MarshalEasyJSON ¶
func (v RemoveStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (RemoveStorageItemsParams) MarshalJSON ¶
func (v RemoveStorageItemsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*RemoveStorageItemsParams) UnmarshalEasyJSON ¶
func (v *RemoveStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RemoveStorageItemsParams) UnmarshalJSON ¶
func (v *RemoveStorageItemsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SetStorageItemsParams ¶
type SetStorageItemsParams struct { ID string `json:"id"` // ID of extension. StorageArea StorageArea `json:"storageArea"` // StorageArea to set data in. Values easyjson.RawMessage `json:"values"` }
SetStorageItemsParams sets values in extension storage in the given storageArea. The provided values will be merged with existing values in the storage area.
func SetStorageItems ¶
func SetStorageItems(id string, storageArea StorageArea, values easyjson.RawMessage) *SetStorageItemsParams
SetStorageItems sets values in extension storage in the given storageArea. The provided values will be merged with existing values in the storage area.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#method-setStorageItems
parameters:
id - ID of extension. storageArea - StorageArea to set data in. values - Values to set.
func (*SetStorageItemsParams) Do ¶
func (p *SetStorageItemsParams) Do(ctx context.Context) (err error)
Do executes Extensions.setStorageItems against the provided context.
func (SetStorageItemsParams) MarshalEasyJSON ¶
func (v SetStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SetStorageItemsParams) MarshalJSON ¶
func (v SetStorageItemsParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SetStorageItemsParams) UnmarshalEasyJSON ¶
func (v *SetStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SetStorageItemsParams) UnmarshalJSON ¶
func (v *SetStorageItemsParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type StorageArea ¶
type StorageArea string
StorageArea storage areas.
See: https://chromedevtools.github.io/devtools-protocol/tot/Extensions#type-StorageArea
const ( StorageAreaSession StorageArea = "session" StorageAreaLocal StorageArea = "local" StorageAreaSync StorageArea = "sync" StorageAreaManaged StorageArea = "managed" )
StorageArea values.
func (StorageArea) MarshalEasyJSON ¶
func (t StorageArea) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (StorageArea) MarshalJSON ¶
func (t StorageArea) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (StorageArea) String ¶
func (t StorageArea) String() string
String returns the StorageArea as string value.
func (*StorageArea) UnmarshalEasyJSON ¶
func (t *StorageArea) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*StorageArea) UnmarshalJSON ¶
func (t *StorageArea) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.