extensions

package
v0.0.0-...-a72e670 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 7 Imported by: 0

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

View Source
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

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

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.

Jump to

Keyboard shortcuts

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