Documentation ¶
Overview ¶
Package log provides type definitions for use with the Chrome Log protocol
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Level = levelEnum{
Verbose: levelVerbose,
Info: levelInfo,
Warning: levelWarning,
Error: levelError,
}
Level provides named acces to the LevelEnum values.
var Name = nameEnum{
LongTask: nameLongTask,
LongLayout: nameLongLayout,
BlockedEvent: nameBlockedEvent,
BlockedParser: nameBlockedParser,
DiscouragedAPIUse: nameDiscouragedAPIUse,
Handler: nameHandler,
RecurringHandler: nameRecurringHandler,
}
Name provides named acces to the NameEnum values.
var Source = sourceEnum{
XML: sourceXML,
Javascript: sourceJavascript,
Network: sourceNetwork,
Storage: sourceStorage,
Appcache: sourceAppcache,
Rendering: sourceRendering,
Security: sourceSecurity,
Deprecation: sourceDeprecation,
Worker: sourceWorker,
Violation: sourceViolation,
Intervention: sourceIntervention,
Recommendation: sourceRecommendation,
Other: sourceOther,
}
Source provides named acces to the SourceEnum values.
Functions ¶
This section is empty.
Types ¶
type ClearResult ¶
type ClearResult struct { // Error information related to executing this method Err error `json:"-"` }
ClearResult represents the result of calls to Log.clear.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#method-clear
type DisableResult ¶
type DisableResult struct { // Error information related to executing this method Err error `json:"-"` }
DisableResult represents the result of calls to Log.disable.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#method-disable
type EnableResult ¶
type EnableResult struct { // Error information related to executing this method Err error `json:"-"` }
EnableResult represents the result of calls to Log.enable.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#method-enable
type Entry ¶
type Entry struct { // Log entry source. Allowed values: // - Source.XML // - Source.Javascript // - Source.Network // - Source.Storage // - Source.Appcache // - Source.Rendering // - Source.Security // - Source.Deprecation // - Source.Worker // - Source.Violation // - Source.Intervention // - Source.Recommendation // - Source.Other Source SourceEnum `json:"source"` // Log entry severity. Allowed values: // - Level.Verbose // - Level.Info // - Level.Warning // - Level.Error Level LevelEnum `json:"level"` // Logged text. Text string `json:"text"` // Timestamp when this entry was added. Timestamp runtime.Timestamp `json:"timestamp"` // Optional. URL of the resource if known. URL string `json:"url,omitempty"` // Optional. Line number in the resource. LineNumber int `json:"lineNumber,omitempty"` // Optional. JavaScript stack trace. StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // Optional. Identifier of the network request associated with this entry. NetworkRequestID network.RequestID `json:"networkRequestId,omitempty"` // Optional. Identifier of the worker associated with this entry. WorkerID string `json:"workerId,omitempty"` // Optional. Call arguments. Args []*runtime.RemoteObject `json:"args,omitempty"` }
Entry is a log entry.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#type-LogEntry
type EntryAddedEvent ¶
type EntryAddedEvent struct { // The entry. Entry *Entry `json:"entry"` // Error information related to this event Err error `json:"-"` }
EntryAddedEvent represents LayerTree.entryAdded event data.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#event-entryAdded
type LevelEnum ¶
type LevelEnum int
LevelEnum represents the log entry severity. Allowed values:
- Level.Verbose "verbose"
- Level.Info "info"
- Level.Warning "warning"
- Level.Error "error"
https://chromedevtools.github.io/devtools-protocol/tot/Log/#type-LogEntry
func (LevelEnum) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*LevelEnum) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type NameEnum ¶
type NameEnum int
NameEnum represents the violation type. Allowed values:
- Name.LongTask "longTask"
- Name.LongLayout "longLayout"
- Name.BlockedEvent "blockedEvent"
- Name.BlockedParser "blockedParser"
- Name.DiscouragedAPIUse "discouragedAPIUse"
- Name.Handler "handler"
- Name.RecurringHandler "recurringHandler"
https://chromedevtools.github.io/devtools-protocol/tot/Log/#type-ViolationSetting
func (NameEnum) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*NameEnum) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type SourceEnum ¶
type SourceEnum int
SourceEnum represents the log entry source. Allowed values:
- Source.XML "xml"
- Source.Javascript "javascript"
- Source.Network "network"
- Source.Storage "storage"
- Source.Appcache "appcache"
- Source.Rendering "rendering"
- Source.Security "security"
- Source.Deprecation "deprecation"
- Source.Worker "worker"
- Source.Violation "violation"
- Source.Intervention "intervention"
- Source.Recommendation "recommendation"
- Source.Other "other"
https://chromedevtools.github.io/devtools-protocol/tot/Log/#type-LogEntry
func (SourceEnum) MarshalJSON ¶
func (enum SourceEnum) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*SourceEnum) UnmarshalJSON ¶
func (enum *SourceEnum) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements json.Unmarshaler
type StartViolationsReportParams ¶
type StartViolationsReportParams struct { // Configuration for violations. Config []*ViolationSetting `json:"config"` }
StartViolationsReportParams represents LayerTree.startViolationsReport parameters.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#method-startViolationsReport
type StartViolationsReportResult ¶
type StartViolationsReportResult struct { // Error information related to executing this method Err error `json:"-"` }
StartViolationsReportResult represents the result of calls to Log.startViolationsReport.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#method-startViolationsReport
type StopViolationsReportResult ¶
type StopViolationsReportResult struct { // Error information related to executing this method Err error `json:"-"` }
StopViolationsReportResult represents the result of calls to Log.stopViolationsReport.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#method-stopViolationsReport
type ViolationSetting ¶
type ViolationSetting struct { // Violation type. Allowed values: // - Name.LongTask // - Name.LongLayout // - Name.BlockedEvent // - Name.BlockedParser // - Name.DiscouragedAPIUse // - Name.Handler // - Name.RecurringHandler Name NameEnum `json:"name"` // Time threshold to trigger upon. Threshold int `json:"threshold"` }
ViolationSetting is a violation configuration setting.
https://chromedevtools.github.io/devtools-protocol/tot/Log/#type-ViolationSetting