forked from go-rod/rod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage.go
981 lines (753 loc) · 31.5 KB
/
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
// This file is generated by "./lib/proto/generate"
package proto
/*
Storage
*/
// StorageSerializedStorageKey ...
type StorageSerializedStorageKey string
// StorageStorageType Enum of possible storage types.
type StorageStorageType string
const (
// StorageStorageTypeAppcache enum const
StorageStorageTypeAppcache StorageStorageType = "appcache"
// StorageStorageTypeCookies enum const
StorageStorageTypeCookies StorageStorageType = "cookies"
// StorageStorageTypeFileSystems enum const
StorageStorageTypeFileSystems StorageStorageType = "file_systems"
// StorageStorageTypeIndexeddb enum const
StorageStorageTypeIndexeddb StorageStorageType = "indexeddb"
// StorageStorageTypeLocalStorage enum const
StorageStorageTypeLocalStorage StorageStorageType = "local_storage"
// StorageStorageTypeShaderCache enum const
StorageStorageTypeShaderCache StorageStorageType = "shader_cache"
// StorageStorageTypeWebsql enum const
StorageStorageTypeWebsql StorageStorageType = "websql"
// StorageStorageTypeServiceWorkers enum const
StorageStorageTypeServiceWorkers StorageStorageType = "service_workers"
// StorageStorageTypeCacheStorage enum const
StorageStorageTypeCacheStorage StorageStorageType = "cache_storage"
// StorageStorageTypeInterestGroups enum const
StorageStorageTypeInterestGroups StorageStorageType = "interest_groups"
// StorageStorageTypeSharedStorage enum const
StorageStorageTypeSharedStorage StorageStorageType = "shared_storage"
// StorageStorageTypeStorageBuckets enum const
StorageStorageTypeStorageBuckets StorageStorageType = "storage_buckets"
// StorageStorageTypeAll enum const
StorageStorageTypeAll StorageStorageType = "all"
// StorageStorageTypeOther enum const
StorageStorageTypeOther StorageStorageType = "other"
)
// StorageUsageForType Usage for a storage type.
type StorageUsageForType struct {
// StorageType Name of storage type.
StorageType StorageStorageType `json:"storageType"`
// Usage Storage usage (bytes).
Usage float64 `json:"usage"`
}
// StorageTrustTokens (experimental) Pair of issuer origin and number of available (signed, but not used) Trust
// Tokens from that issuer.
type StorageTrustTokens struct {
// IssuerOrigin ...
IssuerOrigin string `json:"issuerOrigin"`
// Count ...
Count float64 `json:"count"`
}
// StorageInterestGroupAccessType Enum of interest group access types.
type StorageInterestGroupAccessType string
const (
// StorageInterestGroupAccessTypeJoin enum const
StorageInterestGroupAccessTypeJoin StorageInterestGroupAccessType = "join"
// StorageInterestGroupAccessTypeLeave enum const
StorageInterestGroupAccessTypeLeave StorageInterestGroupAccessType = "leave"
// StorageInterestGroupAccessTypeUpdate enum const
StorageInterestGroupAccessTypeUpdate StorageInterestGroupAccessType = "update"
// StorageInterestGroupAccessTypeLoaded enum const
StorageInterestGroupAccessTypeLoaded StorageInterestGroupAccessType = "loaded"
// StorageInterestGroupAccessTypeBid enum const
StorageInterestGroupAccessTypeBid StorageInterestGroupAccessType = "bid"
// StorageInterestGroupAccessTypeWin enum const
StorageInterestGroupAccessTypeWin StorageInterestGroupAccessType = "win"
)
// StorageInterestGroupAd Ad advertising element inside an interest group.
type StorageInterestGroupAd struct {
// RenderURL ...
RenderURL string `json:"renderUrl"`
// Metadata (optional) ...
Metadata string `json:"metadata,omitempty"`
}
// StorageInterestGroupDetails The full details of an interest group.
type StorageInterestGroupDetails struct {
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
// Name ...
Name string `json:"name"`
// ExpirationTime ...
ExpirationTime TimeSinceEpoch `json:"expirationTime"`
// JoiningOrigin ...
JoiningOrigin string `json:"joiningOrigin"`
// BiddingURL (optional) ...
BiddingURL string `json:"biddingUrl,omitempty"`
// BiddingWasmHelperURL (optional) ...
BiddingWasmHelperURL string `json:"biddingWasmHelperUrl,omitempty"`
// UpdateURL (optional) ...
UpdateURL string `json:"updateUrl,omitempty"`
// TrustedBiddingSignalsURL (optional) ...
TrustedBiddingSignalsURL string `json:"trustedBiddingSignalsUrl,omitempty"`
// TrustedBiddingSignalsKeys ...
TrustedBiddingSignalsKeys []string `json:"trustedBiddingSignalsKeys"`
// UserBiddingSignals (optional) ...
UserBiddingSignals string `json:"userBiddingSignals,omitempty"`
// Ads ...
Ads []*StorageInterestGroupAd `json:"ads"`
// AdComponents ...
AdComponents []*StorageInterestGroupAd `json:"adComponents"`
}
// StorageSharedStorageAccessType Enum of shared storage access types.
type StorageSharedStorageAccessType string
const (
// StorageSharedStorageAccessTypeDocumentAddModule enum const
StorageSharedStorageAccessTypeDocumentAddModule StorageSharedStorageAccessType = "documentAddModule"
// StorageSharedStorageAccessTypeDocumentSelectURL enum const
StorageSharedStorageAccessTypeDocumentSelectURL StorageSharedStorageAccessType = "documentSelectURL"
// StorageSharedStorageAccessTypeDocumentRun enum const
StorageSharedStorageAccessTypeDocumentRun StorageSharedStorageAccessType = "documentRun"
// StorageSharedStorageAccessTypeDocumentSet enum const
StorageSharedStorageAccessTypeDocumentSet StorageSharedStorageAccessType = "documentSet"
// StorageSharedStorageAccessTypeDocumentAppend enum const
StorageSharedStorageAccessTypeDocumentAppend StorageSharedStorageAccessType = "documentAppend"
// StorageSharedStorageAccessTypeDocumentDelete enum const
StorageSharedStorageAccessTypeDocumentDelete StorageSharedStorageAccessType = "documentDelete"
// StorageSharedStorageAccessTypeDocumentClear enum const
StorageSharedStorageAccessTypeDocumentClear StorageSharedStorageAccessType = "documentClear"
// StorageSharedStorageAccessTypeWorkletSet enum const
StorageSharedStorageAccessTypeWorkletSet StorageSharedStorageAccessType = "workletSet"
// StorageSharedStorageAccessTypeWorkletAppend enum const
StorageSharedStorageAccessTypeWorkletAppend StorageSharedStorageAccessType = "workletAppend"
// StorageSharedStorageAccessTypeWorkletDelete enum const
StorageSharedStorageAccessTypeWorkletDelete StorageSharedStorageAccessType = "workletDelete"
// StorageSharedStorageAccessTypeWorkletClear enum const
StorageSharedStorageAccessTypeWorkletClear StorageSharedStorageAccessType = "workletClear"
// StorageSharedStorageAccessTypeWorkletGet enum const
StorageSharedStorageAccessTypeWorkletGet StorageSharedStorageAccessType = "workletGet"
// StorageSharedStorageAccessTypeWorkletKeys enum const
StorageSharedStorageAccessTypeWorkletKeys StorageSharedStorageAccessType = "workletKeys"
// StorageSharedStorageAccessTypeWorkletEntries enum const
StorageSharedStorageAccessTypeWorkletEntries StorageSharedStorageAccessType = "workletEntries"
// StorageSharedStorageAccessTypeWorkletLength enum const
StorageSharedStorageAccessTypeWorkletLength StorageSharedStorageAccessType = "workletLength"
// StorageSharedStorageAccessTypeWorkletRemainingBudget enum const
StorageSharedStorageAccessTypeWorkletRemainingBudget StorageSharedStorageAccessType = "workletRemainingBudget"
)
// StorageSharedStorageEntry Struct for a single key-value pair in an origin's shared storage.
type StorageSharedStorageEntry struct {
// Key ...
Key string `json:"key"`
// Value ...
Value string `json:"value"`
}
// StorageSharedStorageMetadata Details for an origin's shared storage.
type StorageSharedStorageMetadata struct {
// CreationTime ...
CreationTime TimeSinceEpoch `json:"creationTime"`
// Length ...
Length int `json:"length"`
// RemainingBudget ...
RemainingBudget float64 `json:"remainingBudget"`
}
// StorageSharedStorageReportingMetadata Pair of reporting metadata details for a candidate URL for `selectURL()`.
type StorageSharedStorageReportingMetadata struct {
// EventType ...
EventType string `json:"eventType"`
// ReportingURL ...
ReportingURL string `json:"reportingUrl"`
}
// StorageSharedStorageURLWithMetadata Bundles a candidate URL with its reporting metadata.
type StorageSharedStorageURLWithMetadata struct {
// URL Spec of candidate URL.
URL string `json:"url"`
// ReportingMetadata Any associated reporting metadata.
ReportingMetadata []*StorageSharedStorageReportingMetadata `json:"reportingMetadata"`
}
// StorageSharedStorageAccessParams Bundles the parameters for shared storage access events whose
// presence/absence can vary according to SharedStorageAccessType.
type StorageSharedStorageAccessParams struct {
// ScriptSourceURL (optional) Spec of the module script URL.
// Present only for SharedStorageAccessType.documentAddModule.
ScriptSourceURL string `json:"scriptSourceUrl,omitempty"`
// OperationName (optional) Name of the registered operation to be run.
// Present only for SharedStorageAccessType.documentRun and
// SharedStorageAccessType.documentSelectURL.
OperationName string `json:"operationName,omitempty"`
// SerializedData (optional) The operation's serialized data in bytes (converted to a string).
// Present only for SharedStorageAccessType.documentRun and
// SharedStorageAccessType.documentSelectURL.
SerializedData string `json:"serializedData,omitempty"`
// UrlsWithMetadata (optional) Array of candidate URLs' specs, along with any associated metadata.
// Present only for SharedStorageAccessType.documentSelectURL.
UrlsWithMetadata []*StorageSharedStorageURLWithMetadata `json:"urlsWithMetadata,omitempty"`
// Key (optional) Key for a specific entry in an origin's shared storage.
// Present only for SharedStorageAccessType.documentSet,
// SharedStorageAccessType.documentAppend,
// SharedStorageAccessType.documentDelete,
// SharedStorageAccessType.workletSet,
// SharedStorageAccessType.workletAppend,
// SharedStorageAccessType.workletDelete, and
// SharedStorageAccessType.workletGet.
Key string `json:"key,omitempty"`
// Value (optional) Value for a specific entry in an origin's shared storage.
// Present only for SharedStorageAccessType.documentSet,
// SharedStorageAccessType.documentAppend,
// SharedStorageAccessType.workletSet, and
// SharedStorageAccessType.workletAppend.
Value string `json:"value,omitempty"`
// IgnoreIfPresent (optional) Whether or not to set an entry for a key if that key is already present.
// Present only for SharedStorageAccessType.documentSet and
// SharedStorageAccessType.workletSet.
IgnoreIfPresent bool `json:"ignoreIfPresent,omitempty"`
}
// StorageStorageBucketsDurability ...
type StorageStorageBucketsDurability string
const (
// StorageStorageBucketsDurabilityRelaxed enum const
StorageStorageBucketsDurabilityRelaxed StorageStorageBucketsDurability = "relaxed"
// StorageStorageBucketsDurabilityStrict enum const
StorageStorageBucketsDurabilityStrict StorageStorageBucketsDurability = "strict"
)
// StorageStorageBucketInfo ...
type StorageStorageBucketInfo struct {
// StorageKey ...
StorageKey StorageSerializedStorageKey `json:"storageKey"`
// ID ...
ID string `json:"id"`
// Name ...
Name string `json:"name"`
// IsDefault ...
IsDefault bool `json:"isDefault"`
// Expiration ...
Expiration TimeSinceEpoch `json:"expiration"`
// Quota Storage quota (bytes).
Quota float64 `json:"quota"`
// Persistent ...
Persistent bool `json:"persistent"`
// Durability ...
Durability StorageStorageBucketsDurability `json:"durability"`
}
// StorageGetStorageKeyForFrame Returns a storage key given a frame id.
type StorageGetStorageKeyForFrame struct {
// FrameID ...
FrameID PageFrameID `json:"frameId"`
}
// ProtoReq name
func (m StorageGetStorageKeyForFrame) ProtoReq() string { return "Storage.getStorageKeyForFrame" }
// Call the request
func (m StorageGetStorageKeyForFrame) Call(c Client) (*StorageGetStorageKeyForFrameResult, error) {
var res StorageGetStorageKeyForFrameResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// StorageGetStorageKeyForFrameResult ...
type StorageGetStorageKeyForFrameResult struct {
// StorageKey ...
StorageKey StorageSerializedStorageKey `json:"storageKey"`
}
// StorageClearDataForOrigin Clears storage for origin.
type StorageClearDataForOrigin struct {
// Origin Security origin.
Origin string `json:"origin"`
// StorageTypes Comma separated list of StorageType to clear.
StorageTypes string `json:"storageTypes"`
}
// ProtoReq name
func (m StorageClearDataForOrigin) ProtoReq() string { return "Storage.clearDataForOrigin" }
// Call sends the request
func (m StorageClearDataForOrigin) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageClearDataForStorageKey Clears storage for storage key.
type StorageClearDataForStorageKey struct {
// StorageKey Storage key.
StorageKey string `json:"storageKey"`
// StorageTypes Comma separated list of StorageType to clear.
StorageTypes string `json:"storageTypes"`
}
// ProtoReq name
func (m StorageClearDataForStorageKey) ProtoReq() string { return "Storage.clearDataForStorageKey" }
// Call sends the request
func (m StorageClearDataForStorageKey) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageGetCookies Returns all browser cookies.
type StorageGetCookies struct {
// BrowserContextID (optional) Browser context to use when called on the browser endpoint.
BrowserContextID BrowserBrowserContextID `json:"browserContextId,omitempty"`
}
// ProtoReq name
func (m StorageGetCookies) ProtoReq() string { return "Storage.getCookies" }
// Call the request
func (m StorageGetCookies) Call(c Client) (*StorageGetCookiesResult, error) {
var res StorageGetCookiesResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// StorageGetCookiesResult ...
type StorageGetCookiesResult struct {
// Cookies Array of cookie objects.
Cookies []*NetworkCookie `json:"cookies"`
}
// StorageSetCookies Sets given cookies.
type StorageSetCookies struct {
// Cookies Cookies to be set.
Cookies []*NetworkCookieParam `json:"cookies"`
// BrowserContextID (optional) Browser context to use when called on the browser endpoint.
BrowserContextID BrowserBrowserContextID `json:"browserContextId,omitempty"`
}
// ProtoReq name
func (m StorageSetCookies) ProtoReq() string { return "Storage.setCookies" }
// Call sends the request
func (m StorageSetCookies) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageClearCookies Clears cookies.
type StorageClearCookies struct {
// BrowserContextID (optional) Browser context to use when called on the browser endpoint.
BrowserContextID BrowserBrowserContextID `json:"browserContextId,omitempty"`
}
// ProtoReq name
func (m StorageClearCookies) ProtoReq() string { return "Storage.clearCookies" }
// Call sends the request
func (m StorageClearCookies) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageGetUsageAndQuota Returns usage and quota in bytes.
type StorageGetUsageAndQuota struct {
// Origin Security origin.
Origin string `json:"origin"`
}
// ProtoReq name
func (m StorageGetUsageAndQuota) ProtoReq() string { return "Storage.getUsageAndQuota" }
// Call the request
func (m StorageGetUsageAndQuota) Call(c Client) (*StorageGetUsageAndQuotaResult, error) {
var res StorageGetUsageAndQuotaResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// StorageGetUsageAndQuotaResult ...
type StorageGetUsageAndQuotaResult struct {
// Usage Storage usage (bytes).
Usage float64 `json:"usage"`
// Quota Storage quota (bytes).
Quota float64 `json:"quota"`
// OverrideActive Whether or not the origin has an active storage quota override
OverrideActive bool `json:"overrideActive"`
// UsageBreakdown Storage usage per type (bytes).
UsageBreakdown []*StorageUsageForType `json:"usageBreakdown"`
}
// StorageOverrideQuotaForOrigin (experimental) Override quota for the specified origin
type StorageOverrideQuotaForOrigin struct {
// Origin Security origin.
Origin string `json:"origin"`
// QuotaSize (optional) The quota size (in bytes) to override the original quota with.
// If this is called multiple times, the overridden quota will be equal to
// the quotaSize provided in the final call. If this is called without
// specifying a quotaSize, the quota will be reset to the default value for
// the specified origin. If this is called multiple times with different
// origins, the override will be maintained for each origin until it is
// disabled (called without a quotaSize).
QuotaSize *float64 `json:"quotaSize,omitempty"`
}
// ProtoReq name
func (m StorageOverrideQuotaForOrigin) ProtoReq() string { return "Storage.overrideQuotaForOrigin" }
// Call sends the request
func (m StorageOverrideQuotaForOrigin) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageTrackCacheStorageForOrigin Registers origin to be notified when an update occurs to its cache storage list.
type StorageTrackCacheStorageForOrigin struct {
// Origin Security origin.
Origin string `json:"origin"`
}
// ProtoReq name
func (m StorageTrackCacheStorageForOrigin) ProtoReq() string {
return "Storage.trackCacheStorageForOrigin"
}
// Call sends the request
func (m StorageTrackCacheStorageForOrigin) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageTrackCacheStorageForStorageKey Registers storage key to be notified when an update occurs to its cache storage list.
type StorageTrackCacheStorageForStorageKey struct {
// StorageKey Storage key.
StorageKey string `json:"storageKey"`
}
// ProtoReq name
func (m StorageTrackCacheStorageForStorageKey) ProtoReq() string {
return "Storage.trackCacheStorageForStorageKey"
}
// Call sends the request
func (m StorageTrackCacheStorageForStorageKey) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageTrackIndexedDBForOrigin Registers origin to be notified when an update occurs to its IndexedDB.
type StorageTrackIndexedDBForOrigin struct {
// Origin Security origin.
Origin string `json:"origin"`
}
// ProtoReq name
func (m StorageTrackIndexedDBForOrigin) ProtoReq() string { return "Storage.trackIndexedDBForOrigin" }
// Call sends the request
func (m StorageTrackIndexedDBForOrigin) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageTrackIndexedDBForStorageKey Registers storage key to be notified when an update occurs to its IndexedDB.
type StorageTrackIndexedDBForStorageKey struct {
// StorageKey Storage key.
StorageKey string `json:"storageKey"`
}
// ProtoReq name
func (m StorageTrackIndexedDBForStorageKey) ProtoReq() string {
return "Storage.trackIndexedDBForStorageKey"
}
// Call sends the request
func (m StorageTrackIndexedDBForStorageKey) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageUntrackCacheStorageForOrigin Unregisters origin from receiving notifications for cache storage.
type StorageUntrackCacheStorageForOrigin struct {
// Origin Security origin.
Origin string `json:"origin"`
}
// ProtoReq name
func (m StorageUntrackCacheStorageForOrigin) ProtoReq() string {
return "Storage.untrackCacheStorageForOrigin"
}
// Call sends the request
func (m StorageUntrackCacheStorageForOrigin) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageUntrackCacheStorageForStorageKey Unregisters storage key from receiving notifications for cache storage.
type StorageUntrackCacheStorageForStorageKey struct {
// StorageKey Storage key.
StorageKey string `json:"storageKey"`
}
// ProtoReq name
func (m StorageUntrackCacheStorageForStorageKey) ProtoReq() string {
return "Storage.untrackCacheStorageForStorageKey"
}
// Call sends the request
func (m StorageUntrackCacheStorageForStorageKey) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageUntrackIndexedDBForOrigin Unregisters origin from receiving notifications for IndexedDB.
type StorageUntrackIndexedDBForOrigin struct {
// Origin Security origin.
Origin string `json:"origin"`
}
// ProtoReq name
func (m StorageUntrackIndexedDBForOrigin) ProtoReq() string {
return "Storage.untrackIndexedDBForOrigin"
}
// Call sends the request
func (m StorageUntrackIndexedDBForOrigin) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageUntrackIndexedDBForStorageKey Unregisters storage key from receiving notifications for IndexedDB.
type StorageUntrackIndexedDBForStorageKey struct {
// StorageKey Storage key.
StorageKey string `json:"storageKey"`
}
// ProtoReq name
func (m StorageUntrackIndexedDBForStorageKey) ProtoReq() string {
return "Storage.untrackIndexedDBForStorageKey"
}
// Call sends the request
func (m StorageUntrackIndexedDBForStorageKey) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageGetTrustTokens (experimental) Returns the number of stored Trust Tokens per issuer for the
// current browsing context.
type StorageGetTrustTokens struct{}
// ProtoReq name
func (m StorageGetTrustTokens) ProtoReq() string { return "Storage.getTrustTokens" }
// Call the request
func (m StorageGetTrustTokens) Call(c Client) (*StorageGetTrustTokensResult, error) {
var res StorageGetTrustTokensResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// StorageGetTrustTokensResult (experimental) ...
type StorageGetTrustTokensResult struct {
// Tokens ...
Tokens []*StorageTrustTokens `json:"tokens"`
}
// StorageClearTrustTokens (experimental) Removes all Trust Tokens issued by the provided issuerOrigin.
// Leaves other stored data, including the issuer's Redemption Records, intact.
type StorageClearTrustTokens struct {
// IssuerOrigin ...
IssuerOrigin string `json:"issuerOrigin"`
}
// ProtoReq name
func (m StorageClearTrustTokens) ProtoReq() string { return "Storage.clearTrustTokens" }
// Call the request
func (m StorageClearTrustTokens) Call(c Client) (*StorageClearTrustTokensResult, error) {
var res StorageClearTrustTokensResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// StorageClearTrustTokensResult (experimental) ...
type StorageClearTrustTokensResult struct {
// DidDeleteTokens True if any tokens were deleted, false otherwise.
DidDeleteTokens bool `json:"didDeleteTokens"`
}
// StorageGetInterestGroupDetails (experimental) Gets details for a named interest group.
type StorageGetInterestGroupDetails struct {
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
// Name ...
Name string `json:"name"`
}
// ProtoReq name
func (m StorageGetInterestGroupDetails) ProtoReq() string { return "Storage.getInterestGroupDetails" }
// Call the request
func (m StorageGetInterestGroupDetails) Call(c Client) (*StorageGetInterestGroupDetailsResult, error) {
var res StorageGetInterestGroupDetailsResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// StorageGetInterestGroupDetailsResult (experimental) ...
type StorageGetInterestGroupDetailsResult struct {
// Details ...
Details *StorageInterestGroupDetails `json:"details"`
}
// StorageSetInterestGroupTracking (experimental) Enables/Disables issuing of interestGroupAccessed events.
type StorageSetInterestGroupTracking struct {
// Enable ...
Enable bool `json:"enable"`
}
// ProtoReq name
func (m StorageSetInterestGroupTracking) ProtoReq() string { return "Storage.setInterestGroupTracking" }
// Call sends the request
func (m StorageSetInterestGroupTracking) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageGetSharedStorageMetadata (experimental) Gets metadata for an origin's shared storage.
type StorageGetSharedStorageMetadata struct {
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
}
// ProtoReq name
func (m StorageGetSharedStorageMetadata) ProtoReq() string { return "Storage.getSharedStorageMetadata" }
// Call the request
func (m StorageGetSharedStorageMetadata) Call(c Client) (*StorageGetSharedStorageMetadataResult, error) {
var res StorageGetSharedStorageMetadataResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// StorageGetSharedStorageMetadataResult (experimental) ...
type StorageGetSharedStorageMetadataResult struct {
// Metadata ...
Metadata *StorageSharedStorageMetadata `json:"metadata"`
}
// StorageGetSharedStorageEntries (experimental) Gets the entries in an given origin's shared storage.
type StorageGetSharedStorageEntries struct {
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
}
// ProtoReq name
func (m StorageGetSharedStorageEntries) ProtoReq() string { return "Storage.getSharedStorageEntries" }
// Call the request
func (m StorageGetSharedStorageEntries) Call(c Client) (*StorageGetSharedStorageEntriesResult, error) {
var res StorageGetSharedStorageEntriesResult
return &res, call(m.ProtoReq(), m, &res, c)
}
// StorageGetSharedStorageEntriesResult (experimental) ...
type StorageGetSharedStorageEntriesResult struct {
// Entries ...
Entries []*StorageSharedStorageEntry `json:"entries"`
}
// StorageSetSharedStorageEntry (experimental) Sets entry with `key` and `value` for a given origin's shared storage.
type StorageSetSharedStorageEntry struct {
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
// Key ...
Key string `json:"key"`
// Value ...
Value string `json:"value"`
// IgnoreIfPresent (optional) If `ignoreIfPresent` is included and true, then only sets the entry if
// `key` doesn't already exist.
IgnoreIfPresent bool `json:"ignoreIfPresent,omitempty"`
}
// ProtoReq name
func (m StorageSetSharedStorageEntry) ProtoReq() string { return "Storage.setSharedStorageEntry" }
// Call sends the request
func (m StorageSetSharedStorageEntry) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageDeleteSharedStorageEntry (experimental) Deletes entry for `key` (if it exists) for a given origin's shared storage.
type StorageDeleteSharedStorageEntry struct {
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
// Key ...
Key string `json:"key"`
}
// ProtoReq name
func (m StorageDeleteSharedStorageEntry) ProtoReq() string { return "Storage.deleteSharedStorageEntry" }
// Call sends the request
func (m StorageDeleteSharedStorageEntry) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageClearSharedStorageEntries (experimental) Clears all entries for a given origin's shared storage.
type StorageClearSharedStorageEntries struct {
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
}
// ProtoReq name
func (m StorageClearSharedStorageEntries) ProtoReq() string {
return "Storage.clearSharedStorageEntries"
}
// Call sends the request
func (m StorageClearSharedStorageEntries) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageResetSharedStorageBudget (experimental) Resets the budget for `ownerOrigin` by clearing all budget withdrawals.
type StorageResetSharedStorageBudget struct {
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
}
// ProtoReq name
func (m StorageResetSharedStorageBudget) ProtoReq() string { return "Storage.resetSharedStorageBudget" }
// Call sends the request
func (m StorageResetSharedStorageBudget) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageSetSharedStorageTracking (experimental) Enables/disables issuing of sharedStorageAccessed events.
type StorageSetSharedStorageTracking struct {
// Enable ...
Enable bool `json:"enable"`
}
// ProtoReq name
func (m StorageSetSharedStorageTracking) ProtoReq() string { return "Storage.setSharedStorageTracking" }
// Call sends the request
func (m StorageSetSharedStorageTracking) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageSetStorageBucketTracking (experimental) Set tracking for a storage key's buckets.
type StorageSetStorageBucketTracking struct {
// StorageKey ...
StorageKey string `json:"storageKey"`
// Enable ...
Enable bool `json:"enable"`
}
// ProtoReq name
func (m StorageSetStorageBucketTracking) ProtoReq() string { return "Storage.setStorageBucketTracking" }
// Call sends the request
func (m StorageSetStorageBucketTracking) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageDeleteStorageBucket (experimental) Deletes the Storage Bucket with the given storage key and bucket name.
type StorageDeleteStorageBucket struct {
// StorageKey ...
StorageKey string `json:"storageKey"`
// BucketName ...
BucketName string `json:"bucketName"`
}
// ProtoReq name
func (m StorageDeleteStorageBucket) ProtoReq() string { return "Storage.deleteStorageBucket" }
// Call sends the request
func (m StorageDeleteStorageBucket) Call(c Client) error {
return call(m.ProtoReq(), m, nil, c)
}
// StorageCacheStorageContentUpdated A cache's contents have been modified.
type StorageCacheStorageContentUpdated struct {
// Origin Origin to update.
Origin string `json:"origin"`
// StorageKey Storage key to update.
StorageKey string `json:"storageKey"`
// CacheName Name of cache in origin.
CacheName string `json:"cacheName"`
}
// ProtoEvent name
func (evt StorageCacheStorageContentUpdated) ProtoEvent() string {
return "Storage.cacheStorageContentUpdated"
}
// StorageCacheStorageListUpdated A cache has been added/deleted.
type StorageCacheStorageListUpdated struct {
// Origin Origin to update.
Origin string `json:"origin"`
// StorageKey Storage key to update.
StorageKey string `json:"storageKey"`
}
// ProtoEvent name
func (evt StorageCacheStorageListUpdated) ProtoEvent() string {
return "Storage.cacheStorageListUpdated"
}
// StorageIndexedDBContentUpdated The origin's IndexedDB object store has been modified.
type StorageIndexedDBContentUpdated struct {
// Origin Origin to update.
Origin string `json:"origin"`
// StorageKey Storage key to update.
StorageKey string `json:"storageKey"`
// DatabaseName Database to update.
DatabaseName string `json:"databaseName"`
// ObjectStoreName ObjectStore to update.
ObjectStoreName string `json:"objectStoreName"`
}
// ProtoEvent name
func (evt StorageIndexedDBContentUpdated) ProtoEvent() string {
return "Storage.indexedDBContentUpdated"
}
// StorageIndexedDBListUpdated The origin's IndexedDB database list has been modified.
type StorageIndexedDBListUpdated struct {
// Origin Origin to update.
Origin string `json:"origin"`
// StorageKey Storage key to update.
StorageKey string `json:"storageKey"`
}
// ProtoEvent name
func (evt StorageIndexedDBListUpdated) ProtoEvent() string {
return "Storage.indexedDBListUpdated"
}
// StorageInterestGroupAccessed One of the interest groups was accessed by the associated page.
type StorageInterestGroupAccessed struct {
// AccessTime ...
AccessTime TimeSinceEpoch `json:"accessTime"`
// Type ...
Type StorageInterestGroupAccessType `json:"type"`
// OwnerOrigin ...
OwnerOrigin string `json:"ownerOrigin"`
// Name ...
Name string `json:"name"`
}
// ProtoEvent name
func (evt StorageInterestGroupAccessed) ProtoEvent() string {
return "Storage.interestGroupAccessed"
}
// StorageSharedStorageAccessed Shared storage was accessed by the associated page.
// The following parameters are included in all events.
type StorageSharedStorageAccessed struct {
// AccessTime Time of the access.
AccessTime TimeSinceEpoch `json:"accessTime"`
// Type Enum value indicating the Shared Storage API method invoked.
Type StorageSharedStorageAccessType `json:"type"`
// MainFrameID DevTools Frame Token for the primary frame tree's root.
MainFrameID PageFrameID `json:"mainFrameId"`
// OwnerOrigin Serialized origin for the context that invoked the Shared Storage API.
OwnerOrigin string `json:"ownerOrigin"`
// Params The sub-parameters warapped by `params` are all optional and their
// presence/absence depends on `type`.
Params *StorageSharedStorageAccessParams `json:"params"`
}
// ProtoEvent name
func (evt StorageSharedStorageAccessed) ProtoEvent() string {
return "Storage.sharedStorageAccessed"
}
// StorageStorageBucketCreatedOrUpdated ...
type StorageStorageBucketCreatedOrUpdated struct {
// Bucket ...
Bucket *StorageStorageBucketInfo `json:"bucket"`
}
// ProtoEvent name
func (evt StorageStorageBucketCreatedOrUpdated) ProtoEvent() string {
return "Storage.storageBucketCreatedOrUpdated"
}
// StorageStorageBucketDeleted ...
type StorageStorageBucketDeleted struct {
// BucketID ...
BucketID string `json:"bucketId"`
}
// ProtoEvent name
func (evt StorageStorageBucketDeleted) ProtoEvent() string {
return "Storage.storageBucketDeleted"
}