vendor/github.com/go-rod/rod/lib/proto/service_worker.go

350 lines · 10377 bytes

  1// This file is generated by "./lib/proto/generate"
  2
  3package proto
  4
  5/*
  6
  7ServiceWorker
  8
  9*/
 10
 11// ServiceWorkerRegistrationID ...
 12type ServiceWorkerRegistrationID string
 13
 14// ServiceWorkerServiceWorkerRegistration ServiceWorker registration.
 15type ServiceWorkerServiceWorkerRegistration struct {
 16	// RegistrationID ...
 17	RegistrationID ServiceWorkerRegistrationID `json:"registrationId"`
 18
 19	// ScopeURL ...
 20	ScopeURL string `json:"scopeURL"`
 21
 22	// IsDeleted ...
 23	IsDeleted bool `json:"isDeleted"`
 24}
 25
 26// ServiceWorkerServiceWorkerVersionRunningStatus ...
 27type ServiceWorkerServiceWorkerVersionRunningStatus string
 28
 29const (
 30	// ServiceWorkerServiceWorkerVersionRunningStatusStopped enum const.
 31	ServiceWorkerServiceWorkerVersionRunningStatusStopped ServiceWorkerServiceWorkerVersionRunningStatus = "stopped"
 32
 33	// ServiceWorkerServiceWorkerVersionRunningStatusStarting enum const.
 34	ServiceWorkerServiceWorkerVersionRunningStatusStarting ServiceWorkerServiceWorkerVersionRunningStatus = "starting"
 35
 36	// ServiceWorkerServiceWorkerVersionRunningStatusRunning enum const.
 37	ServiceWorkerServiceWorkerVersionRunningStatusRunning ServiceWorkerServiceWorkerVersionRunningStatus = "running"
 38
 39	// ServiceWorkerServiceWorkerVersionRunningStatusStopping enum const.
 40	ServiceWorkerServiceWorkerVersionRunningStatusStopping ServiceWorkerServiceWorkerVersionRunningStatus = "stopping"
 41)
 42
 43// ServiceWorkerServiceWorkerVersionStatus ...
 44type ServiceWorkerServiceWorkerVersionStatus string
 45
 46const (
 47	// ServiceWorkerServiceWorkerVersionStatusNew enum const.
 48	ServiceWorkerServiceWorkerVersionStatusNew ServiceWorkerServiceWorkerVersionStatus = "new"
 49
 50	// ServiceWorkerServiceWorkerVersionStatusInstalling enum const.
 51	ServiceWorkerServiceWorkerVersionStatusInstalling ServiceWorkerServiceWorkerVersionStatus = "installing"
 52
 53	// ServiceWorkerServiceWorkerVersionStatusInstalled enum const.
 54	ServiceWorkerServiceWorkerVersionStatusInstalled ServiceWorkerServiceWorkerVersionStatus = "installed"
 55
 56	// ServiceWorkerServiceWorkerVersionStatusActivating enum const.
 57	ServiceWorkerServiceWorkerVersionStatusActivating ServiceWorkerServiceWorkerVersionStatus = "activating"
 58
 59	// ServiceWorkerServiceWorkerVersionStatusActivated enum const.
 60	ServiceWorkerServiceWorkerVersionStatusActivated ServiceWorkerServiceWorkerVersionStatus = "activated"
 61
 62	// ServiceWorkerServiceWorkerVersionStatusRedundant enum const.
 63	ServiceWorkerServiceWorkerVersionStatusRedundant ServiceWorkerServiceWorkerVersionStatus = "redundant"
 64)
 65
 66// ServiceWorkerServiceWorkerVersion ServiceWorker version.
 67type ServiceWorkerServiceWorkerVersion struct {
 68	// VersionID ...
 69	VersionID string `json:"versionId"`
 70
 71	// RegistrationID ...
 72	RegistrationID ServiceWorkerRegistrationID `json:"registrationId"`
 73
 74	// ScriptURL ...
 75	ScriptURL string `json:"scriptURL"`
 76
 77	// RunningStatus ...
 78	RunningStatus ServiceWorkerServiceWorkerVersionRunningStatus `json:"runningStatus"`
 79
 80	// Status ...
 81	Status ServiceWorkerServiceWorkerVersionStatus `json:"status"`
 82
 83	// ScriptLastModified (optional) The Last-Modified header value of the main script.
 84	ScriptLastModified *float64 `json:"scriptLastModified,omitempty"`
 85
 86	// ScriptResponseTime (optional) The time at which the response headers of the main script were received from the server.
 87	// For cached script it is the last time the cache entry was validated.
 88	ScriptResponseTime *float64 `json:"scriptResponseTime,omitempty"`
 89
 90	// ControlledClients (optional) ...
 91	ControlledClients []TargetTargetID `json:"controlledClients,omitempty"`
 92
 93	// TargetID (optional) ...
 94	TargetID TargetTargetID `json:"targetId,omitempty"`
 95
 96	// RouterRules (optional) ...
 97	RouterRules string `json:"routerRules,omitempty"`
 98}
 99
