forked from go-rod/rod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dom_storage.go
197 lines (141 loc) · 4.65 KB
/
dom_storage.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
// This file is generated by "./lib/proto/generate"
package proto
/*
DOMStorage
Query and modify DOM storage.
*/
// DOMStorageSerializedStorageKey ...
type DOMStorageSerializedStorageKey string
// DOMStorageStorageID DOM Storage identifier.
type DOMStorageStorageID struct {
// SecurityOrigin (optional) Security origin for the storage.
SecurityOrigin string `json:"securityOrigin,omitempty"`
// StorageKey (optional) Represents a key by which DOM Storage keys its CachedStorageAreas
StorageKey DOMStorageSerializedStorageKey `json:"storageKey,omitempty"`
// IsLocalStorage Whether the storage is local storage (not session storage).
IsLocalStorage bool `json:"isLocalStorage"`
}
// DOMStorageItem DOM Storage item.
type DOMStorageItem []string
// DOMStorageClear ...
type DOMStorageClear struct {
// StorageID ...
StorageID *DOMStorageStorageID `json:"storageId"`
}
// ProtoReq name
func (m DOMStorageClear) ProtoReq() string { return "DOMStorage.clear" }
// Call sends the request
func (m DOMStorageClear) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// DOMStorageDisable Disables storage tracking, prevents storage events from being sent to the client.
type DOMStorageDisable struct {
}
// ProtoReq name
func (m DOMStorageDisable) ProtoReq() string { return "DOMStorage.disable" }
// Call sends the request
func (m DOMStorageDisable) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// DOMStorageEnable Enables storage tracking, storage events will now be delivered to the client.
type DOMStorageEnable struct {
}
// ProtoReq name
func (m DOMStorageEnable) ProtoReq() string { return "DOMStorage.enable" }
// Call sends the request
func (m DOMStorageEnable) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// DOMStorageGetDOMStorageItems ...
type DOMStorageGetDOMStorageItems struct {
// StorageID ...
StorageID *DOMStorageStorageID `json:"storageId"`
}
// ProtoReq name
func (m DOMStorageGetDOMStorageItems) ProtoReq() string { return "DOMStorage.getDOMStorageItems" }
// Call the request
func (m DOMStorageGetDOMStorageItems) Call(c Client) (*DOMStorageGetDOMStorageItemsResult, error) {
var res DOMStorageGetDOMStorageItemsResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// DOMStorageGetDOMStorageItemsResult ...
type DOMStorageGetDOMStorageItemsResult struct {
// Entries ...
Entries []DOMStorageItem `json:"entries"`
}
// DOMStorageRemoveDOMStorageItem ...
type DOMStorageRemoveDOMStorageItem struct {
// StorageID ...
StorageID *DOMStorageStorageID `json:"storageId"`
// Key ...
Key string `json:"key"`
}
// ProtoReq name
func (m DOMStorageRemoveDOMStorageItem) ProtoReq() string { return "DOMStorage.removeDOMStorageItem" }
// Call sends the request
func (m DOMStorageRemoveDOMStorageItem) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// DOMStorageSetDOMStorageItem ...
type DOMStorageSetDOMStorageItem struct {
// StorageID ...
StorageID *DOMStorageStorageID `json:"storageId"`
// Key ...
Key string `json:"key"`
// Value ...
Value string `json:"value"`
}
// ProtoReq name
func (m DOMStorageSetDOMStorageItem) ProtoReq() string { return "DOMStorage.setDOMStorageItem" }
// Call sends the request
func (m DOMStorageSetDOMStorageItem) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// DOMStorageDomStorageItemAdded ...
type DOMStorageDomStorageItemAdded struct {
// StorageID ...
StorageID *DOMStorageStorageID `json:"storageId"`
// Key ...
Key string `json:"key"`
// NewValue ...
NewValue string `json:"newValue"`
}
// ProtoEvent name
func (evt DOMStorageDomStorageItemAdded) ProtoEvent() string {
return "DOMStorage.domStorageItemAdded"
}
// DOMStorageDomStorageItemRemoved ...
type DOMStorageDomStorageItemRemoved struct {
// StorageID ...
StorageID *DOMStorageStorageID `json:"storageId"`
// Key ...
Key string `json:"key"`
}
// ProtoEvent name
func (evt DOMStorageDomStorageItemRemoved) ProtoEvent() string {
return "DOMStorage.domStorageItemRemoved"
}
// DOMStorageDomStorageItemUpdated ...
type DOMStorageDomStorageItemUpdated struct {
// StorageID ...
StorageID *DOMStorageStorageID `json:"storageId"`
// Key ...
Key string `json:"key"`
// OldValue ...
OldValue string `json:"oldValue"`
// NewValue ...
NewValue string `json:"newValue"`
}
// ProtoEvent name
func (evt DOMStorageDomStorageItemUpdated) ProtoEvent() string {
return "DOMStorage.domStorageItemUpdated"
}
// DOMStorageDomStorageItemsCleared ...
type DOMStorageDomStorageItemsCleared struct {
// StorageID ...
StorageID *DOMStorageStorageID `json:"storageId"`
}
// ProtoEvent name
func (evt DOMStorageDomStorageItemsCleared) ProtoEvent() string {
return "DOMStorage.domStorageItemsCleared"
}