Documentation ¶
Overview ¶
Package pwa provides the Chrome DevTools Protocol commands, types, and events for the PWA domain.
This domain allows interacting with the browser to control PWAs.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type FileHandler
- type FileHandlerAccept
- type GetOsAppStateParams
- func (p *GetOsAppStateParams) Do(ctx context.Context) (badgeCount int64, fileHandlers []*FileHandler, err error)
- func (v GetOsAppStateParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetOsAppStateParams) MarshalJSON() ([]byte, error)
- func (v *GetOsAppStateParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetOsAppStateParams) UnmarshalJSON(data []byte) error
- type GetOsAppStateReturns
Constants ¶
const (
CommandGetOsAppState = "PWA.getOsAppState"
)
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileHandler ¶
type FileHandler struct { Action string `json:"action"` Accepts []*FileHandlerAccept `json:"accepts"` DisplayName string `json:"displayName"` }
FileHandler [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/PWA#type-FileHandler
func (FileHandler) MarshalEasyJSON ¶
func (v FileHandler) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (FileHandler) MarshalJSON ¶
func (v FileHandler) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*FileHandler) UnmarshalEasyJSON ¶
func (v *FileHandler) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*FileHandler) UnmarshalJSON ¶
func (v *FileHandler) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type FileHandlerAccept ¶
type FileHandlerAccept struct { MediaType string `json:"mediaType"` // New name of the mimetype according to https://www.iana.org/assignments/media-types/media-types.xhtml FileExtensions []string `json:"fileExtensions"` }
FileHandlerAccept the following types are the replica of https://crsrc.org/c/chrome/browser/web_applications/proto/web_app_os_integration_state.proto;drc=9910d3be894c8f142c977ba1023f30a656bc13fc;l=67.
See: https://chromedevtools.github.io/devtools-protocol/tot/PWA#type-FileHandlerAccept
func (FileHandlerAccept) MarshalEasyJSON ¶
func (v FileHandlerAccept) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (FileHandlerAccept) MarshalJSON ¶
func (v FileHandlerAccept) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*FileHandlerAccept) UnmarshalEasyJSON ¶
func (v *FileHandlerAccept) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*FileHandlerAccept) UnmarshalJSON ¶
func (v *FileHandlerAccept) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetOsAppStateParams ¶
type GetOsAppStateParams struct {
ManifestID string `json:"manifestId"` // The id from the webapp's manifest file, commonly it's the url of the site installing the webapp. See https://web.dev/learn/pwa/web-app-manifest.
}
GetOsAppStateParams returns the following OS state for the given manifest id.
func GetOsAppState ¶
func GetOsAppState(manifestID string) *GetOsAppStateParams
GetOsAppState returns the following OS state for the given manifest id.
See: https://chromedevtools.github.io/devtools-protocol/tot/PWA#method-getOsAppState
parameters:
manifestID - The id from the webapp's manifest file, commonly it's the url of the site installing the webapp. See https://web.dev/learn/pwa/web-app-manifest.
func (*GetOsAppStateParams) Do ¶
func (p *GetOsAppStateParams) Do(ctx context.Context) (badgeCount int64, fileHandlers []*FileHandler, err error)
Do executes PWA.getOsAppState against the provided context.
returns:
badgeCount fileHandlers
func (GetOsAppStateParams) MarshalEasyJSON ¶
func (v GetOsAppStateParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetOsAppStateParams) MarshalJSON ¶
func (v GetOsAppStateParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetOsAppStateParams) UnmarshalEasyJSON ¶
func (v *GetOsAppStateParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetOsAppStateParams) UnmarshalJSON ¶
func (v *GetOsAppStateParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetOsAppStateReturns ¶
type GetOsAppStateReturns struct { BadgeCount int64 `json:"badgeCount,omitempty"` FileHandlers []*FileHandler `json:"fileHandlers,omitempty"` }
GetOsAppStateReturns return values.
func (GetOsAppStateReturns) MarshalEasyJSON ¶
func (v GetOsAppStateReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetOsAppStateReturns) MarshalJSON ¶
func (v GetOsAppStateReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetOsAppStateReturns) UnmarshalEasyJSON ¶
func (v *GetOsAppStateReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetOsAppStateReturns) UnmarshalJSON ¶
func (v *GetOsAppStateReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface