vendor/github.com/go-rod/rod/lib/proto/log.go
221 lines · 6321 bytes
1// This file is generated by "./lib/proto/generate"
2
3package proto
4
5/*
6
7Log
8
9Provides access to log entries.
10
11*/
12
13// LogLogEntrySource enum.
14type LogLogEntrySource string
15
16const (
17 // LogLogEntrySourceXML enum const.
18 LogLogEntrySourceXML LogLogEntrySource = "xml"
19
20 // LogLogEntrySourceJavascript enum const.
21 LogLogEntrySourceJavascript LogLogEntrySource = "javascript"
22
23 // LogLogEntrySourceNetwork enum const.
24 LogLogEntrySourceNetwork LogLogEntrySource = "network"
25
26 // LogLogEntrySourceStorage enum const.
27 LogLogEntrySourceStorage LogLogEntrySource = "storage"
28
29 // LogLogEntrySourceAppcache enum const.
30 LogLogEntrySourceAppcache LogLogEntrySource = "appcache"
31
32 // LogLogEntrySourceRendering enum const.
33 LogLogEntrySourceRendering LogLogEntrySource = "rendering"
34
35 // LogLogEntrySourceSecurity enum const.
36 LogLogEntrySourceSecurity LogLogEntrySource = "security"
37
38 // LogLogEntrySourceDeprecation enum const.
39 LogLogEntrySourceDeprecation LogLogEntrySource = "deprecation"
40
41 // LogLogEntrySourceWorker enum const.
42 LogLogEntrySourceWorker LogLogEntrySource = "worker"
43
44 // LogLogEntrySourceViolation enum const.
45 LogLogEntrySourceViolation LogLogEntrySource = "violation"
46
47 // LogLogEntrySourceIntervention enum const.
48 LogLogEntrySourceIntervention LogLogEntrySource = "intervention"
49
50 // LogLogEntrySourceRecommendation enum const.
51 LogLogEntrySourceRecommendation LogLogEntrySource = "recommendation"
52
53 // LogLogEntrySourceOther enum const.
54 LogLogEntrySourceOther LogLogEntrySource = "other"
55)
56
57// LogLogEntryLevel enum.
58type LogLogEntryLevel string
59
60const (
61 // LogLogEntryLevelVerbose enum const.
62 LogLogEntryLevelVerbose LogLogEntryLevel = "verbose"
63
64 // LogLogEntryLevelInfo enum const.
65 LogLogEntryLevelInfo LogLogEntryLevel = "info"
66
67 // LogLogEntryLevelWarning enum const.
68 LogLogEntryLevelWarning LogLogEntryLevel = "warning"
69
70 // LogLogEntryLevelError enum const.
71 LogLogEntryLevelError LogLogEntryLevel = "error"
72)
73
74// LogLogEntryCategory enum.
75type LogLogEntryCategory string
76
77const (
78 // LogLogEntryCategoryCors enum const.
79 LogLogEntryCategoryCors LogLogEntryCategory = "cors"
80)
81
82// LogLogEntry Log entry.
83type LogLogEntry struct {
84 // Source Log entry source.
85 Source LogLogEntrySource `json:"source"`
86
87 // Level Log entry severity.
88 Level LogLogEntryLevel `json:"level"`
89
90 // Text Logged text.
91 Text string `json:"text"`
92
93 // Category (optional) ...
94 Category LogLogEntryCategory `json:"category,omitempty"`
95
96 // Timestamp when this entry was added.
97 Timestamp RuntimeTimestamp `json:"timestamp"`
98
99 // URL (optional) URL of the resource if known.
100 URL string `json:"url,omitempty"`
101
102 // LineNumber (optional) Line number in the resource.
103 LineNumber *int `json:"lineNumber,omitempty"`
104
105 // StackTrace (optional) JavaScript stack trace.
106 StackTrace *RuntimeStackTrace `json:"stackTrace,omitempty"`
107
108 // NetworkRequestID (optional) Identifier of the network request associated with this entry.
109 NetworkRequestID NetworkRequestID `json:"networkRequestId,omitempty"`
110
111 // WorkerID (optional) Identifier of the worker associated with this entry.
112 WorkerID string `json:"workerId,omitempty"`
113
114 // Args (optional) Call arguments.
115 Args []*RuntimeRemoteObject `json:"args,omitempty"`
116}
117
118// LogViolationSettingName enum.
119type LogViolationSettingName string
120
121const (
122 // LogViolationSettingNameLongTask enum const.
123 LogViolationSettingNameLongTask LogViolationSettingName = "longTask"
124
125 // LogViolationSettingNameLongLayout enum const.
126 LogViolationSettingNameLongLayout LogViolationSettingName = "longLayout"
127
128 // LogViolationSettingNameBlockedEvent enum const.
129 LogViolationSettingNameBlockedEvent LogViolationSettingName = "blockedEvent"
130
131 // LogViolationSettingNameBlockedParser enum const.
132 LogViolationSettingNameBlockedParser LogViolationSettingName = "blockedParser"
133
134 // LogViolationSettingNameDiscouragedAPIUse enum const.
135 LogViolationSettingNameDiscouragedAPIUse LogViolationSettingName = "discouragedAPIUse"
136
137 // LogViolationSettingNameHandler enum const.
138 LogViolationSettingNameHandler LogViolationSettingName = "handler"
139
140 // LogViolationSettingNameRecurringHandler enum const.
141 LogViolationSettingNameRecurringHandler LogViolationSettingName = "recurringHandler"
142)
143
144// LogViolationSetting Violation configuration setting.
145type LogViolationSetting struct {
146 // Name Violation type.
147 Name LogViolationSettingName `json:"name"`
148
149 // Threshold Time threshold to trigger upon.
150 Threshold float64 `json:"threshold"`
151}
152
153// LogClear Clears the log.
154type LogClear struct{}
155
156// ProtoReq name.
157func (m LogClear) ProtoReq() string { return "Log.clear" }
158
159// Call sends the request.
160func (m LogClear) Call(c Client) error {
161 return call(m.ProtoReq(), m, nil, c)
162}
163
164// LogDisable Disables log domain, prevents further log entries from being reported to the client.
165type LogDisable struct{}
166
167// ProtoReq name.
168func (m LogDisable) ProtoReq() string { return "Log.disable" }
169
170// Call sends the request.
171func (m LogDisable) Call(c Client) error {
172 return call(m.ProtoReq(), m, nil, c)
173}
174
175// LogEnable Enables log domain, sends the entries collected so far to the client by means of the
176// `entryAdded` notification.
177type LogEnable struct{}
178
179// ProtoReq name.
180func (m LogEnable) ProtoReq() string { return "Log.enable" }
181
182// Call sends the request.
183func (m LogEnable) Call(c Client) error {
184 return call(m.ProtoReq(), m, nil, c)
185}
186
187// LogStartViolationsReport start violation reporting.
188type LogStartViolationsReport struct {
189 // Configuration for violations.
190 Config []*LogViolationSetting `json:"config"`
191}
192
193// ProtoReq name.
194func (m LogStartViolationsReport) ProtoReq() string { return "Log.startViolationsReport" }
195
196// Call sends the request.
197func (m LogStartViolationsReport) Call(c Client) error {
198 return call(m.ProtoReq(), m, nil, c)
199}
200
201// LogStopViolationsReport Stop violation reporting.
202type LogStopViolationsReport struct{}
203
204// ProtoReq name.
205func (m LogStopViolationsReport) ProtoReq() string { return "Log.stopViolationsReport" }
206
207// Call sends the request.
208func (m LogStopViolationsReport) Call(c Client) error {
209 return call(m.ProtoReq(), m, nil, c)
210}
211
212// LogEntryAdded Issued when new message was logged.
213type LogEntryAdded struct {
214 // Entry The entry.
215 Entry *LogLogEntry `json:"entry"`
216}
217
218// ProtoEvent name.
219func (evt LogEntryAdded) ProtoEvent() string {
220 return "Log.entryAdded"
221}