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

185 lines · 4762 bytes

  1// This file is generated by "./lib/proto/generate"
  2
  3package proto
  4
  5/*
  6
  7DOMStorage
  8
  9Query and modify DOM storage.
 10
 11*/
 12
 13// DOMStorageSerializedStorageKey ...
 14type DOMStorageSerializedStorageKey string
 15
 16// DOMStorageStorageID DOM Storage identifier.
 17type DOMStorageStorageID struct {
 18	// SecurityOrigin (optional) Security origin for the storage.
 19	SecurityOrigin string `json:"securityOrigin,omitempty"`
 20
 21	// StorageKey (optional) Represents a key by which DOM Storage keys its CachedStorageAreas
 22	StorageKey DOMStorageSerializedStorageKey `json:"storageKey,omitempty"`
 23
 24	// IsLocalStorage Whether the storage is local storage (not session storage).
 25	IsLocalStorage bool `json:"isLocalStorage"`
 26}
 27
 28// DOMStorageItem DOM Storage item.
 29type DOMStorageItem []string
 30
 31// DOMStorageClear ...
 32type DOMStorageClear struct {
 33	// StorageID ...
 34	StorageID *DOMStorageStorageID `json:"storageId"`
 35}
 36
 37// ProtoReq name.
 38func (m DOMStorageClear) ProtoReq() string { return "DOMStorage.clear" }
 39
 40// Call sends the request.
 41func (m DOMStorageClear) Call(c Client) error {
 42	return call(m.ProtoReq(), m, nil, c)
 43}
 44
 45// DOMStorageDisable Disables storage tracking, prevents storage events from being sent to the client.
 46type DOMStorageDisable struct{}
 47
 48// ProtoReq name.
 49func (m DOMStorageDisable) ProtoReq() string { return "DOMStorage.disable" }
 50
 51// Call sends the request.
 52func (m DOMStorageDisable) Call(c Client) error {
 53	return call(m.ProtoReq(), m, nil, c)
 54}
 55
 56// DOMStorageEnable Enables storage tracking, storage events will now be delivered to the client.
 57type DOMStorageEnable struct{}
 58
 59// ProtoReq name.
 60func (m DOMStorageEnable) ProtoReq() string { return "DOMStorage.enable" }
 61
 62// Call sends the request.
 63func (m DOMStorageEnable) Call(c Client) error {
 64	return call(m.ProtoReq(), m, nil, c)
 65}
 66
 67// DOMStorageGetDOMStorageItems ...
 68type DOMStorageGetDOMStorageItems struct {
 69	// StorageID ...
 70	StorageID *DOMStorageStorageID `json:"storageId"`
 71}
 72
 73// ProtoReq name.
 74func (m DOMStorageGetDOMStorageItems) ProtoReq() string { return "DOMStorage.getDOMStorageItems" }
 75
 76// Call the request.
 77func (m DOMStorageGetDOMStorageItems) Call(c Client) (*DOMStorageGetDOMStorageItemsResult, error) {
 78	var res DOMStorageGetDOMStorageItemsResult
 79	return &res, call(m.ProtoReq(), m, &res, c)
 80}
 81
 82// DOMStorageGetDOMStorageItemsResult ...
 83type DOMStorageGetDOMStorageItemsResult struct {
 84	// Entries ...
 85	Entries []DOMStorageItem `json:"entries"`
 86}
 87
 88// DOMStorageRemoveDOMStorageItem ...
 89type DOMStorageRemoveDOMStorageItem struct {
 90	// StorageID ...
 91	StorageID *DOMStorageStorageID `json:"storageId"`
 92
 93	// Key ...
 94	Key string `json:"key"`
 95}
 96
 97// ProtoReq name.
 98func (m DOMStorageRemoveDOMStorageItem) ProtoReq() string { return "DOMStorage.removeDOMStorageItem" }
 99
100// Call sends the request.
101func (m DOMStorageRemoveDOMStorageItem) Call(c Client) error {
102	return call(m.ProtoReq(), m, nil, c)
103}
104
105// DOMStorageSetDOMStorageItem ...
106type DOMStorageSetDOMStorageItem struct {
107	// StorageID ...
108	StorageID *DOMStorageStorageID `json:"storageId"`
109
110	// Key ...
111	Key string `json:"key"`
112
113	// Value ...
114	Value string `json:"value"`
115}
116
117// ProtoReq name.
118func (m DOMStorageSetDOMStorageItem) ProtoReq() string { return "DOMStorage.setDOMStorageItem" }
119
120// Call sends the request.
121func (m DOMStorageSetDOMStorageItem) Call(c Client) error {
122	return call(m.ProtoReq(), m, nil, c)
123}
124
125// DOMStorageDomStorageItemAdded ...
126type DOMStorageDomStorageItemAdded struct {
127	// StorageID ...
128	StorageID *DOMStorageStorageID `json:"storageId"`
129
130	// Key ...
131	Key string `json:"key"`
132
133	// NewValue ...
134	NewValue string `json:"newValue"`
135}
136
137// ProtoEvent name.
138func (evt DOMStorageDomStorageItemAdded) ProtoEvent() string {
139	return "DOMStorage.domStorageItemAdded"
140}
141
142// DOMStorageDomStorageItemRemoved ...
143type DOMStorageDomStorageItemRemoved struct {
144	// StorageID ...
145	StorageID *DOMStorageStorageID `json:"storageId"`
146
147	// Key ...
148	Key string `json:"key"`
149}
150
151// ProtoEvent name.
152func (evt DOMStorageDomStorageItemRemoved) ProtoEvent() string {
153	return "DOMStorage.domStorageItemRemoved"
154}
155
156// DOMStorageDomStorageItemUpdated ...
157type DOMStorageDomStorageItemUpdated struct {
158	// StorageID ...
159	StorageID *DOMStorageStorageID `json:"storageId"`
160
161	// Key ...
162	Key string `json:"key"`
163
164	// OldValue ...
165	OldValue string `json:"oldValue"`
166
167	// NewValue ...
168	NewValue string `json:"newValue"`
169}
170
171// ProtoEvent name.
172func (evt DOMStorageDomStorageItemUpdated) ProtoEvent() string {
173	return "DOMStorage.domStorageItemUpdated"
174}
175
176// DOMStorageDomStorageItemsCleared ...
177type DOMStorageDomStorageItemsCleared struct {
178	// StorageID ...
179	StorageID *DOMStorageStorageID `json:"storageId"`
180}
181
182// ProtoEvent name.
183func (evt DOMStorageDomStorageItemsCleared) ProtoEvent() string {
184	return "DOMStorage.domStorageItemsCleared"
185}