/
command.go
137 lines (116 loc) · 5.16 KB
/
command.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Code generated by cdpgen. DO NOT EDIT.
package serviceworker
// DeliverPushMessageArgs represents the arguments for DeliverPushMessage in the ServiceWorker domain.
type DeliverPushMessageArgs struct {
Origin string `json:"origin"` // No description.
RegistrationID RegistrationID `json:"registrationId"` // No description.
Data string `json:"data"` // No description.
}
// NewDeliverPushMessageArgs initializes DeliverPushMessageArgs with the required arguments.
func NewDeliverPushMessageArgs(origin string, registrationID RegistrationID, data string) *DeliverPushMessageArgs {
args := new(DeliverPushMessageArgs)
args.Origin = origin
args.RegistrationID = registrationID
args.Data = data
return args
}
// DispatchSyncEventArgs represents the arguments for DispatchSyncEvent in the ServiceWorker domain.
type DispatchSyncEventArgs struct {
Origin string `json:"origin"` // No description.
RegistrationID RegistrationID `json:"registrationId"` // No description.
Tag string `json:"tag"` // No description.
LastChance bool `json:"lastChance"` // No description.
}
// NewDispatchSyncEventArgs initializes DispatchSyncEventArgs with the required arguments.
func NewDispatchSyncEventArgs(origin string, registrationID RegistrationID, tag string, lastChance bool) *DispatchSyncEventArgs {
args := new(DispatchSyncEventArgs)
args.Origin = origin
args.RegistrationID = registrationID
args.Tag = tag
args.LastChance = lastChance
return args
}
// DispatchPeriodicSyncEventArgs represents the arguments for DispatchPeriodicSyncEvent in the ServiceWorker domain.
type DispatchPeriodicSyncEventArgs struct {
Origin string `json:"origin"` // No description.
RegistrationID RegistrationID `json:"registrationId"` // No description.
Tag string `json:"tag"` // No description.
}
// NewDispatchPeriodicSyncEventArgs initializes DispatchPeriodicSyncEventArgs with the required arguments.
func NewDispatchPeriodicSyncEventArgs(origin string, registrationID RegistrationID, tag string) *DispatchPeriodicSyncEventArgs {
args := new(DispatchPeriodicSyncEventArgs)
args.Origin = origin
args.RegistrationID = registrationID
args.Tag = tag
return args
}
// InspectWorkerArgs represents the arguments for InspectWorker in the ServiceWorker domain.
type InspectWorkerArgs struct {
VersionID string `json:"versionId"` // No description.
}
// NewInspectWorkerArgs initializes InspectWorkerArgs with the required arguments.
func NewInspectWorkerArgs(versionID string) *InspectWorkerArgs {
args := new(InspectWorkerArgs)
args.VersionID = versionID
return args
}
// SetForceUpdateOnPageLoadArgs represents the arguments for SetForceUpdateOnPageLoad in the ServiceWorker domain.
type SetForceUpdateOnPageLoadArgs struct {
ForceUpdateOnPageLoad bool `json:"forceUpdateOnPageLoad"` // No description.
}
// NewSetForceUpdateOnPageLoadArgs initializes SetForceUpdateOnPageLoadArgs with the required arguments.
func NewSetForceUpdateOnPageLoadArgs(forceUpdateOnPageLoad bool) *SetForceUpdateOnPageLoadArgs {
args := new(SetForceUpdateOnPageLoadArgs)
args.ForceUpdateOnPageLoad = forceUpdateOnPageLoad
return args
}
// SkipWaitingArgs represents the arguments for SkipWaiting in the ServiceWorker domain.
type SkipWaitingArgs struct {
ScopeURL string `json:"scopeURL"` // No description.
}
// NewSkipWaitingArgs initializes SkipWaitingArgs with the required arguments.
func NewSkipWaitingArgs(scopeURL string) *SkipWaitingArgs {
args := new(SkipWaitingArgs)
args.ScopeURL = scopeURL
return args
}
// StartWorkerArgs represents the arguments for StartWorker in the ServiceWorker domain.
type StartWorkerArgs struct {
ScopeURL string `json:"scopeURL"` // No description.
}
// NewStartWorkerArgs initializes StartWorkerArgs with the required arguments.
func NewStartWorkerArgs(scopeURL string) *StartWorkerArgs {
args := new(StartWorkerArgs)
args.ScopeURL = scopeURL
return args
}
// StopWorkerArgs represents the arguments for StopWorker in the ServiceWorker domain.
type StopWorkerArgs struct {
VersionID string `json:"versionId"` // No description.
}
// NewStopWorkerArgs initializes StopWorkerArgs with the required arguments.
func NewStopWorkerArgs(versionID string) *StopWorkerArgs {
args := new(StopWorkerArgs)
args.VersionID = versionID
return args
}
// UnregisterArgs represents the arguments for Unregister in the ServiceWorker domain.
type UnregisterArgs struct {
ScopeURL string `json:"scopeURL"` // No description.
}
// NewUnregisterArgs initializes UnregisterArgs with the required arguments.
func NewUnregisterArgs(scopeURL string) *UnregisterArgs {
args := new(UnregisterArgs)
args.ScopeURL = scopeURL
return args
}
// UpdateRegistrationArgs represents the arguments for UpdateRegistration in the ServiceWorker domain.
type UpdateRegistrationArgs struct {
ScopeURL string `json:"scopeURL"` // No description.
}
// NewUpdateRegistrationArgs initializes UpdateRegistrationArgs with the required arguments.
func NewUpdateRegistrationArgs(scopeURL string) *UpdateRegistrationArgs {
args := new(UpdateRegistrationArgs)
args.ScopeURL = scopeURL
return args
}