-
Notifications
You must be signed in to change notification settings - Fork 54
/
types.go
1599 lines (1416 loc) · 77 KB
/
types.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
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package audits
// Code generated by cdproto-gen. DO NOT EDIT.
import (
"fmt"
"github.com/chromedp/cdproto/cdp"
"github.com/chromedp/cdproto/network"
"github.com/chromedp/cdproto/runtime"
"github.com/mailru/easyjson"
"github.com/mailru/easyjson/jlexer"
"github.com/mailru/easyjson/jwriter"
)
// AffectedCookie information about a cookie that is affected by an inspector
// issue.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AffectedCookie
type AffectedCookie struct {
Name string `json:"name"` // The following three properties uniquely identify a cookie
Path string `json:"path"`
Domain string `json:"domain"`
}
// AffectedRequest information about a request that is affected by an
// inspector issue.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AffectedRequest
type AffectedRequest struct {
RequestID network.RequestID `json:"requestId"` // The unique request id.
URL string `json:"url,omitempty"`
}
// AffectedFrame information about the frame affected by an inspector issue.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AffectedFrame
type AffectedFrame struct {
FrameID cdp.FrameID `json:"frameId"`
}
// CookieExclusionReason [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-CookieExclusionReason
type CookieExclusionReason string
// String returns the CookieExclusionReason as string value.
func (t CookieExclusionReason) String() string {
return string(t)
}
// CookieExclusionReason values.
const (
CookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax CookieExclusionReason = "ExcludeSameSiteUnspecifiedTreatedAsLax"
CookieExclusionReasonExcludeSameSiteNoneInsecure CookieExclusionReason = "ExcludeSameSiteNoneInsecure"
CookieExclusionReasonExcludeSameSiteLax CookieExclusionReason = "ExcludeSameSiteLax"
CookieExclusionReasonExcludeSameSiteStrict CookieExclusionReason = "ExcludeSameSiteStrict"
CookieExclusionReasonExcludeInvalidSameParty CookieExclusionReason = "ExcludeInvalidSameParty"
CookieExclusionReasonExcludeSamePartyCrossPartyContext CookieExclusionReason = "ExcludeSamePartyCrossPartyContext"
CookieExclusionReasonExcludeDomainNonASCII CookieExclusionReason = "ExcludeDomainNonASCII"
CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet CookieExclusionReason = "ExcludeThirdPartyCookieBlockedInFirstPartySet"
CookieExclusionReasonExcludeThirdPartyPhaseout CookieExclusionReason = "ExcludeThirdPartyPhaseout"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t CookieExclusionReason) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t CookieExclusionReason) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *CookieExclusionReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch CookieExclusionReason(v) {
case CookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax:
*t = CookieExclusionReasonExcludeSameSiteUnspecifiedTreatedAsLax
case CookieExclusionReasonExcludeSameSiteNoneInsecure:
*t = CookieExclusionReasonExcludeSameSiteNoneInsecure
case CookieExclusionReasonExcludeSameSiteLax:
*t = CookieExclusionReasonExcludeSameSiteLax
case CookieExclusionReasonExcludeSameSiteStrict:
*t = CookieExclusionReasonExcludeSameSiteStrict
case CookieExclusionReasonExcludeInvalidSameParty:
*t = CookieExclusionReasonExcludeInvalidSameParty
case CookieExclusionReasonExcludeSamePartyCrossPartyContext:
*t = CookieExclusionReasonExcludeSamePartyCrossPartyContext
case CookieExclusionReasonExcludeDomainNonASCII:
*t = CookieExclusionReasonExcludeDomainNonASCII
case CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet:
*t = CookieExclusionReasonExcludeThirdPartyCookieBlockedInFirstPartySet
case CookieExclusionReasonExcludeThirdPartyPhaseout:
*t = CookieExclusionReasonExcludeThirdPartyPhaseout
default:
in.AddError(fmt.Errorf("unknown CookieExclusionReason value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *CookieExclusionReason) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// CookieWarningReason [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-CookieWarningReason
type CookieWarningReason string
// String returns the CookieWarningReason as string value.
func (t CookieWarningReason) String() string {
return string(t)
}
// CookieWarningReason values.
const (
CookieWarningReasonWarnSameSiteUnspecifiedCrossSiteContext CookieWarningReason = "WarnSameSiteUnspecifiedCrossSiteContext"
CookieWarningReasonWarnSameSiteNoneInsecure CookieWarningReason = "WarnSameSiteNoneInsecure"
CookieWarningReasonWarnSameSiteUnspecifiedLaxAllowUnsafe CookieWarningReason = "WarnSameSiteUnspecifiedLaxAllowUnsafe"
CookieWarningReasonWarnSameSiteStrictLaxDowngradeStrict CookieWarningReason = "WarnSameSiteStrictLaxDowngradeStrict"
CookieWarningReasonWarnSameSiteStrictCrossDowngradeStrict CookieWarningReason = "WarnSameSiteStrictCrossDowngradeStrict"
CookieWarningReasonWarnSameSiteStrictCrossDowngradeLax CookieWarningReason = "WarnSameSiteStrictCrossDowngradeLax"
CookieWarningReasonWarnSameSiteLaxCrossDowngradeStrict CookieWarningReason = "WarnSameSiteLaxCrossDowngradeStrict"
CookieWarningReasonWarnSameSiteLaxCrossDowngradeLax CookieWarningReason = "WarnSameSiteLaxCrossDowngradeLax"
CookieWarningReasonWarnAttributeValueExceedsMaxSize CookieWarningReason = "WarnAttributeValueExceedsMaxSize"
CookieWarningReasonWarnDomainNonASCII CookieWarningReason = "WarnDomainNonASCII"
CookieWarningReasonWarnThirdPartyPhaseout CookieWarningReason = "WarnThirdPartyPhaseout"
CookieWarningReasonWarnCrossSiteRedirectDowngradeChangesInclusion CookieWarningReason = "WarnCrossSiteRedirectDowngradeChangesInclusion"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t CookieWarningReason) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t CookieWarningReason) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *CookieWarningReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch CookieWarningReason(v) {
case CookieWarningReasonWarnSameSiteUnspecifiedCrossSiteContext:
*t = CookieWarningReasonWarnSameSiteUnspecifiedCrossSiteContext
case CookieWarningReasonWarnSameSiteNoneInsecure:
*t = CookieWarningReasonWarnSameSiteNoneInsecure
case CookieWarningReasonWarnSameSiteUnspecifiedLaxAllowUnsafe:
*t = CookieWarningReasonWarnSameSiteUnspecifiedLaxAllowUnsafe
case CookieWarningReasonWarnSameSiteStrictLaxDowngradeStrict:
*t = CookieWarningReasonWarnSameSiteStrictLaxDowngradeStrict
case CookieWarningReasonWarnSameSiteStrictCrossDowngradeStrict:
*t = CookieWarningReasonWarnSameSiteStrictCrossDowngradeStrict
case CookieWarningReasonWarnSameSiteStrictCrossDowngradeLax:
*t = CookieWarningReasonWarnSameSiteStrictCrossDowngradeLax
case CookieWarningReasonWarnSameSiteLaxCrossDowngradeStrict:
*t = CookieWarningReasonWarnSameSiteLaxCrossDowngradeStrict
case CookieWarningReasonWarnSameSiteLaxCrossDowngradeLax:
*t = CookieWarningReasonWarnSameSiteLaxCrossDowngradeLax
case CookieWarningReasonWarnAttributeValueExceedsMaxSize:
*t = CookieWarningReasonWarnAttributeValueExceedsMaxSize
case CookieWarningReasonWarnDomainNonASCII:
*t = CookieWarningReasonWarnDomainNonASCII
case CookieWarningReasonWarnThirdPartyPhaseout:
*t = CookieWarningReasonWarnThirdPartyPhaseout
case CookieWarningReasonWarnCrossSiteRedirectDowngradeChangesInclusion:
*t = CookieWarningReasonWarnCrossSiteRedirectDowngradeChangesInclusion
default:
in.AddError(fmt.Errorf("unknown CookieWarningReason value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *CookieWarningReason) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// CookieOperation [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-CookieOperation
type CookieOperation string
// String returns the CookieOperation as string value.
func (t CookieOperation) String() string {
return string(t)
}
// CookieOperation values.
const (
CookieOperationSetCookie CookieOperation = "SetCookie"
CookieOperationReadCookie CookieOperation = "ReadCookie"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t CookieOperation) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t CookieOperation) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *CookieOperation) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch CookieOperation(v) {
case CookieOperationSetCookie:
*t = CookieOperationSetCookie
case CookieOperationReadCookie:
*t = CookieOperationReadCookie
default:
in.AddError(fmt.Errorf("unknown CookieOperation value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *CookieOperation) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// CookieIssueDetails this information is currently necessary, as the
// front-end has a difficult time finding a specific cookie. With this, we can
// convey specific error information without the cookie.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-CookieIssueDetails
type CookieIssueDetails struct {
Cookie *AffectedCookie `json:"cookie,omitempty"` // If AffectedCookie is not set then rawCookieLine contains the raw Set-Cookie header string. This hints at a problem where the cookie line is syntactically or semantically malformed in a way that no valid cookie could be created.
RawCookieLine string `json:"rawCookieLine,omitempty"`
CookieWarningReasons []CookieWarningReason `json:"cookieWarningReasons"`
CookieExclusionReasons []CookieExclusionReason `json:"cookieExclusionReasons"`
Operation CookieOperation `json:"operation"` // Optionally identifies the site-for-cookies and the cookie url, which may be used by the front-end as additional context.
SiteForCookies string `json:"siteForCookies,omitempty"`
CookieURL string `json:"cookieUrl,omitempty"`
Request *AffectedRequest `json:"request,omitempty"`
}
// MixedContentResolutionStatus [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-MixedContentResolutionStatus
type MixedContentResolutionStatus string
// String returns the MixedContentResolutionStatus as string value.
func (t MixedContentResolutionStatus) String() string {
return string(t)
}
// MixedContentResolutionStatus values.
const (
MixedContentResolutionStatusMixedContentBlocked MixedContentResolutionStatus = "MixedContentBlocked"
MixedContentResolutionStatusMixedContentAutomaticallyUpgraded MixedContentResolutionStatus = "MixedContentAutomaticallyUpgraded"
MixedContentResolutionStatusMixedContentWarning MixedContentResolutionStatus = "MixedContentWarning"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t MixedContentResolutionStatus) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t MixedContentResolutionStatus) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *MixedContentResolutionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch MixedContentResolutionStatus(v) {
case MixedContentResolutionStatusMixedContentBlocked:
*t = MixedContentResolutionStatusMixedContentBlocked
case MixedContentResolutionStatusMixedContentAutomaticallyUpgraded:
*t = MixedContentResolutionStatusMixedContentAutomaticallyUpgraded
case MixedContentResolutionStatusMixedContentWarning:
*t = MixedContentResolutionStatusMixedContentWarning
default:
in.AddError(fmt.Errorf("unknown MixedContentResolutionStatus value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *MixedContentResolutionStatus) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// MixedContentResourceType [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-MixedContentResourceType
type MixedContentResourceType string
// String returns the MixedContentResourceType as string value.
func (t MixedContentResourceType) String() string {
return string(t)
}
// MixedContentResourceType values.
const (
MixedContentResourceTypeAttributionSrc MixedContentResourceType = "AttributionSrc"
MixedContentResourceTypeAudio MixedContentResourceType = "Audio"
MixedContentResourceTypeBeacon MixedContentResourceType = "Beacon"
MixedContentResourceTypeCSPReport MixedContentResourceType = "CSPReport"
MixedContentResourceTypeDownload MixedContentResourceType = "Download"
MixedContentResourceTypeEventSource MixedContentResourceType = "EventSource"
MixedContentResourceTypeFavicon MixedContentResourceType = "Favicon"
MixedContentResourceTypeFont MixedContentResourceType = "Font"
MixedContentResourceTypeForm MixedContentResourceType = "Form"
MixedContentResourceTypeFrame MixedContentResourceType = "Frame"
MixedContentResourceTypeImage MixedContentResourceType = "Image"
MixedContentResourceTypeImport MixedContentResourceType = "Import"
MixedContentResourceTypeManifest MixedContentResourceType = "Manifest"
MixedContentResourceTypePing MixedContentResourceType = "Ping"
MixedContentResourceTypePluginData MixedContentResourceType = "PluginData"
MixedContentResourceTypePluginResource MixedContentResourceType = "PluginResource"
MixedContentResourceTypePrefetch MixedContentResourceType = "Prefetch"
MixedContentResourceTypeResource MixedContentResourceType = "Resource"
MixedContentResourceTypeScript MixedContentResourceType = "Script"
MixedContentResourceTypeServiceWorker MixedContentResourceType = "ServiceWorker"
MixedContentResourceTypeSharedWorker MixedContentResourceType = "SharedWorker"
MixedContentResourceTypeStylesheet MixedContentResourceType = "Stylesheet"
MixedContentResourceTypeTrack MixedContentResourceType = "Track"
MixedContentResourceTypeVideo MixedContentResourceType = "Video"
MixedContentResourceTypeWorker MixedContentResourceType = "Worker"
MixedContentResourceTypeXMLHTTPRequest MixedContentResourceType = "XMLHttpRequest"
MixedContentResourceTypeXSLT MixedContentResourceType = "XSLT"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t MixedContentResourceType) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t MixedContentResourceType) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *MixedContentResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch MixedContentResourceType(v) {
case MixedContentResourceTypeAttributionSrc:
*t = MixedContentResourceTypeAttributionSrc
case MixedContentResourceTypeAudio:
*t = MixedContentResourceTypeAudio
case MixedContentResourceTypeBeacon:
*t = MixedContentResourceTypeBeacon
case MixedContentResourceTypeCSPReport:
*t = MixedContentResourceTypeCSPReport
case MixedContentResourceTypeDownload:
*t = MixedContentResourceTypeDownload
case MixedContentResourceTypeEventSource:
*t = MixedContentResourceTypeEventSource
case MixedContentResourceTypeFavicon:
*t = MixedContentResourceTypeFavicon
case MixedContentResourceTypeFont:
*t = MixedContentResourceTypeFont
case MixedContentResourceTypeForm:
*t = MixedContentResourceTypeForm
case MixedContentResourceTypeFrame:
*t = MixedContentResourceTypeFrame
case MixedContentResourceTypeImage:
*t = MixedContentResourceTypeImage
case MixedContentResourceTypeImport:
*t = MixedContentResourceTypeImport
case MixedContentResourceTypeManifest:
*t = MixedContentResourceTypeManifest
case MixedContentResourceTypePing:
*t = MixedContentResourceTypePing
case MixedContentResourceTypePluginData:
*t = MixedContentResourceTypePluginData
case MixedContentResourceTypePluginResource:
*t = MixedContentResourceTypePluginResource
case MixedContentResourceTypePrefetch:
*t = MixedContentResourceTypePrefetch
case MixedContentResourceTypeResource:
*t = MixedContentResourceTypeResource
case MixedContentResourceTypeScript:
*t = MixedContentResourceTypeScript
case MixedContentResourceTypeServiceWorker:
*t = MixedContentResourceTypeServiceWorker
case MixedContentResourceTypeSharedWorker:
*t = MixedContentResourceTypeSharedWorker
case MixedContentResourceTypeStylesheet:
*t = MixedContentResourceTypeStylesheet
case MixedContentResourceTypeTrack:
*t = MixedContentResourceTypeTrack
case MixedContentResourceTypeVideo:
*t = MixedContentResourceTypeVideo
case MixedContentResourceTypeWorker:
*t = MixedContentResourceTypeWorker
case MixedContentResourceTypeXMLHTTPRequest:
*t = MixedContentResourceTypeXMLHTTPRequest
case MixedContentResourceTypeXSLT:
*t = MixedContentResourceTypeXSLT
default:
in.AddError(fmt.Errorf("unknown MixedContentResourceType value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *MixedContentResourceType) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// MixedContentIssueDetails [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-MixedContentIssueDetails
type MixedContentIssueDetails struct {
ResourceType MixedContentResourceType `json:"resourceType,omitempty"` // The type of resource causing the mixed content issue (css, js, iframe, form,...). Marked as optional because it is mapped to from blink::mojom::RequestContextType, which will be replaced by network::mojom::RequestDestination
ResolutionStatus MixedContentResolutionStatus `json:"resolutionStatus"` // The way the mixed content issue is being resolved.
InsecureURL string `json:"insecureURL"` // The unsafe http url causing the mixed content issue.
MainResourceURL string `json:"mainResourceURL"` // The url responsible for the call to an unsafe url.
Request *AffectedRequest `json:"request,omitempty"` // The mixed content request. Does not always exist (e.g. for unsafe form submission urls).
Frame *AffectedFrame `json:"frame,omitempty"` // Optional because not every mixed content issue is necessarily linked to a frame.
}
// BlockedByResponseReason enum indicating the reason a response has been
// blocked. These reasons are refinements of the net error BLOCKED_BY_RESPONSE.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-BlockedByResponseReason
type BlockedByResponseReason string
// String returns the BlockedByResponseReason as string value.
func (t BlockedByResponseReason) String() string {
return string(t)
}
// BlockedByResponseReason values.
const (
BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader BlockedByResponseReason = "CoepFrameResourceNeedsCoepHeader"
BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage BlockedByResponseReason = "CoopSandboxedIFrameCannotNavigateToCoopPage"
BlockedByResponseReasonCorpNotSameOrigin BlockedByResponseReason = "CorpNotSameOrigin"
BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedByResponseReason = "CorpNotSameOriginAfterDefaultedToSameOriginByCoep"
BlockedByResponseReasonCorpNotSameSite BlockedByResponseReason = "CorpNotSameSite"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t BlockedByResponseReason) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t BlockedByResponseReason) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *BlockedByResponseReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch BlockedByResponseReason(v) {
case BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader:
*t = BlockedByResponseReasonCoepFrameResourceNeedsCoepHeader
case BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage:
*t = BlockedByResponseReasonCoopSandboxedIFrameCannotNavigateToCoopPage
case BlockedByResponseReasonCorpNotSameOrigin:
*t = BlockedByResponseReasonCorpNotSameOrigin
case BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep:
*t = BlockedByResponseReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep
case BlockedByResponseReasonCorpNotSameSite:
*t = BlockedByResponseReasonCorpNotSameSite
default:
in.AddError(fmt.Errorf("unknown BlockedByResponseReason value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *BlockedByResponseReason) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// BlockedByResponseIssueDetails details for a request that has been blocked
// with the BLOCKED_BY_RESPONSE code. Currently only used for COEP/COOP, but may
// be extended to include some CSP errors in the future.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-BlockedByResponseIssueDetails
type BlockedByResponseIssueDetails struct {
Request *AffectedRequest `json:"request"`
ParentFrame *AffectedFrame `json:"parentFrame,omitempty"`
BlockedFrame *AffectedFrame `json:"blockedFrame,omitempty"`
Reason BlockedByResponseReason `json:"reason"`
}
// HeavyAdResolutionStatus [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-HeavyAdResolutionStatus
type HeavyAdResolutionStatus string
// String returns the HeavyAdResolutionStatus as string value.
func (t HeavyAdResolutionStatus) String() string {
return string(t)
}
// HeavyAdResolutionStatus values.
const (
HeavyAdResolutionStatusHeavyAdBlocked HeavyAdResolutionStatus = "HeavyAdBlocked"
HeavyAdResolutionStatusHeavyAdWarning HeavyAdResolutionStatus = "HeavyAdWarning"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t HeavyAdResolutionStatus) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t HeavyAdResolutionStatus) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *HeavyAdResolutionStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch HeavyAdResolutionStatus(v) {
case HeavyAdResolutionStatusHeavyAdBlocked:
*t = HeavyAdResolutionStatusHeavyAdBlocked
case HeavyAdResolutionStatusHeavyAdWarning:
*t = HeavyAdResolutionStatusHeavyAdWarning
default:
in.AddError(fmt.Errorf("unknown HeavyAdResolutionStatus value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *HeavyAdResolutionStatus) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// HeavyAdReason [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-HeavyAdReason
type HeavyAdReason string
// String returns the HeavyAdReason as string value.
func (t HeavyAdReason) String() string {
return string(t)
}
// HeavyAdReason values.
const (
HeavyAdReasonNetworkTotalLimit HeavyAdReason = "NetworkTotalLimit"
HeavyAdReasonCPUTotalLimit HeavyAdReason = "CpuTotalLimit"
HeavyAdReasonCPUPeakLimit HeavyAdReason = "CpuPeakLimit"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t HeavyAdReason) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t HeavyAdReason) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *HeavyAdReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch HeavyAdReason(v) {
case HeavyAdReasonNetworkTotalLimit:
*t = HeavyAdReasonNetworkTotalLimit
case HeavyAdReasonCPUTotalLimit:
*t = HeavyAdReasonCPUTotalLimit
case HeavyAdReasonCPUPeakLimit:
*t = HeavyAdReasonCPUPeakLimit
default:
in.AddError(fmt.Errorf("unknown HeavyAdReason value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *HeavyAdReason) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// HeavyAdIssueDetails [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-HeavyAdIssueDetails
type HeavyAdIssueDetails struct {
Resolution HeavyAdResolutionStatus `json:"resolution"` // The resolution status, either blocking the content or warning.
Reason HeavyAdReason `json:"reason"` // The reason the ad was blocked, total network or cpu or peak cpu.
Frame *AffectedFrame `json:"frame"` // The frame that was blocked.
}
// ContentSecurityPolicyViolationType [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-ContentSecurityPolicyViolationType
type ContentSecurityPolicyViolationType string
// String returns the ContentSecurityPolicyViolationType as string value.
func (t ContentSecurityPolicyViolationType) String() string {
return string(t)
}
// ContentSecurityPolicyViolationType values.
const (
ContentSecurityPolicyViolationTypeKInlineViolation ContentSecurityPolicyViolationType = "kInlineViolation"
ContentSecurityPolicyViolationTypeKEvalViolation ContentSecurityPolicyViolationType = "kEvalViolation"
ContentSecurityPolicyViolationTypeKURLViolation ContentSecurityPolicyViolationType = "kURLViolation"
ContentSecurityPolicyViolationTypeKTrustedTypesSinkViolation ContentSecurityPolicyViolationType = "kTrustedTypesSinkViolation"
ContentSecurityPolicyViolationTypeKTrustedTypesPolicyViolation ContentSecurityPolicyViolationType = "kTrustedTypesPolicyViolation"
ContentSecurityPolicyViolationTypeKWasmEvalViolation ContentSecurityPolicyViolationType = "kWasmEvalViolation"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t ContentSecurityPolicyViolationType) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t ContentSecurityPolicyViolationType) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *ContentSecurityPolicyViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch ContentSecurityPolicyViolationType(v) {
case ContentSecurityPolicyViolationTypeKInlineViolation:
*t = ContentSecurityPolicyViolationTypeKInlineViolation
case ContentSecurityPolicyViolationTypeKEvalViolation:
*t = ContentSecurityPolicyViolationTypeKEvalViolation
case ContentSecurityPolicyViolationTypeKURLViolation:
*t = ContentSecurityPolicyViolationTypeKURLViolation
case ContentSecurityPolicyViolationTypeKTrustedTypesSinkViolation:
*t = ContentSecurityPolicyViolationTypeKTrustedTypesSinkViolation
case ContentSecurityPolicyViolationTypeKTrustedTypesPolicyViolation:
*t = ContentSecurityPolicyViolationTypeKTrustedTypesPolicyViolation
case ContentSecurityPolicyViolationTypeKWasmEvalViolation:
*t = ContentSecurityPolicyViolationTypeKWasmEvalViolation
default:
in.AddError(fmt.Errorf("unknown ContentSecurityPolicyViolationType value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *ContentSecurityPolicyViolationType) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// SourceCodeLocation [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SourceCodeLocation
type SourceCodeLocation struct {
ScriptID runtime.ScriptID `json:"scriptId,omitempty"`
URL string `json:"url"`
LineNumber int64 `json:"lineNumber"`
ColumnNumber int64 `json:"columnNumber"`
}
// ContentSecurityPolicyIssueDetails [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-ContentSecurityPolicyIssueDetails
type ContentSecurityPolicyIssueDetails struct {
BlockedURL string `json:"blockedURL,omitempty"` // The url not included in allowed sources.
ViolatedDirective string `json:"violatedDirective"` // Specific directive that is violated, causing the CSP issue.
IsReportOnly bool `json:"isReportOnly"`
ContentSecurityPolicyViolationType ContentSecurityPolicyViolationType `json:"contentSecurityPolicyViolationType"`
FrameAncestor *AffectedFrame `json:"frameAncestor,omitempty"`
SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation,omitempty"`
ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId,omitempty"`
}
// SharedArrayBufferIssueType [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SharedArrayBufferIssueType
type SharedArrayBufferIssueType string
// String returns the SharedArrayBufferIssueType as string value.
func (t SharedArrayBufferIssueType) String() string {
return string(t)
}
// SharedArrayBufferIssueType values.
const (
SharedArrayBufferIssueTypeTransferIssue SharedArrayBufferIssueType = "TransferIssue"
SharedArrayBufferIssueTypeCreationIssue SharedArrayBufferIssueType = "CreationIssue"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t SharedArrayBufferIssueType) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t SharedArrayBufferIssueType) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *SharedArrayBufferIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch SharedArrayBufferIssueType(v) {
case SharedArrayBufferIssueTypeTransferIssue:
*t = SharedArrayBufferIssueTypeTransferIssue
case SharedArrayBufferIssueTypeCreationIssue:
*t = SharedArrayBufferIssueTypeCreationIssue
default:
in.AddError(fmt.Errorf("unknown SharedArrayBufferIssueType value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *SharedArrayBufferIssueType) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// SharedArrayBufferIssueDetails details for a issue arising from an SAB
// being instantiated in, or transferred to a context that is not cross-origin
// isolated.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-SharedArrayBufferIssueDetails
type SharedArrayBufferIssueDetails struct {
SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation"`
IsWarning bool `json:"isWarning"`
Type SharedArrayBufferIssueType `json:"type"`
}
// LowTextContrastIssueDetails [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-LowTextContrastIssueDetails
type LowTextContrastIssueDetails struct {
ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId"`
ViolatingNodeSelector string `json:"violatingNodeSelector"`
ContrastRatio float64 `json:"contrastRatio"`
ThresholdAA float64 `json:"thresholdAA"`
ThresholdAAA float64 `json:"thresholdAAA"`
FontSize string `json:"fontSize"`
FontWeight string `json:"fontWeight"`
}
// CorsIssueDetails details for a CORS related issue, e.g. a warning or error
// related to CORS RFC1918 enforcement.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-CorsIssueDetails
type CorsIssueDetails struct {
CorsErrorStatus *network.CorsErrorStatus `json:"corsErrorStatus"`
IsWarning bool `json:"isWarning"`
Request *AffectedRequest `json:"request"`
Location *SourceCodeLocation `json:"location,omitempty"`
InitiatorOrigin string `json:"initiatorOrigin,omitempty"`
ResourceIPAddressSpace network.IPAddressSpace `json:"resourceIPAddressSpace,omitempty"`
ClientSecurityState *network.ClientSecurityState `json:"clientSecurityState,omitempty"`
}
// AttributionReportingIssueType [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AttributionReportingIssueType
type AttributionReportingIssueType string
// String returns the AttributionReportingIssueType as string value.
func (t AttributionReportingIssueType) String() string {
return string(t)
}
// AttributionReportingIssueType values.
const (
AttributionReportingIssueTypePermissionPolicyDisabled AttributionReportingIssueType = "PermissionPolicyDisabled"
AttributionReportingIssueTypeUntrustworthyReportingOrigin AttributionReportingIssueType = "UntrustworthyReportingOrigin"
AttributionReportingIssueTypeInsecureContext AttributionReportingIssueType = "InsecureContext"
AttributionReportingIssueTypeInvalidHeader AttributionReportingIssueType = "InvalidHeader"
AttributionReportingIssueTypeInvalidRegisterTriggerHeader AttributionReportingIssueType = "InvalidRegisterTriggerHeader"
AttributionReportingIssueTypeSourceAndTriggerHeaders AttributionReportingIssueType = "SourceAndTriggerHeaders"
AttributionReportingIssueTypeSourceIgnored AttributionReportingIssueType = "SourceIgnored"
AttributionReportingIssueTypeTriggerIgnored AttributionReportingIssueType = "TriggerIgnored"
AttributionReportingIssueTypeOsSourceIgnored AttributionReportingIssueType = "OsSourceIgnored"
AttributionReportingIssueTypeOsTriggerIgnored AttributionReportingIssueType = "OsTriggerIgnored"
AttributionReportingIssueTypeInvalidRegisterOsSourceHeader AttributionReportingIssueType = "InvalidRegisterOsSourceHeader"
AttributionReportingIssueTypeInvalidRegisterOsTriggerHeader AttributionReportingIssueType = "InvalidRegisterOsTriggerHeader"
AttributionReportingIssueTypeWebAndOsHeaders AttributionReportingIssueType = "WebAndOsHeaders"
AttributionReportingIssueTypeNoWebOrOsSupport AttributionReportingIssueType = "NoWebOrOsSupport"
AttributionReportingIssueTypeNavigationRegistrationWithoutTransientUserActivation AttributionReportingIssueType = "NavigationRegistrationWithoutTransientUserActivation"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t AttributionReportingIssueType) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t AttributionReportingIssueType) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *AttributionReportingIssueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch AttributionReportingIssueType(v) {
case AttributionReportingIssueTypePermissionPolicyDisabled:
*t = AttributionReportingIssueTypePermissionPolicyDisabled
case AttributionReportingIssueTypeUntrustworthyReportingOrigin:
*t = AttributionReportingIssueTypeUntrustworthyReportingOrigin
case AttributionReportingIssueTypeInsecureContext:
*t = AttributionReportingIssueTypeInsecureContext
case AttributionReportingIssueTypeInvalidHeader:
*t = AttributionReportingIssueTypeInvalidHeader
case AttributionReportingIssueTypeInvalidRegisterTriggerHeader:
*t = AttributionReportingIssueTypeInvalidRegisterTriggerHeader
case AttributionReportingIssueTypeSourceAndTriggerHeaders:
*t = AttributionReportingIssueTypeSourceAndTriggerHeaders
case AttributionReportingIssueTypeSourceIgnored:
*t = AttributionReportingIssueTypeSourceIgnored
case AttributionReportingIssueTypeTriggerIgnored:
*t = AttributionReportingIssueTypeTriggerIgnored
case AttributionReportingIssueTypeOsSourceIgnored:
*t = AttributionReportingIssueTypeOsSourceIgnored
case AttributionReportingIssueTypeOsTriggerIgnored:
*t = AttributionReportingIssueTypeOsTriggerIgnored
case AttributionReportingIssueTypeInvalidRegisterOsSourceHeader:
*t = AttributionReportingIssueTypeInvalidRegisterOsSourceHeader
case AttributionReportingIssueTypeInvalidRegisterOsTriggerHeader:
*t = AttributionReportingIssueTypeInvalidRegisterOsTriggerHeader
case AttributionReportingIssueTypeWebAndOsHeaders:
*t = AttributionReportingIssueTypeWebAndOsHeaders
case AttributionReportingIssueTypeNoWebOrOsSupport:
*t = AttributionReportingIssueTypeNoWebOrOsSupport
case AttributionReportingIssueTypeNavigationRegistrationWithoutTransientUserActivation:
*t = AttributionReportingIssueTypeNavigationRegistrationWithoutTransientUserActivation
default:
in.AddError(fmt.Errorf("unknown AttributionReportingIssueType value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *AttributionReportingIssueType) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// AttributionReportingIssueDetails details for issues around "Attribution
// Reporting API" usage. Explainer:
// https://github.com/WICG/attribution-reporting-api.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-AttributionReportingIssueDetails
type AttributionReportingIssueDetails struct {
ViolationType AttributionReportingIssueType `json:"violationType"`
Request *AffectedRequest `json:"request,omitempty"`
ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId,omitempty"`
InvalidParameter string `json:"invalidParameter,omitempty"`
}
// QuirksModeIssueDetails details for issues about documents in Quirks Mode
// or Limited Quirks Mode that affects page layouting.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-QuirksModeIssueDetails
type QuirksModeIssueDetails struct {
IsLimitedQuirksMode bool `json:"isLimitedQuirksMode"` // If false, it means the document's mode is "quirks" instead of "limited-quirks".
DocumentNodeID cdp.BackendNodeID `json:"documentNodeId"`
URL string `json:"url"`
FrameID cdp.FrameID `json:"frameId"`
LoaderID cdp.LoaderID `json:"loaderId"`
}
// GenericIssueErrorType [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-GenericIssueErrorType
type GenericIssueErrorType string
// String returns the GenericIssueErrorType as string value.
func (t GenericIssueErrorType) String() string {
return string(t)
}
// GenericIssueErrorType values.
const (
GenericIssueErrorTypeCrossOriginPortalPostMessageError GenericIssueErrorType = "CrossOriginPortalPostMessageError"
GenericIssueErrorTypeFormLabelForNameError GenericIssueErrorType = "FormLabelForNameError"
GenericIssueErrorTypeFormDuplicateIDForInputError GenericIssueErrorType = "FormDuplicateIdForInputError"
GenericIssueErrorTypeFormInputWithNoLabelError GenericIssueErrorType = "FormInputWithNoLabelError"
GenericIssueErrorTypeFormAutocompleteAttributeEmptyError GenericIssueErrorType = "FormAutocompleteAttributeEmptyError"
GenericIssueErrorTypeFormEmptyIDAndNameAttributesForInputError GenericIssueErrorType = "FormEmptyIdAndNameAttributesForInputError"
GenericIssueErrorTypeFormAriaLabelledByToNonExistingID GenericIssueErrorType = "FormAriaLabelledByToNonExistingId"
GenericIssueErrorTypeFormInputAssignedAutocompleteValueToIDOrNameAttributeError GenericIssueErrorType = "FormInputAssignedAutocompleteValueToIdOrNameAttributeError"
GenericIssueErrorTypeFormLabelHasNeitherForNorNestedInput GenericIssueErrorType = "FormLabelHasNeitherForNorNestedInput"
GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError GenericIssueErrorType = "FormLabelForMatchesNonExistingIdError"
GenericIssueErrorTypeFormInputHasWrongButWellIntendedAutocompleteValueError GenericIssueErrorType = "FormInputHasWrongButWellIntendedAutocompleteValueError"
GenericIssueErrorTypeResponseWasBlockedByORB GenericIssueErrorType = "ResponseWasBlockedByORB"
)
// MarshalEasyJSON satisfies easyjson.Marshaler.
func (t GenericIssueErrorType) MarshalEasyJSON(out *jwriter.Writer) {
out.String(string(t))
}
// MarshalJSON satisfies json.Marshaler.
func (t GenericIssueErrorType) MarshalJSON() ([]byte, error) {
return easyjson.Marshal(t)
}
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (t *GenericIssueErrorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
v := in.String()
switch GenericIssueErrorType(v) {
case GenericIssueErrorTypeCrossOriginPortalPostMessageError:
*t = GenericIssueErrorTypeCrossOriginPortalPostMessageError
case GenericIssueErrorTypeFormLabelForNameError:
*t = GenericIssueErrorTypeFormLabelForNameError
case GenericIssueErrorTypeFormDuplicateIDForInputError:
*t = GenericIssueErrorTypeFormDuplicateIDForInputError
case GenericIssueErrorTypeFormInputWithNoLabelError:
*t = GenericIssueErrorTypeFormInputWithNoLabelError
case GenericIssueErrorTypeFormAutocompleteAttributeEmptyError:
*t = GenericIssueErrorTypeFormAutocompleteAttributeEmptyError
case GenericIssueErrorTypeFormEmptyIDAndNameAttributesForInputError:
*t = GenericIssueErrorTypeFormEmptyIDAndNameAttributesForInputError
case GenericIssueErrorTypeFormAriaLabelledByToNonExistingID:
*t = GenericIssueErrorTypeFormAriaLabelledByToNonExistingID
case GenericIssueErrorTypeFormInputAssignedAutocompleteValueToIDOrNameAttributeError:
*t = GenericIssueErrorTypeFormInputAssignedAutocompleteValueToIDOrNameAttributeError
case GenericIssueErrorTypeFormLabelHasNeitherForNorNestedInput:
*t = GenericIssueErrorTypeFormLabelHasNeitherForNorNestedInput
case GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError:
*t = GenericIssueErrorTypeFormLabelForMatchesNonExistingIDError
case GenericIssueErrorTypeFormInputHasWrongButWellIntendedAutocompleteValueError:
*t = GenericIssueErrorTypeFormInputHasWrongButWellIntendedAutocompleteValueError
case GenericIssueErrorTypeResponseWasBlockedByORB:
*t = GenericIssueErrorTypeResponseWasBlockedByORB
default:
in.AddError(fmt.Errorf("unknown GenericIssueErrorType value: %v", v))
}
}
// UnmarshalJSON satisfies json.Unmarshaler.
func (t *GenericIssueErrorType) UnmarshalJSON(buf []byte) error {
return easyjson.Unmarshal(buf, t)
}
// GenericIssueDetails depending on the concrete errorType, different
// properties are set.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-GenericIssueDetails
type GenericIssueDetails struct {
ErrorType GenericIssueErrorType `json:"errorType"` // Issues with the same errorType are aggregated in the frontend.
FrameID cdp.FrameID `json:"frameId,omitempty"`
ViolatingNodeID cdp.BackendNodeID `json:"violatingNodeId,omitempty"`
ViolatingNodeAttribute string `json:"violatingNodeAttribute,omitempty"`
Request *AffectedRequest `json:"request,omitempty"`
}
// DeprecationIssueDetails this issue tracks information needed to print a
// deprecation message.
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-DeprecationIssueDetails
type DeprecationIssueDetails struct {
AffectedFrame *AffectedFrame `json:"affectedFrame,omitempty"`
SourceCodeLocation *SourceCodeLocation `json:"sourceCodeLocation"`
Type string `json:"type"` // One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
}
// BounceTrackingIssueDetails this issue warns about sites in the redirect
// chain of a finished navigation that may be flagged as trackers and have their
// state cleared if they don't receive a user interaction. Note that in this
// context 'site' means eTLD+1. For example, if the URL
// https://example.test:80/bounce was in the redirect chain, the site reported
// would be example.test.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-BounceTrackingIssueDetails
type BounceTrackingIssueDetails struct {
TrackingSites []string `json:"trackingSites"`
}
// CookieDeprecationMetadataIssueDetails this issue warns about third-party
// sites that are accessing cookies on the current page, and have been permitted
// due to having a global metadata grant. Note that in this context 'site' means
// eTLD+1. For example, if the URL https://example.test:80/web_page was
// accessing cookies, the site reported would be example.test.
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-CookieDeprecationMetadataIssueDetails
type CookieDeprecationMetadataIssueDetails struct {
AllowedSites []string `json:"allowedSites"`
}
// ClientHintIssueReason [no description].
//
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-ClientHintIssueReason
type ClientHintIssueReason string
// String returns the ClientHintIssueReason as string value.
func (t ClientHintIssueReason) String() string {
return string(t)
}
// ClientHintIssueReason values.
const (
ClientHintIssueReasonMetaTagAllowListInvalidOrigin ClientHintIssueReason = "MetaTagAllowListInvalidOrigin"
ClientHintIssueReasonMetaTagModifiedHTML ClientHintIssueReason = "MetaTagModifiedHTML"
)