100// ServiceWorkerServiceWorkerErrorMessage ServiceWorker error message.
101type ServiceWorkerServiceWorkerErrorMessage struct {
102	// ErrorMessage ...
103	ErrorMessage string `json:"errorMessage"`
104
105	// RegistrationID ...
106	RegistrationID ServiceWorkerRegistrationID `json:"registrationId"`
107
108	// VersionID ...
109	VersionID string `json:"versionId"`
110
111	// SourceURL ...
112	SourceURL string `json:"sourceURL"`
113
114	// LineNumber ...
115	LineNumber int `json:"lineNumber"`
116
117	// ColumnNumber ...
118	ColumnNumber int `json:"columnNumber"`
119}
120
121// ServiceWorkerDeliverPushMessage ...
122type ServiceWorkerDeliverPushMessage struct {
123	// Origin ...
124	Origin string `json:"origin"`
125
126	// RegistrationID ...
127	RegistrationID ServiceWorkerRegistrationID `json:"registrationId"`
128
129	// Data ...
130	Data string `json:"data"`
131}
132
133// ProtoReq name.
134func (m ServiceWorkerDeliverPushMessage) ProtoReq() string { return "ServiceWorker.deliverPushMessage" }
135
136// Call sends the request.
137func (m ServiceWorkerDeliverPushMessage) Call(c Client) error {
138	return call(m.ProtoReq(), m, nil, c)
139}
140
141// ServiceWorkerDisable ...
142type ServiceWorkerDisable struct{}
143
144// ProtoReq name.
145func (m ServiceWorkerDisable) ProtoReq() string { return "ServiceWorker.disable" }
146
147// Call sends the request.
148func (m ServiceWorkerDisable) Call(c Client) error {
149	return call(m.ProtoReq(), m, nil, c)
150}
151
152// ServiceWorkerDispatchSyncEvent ...
153type ServiceWorkerDispatchSyncEvent struct {
154	// Origin ...
155	Origin string `json:"origin"`
156
157	// RegistrationID ...
158	RegistrationID ServiceWorkerRegistrationID `json:"registrationId"`
159
160	// Tag ...
161	Tag string `json:"tag"`
162
163	// LastChance ...
164	LastChance bool `json:"lastChance"`
165}
166
167// ProtoReq name.
168func (m ServiceWorkerDispatchSyncEvent) ProtoReq() string { return "ServiceWorker.dispatchSyncEvent" }
169
170// Call sends the request.
171func (m ServiceWorkerDispatchSyncEvent) Call(c Client) error {
172	return call(m.ProtoReq(), m, nil, c)
173}
174
175// ServiceWorkerDispatchPeriodicSyncEvent ...
176type ServiceWorkerDispatchPeriodicSyncEvent struct {
177	// Origin ...
178	Origin string `json:"origin"`
179
180	// RegistrationID ...
181	RegistrationID ServiceWorkerRegistrationID `json:"registrationId"`
182
183	// Tag ...
184	Tag string `json:"tag"`
185}
186
187// ProtoReq name.
188func (m ServiceWorkerDispatchPeriodicSyncEvent) ProtoReq() string {
189	return "ServiceWorker.dispatchPeriodicSyncEvent"
190}
191
192// Call sends the request.
193func (m ServiceWorkerDispatchPeriodicSyncEvent) Call(c Client) error {
194	return call(m.ProtoReq(), m, nil, c)
195}
196
197// ServiceWorkerEnable ...
198type ServiceWorkerEnable struct{}
199
200// ProtoReq name.
201func (m ServiceWorkerEnable) ProtoReq() string { return "ServiceWorker.enable" }
202
203// Call sends the request.
204func (m ServiceWorkerEnable) Call(c Client) error {
205	return call(m.ProtoReq(), m, nil, c)
206}
207
208// ServiceWorkerInspectWorker ...
209type ServiceWorkerInspectWorker struct {
210	// VersionID ...
211	VersionID string `json:"versionId"`
212}
213
214// ProtoReq name.
215func (m ServiceWorkerInspectWorker) ProtoReq() string { return "ServiceWorker.inspectWorker" }
216
217// Call sends the request.
218func (m ServiceWorkerInspectWorker) Call(c Client) error {
219	return call(m.ProtoReq(), m, nil, c)
220}
221
222// ServiceWorkerSetForceUpdateOnPageLoad ...
223type ServiceWorkerSetForceUpdateOnPageLoad struct {
224	// ForceUpdateOnPageLoad ...
225	ForceUpdateOnPageLoad bool `json:"forceUpdateOnPageLoad"`
226}
227
228// ProtoReq name.
229func (m ServiceWorkerSetForceUpdateOnPageLoad) ProtoReq() string {
230	return "ServiceWorker.setForceUpdateOnPageLoad"
231}
232
233// Call sends the request.
234func (m ServiceWorkerSetForceUpdateOnPageLoad) Call(c Client) error {
235	return call(m.ProtoReq(), m, nil, c)
236}
237
238// ServiceWorkerSkipWaiting ...
239type ServiceWorkerSkipWaiting struct {
240	// ScopeURL ...
241	ScopeURL string `json:"scopeURL"`
242}
243
244// ProtoReq name.
245func (m ServiceWorkerSkipWaiting) ProtoReq() string { return "ServiceWorker.skipWaiting" }
246
247// Call sends the request.
248func (m ServiceWorkerSkipWaiting) Call(c Client) error {
249	return call(m.ProtoReq(), m, nil, c)
250}
251
252// ServiceWorkerStartWorker ...
253type ServiceWorkerStartWorker struct {
254	// ScopeURL ...
255	ScopeURL string `json:"scopeURL"`
256}
257
258// ProtoReq name.
259func (m ServiceWorkerStartWorker) ProtoReq() string { return "ServiceWorker.startWorker" }
260
261// Call sends the request.
262func (m ServiceWorkerStartWorker) Call(c Client) error {
263	return call(m.ProtoReq(), m, nil, c)
264}
265
266// ServiceWorkerStopAllWorkers ...
267type ServiceWorkerStopAllWorkers struct{}
268
269// ProtoReq name.
270func (m ServiceWorkerStopAllWorkers) ProtoReq() string { return "ServiceWorker.stopAllWorkers" }
271
272// Call sends the request.
273func (m ServiceWorkerStopAllWorkers) Call(c Client) error {
274	return call(m.ProtoReq(), m, nil, c)
275}
276
277// ServiceWorkerStopWorker ...
278type ServiceWorkerStopWorker struct {
279	// VersionID ...
280	VersionID string `json:"versionId"`
281}
282
283// ProtoReq name.
284func (m ServiceWorkerStopWorker) ProtoReq() string { return "ServiceWorker.stopWorker" }
285
286// Call sends the request.
287func (m ServiceWorkerStopWorker) Call(c Client) error {
288	return call(m.ProtoReq(), m, nil, c)
289}
290
291// ServiceWorkerUnregister ...
292type ServiceWorkerUnregister struct {
293	// ScopeURL ...
294	ScopeURL string `json:"scopeURL"`
295}
296
297// ProtoReq name.
298func (m ServiceWorkerUnregister) ProtoReq() string { return "ServiceWorker.unregister" }
299
300// Call sends the request.
301func (m ServiceWorkerUnregister) Call(c Client) error {
302	return call(m.ProtoReq(), m, nil, c)
303}
304
305// ServiceWorkerUpdateRegistration ...
306type ServiceWorkerUpdateRegistration struct {
307	// ScopeURL ...
308	ScopeURL string `json:"scopeURL"`
309}
310
311// ProtoReq name.
312func (m ServiceWorkerUpdateRegistration) ProtoReq() string { return "ServiceWorker.updateRegistration" }
313
314// Call sends the request.
315func (m ServiceWorkerUpdateRegistration) Call(c Client) error {
316	return call(m.ProtoReq(), m, nil, c)
317}
318
319// ServiceWorkerWorkerErrorReported ...
320type ServiceWorkerWorkerErrorReported struct {
321	// ErrorMessage ...
322	ErrorMessage *ServiceWorkerServiceWorkerErrorMessage `json:"errorMessage"`
323}
324
325// ProtoEvent name.
326func (evt ServiceWorkerWorkerErrorReported) ProtoEvent() string {
327	return "ServiceWorker.workerErrorReported"
328}
329
330// ServiceWorkerWorkerRegistrationUpdated ...
331type ServiceWorkerWorkerRegistrationUpdated struct {
332	// Registrations ...
333	Registrations []*ServiceWorkerServiceWorkerRegistration `json:"registrations"`
334}
335
336// ProtoEvent name.
337func (evt ServiceWorkerWorkerRegistrationUpdated) ProtoEvent() string {
338	return "ServiceWorker.workerRegistrationUpdated"
339}
340
341// ServiceWorkerWorkerVersionUpdated ...
342type ServiceWorkerWorkerVersionUpdated struct {
343	// Versions ...
344	Versions []*ServiceWorkerServiceWorkerVersion `json:"versions"`
345}
346
347// ProtoEvent name.
348func (evt ServiceWorkerWorkerVersionUpdated) ProtoEvent() string {
349	return "ServiceWorker.workerVersionUpdated"
350}