import "github.com/chromedp/cdproto/serviceworker"
Package serviceworker provides the Chrome DevTools Protocol commands, types, and events for the ServiceWorker domain.
Generated by the cdproto-gen command.
easyjson.go events.go serviceworker.go types.go
const ( CommandDeliverPushMessage = "ServiceWorker.deliverPushMessage" CommandDisable = "ServiceWorker.disable" CommandDispatchSyncEvent = "ServiceWorker.dispatchSyncEvent" CommandDispatchPeriodicSyncEvent = "ServiceWorker.dispatchPeriodicSyncEvent" CommandEnable = "ServiceWorker.enable" CommandInspectWorker = "ServiceWorker.inspectWorker" CommandSetForceUpdateOnPageLoad = "ServiceWorker.setForceUpdateOnPageLoad" CommandSkipWaiting = "ServiceWorker.skipWaiting" CommandStartWorker = "ServiceWorker.startWorker" CommandStopAllWorkers = "ServiceWorker.stopAllWorkers" CommandStopWorker = "ServiceWorker.stopWorker" CommandUnregister = "ServiceWorker.unregister" CommandUpdateRegistration = "ServiceWorker.updateRegistration" )
Command names.
type DeliverPushMessageParams struct { Origin string `json:"origin"` RegistrationID RegistrationID `json:"registrationId"` Data string `json:"data"` }
DeliverPushMessageParams [no description].
func DeliverPushMessage(origin string, registrationID RegistrationID, data string) *DeliverPushMessageParams
DeliverPushMessage [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-deliverPushMessage
parameters:
origin registrationID data
func (p *DeliverPushMessageParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.deliverPushMessage against the provided context.
func (v DeliverPushMessageParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DeliverPushMessageParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DeliverPushMessageParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DeliverPushMessageParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DisableParams struct{}
DisableParams [no description].
func Disable() *DisableParams
Disable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-disable
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.disable against the provided context.
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DispatchPeriodicSyncEventParams struct { Origin string `json:"origin"` RegistrationID RegistrationID `json:"registrationId"` Tag string `json:"tag"` }
DispatchPeriodicSyncEventParams [no description].
func DispatchPeriodicSyncEvent(origin string, registrationID RegistrationID, tag string) *DispatchPeriodicSyncEventParams
DispatchPeriodicSyncEvent [no description].
parameters:
origin registrationID tag
func (p *DispatchPeriodicSyncEventParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.dispatchPeriodicSyncEvent against the provided context.
func (v DispatchPeriodicSyncEventParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DispatchPeriodicSyncEventParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DispatchPeriodicSyncEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DispatchPeriodicSyncEventParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DispatchSyncEventParams struct { Origin string `json:"origin"` RegistrationID RegistrationID `json:"registrationId"` Tag string `json:"tag"` LastChance bool `json:"lastChance"` }
DispatchSyncEventParams [no description].
func DispatchSyncEvent(origin string, registrationID RegistrationID, tag string, lastChance bool) *DispatchSyncEventParams
DispatchSyncEvent [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-dispatchSyncEvent
parameters:
origin registrationID tag lastChance
func (p *DispatchSyncEventParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.dispatchSyncEvent against the provided context.
func (v DispatchSyncEventParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v DispatchSyncEventParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *DispatchSyncEventParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DispatchSyncEventParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams struct{}
EnableParams [no description].
func Enable() *EnableParams
Enable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-enable
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.enable against the provided context.
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ErrorMessage struct { ErrorMessage string `json:"errorMessage"` RegistrationID RegistrationID `json:"registrationId"` VersionID string `json:"versionId"` SourceURL string `json:"sourceURL"` LineNumber int64 `json:"lineNumber"` ColumnNumber int64 `json:"columnNumber"` }
ErrorMessage serviceWorker error message.
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerErrorMessage
func (v ErrorMessage) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ErrorMessage) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ErrorMessage) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ErrorMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventWorkerErrorReported struct { ErrorMessage *ErrorMessage `json:"errorMessage"` }
EventWorkerErrorReported [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerErrorReported
func (v EventWorkerErrorReported) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventWorkerErrorReported) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventWorkerErrorReported) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventWorkerErrorReported) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventWorkerRegistrationUpdated struct { Registrations []*Registration `json:"registrations"` }
EventWorkerRegistrationUpdated [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerRegistrationUpdated
func (v EventWorkerRegistrationUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventWorkerRegistrationUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventWorkerRegistrationUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventWorkerRegistrationUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
EventWorkerVersionUpdated [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#event-workerVersionUpdated
func (v EventWorkerVersionUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v EventWorkerVersionUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *EventWorkerVersionUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *EventWorkerVersionUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
InspectWorkerParams [no description].
func InspectWorker(versionID string) *InspectWorkerParams
InspectWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-inspectWorker
parameters:
versionID
func (p *InspectWorkerParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.inspectWorker against the provided context.
func (v InspectWorkerParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v InspectWorkerParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *InspectWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *InspectWorkerParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Registration struct { RegistrationID RegistrationID `json:"registrationId"` ScopeURL string `json:"scopeURL"` IsDeleted bool `json:"isDeleted"` }
Registration serviceWorker registration.
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerRegistration
func (v Registration) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v Registration) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *Registration) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Registration) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
RegistrationID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-RegistrationID
func (t RegistrationID) String() string
String returns the RegistrationID as string value.
type SetForceUpdateOnPageLoadParams struct { ForceUpdateOnPageLoad bool `json:"forceUpdateOnPageLoad"` }
SetForceUpdateOnPageLoadParams [no description].
func SetForceUpdateOnPageLoad(forceUpdateOnPageLoad bool) *SetForceUpdateOnPageLoadParams
SetForceUpdateOnPageLoad [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-setForceUpdateOnPageLoad
parameters:
forceUpdateOnPageLoad
func (p *SetForceUpdateOnPageLoadParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.setForceUpdateOnPageLoad against the provided context.
func (v SetForceUpdateOnPageLoadParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SetForceUpdateOnPageLoadParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SetForceUpdateOnPageLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SetForceUpdateOnPageLoadParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
SkipWaitingParams [no description].
func SkipWaiting(scopeURL string) *SkipWaitingParams
SkipWaiting [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-skipWaiting
parameters:
scopeURL
func (p *SkipWaitingParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.skipWaiting against the provided context.
func (v SkipWaitingParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v SkipWaitingParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *SkipWaitingParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *SkipWaitingParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
StartWorkerParams [no description].
func StartWorker(scopeURL string) *StartWorkerParams
StartWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-startWorker
parameters:
scopeURL
func (p *StartWorkerParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.startWorker against the provided context.
func (v StartWorkerParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v StartWorkerParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *StartWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *StartWorkerParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type StopAllWorkersParams struct{}
StopAllWorkersParams [no description].
func StopAllWorkers() *StopAllWorkersParams
StopAllWorkers [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-stopAllWorkers
func (p *StopAllWorkersParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.stopAllWorkers against the provided context.
func (v StopAllWorkersParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v StopAllWorkersParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *StopAllWorkersParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *StopAllWorkersParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
StopWorkerParams [no description].
func StopWorker(versionID string) *StopWorkerParams
StopWorker [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-stopWorker
parameters:
versionID
func (p *StopWorkerParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.stopWorker against the provided context.
func (v StopWorkerParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v StopWorkerParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *StopWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *StopWorkerParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
UnregisterParams [no description].
func Unregister(scopeURL string) *UnregisterParams
Unregister [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-unregister
parameters:
scopeURL
func (p *UnregisterParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.unregister against the provided context.
func (v UnregisterParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v UnregisterParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *UnregisterParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *UnregisterParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
UpdateRegistrationParams [no description].
func UpdateRegistration(scopeURL string) *UpdateRegistrationParams
UpdateRegistration [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#method-updateRegistration
parameters:
scopeURL
func (p *UpdateRegistrationParams) Do(ctx context.Context) (err error)
Do executes ServiceWorker.updateRegistration against the provided context.
func (v UpdateRegistrationParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v UpdateRegistrationParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *UpdateRegistrationParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *UpdateRegistrationParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Version struct { VersionID string `json:"versionId"` RegistrationID RegistrationID `json:"registrationId"` ScriptURL string `json:"scriptURL"` RunningStatus VersionRunningStatus `json:"runningStatus"` Status VersionStatus `json:"status"` ScriptLastModified float64 `json:"scriptLastModified,omitempty"` // The Last-Modified header value of the main script. ScriptResponseTime float64 `json:"scriptResponseTime,omitempty"` // The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated. ControlledClients []target.ID `json:"controlledClients,omitempty"` TargetID target.ID `json:"targetId,omitempty"` }
Version serviceWorker version.
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersion
MarshalEasyJSON supports easyjson.Marshaler interface
MarshalJSON supports json.Marshaler interface
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
UnmarshalJSON supports json.Unmarshaler interface
VersionRunningStatus [no description].
const ( VersionRunningStatusStopped VersionRunningStatus = "stopped" VersionRunningStatusStarting VersionRunningStatus = "starting" VersionRunningStatusRunning VersionRunningStatus = "running" VersionRunningStatusStopping VersionRunningStatus = "stopping" )
VersionRunningStatus values.
func (t VersionRunningStatus) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (t VersionRunningStatus) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (t VersionRunningStatus) String() string
String returns the VersionRunningStatus as string value.
func (t *VersionRunningStatus) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *VersionRunningStatus) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
VersionStatus [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker#type-ServiceWorkerVersionStatus
const ( VersionStatusNew VersionStatus = "new" VersionStatusInstalling VersionStatus = "installing" VersionStatusInstalled VersionStatus = "installed" VersionStatusActivating VersionStatus = "activating" VersionStatusActivated VersionStatus = "activated" VersionStatusRedundant VersionStatus = "redundant" )
VersionStatus values.
func (t VersionStatus) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (t VersionStatus) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (t VersionStatus) String() string
String returns the VersionStatus as string value.
func (t *VersionStatus) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *VersionStatus) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
Package serviceworker imports 8 packages (graph) and is imported by 4 packages. Updated 2021-01-07. Refresh now. Tools for package owners.