Adding synthesized "HAR" domain to protocol generation

* Added "HAR" domain
* Fixed issue with omitempty on domain types
This commit is contained in:
Kenneth Shaw 2017-07-02 18:44:34 +07:00
parent d70d54233f
commit 7fbfef7cf1
93 changed files with 8553 additions and 5782 deletions

View File

@ -282,14 +282,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.Value != nil { if in.Value != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -491,14 +489,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility3(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if (in.Value).IsDefined() { if (in.Value).IsDefined() {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -618,14 +614,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility4(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.BackendDOMNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"backendDOMNodeId\":") out.RawString("\"backendDOMNodeId\":")
out.Int64(int64(in.BackendDOMNodeID)) out.Int64(int64(in.BackendDOMNodeID))
}
if in.Idref != "" { if in.Idref != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -713,15 +707,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Value != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -732,7 +723,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(out *jwriter.Wr
} else { } else {
(*in.Value).MarshalEasyJSON(out) (*in.Value).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -923,22 +913,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility6(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeId\":") out.RawString("\"nodeId\":")
out.String(string(in.NodeID)) out.String(string(in.NodeID))
}
if in.Ignored {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"ignored\":") out.RawString("\"ignored\":")
out.Bool(bool(in.Ignored)) out.Bool(bool(in.Ignored))
}
if len(in.IgnoredReasons) != 0 { if len(in.IgnoredReasons) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')

View File

@ -223,7 +223,7 @@ func (t *AXValueNativeSourceType) UnmarshalJSON(buf []byte) error {
// AXValueSource a single source for a computed AX property. // AXValueSource a single source for a computed AX property.
type AXValueSource struct { type AXValueSource struct {
Type AXValueSourceType `json:"type,omitempty"` // What type of source this is. Type AXValueSourceType `json:"type"` // What type of source this is.
Value *AXValue `json:"value,omitempty"` // The value of this property source. Value *AXValue `json:"value,omitempty"` // The value of this property source.
Attribute string `json:"attribute,omitempty"` // The name of the relevant attribute, if any. Attribute string `json:"attribute,omitempty"` // The name of the relevant attribute, if any.
AttributeValue *AXValue `json:"attributeValue,omitempty"` // The value of the relevant attribute, if any. AttributeValue *AXValue `json:"attributeValue,omitempty"` // The value of the relevant attribute, if any.
@ -236,20 +236,20 @@ type AXValueSource struct {
// AXRelatedNode [no description]. // AXRelatedNode [no description].
type AXRelatedNode struct { type AXRelatedNode struct {
BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId,omitempty"` // The BackendNodeId of the related DOM node. BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId"` // The BackendNodeId of the related DOM node.
Idref string `json:"idref,omitempty"` // The IDRef value provided, if any. Idref string `json:"idref,omitempty"` // The IDRef value provided, if any.
Text string `json:"text,omitempty"` // The text alternative of this node in the current context. Text string `json:"text,omitempty"` // The text alternative of this node in the current context.
} }
// AXProperty [no description]. // AXProperty [no description].
type AXProperty struct { type AXProperty struct {
Name string `json:"name,omitempty"` // The name of this property. Name string `json:"name"` // The name of this property.
Value *AXValue `json:"value,omitempty"` // The value of this property. Value *AXValue `json:"value"` // The value of this property.
} }
// AXValue a single computed AX property. // AXValue a single computed AX property.
type AXValue struct { type AXValue struct {
Type AXValueType `json:"type,omitempty"` // The type of this value. Type AXValueType `json:"type"` // The type of this value.
Value easyjson.RawMessage `json:"value,omitempty"` // The computed value of this property. Value easyjson.RawMessage `json:"value,omitempty"` // The computed value of this property.
RelatedNodes []*AXRelatedNode `json:"relatedNodes,omitempty"` // One or more related nodes, if applicable. RelatedNodes []*AXRelatedNode `json:"relatedNodes,omitempty"` // One or more related nodes, if applicable.
Sources []*AXValueSource `json:"sources,omitempty"` // The sources which contributed to the computation of this property. Sources []*AXValueSource `json:"sources,omitempty"` // The sources which contributed to the computation of this property.
@ -543,8 +543,8 @@ func (t *AXRelationshipAttributes) UnmarshalJSON(buf []byte) error {
// AXNode a node in the accessibility tree. // AXNode a node in the accessibility tree.
type AXNode struct { type AXNode struct {
NodeID AXNodeID `json:"nodeId,omitempty"` // Unique identifier for this node. NodeID AXNodeID `json:"nodeId"` // Unique identifier for this node.
Ignored bool `json:"ignored,omitempty"` // Whether this node is ignored for accessibility Ignored bool `json:"ignored"` // Whether this node is ignored for accessibility
IgnoredReasons []*AXProperty `json:"ignoredReasons,omitempty"` // Collection of reasons why this node is hidden. IgnoredReasons []*AXProperty `json:"ignoredReasons,omitempty"` // Collection of reasons why this node is hidden.
Role *AXValue `json:"role,omitempty"` // This Node's role, whether explicit or implicit. Role *AXValue `json:"role,omitempty"` // This Node's role, whether explicit or implicit.
Name *AXValue `json:"name,omitempty"` // The accessible name for this Node. Name *AXValue `json:"name,omitempty"` // The accessible name for this Node.

View File

@ -703,7 +703,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation7(out *jwriter.Writer
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
} }
if len(in.Keyframes) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -725,7 +724,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation7(out *jwriter.Writer
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -789,22 +787,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation8(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Offset != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"offset\":") out.RawString("\"offset\":")
out.String(string(in.Offset)) out.String(string(in.Offset))
}
if in.Easing != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"easing\":") out.RawString("\"easing\":")
out.String(string(in.Easing)) out.String(string(in.Easing))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1138,7 +1132,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation13(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Animation != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1149,7 +1142,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation13(out *jwriter.Write
} else { } else {
(*in.Animation).MarshalEasyJSON(out) (*in.Animation).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1211,14 +1203,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation14(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.String(string(in.ID)) out.String(string(in.ID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1280,14 +1270,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation15(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.String(string(in.ID)) out.String(string(in.ID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1434,70 +1422,54 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Delay != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"delay\":") out.RawString("\"delay\":")
out.Float64(float64(in.Delay)) out.Float64(float64(in.Delay))
}
if in.EndDelay != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endDelay\":") out.RawString("\"endDelay\":")
out.Float64(float64(in.EndDelay)) out.Float64(float64(in.EndDelay))
}
if in.IterationStart != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"iterationStart\":") out.RawString("\"iterationStart\":")
out.Float64(float64(in.IterationStart)) out.Float64(float64(in.IterationStart))
}
if in.Iterations != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"iterations\":") out.RawString("\"iterations\":")
out.Float64(float64(in.Iterations)) out.Float64(float64(in.Iterations))
}
if in.Duration != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"duration\":") out.RawString("\"duration\":")
out.Float64(float64(in.Duration)) out.Float64(float64(in.Duration))
}
if in.Direction != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"direction\":") out.RawString("\"direction\":")
out.String(string(in.Direction)) out.String(string(in.Direction))
}
if in.Fill != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"fill\":") out.RawString("\"fill\":")
out.String(string(in.Fill)) out.String(string(in.Fill))
}
if in.BackendNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"backendNodeId\":") out.RawString("\"backendNodeId\":")
out.Int64(int64(in.BackendNodeID)) out.Int64(int64(in.BackendNodeID))
}
if in.KeyframesRule != nil { if in.KeyframesRule != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1510,14 +1482,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(out *jwriter.Write
(*in.KeyframesRule).MarshalEasyJSON(out) (*in.KeyframesRule).MarshalEasyJSON(out)
} }
} }
if in.Easing != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"easing\":") out.RawString("\"easing\":")
out.String(string(in.Easing)) out.String(string(in.Easing))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1664,63 +1634,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation19(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.String(string(in.ID)) out.String(string(in.ID))
}
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.PausedState {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"pausedState\":") out.RawString("\"pausedState\":")
out.Bool(bool(in.PausedState)) out.Bool(bool(in.PausedState))
}
if in.PlayState != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"playState\":") out.RawString("\"playState\":")
out.String(string(in.PlayState)) out.String(string(in.PlayState))
}
if in.PlaybackRate != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"playbackRate\":") out.RawString("\"playbackRate\":")
out.Float64(float64(in.PlaybackRate)) out.Float64(float64(in.PlaybackRate))
}
if in.StartTime != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startTime\":") out.RawString("\"startTime\":")
out.Float64(float64(in.StartTime)) out.Float64(float64(in.StartTime))
}
if in.CurrentTime != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"currentTime\":") out.RawString("\"currentTime\":")
out.Float64(float64(in.CurrentTime)) out.Float64(float64(in.CurrentTime))
}
if in.Source != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1731,15 +1686,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation19(out *jwriter.Write
} else { } else {
(*in.Source).MarshalEasyJSON(out) (*in.Source).MarshalEasyJSON(out)
} }
}
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.CSSID != "" { if in.CSSID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')

View File

@ -8,17 +8,17 @@ import (
// EventAnimationCreated event for each animation that has been created. // EventAnimationCreated event for each animation that has been created.
type EventAnimationCreated struct { type EventAnimationCreated struct {
ID string `json:"id,omitempty"` // Id of the animation that was created. ID string `json:"id"` // Id of the animation that was created.
} }
// EventAnimationStarted event for animation that has been started. // EventAnimationStarted event for animation that has been started.
type EventAnimationStarted struct { type EventAnimationStarted struct {
Animation *Animation `json:"animation,omitempty"` // Animation that was started. Animation *Animation `json:"animation"` // Animation that was started.
} }
// EventAnimationCanceled event for when an animation has been cancelled. // EventAnimationCanceled event for when an animation has been cancelled.
type EventAnimationCanceled struct { type EventAnimationCanceled struct {
ID string `json:"id,omitempty"` // Id of the animation that was cancelled. ID string `json:"id"` // Id of the animation that was cancelled.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -13,42 +13,42 @@ import (
// Animation animation instance. // Animation animation instance.
type Animation struct { type Animation struct {
ID string `json:"id,omitempty"` // Animation's id. ID string `json:"id"` // Animation's id.
Name string `json:"name,omitempty"` // Animation's name. Name string `json:"name"` // Animation's name.
PausedState bool `json:"pausedState,omitempty"` // Animation's internal paused state. PausedState bool `json:"pausedState"` // Animation's internal paused state.
PlayState string `json:"playState,omitempty"` // Animation's play state. PlayState string `json:"playState"` // Animation's play state.
PlaybackRate float64 `json:"playbackRate,omitempty"` // Animation's playback rate. PlaybackRate float64 `json:"playbackRate"` // Animation's playback rate.
StartTime float64 `json:"startTime,omitempty"` // Animation's start time. StartTime float64 `json:"startTime"` // Animation's start time.
CurrentTime float64 `json:"currentTime,omitempty"` // Animation's current time. CurrentTime float64 `json:"currentTime"` // Animation's current time.
Source *Effect `json:"source,omitempty"` // Animation's source animation node. Source *Effect `json:"source"` // Animation's source animation node.
Type Type `json:"type,omitempty"` // Animation type of Animation. Type Type `json:"type"` // Animation type of Animation.
CSSID string `json:"cssId,omitempty"` // A unique ID for Animation representing the sources that triggered this CSS animation/transition. CSSID string `json:"cssId,omitempty"` // A unique ID for Animation representing the sources that triggered this CSS animation/transition.
} }
// Effect animationEffect instance. // Effect animationEffect instance.
type Effect struct { type Effect struct {
Delay float64 `json:"delay,omitempty"` // AnimationEffect's delay. Delay float64 `json:"delay"` // AnimationEffect's delay.
EndDelay float64 `json:"endDelay,omitempty"` // AnimationEffect's end delay. EndDelay float64 `json:"endDelay"` // AnimationEffect's end delay.
IterationStart float64 `json:"iterationStart,omitempty"` // AnimationEffect's iteration start. IterationStart float64 `json:"iterationStart"` // AnimationEffect's iteration start.
Iterations float64 `json:"iterations,omitempty"` // AnimationEffect's iterations. Iterations float64 `json:"iterations"` // AnimationEffect's iterations.
Duration float64 `json:"duration,omitempty"` // AnimationEffect's iteration duration. Duration float64 `json:"duration"` // AnimationEffect's iteration duration.
Direction string `json:"direction,omitempty"` // AnimationEffect's playback direction. Direction string `json:"direction"` // AnimationEffect's playback direction.
Fill string `json:"fill,omitempty"` // AnimationEffect's fill mode. Fill string `json:"fill"` // AnimationEffect's fill mode.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // AnimationEffect's target node. BackendNodeID cdp.BackendNodeID `json:"backendNodeId"` // AnimationEffect's target node.
KeyframesRule *KeyframesRule `json:"keyframesRule,omitempty"` // AnimationEffect's keyframes. KeyframesRule *KeyframesRule `json:"keyframesRule,omitempty"` // AnimationEffect's keyframes.
Easing string `json:"easing,omitempty"` // AnimationEffect's timing function. Easing string `json:"easing"` // AnimationEffect's timing function.
} }
// KeyframesRule keyframes Rule. // KeyframesRule keyframes Rule.
type KeyframesRule struct { type KeyframesRule struct {
Name string `json:"name,omitempty"` // CSS keyframed animation's name. Name string `json:"name,omitempty"` // CSS keyframed animation's name.
Keyframes []*KeyframeStyle `json:"keyframes,omitempty"` // List of animation keyframes. Keyframes []*KeyframeStyle `json:"keyframes"` // List of animation keyframes.
} }
// KeyframeStyle keyframe Style. // KeyframeStyle keyframe Style.
type KeyframeStyle struct { type KeyframeStyle struct {
Offset string `json:"offset,omitempty"` // Keyframe's time offset. Offset string `json:"offset"` // Keyframe's time offset.
Easing string `json:"easing,omitempty"` // AnimationEffect's timing function. Easing string `json:"easing"` // AnimationEffect's timing function.
} }
// Type animation type of Animation. // Type animation type of Animation.

View File

@ -56,30 +56,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(out *jwriter.
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if in.Size != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"size\":") out.RawString("\"size\":")
out.Int64(int64(in.Size)) out.Int64(int64(in.Size))
}
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
out.String(string(in.Type)) out.String(string(in.Type))
}
out.RawByte('}') out.RawByte('}')
} }
@ -601,30 +595,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache7(out *jwriter
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
if in.ManifestURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"manifestURL\":") out.RawString("\"manifestURL\":")
out.String(string(in.ManifestURL)) out.String(string(in.ManifestURL))
}
if in.Status != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"status\":") out.RawString("\"status\":")
out.Int64(int64(in.Status)) out.Int64(int64(in.Status))
}
out.RawByte('}') out.RawByte('}')
} }
@ -686,14 +674,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache8(out *jwriter
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.IsNowOnline {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"isNowOnline\":") out.RawString("\"isNowOnline\":")
out.Bool(bool(in.IsNowOnline)) out.Bool(bool(in.IsNowOnline))
}
out.RawByte('}') out.RawByte('}')
} }
@ -759,30 +745,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache9(out *jwriter
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
if in.ManifestURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"manifestURL\":") out.RawString("\"manifestURL\":")
out.String(string(in.ManifestURL)) out.String(string(in.ManifestURL))
}
if in.Status != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"status\":") out.RawString("\"status\":")
out.Int64(int64(in.Status)) out.Int64(int64(in.Status))
}
out.RawByte('}') out.RawByte('}')
} }
@ -940,39 +920,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache11(out *jwrite
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ManifestURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"manifestURL\":") out.RawString("\"manifestURL\":")
out.String(string(in.ManifestURL)) out.String(string(in.ManifestURL))
}
if in.Size != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"size\":") out.RawString("\"size\":")
out.Float64(float64(in.Size)) out.Float64(float64(in.Size))
}
if in.CreationTime != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"creationTime\":") out.RawString("\"creationTime\":")
out.Float64(float64(in.CreationTime)) out.Float64(float64(in.CreationTime))
}
if in.UpdateTime != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"updateTime\":") out.RawString("\"updateTime\":")
out.Float64(float64(in.UpdateTime)) out.Float64(float64(in.UpdateTime))
}
if len(in.Resources) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -994,7 +965,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache11(out *jwrite
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -8,14 +8,14 @@ import (
// EventApplicationCacheStatusUpdated [no description]. // EventApplicationCacheStatusUpdated [no description].
type EventApplicationCacheStatusUpdated struct { type EventApplicationCacheStatusUpdated struct {
FrameID cdp.FrameID `json:"frameId,omitempty"` // Identifier of the frame containing document whose application cache updated status. FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame containing document whose application cache updated status.
ManifestURL string `json:"manifestURL,omitempty"` // Manifest URL. ManifestURL string `json:"manifestURL"` // Manifest URL.
Status int64 `json:"status,omitempty"` // Updated application cache status. Status int64 `json:"status"` // Updated application cache status.
} }
// EventNetworkStateUpdated [no description]. // EventNetworkStateUpdated [no description].
type EventNetworkStateUpdated struct { type EventNetworkStateUpdated struct {
IsNowOnline bool `json:"isNowOnline,omitempty"` IsNowOnline bool `json:"isNowOnline"`
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -8,23 +8,23 @@ import (
// Resource detailed application cache resource information. // Resource detailed application cache resource information.
type Resource struct { type Resource struct {
URL string `json:"url,omitempty"` // Resource url. URL string `json:"url"` // Resource url.
Size int64 `json:"size,omitempty"` // Resource size. Size int64 `json:"size"` // Resource size.
Type string `json:"type,omitempty"` // Resource type. Type string `json:"type"` // Resource type.
} }
// ApplicationCache detailed application cache information. // ApplicationCache detailed application cache information.
type ApplicationCache struct { type ApplicationCache struct {
ManifestURL string `json:"manifestURL,omitempty"` // Manifest URL. ManifestURL string `json:"manifestURL"` // Manifest URL.
Size float64 `json:"size,omitempty"` // Application cache size. Size float64 `json:"size"` // Application cache size.
CreationTime float64 `json:"creationTime,omitempty"` // Application cache creation time. CreationTime float64 `json:"creationTime"` // Application cache creation time.
UpdateTime float64 `json:"updateTime,omitempty"` // Application cache update time. UpdateTime float64 `json:"updateTime"` // Application cache update time.
Resources []*Resource `json:"resources,omitempty"` // Application cache resources. Resources []*Resource `json:"resources"` // Application cache resources.
} }
// FrameWithManifest frame identifier - manifest URL pair. // FrameWithManifest frame identifier - manifest URL pair.
type FrameWithManifest struct { type FrameWithManifest struct {
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier. FrameID cdp.FrameID `json:"frameId"` // Frame identifier.
ManifestURL string `json:"manifestURL,omitempty"` // Manifest URL. ManifestURL string `json:"manifestURL"` // Manifest URL.
Status int64 `json:"status,omitempty"` // Application cache status. Status int64 `json:"status"` // Application cache status.
} }

View File

@ -584,30 +584,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(out *jwriter.Wri
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Request != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"request\":") out.RawString("\"request\":")
out.String(string(in.Request)) out.String(string(in.Request))
}
if in.Response != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"response\":") out.RawString("\"response\":")
out.String(string(in.Response)) out.String(string(in.Response))
}
if in.ResponseTime != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"responseTime\":") out.RawString("\"responseTime\":")
out.Float64(float64(in.ResponseTime)) out.Float64(float64(in.ResponseTime))
}
out.RawByte('}') out.RawByte('}')
} }
@ -673,30 +667,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(out *jwriter.Wri
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.CacheID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"cacheId\":") out.RawString("\"cacheId\":")
out.String(string(in.CacheID)) out.String(string(in.CacheID))
}
if in.SecurityOrigin != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"securityOrigin\":") out.RawString("\"securityOrigin\":")
out.String(string(in.SecurityOrigin)) out.String(string(in.SecurityOrigin))
}
if in.CacheName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"cacheName\":") out.RawString("\"cacheName\":")
out.String(string(in.CacheName)) out.String(string(in.CacheName))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -12,14 +12,14 @@ func (t CacheID) String() string {
// DataEntry data entry. // DataEntry data entry.
type DataEntry struct { type DataEntry struct {
Request string `json:"request,omitempty"` // Request url spec. Request string `json:"request"` // Request url spec.
Response string `json:"response,omitempty"` // Response status text. Response string `json:"response"` // Response status text.
ResponseTime float64 `json:"responseTime,omitempty"` // Number of seconds since epoch. ResponseTime float64 `json:"responseTime"` // Number of seconds since epoch.
} }
// Cache cache identifier. // Cache cache identifier.
type Cache struct { type Cache struct {
CacheID CacheID `json:"cacheId,omitempty"` // An opaque unique id of the cache. CacheID CacheID `json:"cacheId"` // An opaque unique id of the cache.
SecurityOrigin string `json:"securityOrigin,omitempty"` // Security origin of the cache. SecurityOrigin string `json:"securityOrigin"` // Security origin of the cache.
CacheName string `json:"cacheName,omitempty"` // The name of the cache. CacheName string `json:"cacheName"` // The name of the cache.
} }

View File

@ -18,8 +18,8 @@ import (
// MessageError message error type. // MessageError message error type.
type MessageError struct { type MessageError struct {
Code int64 `json:"code,omitempty"` // Error code. Code int64 `json:"code"` // Error code.
Message string `json:"message,omitempty"` // Error message. Message string `json:"message"` // Error message.
} }
// Error satisfies error interface. // Error satisfies error interface.
@ -1443,13 +1443,13 @@ func (t *FrameID) UnmarshalJSON(buf []byte) error {
// Frame information about the Frame on the page. // Frame information about the Frame on the page.
type Frame struct { type Frame struct {
ID FrameID `json:"id,omitempty"` // Frame unique identifier. ID FrameID `json:"id"` // Frame unique identifier.
ParentID FrameID `json:"parentId,omitempty"` // Parent frame identifier. ParentID FrameID `json:"parentId,omitempty"` // Parent frame identifier.
LoaderID LoaderID `json:"loaderId,omitempty"` // Identifier of the loader associated with this frame. LoaderID LoaderID `json:"loaderId"` // Identifier of the loader associated with this frame.
Name string `json:"name,omitempty"` // Frame's name as specified in the tag. Name string `json:"name,omitempty"` // Frame's name as specified in the tag.
URL string `json:"url,omitempty"` // Frame document's URL. URL string `json:"url"` // Frame document's URL.
SecurityOrigin string `json:"securityOrigin,omitempty"` // Frame document's security origin. SecurityOrigin string `json:"securityOrigin"` // Frame document's security origin.
MimeType string `json:"mimeType,omitempty"` // Frame document's mimeType as determined by the browser. MimeType string `json:"mimeType"` // Frame document's mimeType as determined by the browser.
State FrameState `json:"-"` // Frame state. State FrameState `json:"-"` // Frame state.
Root *Node `json:"-"` // Frame document root. Root *Node `json:"-"` // Frame document root.
Nodes map[NodeID]*Node `json:"-"` // Frame nodes. Nodes map[NodeID]*Node `json:"-"` // Frame nodes.
@ -1591,9 +1591,9 @@ func (t *BackendNodeID) UnmarshalJSON(buf []byte) error {
// BackendNode backend node with a friendly name. // BackendNode backend node with a friendly name.
type BackendNode struct { type BackendNode struct {
NodeType NodeType `json:"nodeType,omitempty"` // Node's nodeType. NodeType NodeType `json:"nodeType"` // Node's nodeType.
NodeName string `json:"nodeName,omitempty"` // Node's nodeName. NodeName string `json:"nodeName"` // Node's nodeName.
BackendNodeID BackendNodeID `json:"backendNodeId,omitempty"` BackendNodeID BackendNodeID `json:"backendNodeId"`
} }
// PseudoType pseudo element type. // PseudoType pseudo element type.
@ -1725,13 +1725,13 @@ func (t *ShadowRootType) UnmarshalJSON(buf []byte) error {
// Node dOM interaction is implemented in terms of mirror objects that // Node dOM interaction is implemented in terms of mirror objects that
// represent the actual DOM nodes. DOMNode is a base node mirror type. // represent the actual DOM nodes. DOMNode is a base node mirror type.
type Node struct { type Node struct {
NodeID NodeID `json:"nodeId,omitempty"` // Node identifier that is passed into the rest of the DOM messages as the nodeId. Backend will only push node with given id once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client. NodeID NodeID `json:"nodeId"` // Node identifier that is passed into the rest of the DOM messages as the nodeId. Backend will only push node with given id once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
ParentID NodeID `json:"parentId,omitempty"` // The id of the parent node if any. ParentID NodeID `json:"parentId,omitempty"` // The id of the parent node if any.
BackendNodeID BackendNodeID `json:"backendNodeId,omitempty"` // The BackendNodeId for this node. BackendNodeID BackendNodeID `json:"backendNodeId"` // The BackendNodeId for this node.
NodeType NodeType `json:"nodeType,omitempty"` // Node's nodeType. NodeType NodeType `json:"nodeType"` // Node's nodeType.
NodeName string `json:"nodeName,omitempty"` // Node's nodeName. NodeName string `json:"nodeName"` // Node's nodeName.
LocalName string `json:"localName,omitempty"` // Node's localName. LocalName string `json:"localName"` // Node's localName.
NodeValue string `json:"nodeValue,omitempty"` // Node's nodeValue. NodeValue string `json:"nodeValue"` // Node's nodeValue.
ChildNodeCount int64 `json:"childNodeCount,omitempty"` // Child count for Container nodes. ChildNodeCount int64 `json:"childNodeCount,omitempty"` // Child count for Container nodes.
Children []*Node `json:"children,omitempty"` // Child nodes of this node when requested with children. Children []*Node `json:"children,omitempty"` // Child nodes of this node when requested with children.
Attributes []string `json:"attributes,omitempty"` // Attributes of the Element node in the form of flat array [name1, value1, name2, value2]. Attributes []string `json:"attributes,omitempty"` // Attributes of the Element node in the form of flat array [name1, value1, name2, value2].
@ -1875,9 +1875,9 @@ const EmptyNodeID = NodeID(0)
// RGBA a structure holding an RGBA color. // RGBA a structure holding an RGBA color.
type RGBA struct { type RGBA struct {
R int64 `json:"r,omitempty"` // The red component, in the [0-255] range. R int64 `json:"r"` // The red component, in the [0-255] range.
G int64 `json:"g,omitempty"` // The green component, in the [0-255] range. G int64 `json:"g"` // The green component, in the [0-255] range.
B int64 `json:"b,omitempty"` // The blue component, in the [0-255] range. B int64 `json:"b"` // The blue component, in the [0-255] range.
A float64 `json:"a,omitempty"` // The alpha component, in the [0-1] range (default: 1). A float64 `json:"a,omitempty"` // The alpha component, in the [0-1] range (default: 1).
} }

View File

@ -63,14 +63,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss(out *jwriter.Writer, in Va
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Text != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"text\":") out.RawString("\"text\":")
out.String(string(in.Text)) out.String(string(in.Text))
}
if in.Range != nil { if in.Range != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -340,30 +338,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(out *jwriter.Writer, in S
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StyleSheetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"styleSheetId\":") out.RawString("\"styleSheetId\":")
out.String(string(in.StyleSheetID)) out.String(string(in.StyleSheetID))
}
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
if in.SourceURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"sourceURL\":") out.RawString("\"sourceURL\":")
out.String(string(in.SourceURL)) out.String(string(in.SourceURL))
}
if in.SourceMapURL != "" { if in.SourceMapURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -372,22 +364,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(out *jwriter.Writer, in S
out.RawString("\"sourceMapURL\":") out.RawString("\"sourceMapURL\":")
out.String(string(in.SourceMapURL)) out.String(string(in.SourceMapURL))
} }
if in.Origin != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"origin\":") out.RawString("\"origin\":")
(in.Origin).MarshalEasyJSON(out) (in.Origin).MarshalEasyJSON(out)
}
if in.Title != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"title\":") out.RawString("\"title\":")
out.String(string(in.Title)) out.String(string(in.Title))
}
if in.OwnerNode != 0 { if in.OwnerNode != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -396,14 +384,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(out *jwriter.Writer, in S
out.RawString("\"ownerNode\":") out.RawString("\"ownerNode\":")
out.Int64(int64(in.OwnerNode)) out.Int64(int64(in.OwnerNode))
} }
if in.Disabled {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"disabled\":") out.RawString("\"disabled\":")
out.Bool(bool(in.Disabled)) out.Bool(bool(in.Disabled))
}
if in.HasSourceURL { if in.HasSourceURL {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -412,38 +398,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss3(out *jwriter.Writer, in S
out.RawString("\"hasSourceURL\":") out.RawString("\"hasSourceURL\":")
out.Bool(bool(in.HasSourceURL)) out.Bool(bool(in.HasSourceURL))
} }
if in.IsInline {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"isInline\":") out.RawString("\"isInline\":")
out.Bool(bool(in.IsInline)) out.Bool(bool(in.IsInline))
}
if in.StartLine != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startLine\":") out.RawString("\"startLine\":")
out.Float64(float64(in.StartLine)) out.Float64(float64(in.StartLine))
}
if in.StartColumn != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startColumn\":") out.RawString("\"startColumn\":")
out.Float64(float64(in.StartColumn)) out.Float64(float64(in.StartColumn))
}
if in.Length != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"length\":") out.RawString("\"length\":")
out.Float64(float64(in.Length)) out.Float64(float64(in.Length))
}
out.RawByte('}') out.RawByte('}')
} }
@ -517,15 +495,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(out *jwriter.Writer, in S
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StyleSheetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"styleSheetId\":") out.RawString("\"styleSheetId\":")
out.String(string(in.StyleSheetID)) out.String(string(in.StyleSheetID))
}
if in.Range != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -536,15 +511,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss4(out *jwriter.Writer, in S
} else { } else {
(*in.Range).MarshalEasyJSON(out) (*in.Range).MarshalEasyJSON(out)
} }
}
if in.Text != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"text\":") out.RawString("\"text\":")
out.String(string(in.Text)) out.String(string(in.Text))
}
out.RawByte('}') out.RawByte('}')
} }
@ -688,7 +660,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(out *jwriter.Writer, in S
out.RawString("\"styleSheetId\":") out.RawString("\"styleSheetId\":")
out.String(string(in.StyleSheetID)) out.String(string(in.StyleSheetID))
} }
if len(in.CSSProperties) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -710,8 +681,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(out *jwriter.Writer, in S
} }
out.RawByte(']') out.RawByte(']')
} }
}
if len(in.ShorthandEntries) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -733,7 +702,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss5(out *jwriter.Writer, in S
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.CSSText != "" { if in.CSSText != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1052,38 +1020,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss9(out *jwriter.Writer, in S
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StartLine != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startLine\":") out.RawString("\"startLine\":")
out.Int64(int64(in.StartLine)) out.Int64(int64(in.StartLine))
}
if in.StartColumn != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startColumn\":") out.RawString("\"startColumn\":")
out.Int64(int64(in.StartColumn)) out.Int64(int64(in.StartColumn))
}
if in.EndLine != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endLine\":") out.RawString("\"endLine\":")
out.Int64(int64(in.EndLine)) out.Int64(int64(in.EndLine))
}
if in.EndColumn != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endColumn\":") out.RawString("\"endColumn\":")
out.Int64(int64(in.EndColumn)) out.Int64(int64(in.EndColumn))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1149,22 +1109,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss10(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Value != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"value\":") out.RawString("\"value\":")
out.String(string(in.Value)) out.String(string(in.Value))
}
if in.Important { if in.Important {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -2244,7 +2200,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss22(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Selectors) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2266,15 +2221,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss22(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.Text != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"text\":") out.RawString("\"text\":")
out.String(string(in.Text)) out.String(string(in.Text))
}
out.RawByte('}') out.RawByte('}')
} }
@ -2342,38 +2294,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss23(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StyleSheetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"styleSheetId\":") out.RawString("\"styleSheetId\":")
out.String(string(in.StyleSheetID)) out.String(string(in.StyleSheetID))
}
if in.StartOffset != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startOffset\":") out.RawString("\"startOffset\":")
out.Float64(float64(in.StartOffset)) out.Float64(float64(in.StartOffset))
}
if in.EndOffset != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endOffset\":") out.RawString("\"endOffset\":")
out.Float64(float64(in.EndOffset)) out.Float64(float64(in.EndOffset))
}
if in.Used {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"used\":") out.RawString("\"used\":")
out.Bool(bool(in.Used)) out.Bool(bool(in.Used))
}
out.RawByte('}') out.RawByte('}')
} }
@ -2466,7 +2410,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Rule != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2477,8 +2420,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(out *jwriter.Writer, in
} else { } else {
(*in.Rule).MarshalEasyJSON(out) (*in.Rule).MarshalEasyJSON(out)
} }
}
if len(in.MatchingSelectors) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2496,7 +2437,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss24(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2619,7 +2559,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(out *jwriter.Writer, in
out.RawString("\"styleSheetId\":") out.RawString("\"styleSheetId\":")
out.String(string(in.StyleSheetID)) out.String(string(in.StyleSheetID))
} }
if in.SelectorList != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2630,16 +2569,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(out *jwriter.Writer, in
} else { } else {
(*in.SelectorList).MarshalEasyJSON(out) (*in.SelectorList).MarshalEasyJSON(out)
} }
}
if in.Origin != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"origin\":") out.RawString("\"origin\":")
(in.Origin).MarshalEasyJSON(out) (in.Origin).MarshalEasyJSON(out)
}
if in.Style != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2650,7 +2585,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss25(out *jwriter.Writer, in
} else { } else {
(*in.Style).MarshalEasyJSON(out) (*in.Style).MarshalEasyJSON(out)
} }
}
if len(in.Media) != 0 { if len(in.Media) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -2766,15 +2700,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss26(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.PseudoType != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"pseudoType\":") out.RawString("\"pseudoType\":")
(in.PseudoType).MarshalEasyJSON(out) (in.PseudoType).MarshalEasyJSON(out)
}
if len(in.Matches) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2796,7 +2727,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss26(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2880,22 +2810,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss27(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Value != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"value\":") out.RawString("\"value\":")
out.String(string(in.Value)) out.String(string(in.Value))
}
if in.Important { if in.Important {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3013,30 +2939,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss28(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FamilyName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"familyName\":") out.RawString("\"familyName\":")
out.String(string(in.FamilyName)) out.String(string(in.FamilyName))
}
if in.IsCustomFont {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"isCustomFont\":") out.RawString("\"isCustomFont\":")
out.Bool(bool(in.IsCustomFont)) out.Bool(bool(in.IsCustomFont))
}
if in.GlyphCount != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"glyphCount\":") out.RawString("\"glyphCount\":")
out.Float64(float64(in.GlyphCount)) out.Float64(float64(in.GlyphCount))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3114,30 +3034,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss29(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Value != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"value\":") out.RawString("\"value\":")
out.Float64(float64(in.Value)) out.Float64(float64(in.Value))
}
if in.Unit != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"unit\":") out.RawString("\"unit\":")
out.String(string(in.Unit)) out.String(string(in.Unit))
}
if in.Feature != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"feature\":") out.RawString("\"feature\":")
out.String(string(in.Feature)) out.String(string(in.Feature))
}
if in.ValueRange != nil { if in.ValueRange != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3250,7 +3164,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss30(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Expressions) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3272,15 +3185,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss30(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.Active {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"active\":") out.RawString("\"active\":")
out.Bool(bool(in.Active)) out.Bool(bool(in.Active))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3389,22 +3299,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss31(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Text != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"text\":") out.RawString("\"text\":")
out.String(string(in.Text)) out.String(string(in.Text))
}
if in.Source != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"source\":") out.RawString("\"source\":")
(in.Source).MarshalEasyJSON(out) (in.Source).MarshalEasyJSON(out)
}
if in.SourceURL != "" { if in.SourceURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3556,7 +3462,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.AnimationName != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3567,8 +3472,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(out *jwriter.Writer, in
} else { } else {
(*in.AnimationName).MarshalEasyJSON(out) (*in.AnimationName).MarshalEasyJSON(out)
} }
}
if len(in.Keyframes) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3590,7 +3493,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss32(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -3682,15 +3584,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in
out.RawString("\"styleSheetId\":") out.RawString("\"styleSheetId\":")
out.String(string(in.StyleSheetID)) out.String(string(in.StyleSheetID))
} }
if in.Origin != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"origin\":") out.RawString("\"origin\":")
(in.Origin).MarshalEasyJSON(out) (in.Origin).MarshalEasyJSON(out)
}
if in.KeyText != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3701,8 +3600,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in
} else { } else {
(*in.KeyText).MarshalEasyJSON(out) (*in.KeyText).MarshalEasyJSON(out)
} }
}
if in.Style != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3713,7 +3610,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss33(out *jwriter.Writer, in
} else { } else {
(*in.Style).MarshalEasyJSON(out) (*in.Style).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -3787,7 +3683,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.BoundingBox != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3798,23 +3693,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss34(out *jwriter.Writer, in
} else { } else {
(*in.BoundingBox).MarshalEasyJSON(out) (*in.BoundingBox).MarshalEasyJSON(out)
} }
}
if in.StartCharacterIndex != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startCharacterIndex\":") out.RawString("\"startCharacterIndex\":")
out.Int64(int64(in.StartCharacterIndex)) out.Int64(int64(in.StartCharacterIndex))
}
if in.NumCharacters != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"numCharacters\":") out.RawString("\"numCharacters\":")
out.Int64(int64(in.NumCharacters)) out.Int64(int64(in.NumCharacters))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3927,7 +3817,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(out *jwriter.Writer, in
(*in.InlineStyle).MarshalEasyJSON(out) (*in.InlineStyle).MarshalEasyJSON(out)
} }
} }
if len(in.MatchedCSSRules) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3949,7 +3838,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss35(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -5510,14 +5398,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss51(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StyleSheetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"styleSheetId\":") out.RawString("\"styleSheetId\":")
out.String(string(in.StyleSheetID)) out.String(string(in.StyleSheetID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -5579,14 +5465,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss52(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StyleSheetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"styleSheetId\":") out.RawString("\"styleSheetId\":")
out.String(string(in.StyleSheetID)) out.String(string(in.StyleSheetID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -5656,7 +5540,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Header != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -5667,7 +5550,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss53(out *jwriter.Writer, in
} else { } else {
(*in.Header).MarshalEasyJSON(out) (*in.Header).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -6103,22 +5985,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCss60(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Value != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"value\":") out.RawString("\"value\":")
out.String(string(in.Value)) out.String(string(in.Value))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -17,19 +17,19 @@ type EventFontsUpdated struct{}
// EventStyleSheetChanged fired whenever a stylesheet is changed as a result // EventStyleSheetChanged fired whenever a stylesheet is changed as a result
// of the client operation. // of the client operation.
type EventStyleSheetChanged struct { type EventStyleSheetChanged struct {
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` StyleSheetID StyleSheetID `json:"styleSheetId"`
} }
// EventStyleSheetAdded fired whenever an active document stylesheet is // EventStyleSheetAdded fired whenever an active document stylesheet is
// added. // added.
type EventStyleSheetAdded struct { type EventStyleSheetAdded struct {
Header *StyleSheetHeader `json:"header,omitempty"` // Added stylesheet metainfo. Header *StyleSheetHeader `json:"header"` // Added stylesheet metainfo.
} }
// EventStyleSheetRemoved fired whenever an active document stylesheet is // EventStyleSheetRemoved fired whenever an active document stylesheet is
// removed. // removed.
type EventStyleSheetRemoved struct { type EventStyleSheetRemoved struct {
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the removed stylesheet. StyleSheetID StyleSheetID `json:"styleSheetId"` // Identifier of the removed stylesheet.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -73,103 +73,103 @@ func (t *StyleSheetOrigin) UnmarshalJSON(buf []byte) error {
// PseudoElementMatches cSS rule collection for a single pseudo style. // PseudoElementMatches cSS rule collection for a single pseudo style.
type PseudoElementMatches struct { type PseudoElementMatches struct {
PseudoType cdp.PseudoType `json:"pseudoType,omitempty"` // Pseudo element type. PseudoType cdp.PseudoType `json:"pseudoType"` // Pseudo element type.
Matches []*RuleMatch `json:"matches,omitempty"` // Matches of CSS rules applicable to the pseudo style. Matches []*RuleMatch `json:"matches"` // Matches of CSS rules applicable to the pseudo style.
} }
// InheritedStyleEntry inherited CSS rule collection from ancestor node. // InheritedStyleEntry inherited CSS rule collection from ancestor node.
type InheritedStyleEntry struct { type InheritedStyleEntry struct {
InlineStyle *Style `json:"inlineStyle,omitempty"` // The ancestor node's inline style, if any, in the style inheritance chain. InlineStyle *Style `json:"inlineStyle,omitempty"` // The ancestor node's inline style, if any, in the style inheritance chain.
MatchedCSSRules []*RuleMatch `json:"matchedCSSRules,omitempty"` // Matches of CSS rules matching the ancestor node in the style inheritance chain. MatchedCSSRules []*RuleMatch `json:"matchedCSSRules"` // Matches of CSS rules matching the ancestor node in the style inheritance chain.
} }
// RuleMatch match data for a CSS rule. // RuleMatch match data for a CSS rule.
type RuleMatch struct { type RuleMatch struct {
Rule *Rule `json:"rule,omitempty"` // CSS rule in the match. Rule *Rule `json:"rule"` // CSS rule in the match.
MatchingSelectors []int64 `json:"matchingSelectors,omitempty"` // Matching selector indices in the rule's selectorList selectors (0-based). MatchingSelectors []int64 `json:"matchingSelectors"` // Matching selector indices in the rule's selectorList selectors (0-based).
} }
// Value data for a simple selector (these are delimited by commas in a // Value data for a simple selector (these are delimited by commas in a
// selector list). // selector list).
type Value struct { type Value struct {
Text string `json:"text,omitempty"` // Value text. Text string `json:"text"` // Value text.
Range *SourceRange `json:"range,omitempty"` // Value range in the underlying resource (if available). Range *SourceRange `json:"range,omitempty"` // Value range in the underlying resource (if available).
} }
// SelectorList selector list data. // SelectorList selector list data.
type SelectorList struct { type SelectorList struct {
Selectors []*Value `json:"selectors,omitempty"` // Selectors in the list. Selectors []*Value `json:"selectors"` // Selectors in the list.
Text string `json:"text,omitempty"` // Rule selector text. Text string `json:"text"` // Rule selector text.
} }
// StyleSheetHeader cSS stylesheet metainformation. // StyleSheetHeader cSS stylesheet metainformation.
type StyleSheetHeader struct { type StyleSheetHeader struct {
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The stylesheet identifier. StyleSheetID StyleSheetID `json:"styleSheetId"` // The stylesheet identifier.
FrameID cdp.FrameID `json:"frameId,omitempty"` // Owner frame identifier. FrameID cdp.FrameID `json:"frameId"` // Owner frame identifier.
SourceURL string `json:"sourceURL,omitempty"` // Stylesheet resource URL. SourceURL string `json:"sourceURL"` // Stylesheet resource URL.
SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with the stylesheet (if any). SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with the stylesheet (if any).
Origin StyleSheetOrigin `json:"origin,omitempty"` // Stylesheet origin. Origin StyleSheetOrigin `json:"origin"` // Stylesheet origin.
Title string `json:"title,omitempty"` // Stylesheet title. Title string `json:"title"` // Stylesheet title.
OwnerNode cdp.BackendNodeID `json:"ownerNode,omitempty"` // The backend id for the owner node of the stylesheet. OwnerNode cdp.BackendNodeID `json:"ownerNode,omitempty"` // The backend id for the owner node of the stylesheet.
Disabled bool `json:"disabled,omitempty"` // Denotes whether the stylesheet is disabled. Disabled bool `json:"disabled"` // Denotes whether the stylesheet is disabled.
HasSourceURL bool `json:"hasSourceURL,omitempty"` // Whether the sourceURL field value comes from the sourceURL comment. HasSourceURL bool `json:"hasSourceURL,omitempty"` // Whether the sourceURL field value comes from the sourceURL comment.
IsInline bool `json:"isInline,omitempty"` // Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags. IsInline bool `json:"isInline"` // Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
StartLine float64 `json:"startLine,omitempty"` // Line offset of the stylesheet within the resource (zero based). StartLine float64 `json:"startLine"` // Line offset of the stylesheet within the resource (zero based).
StartColumn float64 `json:"startColumn,omitempty"` // Column offset of the stylesheet within the resource (zero based). StartColumn float64 `json:"startColumn"` // Column offset of the stylesheet within the resource (zero based).
Length float64 `json:"length,omitempty"` // Size of the content (in characters). Length float64 `json:"length"` // Size of the content (in characters).
} }
// Rule cSS rule representation. // Rule cSS rule representation.
type Rule struct { type Rule struct {
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
SelectorList *SelectorList `json:"selectorList,omitempty"` // Rule selector data. SelectorList *SelectorList `json:"selectorList"` // Rule selector data.
Origin StyleSheetOrigin `json:"origin,omitempty"` // Parent stylesheet's origin. Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
Style *Style `json:"style,omitempty"` // Associated style declaration. Style *Style `json:"style"` // Associated style declaration.
Media []*Media `json:"media,omitempty"` // Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards. Media []*Media `json:"media,omitempty"` // Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
} }
// RuleUsage cSS coverage information. // RuleUsage cSS coverage information.
type RuleUsage struct { type RuleUsage struct {
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. StyleSheetID StyleSheetID `json:"styleSheetId"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
StartOffset float64 `json:"startOffset,omitempty"` // Offset of the start of the rule (including selector) from the beginning of the stylesheet. StartOffset float64 `json:"startOffset"` // Offset of the start of the rule (including selector) from the beginning of the stylesheet.
EndOffset float64 `json:"endOffset,omitempty"` // Offset of the end of the rule body from the beginning of the stylesheet. EndOffset float64 `json:"endOffset"` // Offset of the end of the rule body from the beginning of the stylesheet.
Used bool `json:"used,omitempty"` // Indicates whether the rule was actually used by some element in the page. Used bool `json:"used"` // Indicates whether the rule was actually used by some element in the page.
} }
// SourceRange text range within a resource. All numbers are zero-based. // SourceRange text range within a resource. All numbers are zero-based.
type SourceRange struct { type SourceRange struct {
StartLine int64 `json:"startLine,omitempty"` // Start line of range. StartLine int64 `json:"startLine"` // Start line of range.
StartColumn int64 `json:"startColumn,omitempty"` // Start column of range (inclusive). StartColumn int64 `json:"startColumn"` // Start column of range (inclusive).
EndLine int64 `json:"endLine,omitempty"` // End line of range EndLine int64 `json:"endLine"` // End line of range
EndColumn int64 `json:"endColumn,omitempty"` // End column of range (exclusive). EndColumn int64 `json:"endColumn"` // End column of range (exclusive).
} }
// ShorthandEntry [no description]. // ShorthandEntry [no description].
type ShorthandEntry struct { type ShorthandEntry struct {
Name string `json:"name,omitempty"` // Shorthand name. Name string `json:"name"` // Shorthand name.
Value string `json:"value,omitempty"` // Shorthand value. Value string `json:"value"` // Shorthand value.
Important bool `json:"important,omitempty"` // Whether the property has "!important" annotation (implies false if absent). Important bool `json:"important,omitempty"` // Whether the property has "!important" annotation (implies false if absent).
} }
// ComputedProperty [no description]. // ComputedProperty [no description].
type ComputedProperty struct { type ComputedProperty struct {
Name string `json:"name,omitempty"` // Computed style property name. Name string `json:"name"` // Computed style property name.
Value string `json:"value,omitempty"` // Computed style property value. Value string `json:"value"` // Computed style property value.
} }
// Style cSS style representation. // Style cSS style representation.
type Style struct { type Style struct {
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
CSSProperties []*Property `json:"cssProperties,omitempty"` // CSS properties in the style. CSSProperties []*Property `json:"cssProperties"` // CSS properties in the style.
ShorthandEntries []*ShorthandEntry `json:"shorthandEntries,omitempty"` // Computed values for all shorthands found in the style. ShorthandEntries []*ShorthandEntry `json:"shorthandEntries"` // Computed values for all shorthands found in the style.
CSSText string `json:"cssText,omitempty"` // Style declaration text (if available). CSSText string `json:"cssText,omitempty"` // Style declaration text (if available).
Range *SourceRange `json:"range,omitempty"` // Style declaration range in the enclosing stylesheet (if available). Range *SourceRange `json:"range,omitempty"` // Style declaration range in the enclosing stylesheet (if available).
} }
// Property cSS property declaration data. // Property cSS property declaration data.
type Property struct { type Property struct {
Name string `json:"name,omitempty"` // The property name. Name string `json:"name"` // The property name.
Value string `json:"value,omitempty"` // The property value. Value string `json:"value"` // The property value.
Important bool `json:"important,omitempty"` // Whether the property has "!important" annotation (implies false if absent). Important bool `json:"important,omitempty"` // Whether the property has "!important" annotation (implies false if absent).
Implicit bool `json:"implicit,omitempty"` // Whether the property is implicit (implies false if absent). Implicit bool `json:"implicit,omitempty"` // Whether the property is implicit (implies false if absent).
Text string `json:"text,omitempty"` // The full property text as specified in the style. Text string `json:"text,omitempty"` // The full property text as specified in the style.
@ -180,8 +180,8 @@ type Property struct {
// Media cSS media rule descriptor. // Media cSS media rule descriptor.
type Media struct { type Media struct {
Text string `json:"text,omitempty"` // Media query text. Text string `json:"text"` // Media query text.
Source MediaSource `json:"source,omitempty"` // Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag. Source MediaSource `json:"source"` // Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
SourceURL string `json:"sourceURL,omitempty"` // URL of the document containing the media query description. SourceURL string `json:"sourceURL,omitempty"` // URL of the document containing the media query description.
Range *SourceRange `json:"range,omitempty"` // The associated rule (@media or @import) header range in the enclosing stylesheet (if available). Range *SourceRange `json:"range,omitempty"` // The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists). StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
@ -190,15 +190,15 @@ type Media struct {
// MediaQuery media query descriptor. // MediaQuery media query descriptor.
type MediaQuery struct { type MediaQuery struct {
Expressions []*MediaQueryExpression `json:"expressions,omitempty"` // Array of media query expressions. Expressions []*MediaQueryExpression `json:"expressions"` // Array of media query expressions.
Active bool `json:"active,omitempty"` // Whether the media query condition is satisfied. Active bool `json:"active"` // Whether the media query condition is satisfied.
} }
// MediaQueryExpression media query expression descriptor. // MediaQueryExpression media query expression descriptor.
type MediaQueryExpression struct { type MediaQueryExpression struct {
Value float64 `json:"value,omitempty"` // Media query expression value. Value float64 `json:"value"` // Media query expression value.
Unit string `json:"unit,omitempty"` // Media query expression units. Unit string `json:"unit"` // Media query expression units.
Feature string `json:"feature,omitempty"` // Media query expression feature. Feature string `json:"feature"` // Media query expression feature.
ValueRange *SourceRange `json:"valueRange,omitempty"` // The associated range of the value text in the enclosing stylesheet (if available). ValueRange *SourceRange `json:"valueRange,omitempty"` // The associated range of the value text in the enclosing stylesheet (if available).
ComputedLength float64 `json:"computedLength,omitempty"` // Computed length of media query expression (if applicable). ComputedLength float64 `json:"computedLength,omitempty"` // Computed length of media query expression (if applicable).
} }
@ -206,39 +206,39 @@ type MediaQueryExpression struct {
// PlatformFontUsage information about amount of glyphs that were rendered // PlatformFontUsage information about amount of glyphs that were rendered
// with given font. // with given font.
type PlatformFontUsage struct { type PlatformFontUsage struct {
FamilyName string `json:"familyName,omitempty"` // Font's family name reported by platform. FamilyName string `json:"familyName"` // Font's family name reported by platform.
IsCustomFont bool `json:"isCustomFont,omitempty"` // Indicates if the font was downloaded or resolved locally. IsCustomFont bool `json:"isCustomFont"` // Indicates if the font was downloaded or resolved locally.
GlyphCount float64 `json:"glyphCount,omitempty"` // Amount of glyphs that were rendered with this font. GlyphCount float64 `json:"glyphCount"` // Amount of glyphs that were rendered with this font.
} }
// KeyframesRule cSS keyframes rule representation. // KeyframesRule cSS keyframes rule representation.
type KeyframesRule struct { type KeyframesRule struct {
AnimationName *Value `json:"animationName,omitempty"` // Animation name. AnimationName *Value `json:"animationName"` // Animation name.
Keyframes []*KeyframeRule `json:"keyframes,omitempty"` // List of keyframes. Keyframes []*KeyframeRule `json:"keyframes"` // List of keyframes.
} }
// KeyframeRule cSS keyframe rule representation. // KeyframeRule cSS keyframe rule representation.
type KeyframeRule struct { type KeyframeRule struct {
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from. StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Origin StyleSheetOrigin `json:"origin,omitempty"` // Parent stylesheet's origin. Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
KeyText *Value `json:"keyText,omitempty"` // Associated key text. KeyText *Value `json:"keyText"` // Associated key text.
Style *Style `json:"style,omitempty"` // Associated style declaration. Style *Style `json:"style"` // Associated style declaration.
} }
// StyleDeclarationEdit a descriptor of operation to mutate style declaration // StyleDeclarationEdit a descriptor of operation to mutate style declaration
// text. // text.
type StyleDeclarationEdit struct { type StyleDeclarationEdit struct {
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier. StyleSheetID StyleSheetID `json:"styleSheetId"` // The css style sheet identifier.
Range *SourceRange `json:"range,omitempty"` // The range of the style text in the enclosing stylesheet. Range *SourceRange `json:"range"` // The range of the style text in the enclosing stylesheet.
Text string `json:"text,omitempty"` // New style text. Text string `json:"text"` // New style text.
} }
// InlineTextBox details of post layout rendered text positions. The exact // InlineTextBox details of post layout rendered text positions. The exact
// layout should not be regarded as stable and may change between versions. // layout should not be regarded as stable and may change between versions.
type InlineTextBox struct { type InlineTextBox struct {
BoundingBox *dom.Rect `json:"boundingBox,omitempty"` // The absolute position bounding box. BoundingBox *dom.Rect `json:"boundingBox"` // The absolute position bounding box.
StartCharacterIndex int64 `json:"startCharacterIndex,omitempty"` // The starting index in characters, for this post layout textbox substring. StartCharacterIndex int64 `json:"startCharacterIndex"` // The starting index in characters, for this post layout textbox substring.
NumCharacters int64 `json:"numCharacters,omitempty"` // The number of characters in this post layout textbox substring. NumCharacters int64 `json:"numCharacters"` // The number of characters in this post layout textbox substring.
} }
// MediaSource source of the media query: "mediaRule" if specified by a // MediaSource source of the media query: "mediaRule" if specified by a

View File

@ -468,7 +468,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Database != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -479,7 +478,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(out *jwriter.Writer,
} else { } else {
(*in.Database).MarshalEasyJSON(out) (*in.Database).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -543,22 +541,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase5(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Message != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"message\":") out.RawString("\"message\":")
out.String(string(in.Message)) out.String(string(in.Message))
}
if in.Code != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"code\":") out.RawString("\"code\":")
out.Int64(int64(in.Code)) out.Int64(int64(in.Code))
}
out.RawByte('}') out.RawByte('}')
} }
@ -744,38 +738,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase8(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.String(string(in.ID)) out.String(string(in.ID))
}
if in.Domain != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"domain\":") out.RawString("\"domain\":")
out.String(string(in.Domain)) out.String(string(in.Domain))
}
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Version != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"version\":") out.RawString("\"version\":")
out.String(string(in.Version)) out.String(string(in.Version))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -8,7 +8,7 @@ import (
// EventAddDatabase [no description]. // EventAddDatabase [no description].
type EventAddDatabase struct { type EventAddDatabase struct {
Database *Database `json:"database,omitempty"` Database *Database `json:"database"`
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -12,14 +12,14 @@ func (t ID) String() string {
// Database database object. // Database database object.
type Database struct { type Database struct {
ID ID `json:"id,omitempty"` // Database ID. ID ID `json:"id"` // Database ID.
Domain string `json:"domain,omitempty"` // Database domain. Domain string `json:"domain"` // Database domain.
Name string `json:"name,omitempty"` // Database name. Name string `json:"name"` // Database name.
Version string `json:"version,omitempty"` // Database version. Version string `json:"version"` // Database version.
} }
// Error database error. // Error database error.
type Error struct { type Error struct {
Message string `json:"message,omitempty"` // Error message. Message string `json:"message"` // Error message.
Code int64 `json:"code,omitempty"` // Error code. Code int64 `json:"code"` // Error code.
} }

View File

@ -1483,22 +1483,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.LineNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineNumber\":") out.RawString("\"lineNumber\":")
out.Float64(float64(in.LineNumber)) out.Float64(float64(in.LineNumber))
}
if in.LineContent != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineContent\":") out.RawString("\"lineContent\":")
out.String(string(in.LineContent)) out.String(string(in.LineContent))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1770,22 +1766,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger19(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.LineNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineNumber\":") out.RawString("\"lineNumber\":")
out.Int64(int64(in.LineNumber)) out.Int64(int64(in.LineNumber))
}
if in.ColumnNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"columnNumber\":") out.RawString("\"columnNumber\":")
out.Int64(int64(in.ColumnNumber)) out.Int64(int64(in.ColumnNumber))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1879,15 +1871,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.Object != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1898,7 +1887,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(out *jwriter.Writer
} else { } else {
(*in.Object).MarshalEasyJSON(out) (*in.Object).MarshalEasyJSON(out)
} }
}
if in.Name != "" { if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -2442,22 +2430,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ScriptID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scriptId\":") out.RawString("\"scriptId\":")
out.String(string(in.ScriptID)) out.String(string(in.ScriptID))
}
if in.LineNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineNumber\":") out.RawString("\"lineNumber\":")
out.Int64(int64(in.LineNumber)) out.Int64(int64(in.LineNumber))
}
if in.ColumnNumber != 0 { if in.ColumnNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -2923,70 +2907,54 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ScriptID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scriptId\":") out.RawString("\"scriptId\":")
out.String(string(in.ScriptID)) out.String(string(in.ScriptID))
}
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if in.StartLine != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startLine\":") out.RawString("\"startLine\":")
out.Int64(int64(in.StartLine)) out.Int64(int64(in.StartLine))
}
if in.StartColumn != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startColumn\":") out.RawString("\"startColumn\":")
out.Int64(int64(in.StartColumn)) out.Int64(int64(in.StartColumn))
}
if in.EndLine != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endLine\":") out.RawString("\"endLine\":")
out.Int64(int64(in.EndLine)) out.Int64(int64(in.EndLine))
}
if in.EndColumn != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endColumn\":") out.RawString("\"endColumn\":")
out.Int64(int64(in.EndColumn)) out.Int64(int64(in.EndColumn))
}
if in.ExecutionContextID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"executionContextId\":") out.RawString("\"executionContextId\":")
out.Int64(int64(in.ExecutionContextID)) out.Int64(int64(in.ExecutionContextID))
}
if in.Hash != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"hash\":") out.RawString("\"hash\":")
out.String(string(in.Hash)) out.String(string(in.Hash))
}
if (in.ExecutionContextAuxData).IsDefined() { if (in.ExecutionContextAuxData).IsDefined() {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3142,70 +3110,54 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ScriptID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scriptId\":") out.RawString("\"scriptId\":")
out.String(string(in.ScriptID)) out.String(string(in.ScriptID))
}
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if in.StartLine != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startLine\":") out.RawString("\"startLine\":")
out.Int64(int64(in.StartLine)) out.Int64(int64(in.StartLine))
}
if in.StartColumn != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startColumn\":") out.RawString("\"startColumn\":")
out.Int64(int64(in.StartColumn)) out.Int64(int64(in.StartColumn))
}
if in.EndLine != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endLine\":") out.RawString("\"endLine\":")
out.Int64(int64(in.EndLine)) out.Int64(int64(in.EndLine))
}
if in.EndColumn != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endColumn\":") out.RawString("\"endColumn\":")
out.Int64(int64(in.EndColumn)) out.Int64(int64(in.EndColumn))
}
if in.ExecutionContextID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"executionContextId\":") out.RawString("\"executionContextId\":")
out.Int64(int64(in.ExecutionContextID)) out.Int64(int64(in.ExecutionContextID))
}
if in.Hash != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"hash\":") out.RawString("\"hash\":")
out.String(string(in.Hash)) out.String(string(in.Hash))
}
if (in.ExecutionContextAuxData).IsDefined() { if (in.ExecutionContextAuxData).IsDefined() {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3444,7 +3396,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.CallFrames) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3466,15 +3417,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(out *jwriter.Writer
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.Reason != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"reason\":") out.RawString("\"reason\":")
(in.Reason).MarshalEasyJSON(out) (in.Reason).MarshalEasyJSON(out)
}
if (in.Data).IsDefined() { if (in.Data).IsDefined() {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3585,15 +3533,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.BreakpointID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"breakpointId\":") out.RawString("\"breakpointId\":")
out.String(string(in.BreakpointID)) out.String(string(in.BreakpointID))
}
if in.Location != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3604,7 +3549,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer
} else { } else {
(*in.Location).MarshalEasyJSON(out) (*in.Location).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4184,22 +4128,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.CallFrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"callFrameId\":") out.RawString("\"callFrameId\":")
out.String(string(in.CallFrameID)) out.String(string(in.CallFrameID))
}
if in.FunctionName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"functionName\":") out.RawString("\"functionName\":")
out.String(string(in.FunctionName)) out.String(string(in.FunctionName))
}
if in.FunctionLocation != nil { if in.FunctionLocation != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -4212,7 +4152,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(out *jwriter.Writer
(*in.FunctionLocation).MarshalEasyJSON(out) (*in.FunctionLocation).MarshalEasyJSON(out)
} }
} }
if in.Location != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4223,8 +4162,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(out *jwriter.Writer
} else { } else {
(*in.Location).MarshalEasyJSON(out) (*in.Location).MarshalEasyJSON(out)
} }
}
if len(in.ScopeChain) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4246,8 +4183,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(out *jwriter.Writer
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.This != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4258,7 +4193,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(out *jwriter.Writer
} else { } else {
(*in.This).MarshalEasyJSON(out) (*in.This).MarshalEasyJSON(out)
} }
}
if in.ReturnValue != nil { if in.ReturnValue != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -4338,22 +4272,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger43(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ScriptID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scriptId\":") out.RawString("\"scriptId\":")
out.String(string(in.ScriptID)) out.String(string(in.ScriptID))
}
if in.LineNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineNumber\":") out.RawString("\"lineNumber\":")
out.Int64(int64(in.LineNumber)) out.Int64(int64(in.LineNumber))
}
if in.ColumnNumber != 0 { if in.ColumnNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')

View File

@ -11,14 +11,14 @@ import (
// EventScriptParsed fired when virtual machine parses script. This event is // EventScriptParsed fired when virtual machine parses script. This event is
// also fired for all known and uncollected scripts upon enabling debugger. // also fired for all known and uncollected scripts upon enabling debugger.
type EventScriptParsed struct { type EventScriptParsed struct {
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Identifier of the script parsed. ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed.
URL string `json:"url,omitempty"` // URL or name of the script parsed (if any). URL string `json:"url"` // URL or name of the script parsed (if any).
StartLine int64 `json:"startLine,omitempty"` // Line offset of the script within the resource with given URL (for script tags). StartLine int64 `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags).
StartColumn int64 `json:"startColumn,omitempty"` // Column offset of the script within the resource with given URL. StartColumn int64 `json:"startColumn"` // Column offset of the script within the resource with given URL.
EndLine int64 `json:"endLine,omitempty"` // Last line of the script. EndLine int64 `json:"endLine"` // Last line of the script.
EndColumn int64 `json:"endColumn,omitempty"` // Length of the last line of the script. EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId,omitempty"` // Specifies script creation context. ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
Hash string `json:"hash,omitempty"` // Content hash of the script. Hash string `json:"hash"` // Content hash of the script.
ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"` ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
IsLiveEdit bool `json:"isLiveEdit,omitempty"` // True, if this script is generated as a result of the live edit operation. IsLiveEdit bool `json:"isLiveEdit,omitempty"` // True, if this script is generated as a result of the live edit operation.
SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any). SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any).
@ -31,14 +31,14 @@ type EventScriptParsed struct {
// EventScriptFailedToParse fired when virtual machine fails to parse the // EventScriptFailedToParse fired when virtual machine fails to parse the
// script. // script.
type EventScriptFailedToParse struct { type EventScriptFailedToParse struct {
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Identifier of the script parsed. ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed.
URL string `json:"url,omitempty"` // URL or name of the script parsed (if any). URL string `json:"url"` // URL or name of the script parsed (if any).
StartLine int64 `json:"startLine,omitempty"` // Line offset of the script within the resource with given URL (for script tags). StartLine int64 `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags).
StartColumn int64 `json:"startColumn,omitempty"` // Column offset of the script within the resource with given URL. StartColumn int64 `json:"startColumn"` // Column offset of the script within the resource with given URL.
EndLine int64 `json:"endLine,omitempty"` // Last line of the script. EndLine int64 `json:"endLine"` // Last line of the script.
EndColumn int64 `json:"endColumn,omitempty"` // Length of the last line of the script. EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId,omitempty"` // Specifies script creation context. ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
Hash string `json:"hash,omitempty"` // Content hash of the script. Hash string `json:"hash"` // Content hash of the script.
ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"` ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any). SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any).
HasSourceURL bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL. HasSourceURL bool `json:"hasSourceURL,omitempty"` // True, if this script has sourceURL.
@ -50,15 +50,15 @@ type EventScriptFailedToParse struct {
// EventBreakpointResolved fired when breakpoint is resolved to an actual // EventBreakpointResolved fired when breakpoint is resolved to an actual
// script and location. // script and location.
type EventBreakpointResolved struct { type EventBreakpointResolved struct {
BreakpointID BreakpointID `json:"breakpointId,omitempty"` // Breakpoint unique identifier. BreakpointID BreakpointID `json:"breakpointId"` // Breakpoint unique identifier.
Location *Location `json:"location,omitempty"` // Actual breakpoint location. Location *Location `json:"location"` // Actual breakpoint location.
} }
// EventPaused fired when the virtual machine stopped on breakpoint or // EventPaused fired when the virtual machine stopped on breakpoint or
// exception or any other stop criteria. // exception or any other stop criteria.
type EventPaused struct { type EventPaused struct {
CallFrames []*CallFrame `json:"callFrames,omitempty"` // Call stack the virtual machine stopped on. CallFrames []*CallFrame `json:"callFrames"` // Call stack the virtual machine stopped on.
Reason PausedReason `json:"reason,omitempty"` // Pause reason. Reason PausedReason `json:"reason"` // Pause reason.
Data easyjson.RawMessage `json:"data,omitempty"` Data easyjson.RawMessage `json:"data,omitempty"`
HitBreakpoints []string `json:"hitBreakpoints,omitempty"` // Hit breakpoints IDs HitBreakpoints []string `json:"hitBreakpoints,omitempty"` // Hit breakpoints IDs
AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any. AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.

View File

@ -29,32 +29,32 @@ func (t CallFrameID) String() string {
// Location location in the source code. // Location location in the source code.
type Location struct { type Location struct {
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Script identifier as reported in the Debugger.scriptParsed. ScriptID runtime.ScriptID `json:"scriptId"` // Script identifier as reported in the Debugger.scriptParsed.
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the script (0-based). LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based). ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based).
} }
// ScriptPosition location in the source code. // ScriptPosition location in the source code.
type ScriptPosition struct { type ScriptPosition struct {
LineNumber int64 `json:"lineNumber,omitempty"` LineNumber int64 `json:"lineNumber"`
ColumnNumber int64 `json:"columnNumber,omitempty"` ColumnNumber int64 `json:"columnNumber"`
} }
// CallFrame javaScript call frame. Array of call frames form the call stack. // CallFrame javaScript call frame. Array of call frames form the call stack.
type CallFrame struct { type CallFrame struct {
CallFrameID CallFrameID `json:"callFrameId,omitempty"` // Call frame identifier. This identifier is only valid while the virtual machine is paused. CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier. This identifier is only valid while the virtual machine is paused.
FunctionName string `json:"functionName,omitempty"` // Name of the JavaScript function called on this call frame. FunctionName string `json:"functionName"` // Name of the JavaScript function called on this call frame.
FunctionLocation *Location `json:"functionLocation,omitempty"` // Location in the source code. FunctionLocation *Location `json:"functionLocation,omitempty"` // Location in the source code.
Location *Location `json:"location,omitempty"` // Location in the source code. Location *Location `json:"location"` // Location in the source code.
ScopeChain []*Scope `json:"scopeChain,omitempty"` // Scope chain for this call frame. ScopeChain []*Scope `json:"scopeChain"` // Scope chain for this call frame.
This *runtime.RemoteObject `json:"this,omitempty"` // this object for this call frame. This *runtime.RemoteObject `json:"this"` // this object for this call frame.
ReturnValue *runtime.RemoteObject `json:"returnValue,omitempty"` // The value being returned, if the function is at return point. ReturnValue *runtime.RemoteObject `json:"returnValue,omitempty"` // The value being returned, if the function is at return point.
} }
// Scope scope description. // Scope scope description.
type Scope struct { type Scope struct {
Type ScopeType `json:"type,omitempty"` // Scope type. Type ScopeType `json:"type"` // Scope type.
Object *runtime.RemoteObject `json:"object,omitempty"` // Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties. Object *runtime.RemoteObject `json:"object"` // Object representing the scope. For global and with scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
Name string `json:"name,omitempty"` Name string `json:"name,omitempty"`
StartLocation *Location `json:"startLocation,omitempty"` // Location in the source code where scope starts StartLocation *Location `json:"startLocation,omitempty"` // Location in the source code where scope starts
EndLocation *Location `json:"endLocation,omitempty"` // Location in the source code where scope ends EndLocation *Location `json:"endLocation,omitempty"` // Location in the source code where scope ends
@ -62,14 +62,14 @@ type Scope struct {
// SearchMatch search match for resource. // SearchMatch search match for resource.
type SearchMatch struct { type SearchMatch struct {
LineNumber float64 `json:"lineNumber,omitempty"` // Line number in resource content. LineNumber float64 `json:"lineNumber"` // Line number in resource content.
LineContent string `json:"lineContent,omitempty"` // Line with match content. LineContent string `json:"lineContent"` // Line with match content.
} }
// BreakLocation [no description]. // BreakLocation [no description].
type BreakLocation struct { type BreakLocation struct {
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Script identifier as reported in the Debugger.scriptParsed. ScriptID runtime.ScriptID `json:"scriptId"` // Script identifier as reported in the Debugger.scriptParsed.
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the script (0-based). LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based). ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based).
Type BreakLocationType `json:"type,omitempty"` Type BreakLocationType `json:"type,omitempty"`
} }

View File

@ -180,7 +180,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(out *jwriter.Writer, in S
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Bounds) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -198,8 +197,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(out *jwriter.Writer, in S
} }
out.RawByte(']') out.RawByte(']')
} }
}
if len(in.Shape) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -217,8 +214,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(out *jwriter.Writer, in S
} }
out.RawByte(']') out.RawByte(']')
} }
}
if len(in.MarginShape) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -236,7 +231,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(out *jwriter.Writer, in S
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1522,38 +1516,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom18(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.X != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"x\":") out.RawString("\"x\":")
out.Float64(float64(in.X)) out.Float64(float64(in.X))
}
if in.Y != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"y\":") out.RawString("\"y\":")
out.Float64(float64(in.Y)) out.Float64(float64(in.Y))
}
if in.Width != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"width\":") out.RawString("\"width\":")
out.Float64(float64(in.Width)) out.Float64(float64(in.Width))
}
if in.Height != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"height\":") out.RawString("\"height\":")
out.Float64(float64(in.Height)) out.Float64(float64(in.Height))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3995,15 +3981,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.HostID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"hostId\":") out.RawString("\"hostId\":")
out.Int64(int64(in.HostID)) out.Int64(int64(in.HostID))
}
if in.Root != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4014,7 +3997,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(out *jwriter.Writer, in
} else { } else {
(*in.Root).MarshalEasyJSON(out) (*in.Root).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4078,22 +4060,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom50(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.HostID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"hostId\":") out.RawString("\"hostId\":")
out.Int64(int64(in.HostID)) out.Int64(int64(in.HostID))
}
if in.RootID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"rootId\":") out.RawString("\"rootId\":")
out.Int64(int64(in.RootID)) out.Int64(int64(in.RootID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -4186,15 +4164,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ParentID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"parentId\":") out.RawString("\"parentId\":")
out.Int64(int64(in.ParentID)) out.Int64(int64(in.ParentID))
}
if len(in.Nodes) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4216,7 +4191,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4280,22 +4254,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom52(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ParentID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"parentId\":") out.RawString("\"parentId\":")
out.Int64(int64(in.ParentID)) out.Int64(int64(in.ParentID))
}
if in.PseudoElementID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"pseudoElementId\":") out.RawString("\"pseudoElementId\":")
out.Int64(int64(in.PseudoElementID)) out.Int64(int64(in.PseudoElementID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -4367,15 +4337,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ParentID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"parentId\":") out.RawString("\"parentId\":")
out.Int64(int64(in.ParentID)) out.Int64(int64(in.ParentID))
}
if in.PseudoElement != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4386,7 +4353,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(out *jwriter.Writer, in
} else { } else {
(*in.PseudoElement).MarshalEasyJSON(out) (*in.PseudoElement).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4469,7 +4435,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.NodeIds) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4487,7 +4452,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4639,15 +4603,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.InsertionPointID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"insertionPointId\":") out.RawString("\"insertionPointId\":")
out.Int64(int64(in.InsertionPointID)) out.Int64(int64(in.InsertionPointID))
}
if len(in.DistributedNodes) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4669,7 +4630,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4733,22 +4693,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom57(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ParentNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"parentNodeId\":") out.RawString("\"parentNodeId\":")
out.Int64(int64(in.ParentNodeID)) out.Int64(int64(in.ParentNodeID))
}
if in.NodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeId\":") out.RawString("\"nodeId\":")
out.Int64(int64(in.NodeID)) out.Int64(int64(in.NodeID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -4822,23 +4778,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ParentNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"parentNodeId\":") out.RawString("\"parentNodeId\":")
out.Int64(int64(in.ParentNodeID)) out.Int64(int64(in.ParentNodeID))
}
if in.PreviousNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"previousNodeId\":") out.RawString("\"previousNodeId\":")
out.Int64(int64(in.PreviousNodeID)) out.Int64(int64(in.PreviousNodeID))
}
if in.Node != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4849,7 +4800,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(out *jwriter.Writer, in
} else { } else {
(*in.Node).MarshalEasyJSON(out) (*in.Node).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4913,22 +4863,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom59(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeId\":") out.RawString("\"nodeId\":")
out.Int64(int64(in.NodeID)) out.Int64(int64(in.NodeID))
}
if in.ChildNodeCount != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"childNodeCount\":") out.RawString("\"childNodeCount\":")
out.Int64(int64(in.ChildNodeCount)) out.Int64(int64(in.ChildNodeCount))
}
out.RawByte('}') out.RawByte('}')
} }
@ -4992,22 +4938,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom60(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeId\":") out.RawString("\"nodeId\":")
out.Int64(int64(in.NodeID)) out.Int64(int64(in.NodeID))
}
if in.CharacterData != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"characterData\":") out.RawString("\"characterData\":")
out.String(string(in.CharacterData)) out.String(string(in.CharacterData))
}
out.RawByte('}') out.RawByte('}')
} }
@ -5071,22 +5013,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom61(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeId\":") out.RawString("\"nodeId\":")
out.Int64(int64(in.NodeID)) out.Int64(int64(in.NodeID))
}
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
out.RawByte('}') out.RawByte('}')
} }
@ -5152,30 +5090,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom62(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeId\":") out.RawString("\"nodeId\":")
out.Int64(int64(in.NodeID)) out.Int64(int64(in.NodeID))
}
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Value != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"value\":") out.RawString("\"value\":")
out.String(string(in.Value)) out.String(string(in.Value))
}
out.RawByte('}') out.RawByte('}')
} }
@ -5848,7 +5780,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Content) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -5866,8 +5797,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
if len(in.Padding) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -5885,8 +5814,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
if len(in.Border) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -5904,8 +5831,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
if len(in.Margin) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -5923,23 +5848,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.Width != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"width\":") out.RawString("\"width\":")
out.Int64(int64(in.Width)) out.Int64(int64(in.Width))
}
if in.Height != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"height\":") out.RawString("\"height\":")
out.Int64(int64(in.Height)) out.Int64(int64(in.Height))
}
if in.ShapeOutside != nil { if in.ShapeOutside != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')

View File

@ -14,85 +14,85 @@ type EventDocumentUpdated struct{}
// missing DOM structure. This happens upon most of the calls requesting node // missing DOM structure. This happens upon most of the calls requesting node
// ids. // ids.
type EventSetChildNodes struct { type EventSetChildNodes struct {
ParentID cdp.NodeID `json:"parentId,omitempty"` // Parent node id to populate with children. ParentID cdp.NodeID `json:"parentId"` // Parent node id to populate with children.
Nodes []*cdp.Node `json:"nodes,omitempty"` // Child nodes array. Nodes []*cdp.Node `json:"nodes"` // Child nodes array.
} }
// EventAttributeModified fired when Element's attribute is modified. // EventAttributeModified fired when Element's attribute is modified.
type EventAttributeModified struct { type EventAttributeModified struct {
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
Name string `json:"name,omitempty"` // Attribute name. Name string `json:"name"` // Attribute name.
Value string `json:"value,omitempty"` // Attribute value. Value string `json:"value"` // Attribute value.
} }
// EventAttributeRemoved fired when Element's attribute is removed. // EventAttributeRemoved fired when Element's attribute is removed.
type EventAttributeRemoved struct { type EventAttributeRemoved struct {
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
Name string `json:"name,omitempty"` // A ttribute name. Name string `json:"name"` // A ttribute name.
} }
// EventInlineStyleInvalidated fired when Element's inline style is modified // EventInlineStyleInvalidated fired when Element's inline style is modified
// via a CSS property modification. // via a CSS property modification.
type EventInlineStyleInvalidated struct { type EventInlineStyleInvalidated struct {
NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Ids of the nodes for which the inline styles have been invalidated. NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
} }
// EventCharacterDataModified mirrors DOMCharacterDataModified event. // EventCharacterDataModified mirrors DOMCharacterDataModified event.
type EventCharacterDataModified struct { type EventCharacterDataModified struct {
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
CharacterData string `json:"characterData,omitempty"` // New text value. CharacterData string `json:"characterData"` // New text value.
} }
// EventChildNodeCountUpdated fired when Container's child node count has // EventChildNodeCountUpdated fired when Container's child node count has
// changed. // changed.
type EventChildNodeCountUpdated struct { type EventChildNodeCountUpdated struct {
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
ChildNodeCount int64 `json:"childNodeCount,omitempty"` // New node count. ChildNodeCount int64 `json:"childNodeCount"` // New node count.
} }
// EventChildNodeInserted mirrors DOMNodeInserted event. // EventChildNodeInserted mirrors DOMNodeInserted event.
type EventChildNodeInserted struct { type EventChildNodeInserted struct {
ParentNodeID cdp.NodeID `json:"parentNodeId,omitempty"` // Id of the node that has changed. ParentNodeID cdp.NodeID `json:"parentNodeId"` // Id of the node that has changed.
PreviousNodeID cdp.NodeID `json:"previousNodeId,omitempty"` // If of the previous siblint. PreviousNodeID cdp.NodeID `json:"previousNodeId"` // If of the previous siblint.
Node *cdp.Node `json:"node,omitempty"` // Inserted node data. Node *cdp.Node `json:"node"` // Inserted node data.
} }
// EventChildNodeRemoved mirrors DOMNodeRemoved event. // EventChildNodeRemoved mirrors DOMNodeRemoved event.
type EventChildNodeRemoved struct { type EventChildNodeRemoved struct {
ParentNodeID cdp.NodeID `json:"parentNodeId,omitempty"` // Parent id. ParentNodeID cdp.NodeID `json:"parentNodeId"` // Parent id.
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has been removed. NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has been removed.
} }
// EventShadowRootPushed called when shadow root is pushed into the element. // EventShadowRootPushed called when shadow root is pushed into the element.
type EventShadowRootPushed struct { type EventShadowRootPushed struct {
HostID cdp.NodeID `json:"hostId,omitempty"` // Host element id. HostID cdp.NodeID `json:"hostId"` // Host element id.
Root *cdp.Node `json:"root,omitempty"` // Shadow root. Root *cdp.Node `json:"root"` // Shadow root.
} }
// EventShadowRootPopped called when shadow root is popped from the element. // EventShadowRootPopped called when shadow root is popped from the element.
type EventShadowRootPopped struct { type EventShadowRootPopped struct {
HostID cdp.NodeID `json:"hostId,omitempty"` // Host element id. HostID cdp.NodeID `json:"hostId"` // Host element id.
RootID cdp.NodeID `json:"rootId,omitempty"` // Shadow root id. RootID cdp.NodeID `json:"rootId"` // Shadow root id.
} }
// EventPseudoElementAdded called when a pseudo element is added to an // EventPseudoElementAdded called when a pseudo element is added to an
// element. // element.
type EventPseudoElementAdded struct { type EventPseudoElementAdded struct {
ParentID cdp.NodeID `json:"parentId,omitempty"` // Pseudo element's parent element id. ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
PseudoElement *cdp.Node `json:"pseudoElement,omitempty"` // The added pseudo element. PseudoElement *cdp.Node `json:"pseudoElement"` // The added pseudo element.
} }
// EventPseudoElementRemoved called when a pseudo element is removed from an // EventPseudoElementRemoved called when a pseudo element is removed from an
// element. // element.
type EventPseudoElementRemoved struct { type EventPseudoElementRemoved struct {
ParentID cdp.NodeID `json:"parentId,omitempty"` // Pseudo element's parent element id. ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
PseudoElementID cdp.NodeID `json:"pseudoElementId,omitempty"` // The removed pseudo element id. PseudoElementID cdp.NodeID `json:"pseudoElementId"` // The removed pseudo element id.
} }
// EventDistributedNodesUpdated called when distribution is changed. // EventDistributedNodesUpdated called when distribution is changed.
type EventDistributedNodesUpdated struct { type EventDistributedNodesUpdated struct {
InsertionPointID cdp.NodeID `json:"insertionPointId,omitempty"` // Insertion point where distributed nodes were updated. InsertionPointID cdp.NodeID `json:"insertionPointId"` // Insertion point where distributed nodes were updated.
DistributedNodes []*cdp.BackendNode `json:"distributedNodes,omitempty"` // Distributed nodes for given insertion point. DistributedNodes []*cdp.BackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -10,26 +10,26 @@ type Quad []float64
// BoxModel box model. // BoxModel box model.
type BoxModel struct { type BoxModel struct {
Content Quad `json:"content,omitempty"` // Content box Content Quad `json:"content"` // Content box
Padding Quad `json:"padding,omitempty"` // Padding box Padding Quad `json:"padding"` // Padding box
Border Quad `json:"border,omitempty"` // Border box Border Quad `json:"border"` // Border box
Margin Quad `json:"margin,omitempty"` // Margin box Margin Quad `json:"margin"` // Margin box
Width int64 `json:"width,omitempty"` // Node width Width int64 `json:"width"` // Node width
Height int64 `json:"height,omitempty"` // Node height Height int64 `json:"height"` // Node height
ShapeOutside *ShapeOutsideInfo `json:"shapeOutside,omitempty"` // Shape outside coordinates ShapeOutside *ShapeOutsideInfo `json:"shapeOutside,omitempty"` // Shape outside coordinates
} }
// ShapeOutsideInfo cSS Shape Outside details. // ShapeOutsideInfo cSS Shape Outside details.
type ShapeOutsideInfo struct { type ShapeOutsideInfo struct {
Bounds Quad `json:"bounds,omitempty"` // Shape bounds Bounds Quad `json:"bounds"` // Shape bounds
Shape []easyjson.RawMessage `json:"shape,omitempty"` // Shape coordinate details Shape []easyjson.RawMessage `json:"shape"` // Shape coordinate details
MarginShape []easyjson.RawMessage `json:"marginShape,omitempty"` // Margin shape bounds MarginShape []easyjson.RawMessage `json:"marginShape"` // Margin shape bounds
} }
// Rect rectangle. // Rect rectangle.
type Rect struct { type Rect struct {
X float64 `json:"x,omitempty"` // X coordinate X float64 `json:"x"` // X coordinate
Y float64 `json:"y,omitempty"` // Y coordinate Y float64 `json:"y"` // Y coordinate
Width float64 `json:"width,omitempty"` // Rectangle width Width float64 `json:"width"` // Rectangle width
Height float64 `json:"height,omitempty"` // Rectangle height Height float64 `json:"height"` // Rectangle height
} }

View File

@ -859,62 +859,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(out *jwriter.Wri
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
out.String(string(in.Type)) out.String(string(in.Type))
}
if in.UseCapture {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"useCapture\":") out.RawString("\"useCapture\":")
out.Bool(bool(in.UseCapture)) out.Bool(bool(in.UseCapture))
}
if in.Passive {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"passive\":") out.RawString("\"passive\":")
out.Bool(bool(in.Passive)) out.Bool(bool(in.Passive))
}
if in.Once {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"once\":") out.RawString("\"once\":")
out.Bool(bool(in.Once)) out.Bool(bool(in.Once))
}
if in.ScriptID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scriptId\":") out.RawString("\"scriptId\":")
out.String(string(in.ScriptID)) out.String(string(in.ScriptID))
}
if in.LineNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineNumber\":") out.RawString("\"lineNumber\":")
out.Int64(int64(in.LineNumber)) out.Int64(int64(in.LineNumber))
}
if in.ColumnNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"columnNumber\":") out.RawString("\"columnNumber\":")
out.Int64(int64(in.ColumnNumber)) out.Int64(int64(in.ColumnNumber))
}
if in.Handler != nil { if in.Handler != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')

View File

@ -59,13 +59,13 @@ func (t *DOMBreakpointType) UnmarshalJSON(buf []byte) error {
// EventListener object event listener. // EventListener object event listener.
type EventListener struct { type EventListener struct {
Type string `json:"type,omitempty"` // EventListener's type. Type string `json:"type"` // EventListener's type.
UseCapture bool `json:"useCapture,omitempty"` // EventListener's useCapture. UseCapture bool `json:"useCapture"` // EventListener's useCapture.
Passive bool `json:"passive,omitempty"` // EventListener's passive flag. Passive bool `json:"passive"` // EventListener's passive flag.
Once bool `json:"once,omitempty"` // EventListener's once flag. Once bool `json:"once"` // EventListener's once flag.
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Script id of the handler code. ScriptID runtime.ScriptID `json:"scriptId"` // Script id of the handler code.
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the script (0-based). LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based). ColumnNumber int64 `json:"columnNumber"` // Column number in the script (0-based).
Handler *runtime.RemoteObject `json:"handler,omitempty"` // Event handler function value. Handler *runtime.RemoteObject `json:"handler,omitempty"` // Event handler function value.
OriginalHandler *runtime.RemoteObject `json:"originalHandler,omitempty"` // Event original handler function value. OriginalHandler *runtime.RemoteObject `json:"originalHandler,omitempty"` // Event original handler function value.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node the listener is added to (if any). BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node the listener is added to (if any).

View File

@ -56,22 +56,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Value != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"value\":") out.RawString("\"value\":")
out.String(string(in.Value)) out.String(string(in.Value))
}
out.RawByte('}') out.RawByte('}')
} }
@ -178,15 +174,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot1(out *jwriter.Writ
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.DomNodeIndex != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"domNodeIndex\":") out.RawString("\"domNodeIndex\":")
out.Int64(int64(in.DomNodeIndex)) out.Int64(int64(in.DomNodeIndex))
}
if in.BoundingBox != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -197,7 +190,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot1(out *jwriter.Writ
} else { } else {
(*in.BoundingBox).MarshalEasyJSON(out) (*in.BoundingBox).MarshalEasyJSON(out)
} }
}
if in.LayoutText != "" { if in.LayoutText != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -725,38 +717,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot4(out *jwriter.Writ
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeType != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeType\":") out.RawString("\"nodeType\":")
(in.NodeType).MarshalEasyJSON(out) (in.NodeType).MarshalEasyJSON(out)
}
if in.NodeName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeName\":") out.RawString("\"nodeName\":")
out.String(string(in.NodeName)) out.String(string(in.NodeName))
}
if in.NodeValue != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeValue\":") out.RawString("\"nodeValue\":")
out.String(string(in.NodeValue)) out.String(string(in.NodeValue))
}
if in.BackendNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"backendNodeId\":") out.RawString("\"backendNodeId\":")
out.Int64(int64(in.BackendNodeID)) out.Int64(int64(in.BackendNodeID))
}
if len(in.ChildNodeIndexes) != 0 { if len(in.ChildNodeIndexes) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1004,7 +988,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(out *jwriter.Writ
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Properties) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1026,7 +1009,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(out *jwriter.Writ
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -10,10 +10,10 @@ import (
// DOMNode a Node in the DOM tree. // DOMNode a Node in the DOM tree.
type DOMNode struct { type DOMNode struct {
NodeType cdp.NodeType `json:"nodeType,omitempty"` // Node's nodeType. NodeType cdp.NodeType `json:"nodeType"` // Node's nodeType.
NodeName string `json:"nodeName,omitempty"` // Node's nodeName. NodeName string `json:"nodeName"` // Node's nodeName.
NodeValue string `json:"nodeValue,omitempty"` // Node's nodeValue. NodeValue string `json:"nodeValue"` // Node's nodeValue.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node's id, corresponds to DOM.Node.backendNodeId. BackendNodeID cdp.BackendNodeID `json:"backendNodeId"` // Node's id, corresponds to DOM.Node.backendNodeId.
ChildNodeIndexes []int64 `json:"childNodeIndexes,omitempty"` // The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any. ChildNodeIndexes []int64 `json:"childNodeIndexes,omitempty"` // The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any.
Attributes []*NameValue `json:"attributes,omitempty"` // Attributes of an Element node. Attributes []*NameValue `json:"attributes,omitempty"` // Attributes of an Element node.
PseudoElementIndexes []int64 `json:"pseudoElementIndexes,omitempty"` // Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any. PseudoElementIndexes []int64 `json:"pseudoElementIndexes,omitempty"` // Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any.
@ -33,8 +33,8 @@ type DOMNode struct {
// LayoutTreeNode details of an element in the DOM tree with a LayoutObject. // LayoutTreeNode details of an element in the DOM tree with a LayoutObject.
type LayoutTreeNode struct { type LayoutTreeNode struct {
DomNodeIndex int64 `json:"domNodeIndex,omitempty"` // The index of the related DOM node in the domNodes array returned by getSnapshot. DomNodeIndex int64 `json:"domNodeIndex"` // The index of the related DOM node in the domNodes array returned by getSnapshot.
BoundingBox *dom.Rect `json:"boundingBox,omitempty"` // The absolute position bounding box. BoundingBox *dom.Rect `json:"boundingBox"` // The absolute position bounding box.
LayoutText string `json:"layoutText,omitempty"` // Contents of the LayoutText, if any. LayoutText string `json:"layoutText,omitempty"` // Contents of the LayoutText, if any.
InlineTextNodes []*css.InlineTextBox `json:"inlineTextNodes,omitempty"` // The post-layout inline text nodes, if any. InlineTextNodes []*css.InlineTextBox `json:"inlineTextNodes,omitempty"` // The post-layout inline text nodes, if any.
StyleIndex int64 `json:"styleIndex,omitempty"` // Index into the computedStyles array returned by getSnapshot. StyleIndex int64 `json:"styleIndex,omitempty"` // Index into the computedStyles array returned by getSnapshot.
@ -43,11 +43,11 @@ type LayoutTreeNode struct {
// ComputedStyle a subset of the full ComputedStyle as defined by the request // ComputedStyle a subset of the full ComputedStyle as defined by the request
// whitelist. // whitelist.
type ComputedStyle struct { type ComputedStyle struct {
Properties []*NameValue `json:"properties,omitempty"` // Name/value pairs of computed style properties. Properties []*NameValue `json:"properties"` // Name/value pairs of computed style properties.
} }
// NameValue a name/value pair. // NameValue a name/value pair.
type NameValue struct { type NameValue struct {
Name string `json:"name,omitempty"` // Attribute/property name. Name string `json:"name"` // Attribute/property name.
Value string `json:"value,omitempty"` // Attribute/property value. Value string `json:"value"` // Attribute/property value.
} }

View File

@ -54,22 +54,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.SecurityOrigin != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"securityOrigin\":") out.RawString("\"securityOrigin\":")
out.String(string(in.SecurityOrigin)) out.String(string(in.SecurityOrigin))
}
if in.IsLocalStorage {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"isLocalStorage\":") out.RawString("\"isLocalStorage\":")
out.Bool(bool(in.IsLocalStorage)) out.Bool(bool(in.IsLocalStorage))
}
out.RawByte('}') out.RawByte('}')
} }
@ -533,7 +529,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StorageID != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -544,7 +539,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(out *jwriter.Write
} else { } else {
(*in.StorageID).MarshalEasyJSON(out) (*in.StorageID).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -620,7 +614,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StorageID != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -631,31 +624,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(out *jwriter.Write
} else { } else {
(*in.StorageID).MarshalEasyJSON(out) (*in.StorageID).MarshalEasyJSON(out)
} }
}
if in.Key != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"key\":") out.RawString("\"key\":")
out.String(string(in.Key)) out.String(string(in.Key))
}
if in.OldValue != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"oldValue\":") out.RawString("\"oldValue\":")
out.String(string(in.OldValue)) out.String(string(in.OldValue))
}
if in.NewValue != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"newValue\":") out.RawString("\"newValue\":")
out.String(string(in.NewValue)) out.String(string(in.NewValue))
}
out.RawByte('}') out.RawByte('}')
} }
@ -727,7 +713,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StorageID != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -738,15 +723,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(out *jwriter.Write
} else { } else {
(*in.StorageID).MarshalEasyJSON(out) (*in.StorageID).MarshalEasyJSON(out)
} }
}
if in.Key != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"key\":") out.RawString("\"key\":")
out.String(string(in.Key)) out.String(string(in.Key))
}
out.RawByte('}') out.RawByte('}')
} }
@ -820,7 +802,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage8(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StorageID != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -831,23 +812,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage8(out *jwriter.Write
} else { } else {
(*in.StorageID).MarshalEasyJSON(out) (*in.StorageID).MarshalEasyJSON(out)
} }
}
if in.Key != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"key\":") out.RawString("\"key\":")
out.String(string(in.Key)) out.String(string(in.Key))
}
if in.NewValue != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"newValue\":") out.RawString("\"newValue\":")
out.String(string(in.NewValue)) out.String(string(in.NewValue))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -8,28 +8,28 @@ import (
// EventDomStorageItemsCleared [no description]. // EventDomStorageItemsCleared [no description].
type EventDomStorageItemsCleared struct { type EventDomStorageItemsCleared struct {
StorageID *StorageID `json:"storageId,omitempty"` StorageID *StorageID `json:"storageId"`
} }
// EventDomStorageItemRemoved [no description]. // EventDomStorageItemRemoved [no description].
type EventDomStorageItemRemoved struct { type EventDomStorageItemRemoved struct {
StorageID *StorageID `json:"storageId,omitempty"` StorageID *StorageID `json:"storageId"`
Key string `json:"key,omitempty"` Key string `json:"key"`
} }
// EventDomStorageItemAdded [no description]. // EventDomStorageItemAdded [no description].
type EventDomStorageItemAdded struct { type EventDomStorageItemAdded struct {
StorageID *StorageID `json:"storageId,omitempty"` StorageID *StorageID `json:"storageId"`
Key string `json:"key,omitempty"` Key string `json:"key"`
NewValue string `json:"newValue,omitempty"` NewValue string `json:"newValue"`
} }
// EventDomStorageItemUpdated [no description]. // EventDomStorageItemUpdated [no description].
type EventDomStorageItemUpdated struct { type EventDomStorageItemUpdated struct {
StorageID *StorageID `json:"storageId,omitempty"` StorageID *StorageID `json:"storageId"`
Key string `json:"key,omitempty"` Key string `json:"key"`
OldValue string `json:"oldValue,omitempty"` OldValue string `json:"oldValue"`
NewValue string `json:"newValue,omitempty"` NewValue string `json:"newValue"`
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -4,8 +4,8 @@ package domstorage
// StorageID dOM Storage identifier. // StorageID dOM Storage identifier.
type StorageID struct { type StorageID struct {
SecurityOrigin string `json:"securityOrigin,omitempty"` // Security origin for the storage. SecurityOrigin string `json:"securityOrigin"` // Security origin for the storage.
IsLocalStorage bool `json:"isLocalStorage,omitempty"` // Whether the storage is local storage (not session storage). IsLocalStorage bool `json:"isLocalStorage"` // Whether the storage is local storage (not session storage).
} }
// Item dOM Storage item. // Item dOM Storage item.

View File

@ -58,30 +58,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp(out *jwriter.Writer, in RGBA)
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.R != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"r\":") out.RawString("\"r\":")
out.Int64(int64(in.R)) out.Int64(int64(in.R))
}
if in.G != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"g\":") out.RawString("\"g\":")
out.Int64(int64(in.G)) out.Int64(int64(in.G))
}
if in.B != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"b\":") out.RawString("\"b\":")
out.Int64(int64(in.B)) out.Int64(int64(in.B))
}
if in.A != 0 { if in.A != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -366,14 +360,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp1(out *jwriter.Writer, in Node
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeId\":") out.RawString("\"nodeId\":")
out.Int64(int64(in.NodeID)) out.Int64(int64(in.NodeID))
}
if in.ParentID != 0 { if in.ParentID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -382,46 +374,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp1(out *jwriter.Writer, in Node
out.RawString("\"parentId\":") out.RawString("\"parentId\":")
out.Int64(int64(in.ParentID)) out.Int64(int64(in.ParentID))
} }
if in.BackendNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"backendNodeId\":") out.RawString("\"backendNodeId\":")
out.Int64(int64(in.BackendNodeID)) out.Int64(int64(in.BackendNodeID))
}
if in.NodeType != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeType\":") out.RawString("\"nodeType\":")
(in.NodeType).MarshalEasyJSON(out) (in.NodeType).MarshalEasyJSON(out)
}
if in.NodeName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeName\":") out.RawString("\"nodeName\":")
out.String(string(in.NodeName)) out.String(string(in.NodeName))
}
if in.LocalName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"localName\":") out.RawString("\"localName\":")
out.String(string(in.LocalName)) out.String(string(in.LocalName))
}
if in.NodeValue != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeValue\":") out.RawString("\"nodeValue\":")
out.String(string(in.NodeValue)) out.String(string(in.NodeValue))
}
if in.ChildNodeCount != 0 { if in.ChildNodeCount != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -736,22 +718,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp2(out *jwriter.Writer, in Mess
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Code != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"code\":") out.RawString("\"code\":")
out.Int64(int64(in.Code)) out.Int64(int64(in.Code))
}
if in.Message != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"message\":") out.RawString("\"message\":")
out.String(string(in.Message)) out.String(string(in.Message))
}
out.RawByte('}') out.RawByte('}')
} }
@ -946,14 +924,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Fram
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.String(string(in.ID)) out.String(string(in.ID))
}
if in.ParentID != "" { if in.ParentID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -962,14 +938,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Fram
out.RawString("\"parentId\":") out.RawString("\"parentId\":")
out.String(string(in.ParentID)) out.String(string(in.ParentID))
} }
if in.LoaderID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"loaderId\":") out.RawString("\"loaderId\":")
out.String(string(in.LoaderID)) out.String(string(in.LoaderID))
}
if in.Name != "" { if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -978,30 +952,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Fram
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
} }
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if in.SecurityOrigin != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"securityOrigin\":") out.RawString("\"securityOrigin\":")
out.String(string(in.SecurityOrigin)) out.String(string(in.SecurityOrigin))
}
if in.MimeType != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"mimeType\":") out.RawString("\"mimeType\":")
out.String(string(in.MimeType)) out.String(string(in.MimeType))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1067,30 +1035,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp5(out *jwriter.Writer, in Back
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeType != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeType\":") out.RawString("\"nodeType\":")
(in.NodeType).MarshalEasyJSON(out) (in.NodeType).MarshalEasyJSON(out)
}
if in.NodeName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeName\":") out.RawString("\"nodeName\":")
out.String(string(in.NodeName)) out.String(string(in.NodeName))
}
if in.BackendNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"backendNodeId\":") out.RawString("\"backendNodeId\":")
out.Int64(int64(in.BackendNodeID)) out.Int64(int64(in.BackendNodeID))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -893,22 +893,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation10(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.Angle != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"angle\":") out.RawString("\"angle\":")
out.Int64(int64(in.Angle)) out.Int64(int64(in.Angle))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -12,8 +12,8 @@ import (
// ScreenOrientation screen orientation. // ScreenOrientation screen orientation.
type ScreenOrientation struct { type ScreenOrientation struct {
Type OrientationType `json:"type,omitempty"` // Orientation type. Type OrientationType `json:"type"` // Orientation type.
Angle int64 `json:"angle,omitempty"` // Orientation angle. Angle int64 `json:"angle"` // Orientation angle.
} }
// VirtualTimePolicy advance: If the scheduler runs out of immediate work, // VirtualTimePolicy advance: If the scheduler runs out of immediate work,

2261
cdp/har/easyjson.go Normal file

File diff suppressed because it is too large Load Diff

9
cdp/har/har.go Normal file
View File

@ -0,0 +1,9 @@
// Package har provides the Chrome Debugging Protocol
// commands, types, and events for the HAR domain.
//
// HTTP Archive Format.
//
// Generated by the chromedp-gen command.
package har
// AUTOGENERATED. DO NOT EDIT.

168
cdp/har/types.go Normal file
View File

@ -0,0 +1,168 @@
package har
// AUTOGENERATED. DO NOT EDIT.
// Cache this objects contains info about a request coming from browser
// cache.
type Cache struct {
BeforeRequest *CacheData `json:"beforeRequest,omitempty"` // State of a cache entry before the request. Leave out this field if the information is not available.
AfterRequest *CacheData `json:"afterRequest,omitempty"` // State of a cache entry after the request. Leave out this field if the information is not available.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// CacheData describes the cache data for beforeRequest and afterRequest.
type CacheData struct {
Expires string `json:"expires,omitempty"` // Expiration time of the cache entry.
LastAccess string `json:"lastAccess"` // The last time the cache entry was opened.
ETag string `json:"eTag"` // Etag
HitCount int64 `json:"hitCount"` // The number of times the cache entry has been opened.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Content this object describes details about response content (embedded in
// <response> object).
type Content struct {
Size int64 `json:"size"` // Length of the returned content in bytes. Should be equal to response.bodySize if there is no compression and bigger when the content has been compressed.
Compression int64 `json:"compression,omitempty"` // Number of bytes saved. Leave out this field if the information is not available.
MimeType string `json:"mimeType"` // MIME type of the response text (value of the Content-Type response header). The charset attribute of the MIME type is included (if available).
Text string `json:"text,omitempty"` // Response body sent from the server or loaded from the browser cache. This field is populated with textual content only. The text field is either HTTP decoded text or a encoded (e.g. "base64") representation of the response body. Leave out this field if the information is not available.
Encoding string `json:"encoding,omitempty"` // Encoding used for response text field e.g "base64". Leave out this field if the text field is HTTP decoded (decompressed & unchunked), than trans-coded from its original character set into UTF-8.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Cookie this object contains list of all cookies (used in <request> and
// <response> objects).
type Cookie struct {
Name string `json:"name"` // The name of the cookie.
Value string `json:"value"` // The cookie value.
Path string `json:"path,omitempty"` // The path pertaining to the cookie.
Domain string `json:"domain,omitempty"` // The host of the cookie.
Expires string `json:"expires,omitempty"` // Cookie expiration time. (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g. 2009-07-24T19:20:30.123+02:00).
HTTPOnly bool `json:"httpOnly,omitempty"` // Set to true if the cookie is HTTP only, false otherwise.
Secure bool `json:"secure,omitempty"` // True if the cookie was transmitted over ssl, false otherwise.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Creator creator and browser objects share the same structure.
type Creator struct {
Name string `json:"name"` // Name of the application/browser used to export the log.
Version string `json:"version"` // Version of the application/browser used to export the log.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Entry this object represents an array with all exported HTTP requests.
// Sorting entries by startedDateTime (starting from the oldest) is preferred
// way how to export data since it can make importing faster. However the reader
// application should always make sure the array is sorted (if required for the
// import).
type Entry struct {
Pageref string `json:"pageref,omitempty"` // Reference to the parent page. Leave out this field if the application does not support grouping by pages.
StartedDateTime string `json:"startedDateTime"` // Date and time stamp of the request start (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD).
Time float64 `json:"time"` // Total elapsed time of the request in milliseconds. This is the sum of all timings available in the timings object (i.e. not including -1 values) .
Request *Request `json:"request"` // Detailed info about the request.
Response *Response `json:"response"` // Detailed info about the response.
Cache *Cache `json:"cache"` // Info about cache usage.
Timings *Timings `json:"timings"` // Detailed timing info about request/response round trip.
ServerIPAddress string `json:"serverIPAddress,omitempty"` // IP address of the server that was connected (result of DNS resolution).
Connection string `json:"connection,omitempty"` // Unique ID of the parent TCP/IP connection, can be the client or server port number. Note that a port number doesn't have to be unique identifier in cases where the port is shared for more connections. If the port isn't available for the application, any other unique connection ID can be used instead (e.g. connection index). Leave out this field if the application doesn't support this info.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// HAR parent container for HAR log.
type HAR struct {
Log *Log `json:"log"`
}
// Log this object represents the root of exported data.
type Log struct {
Version string `json:"version"` // Version number of the format. If empty, string "1.1" is assumed by default.
Creator *Creator `json:"creator"` // Name and version info of the log creator application.
Browser *Creator `json:"browser,omitempty"` // Name and version info of used browser.
Pages []*Page `json:"pages,omitempty"` // List of all exported (tracked) pages. Leave out this field if the application does not support grouping by pages.
Entries []*Entry `json:"entries"` // List of all exported (tracked) requests.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// NameValuePair describes a name/value pair.
type NameValuePair struct {
Name string `json:"name"` // Name of the pair.
Value string `json:"value"` // Value of the pair.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Page this object represents list of exported pages.
type Page struct {
StartedDateTime string `json:"startedDateTime"` // Date and time stamp for the beginning of the page load (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g. 2009-07-24T19:20:30.45+01:00).
ID string `json:"id"` // Unique identifier of a page within the <log>. Entries use it to refer the parent page.
Title string `json:"title"` // Page title.
PageTimings *PageTimings `json:"pageTimings"` // Detailed timing info about page load.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// PageTimings this object describes timings for various events (states)
// fired during the page load. All times are specified in milliseconds. If a
// time info is not available appropriate field is set to -1.
type PageTimings struct {
OnContentLoad float64 `json:"onContentLoad,omitempty"` // Content of the page loaded. Number of milliseconds since page load started (page.startedDateTime). Use -1 if the timing does not apply to the current request.
OnLoad float64 `json:"onLoad,omitempty"` // Page is loaded (onLoad event fired). Number of milliseconds since page load started (page.startedDateTime). Use -1 if the timing does not apply to the current request.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Param list of posted parameters, if any (embedded in <postData> object).
type Param struct {
Name string `json:"name"` // name of a posted parameter.
Value string `json:"value,omitempty"` // value of a posted parameter or content of a posted file.
FileName string `json:"fileName,omitempty"` // name of a posted file.
ContentType string `json:"contentType,omitempty"` // content type of a posted file.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// PostData this object describes posted data, if any (embedded in <request>
// object).
type PostData struct {
MimeType string `json:"mimeType"` // Mime type of posted data.
Params []*Param `json:"params"` // List of posted parameters (in case of URL encoded parameters).
Text string `json:"text"` // Plain text posted data
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Request this object contains detailed info about performed request.
type Request struct {
Method string `json:"method"` // Request method (GET, POST, ...).
URL string `json:"url"` // Absolute URL of the request (fragments are not included).
HTTPVersion string `json:"httpVersion"` // Request HTTP Version.
Cookies []*Cookie `json:"cookies"` // List of cookie objects.
Headers []*NameValuePair `json:"headers"` // List of header objects.
QueryString []*NameValuePair `json:"queryString"` // List of query parameter objects.
PostData *PostData `json:"postData,omitempty"` // Posted data info.
HeadersSize int64 `json:"headersSize"` // Total number of bytes from the start of the HTTP request message until (and including) the double CRLF before the body. Set to -1 if the info is not available.
BodySize int64 `json:"bodySize"` // Size of the request body (POST data payload) in bytes. Set to -1 if the info is not available.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Response this object contains detailed info about the response.
type Response struct {
Status int64 `json:"status"` // Response status.
StatusText string `json:"statusText"` // Response status description.
HTTPVersion string `json:"httpVersion"` // Response HTTP Version.
Cookies []*Cookie `json:"cookies"` // List of cookie objects.
Headers []*NameValuePair `json:"headers"` // List of header objects.
Content *Content `json:"content"` // Details about the response body.
RedirectURL string `json:"redirectURL"` // Redirection target URL from the Location response header.
HeadersSize int64 `json:"headersSize"` // Total number of bytes from the start of the HTTP response message until (and including) the double CRLF before the body. Set to -1 if the info is not available.
BodySize int64 `json:"bodySize"` // Size of the received response body in bytes. Set to zero in case of responses coming from the cache (304). Set to -1 if the info is not available.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}
// Timings this object describes various phases within request-response round
// trip. All times are specified in milliseconds.
type Timings struct {
Blocked float64 `json:"blocked,omitempty"` // Time spent in a queue waiting for a network connection. Use -1 if the timing does not apply to the current request.
DNS float64 `json:"dns,omitempty"` // DNS resolution time. The time required to resolve a host name. Use -1 if the timing does not apply to the current request.
Connect float64 `json:"connect,omitempty"` // Time required to create TCP connection. Use -1 if the timing does not apply to the current request.
Send float64 `json:"send"` // Time required to send HTTP request to the server.
Wait float64 `json:"wait"` // Waiting for a response from the server.
Receive float64 `json:"receive"` // Time required to read entire response from the server (or cache).
Ssl float64 `json:"ssl,omitempty"` // Time required for SSL/TLS negotiation. If this field is defined then the time is also included in the connect field (to ensure backward compatibility with HAR 1.1). Use -1 if the timing does not apply to the current request.
Comment string `json:"comment,omitempty"` // A comment provided by the user or the application.
}

View File

@ -511,7 +511,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler6(out *jwriter.Wri
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.CallFrame != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -522,16 +521,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler6(out *jwriter.Wri
} else { } else {
(*in.CallFrame).MarshalEasyJSON(out) (*in.CallFrame).MarshalEasyJSON(out)
} }
}
if in.SelfSize != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"selfSize\":") out.RawString("\"selfSize\":")
out.Float64(float64(in.SelfSize)) out.Float64(float64(in.SelfSize))
}
if len(in.Children) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -553,7 +548,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler6(out *jwriter.Wri
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -623,7 +617,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler7(out *jwriter.Wri
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Head != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -634,7 +627,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler7(out *jwriter.Wri
} else { } else {
(*in.Head).MarshalEasyJSON(out) (*in.Head).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1053,22 +1045,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler13(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Done != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"done\":") out.RawString("\"done\":")
out.Int64(int64(in.Done)) out.Int64(int64(in.Done))
}
if in.Total != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"total\":") out.RawString("\"total\":")
out.Int64(int64(in.Total)) out.Int64(int64(in.Total))
}
if in.Finished { if in.Finished {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1148,15 +1136,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler14(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.LastSeenObjectID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lastSeenObjectId\":") out.RawString("\"lastSeenObjectId\":")
out.Int64(int64(in.LastSeenObjectID)) out.Int64(int64(in.LastSeenObjectID))
}
if in.Timestamp != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1167,7 +1152,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler14(out *jwriter.Wr
} else { } else {
(*in.Timestamp).MarshalEasyJSON(out) (*in.Timestamp).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1250,7 +1234,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.StatsUpdate) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1268,7 +1251,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(out *jwriter.Wr
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1330,14 +1312,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Chunk != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"chunk\":") out.RawString("\"chunk\":")
out.String(string(in.Chunk)) out.String(string(in.Chunk))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -8,7 +8,7 @@ import (
// EventAddHeapSnapshotChunk [no description]. // EventAddHeapSnapshotChunk [no description].
type EventAddHeapSnapshotChunk struct { type EventAddHeapSnapshotChunk struct {
Chunk string `json:"chunk,omitempty"` Chunk string `json:"chunk"`
} }
// EventResetProfiles [no description]. // EventResetProfiles [no description].
@ -16,8 +16,8 @@ type EventResetProfiles struct{}
// EventReportHeapSnapshotProgress [no description]. // EventReportHeapSnapshotProgress [no description].
type EventReportHeapSnapshotProgress struct { type EventReportHeapSnapshotProgress struct {
Done int64 `json:"done,omitempty"` Done int64 `json:"done"`
Total int64 `json:"total,omitempty"` Total int64 `json:"total"`
Finished bool `json:"finished,omitempty"` Finished bool `json:"finished,omitempty"`
} }
@ -27,14 +27,14 @@ type EventReportHeapSnapshotProgress struct {
// then one or more heapStatsUpdate events will be sent before a new // then one or more heapStatsUpdate events will be sent before a new
// lastSeenObjectId event. // lastSeenObjectId event.
type EventLastSeenObjectID struct { type EventLastSeenObjectID struct {
LastSeenObjectID int64 `json:"lastSeenObjectId,omitempty"` LastSeenObjectID int64 `json:"lastSeenObjectId"`
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` Timestamp *cdp.Timestamp `json:"timestamp"`
} }
// EventHeapStatsUpdate if heap objects tracking has been started then // EventHeapStatsUpdate if heap objects tracking has been started then
// backend may send update for one or more fragments. // backend may send update for one or more fragments.
type EventHeapStatsUpdate struct { type EventHeapStatsUpdate struct {
StatsUpdate []int64 `json:"statsUpdate,omitempty"` // An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment. StatsUpdate []int64 `json:"statsUpdate"` // An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -15,12 +15,12 @@ func (t HeapSnapshotObjectID) String() string {
// SamplingHeapProfileNode sampling Heap Profile node. Holds callsite // SamplingHeapProfileNode sampling Heap Profile node. Holds callsite
// information, allocation statistics and child nodes. // information, allocation statistics and child nodes.
type SamplingHeapProfileNode struct { type SamplingHeapProfileNode struct {
CallFrame *runtime.CallFrame `json:"callFrame,omitempty"` // Function location. CallFrame *runtime.CallFrame `json:"callFrame"` // Function location.
SelfSize float64 `json:"selfSize,omitempty"` // Allocations size in bytes for the node excluding children. SelfSize float64 `json:"selfSize"` // Allocations size in bytes for the node excluding children.
Children []*SamplingHeapProfileNode `json:"children,omitempty"` // Child nodes. Children []*SamplingHeapProfileNode `json:"children"` // Child nodes.
} }
// SamplingHeapProfile profile. // SamplingHeapProfile profile.
type SamplingHeapProfile struct { type SamplingHeapProfile struct {
Head *SamplingHeapProfileNode `json:"head,omitempty"` Head *SamplingHeapProfileNode `json:"head"`
} }

View File

@ -643,15 +643,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.KeyPath != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -662,23 +659,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(out *jwriter.Writer
} else { } else {
(*in.KeyPath).MarshalEasyJSON(out) (*in.KeyPath).MarshalEasyJSON(out)
} }
}
if in.Unique {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"unique\":") out.RawString("\"unique\":")
out.Bool(bool(in.Unique)) out.Bool(bool(in.Unique))
}
if in.MultiEntry {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"multiEntry\":") out.RawString("\"multiEntry\":")
out.Bool(bool(in.MultiEntry)) out.Bool(bool(in.MultiEntry))
}
out.RawByte('}') out.RawByte('}')
} }
@ -783,15 +775,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.KeyPath != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -802,16 +791,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(out *jwriter.Writer
} else { } else {
(*in.KeyPath).MarshalEasyJSON(out) (*in.KeyPath).MarshalEasyJSON(out)
} }
}
if in.AutoIncrement {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"autoIncrement\":") out.RawString("\"autoIncrement\":")
out.Bool(bool(in.AutoIncrement)) out.Bool(bool(in.AutoIncrement))
}
if len(in.Indexes) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -833,7 +818,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(out *jwriter.Writer
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -941,22 +925,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb8(out *jwriter.Writer
(*in.Upper).MarshalEasyJSON(out) (*in.Upper).MarshalEasyJSON(out)
} }
} }
if in.LowerOpen {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lowerOpen\":") out.RawString("\"lowerOpen\":")
out.Bool(bool(in.LowerOpen)) out.Bool(bool(in.LowerOpen))
}
if in.UpperOpen {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"upperOpen\":") out.RawString("\"upperOpen\":")
out.Bool(bool(in.UpperOpen)) out.Bool(bool(in.UpperOpen))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1043,14 +1023,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb9(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.String != "" { if in.String != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1176,14 +1154,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb10(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.Number != 0 { if in.Number != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1518,23 +1494,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Version != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"version\":") out.RawString("\"version\":")
out.Int64(int64(in.Version)) out.Int64(int64(in.Version))
}
if len(in.ObjectStores) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1556,7 +1527,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(out *jwriter.Write
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1646,7 +1616,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Key != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1657,8 +1626,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(out *jwriter.Write
} else { } else {
(*in.Key).MarshalEasyJSON(out) (*in.Key).MarshalEasyJSON(out)
} }
}
if in.PrimaryKey != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1669,8 +1636,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(out *jwriter.Write
} else { } else {
(*in.PrimaryKey).MarshalEasyJSON(out) (*in.PrimaryKey).MarshalEasyJSON(out)
} }
}
if in.Value != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1681,7 +1646,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(out *jwriter.Write
} else { } else {
(*in.Value).MarshalEasyJSON(out) (*in.Value).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -13,30 +13,30 @@ import (
// DatabaseWithObjectStores database with an array of object stores. // DatabaseWithObjectStores database with an array of object stores.
type DatabaseWithObjectStores struct { type DatabaseWithObjectStores struct {
Name string `json:"name,omitempty"` // Database name. Name string `json:"name"` // Database name.
Version int64 `json:"version,omitempty"` // Database version. Version int64 `json:"version"` // Database version.
ObjectStores []*ObjectStore `json:"objectStores,omitempty"` // Object stores in this database. ObjectStores []*ObjectStore `json:"objectStores"` // Object stores in this database.
} }
// ObjectStore object store. // ObjectStore object store.
type ObjectStore struct { type ObjectStore struct {
Name string `json:"name,omitempty"` // Object store name. Name string `json:"name"` // Object store name.
KeyPath *KeyPath `json:"keyPath,omitempty"` // Object store key path. KeyPath *KeyPath `json:"keyPath"` // Object store key path.
AutoIncrement bool `json:"autoIncrement,omitempty"` // If true, object store has auto increment flag set. AutoIncrement bool `json:"autoIncrement"` // If true, object store has auto increment flag set.
Indexes []*ObjectStoreIndex `json:"indexes,omitempty"` // Indexes in this object store. Indexes []*ObjectStoreIndex `json:"indexes"` // Indexes in this object store.
} }
// ObjectStoreIndex object store index. // ObjectStoreIndex object store index.
type ObjectStoreIndex struct { type ObjectStoreIndex struct {
Name string `json:"name,omitempty"` // Index name. Name string `json:"name"` // Index name.
KeyPath *KeyPath `json:"keyPath,omitempty"` // Index key path. KeyPath *KeyPath `json:"keyPath"` // Index key path.
Unique bool `json:"unique,omitempty"` // If true, index is unique. Unique bool `json:"unique"` // If true, index is unique.
MultiEntry bool `json:"multiEntry,omitempty"` // If true, index allows multiple entries for a key. MultiEntry bool `json:"multiEntry"` // If true, index allows multiple entries for a key.
} }
// Key key. // Key key.
type Key struct { type Key struct {
Type KeyType `json:"type,omitempty"` // Key type. Type KeyType `json:"type"` // Key type.
Number float64 `json:"number,omitempty"` // Number value. Number float64 `json:"number,omitempty"` // Number value.
String string `json:"string,omitempty"` // String value. String string `json:"string,omitempty"` // String value.
Date float64 `json:"date,omitempty"` // Date value. Date float64 `json:"date,omitempty"` // Date value.
@ -47,20 +47,20 @@ type Key struct {
type KeyRange struct { type KeyRange struct {
Lower *Key `json:"lower,omitempty"` // Lower bound. Lower *Key `json:"lower,omitempty"` // Lower bound.
Upper *Key `json:"upper,omitempty"` // Upper bound. Upper *Key `json:"upper,omitempty"` // Upper bound.
LowerOpen bool `json:"lowerOpen,omitempty"` // If true lower bound is open. LowerOpen bool `json:"lowerOpen"` // If true lower bound is open.
UpperOpen bool `json:"upperOpen,omitempty"` // If true upper bound is open. UpperOpen bool `json:"upperOpen"` // If true upper bound is open.
} }
// DataEntry data entry. // DataEntry data entry.
type DataEntry struct { type DataEntry struct {
Key *runtime.RemoteObject `json:"key,omitempty"` // Key object. Key *runtime.RemoteObject `json:"key"` // Key object.
PrimaryKey *runtime.RemoteObject `json:"primaryKey,omitempty"` // Primary key object. PrimaryKey *runtime.RemoteObject `json:"primaryKey"` // Primary key object.
Value *runtime.RemoteObject `json:"value,omitempty"` // Value object. Value *runtime.RemoteObject `json:"value"` // Value object.
} }
// KeyPath key path. // KeyPath key path.
type KeyPath struct { type KeyPath struct {
Type KeyPathType `json:"type,omitempty"` // Key path type. Type KeyPathType `json:"type"` // Key path type.
String string `json:"string,omitempty"` // String value. String string `json:"string,omitempty"` // String value.
Array []string `json:"array,omitempty"` // Array value. Array []string `json:"array,omitempty"` // Array value.
} }

View File

@ -67,30 +67,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInput(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.State != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"state\":") out.RawString("\"state\":")
(in.State).MarshalEasyJSON(out) (in.State).MarshalEasyJSON(out)
}
if in.X != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"x\":") out.RawString("\"x\":")
out.Int64(int64(in.X)) out.Int64(int64(in.X))
}
if in.Y != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"y\":") out.RawString("\"y\":")
out.Int64(int64(in.Y)) out.Int64(int64(in.Y))
}
if in.RadiusX != 0 { if in.RadiusX != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')

View File

@ -13,9 +13,9 @@ import (
// TouchPoint [no description]. // TouchPoint [no description].
type TouchPoint struct { type TouchPoint struct {
State TouchState `json:"state,omitempty"` // State of the touch point. State TouchState `json:"state"` // State of the touch point.
X int64 `json:"x,omitempty"` // X coordinate of the event relative to the main frame's viewport. X int64 `json:"x"` // X coordinate of the event relative to the main frame's viewport.
Y int64 `json:"y,omitempty"` // Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. Y int64 `json:"y"` // Y coordinate of the event relative to the main frame's viewport. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
RadiusX int64 `json:"radiusX,omitempty"` // X radius of the touch area (default: 1). RadiusX int64 `json:"radiusX,omitempty"` // X radius of the touch area (default: 1).
RadiusY int64 `json:"radiusY,omitempty"` // Y radius of the touch area (default: 1). RadiusY int64 `json:"radiusY,omitempty"` // Y radius of the touch area (default: 1).
RotationAngle float64 `json:"rotationAngle,omitempty"` // Rotation angle (default: 0.0). RotationAngle float64 `json:"rotationAngle,omitempty"` // Rotation angle (default: 0.0).

View File

@ -111,14 +111,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Reason != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"reason\":") out.RawString("\"reason\":")
(in.Reason).MarshalEasyJSON(out) (in.Reason).MarshalEasyJSON(out)
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -9,7 +9,7 @@ import (
// EventDetached fired when remote debugging connection is about to be // EventDetached fired when remote debugging connection is about to be
// terminated. Contains detach reason. // terminated. Contains detach reason.
type EventDetached struct { type EventDetached struct {
Reason DetachReason `json:"reason,omitempty"` // The reason why connection has been terminated. Reason DetachReason `json:"reason"` // The reason why connection has been terminated.
} }
// EventTargetCrashed fired when debugging target has crashed. // EventTargetCrashed fired when debugging target has crashed.

View File

@ -231,7 +231,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Rect != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -242,15 +241,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(out *jwriter.Writer
} else { } else {
(*in.Rect).MarshalEasyJSON(out) (*in.Rect).MarshalEasyJSON(out)
} }
}
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
out.RawByte('}') out.RawByte('}')
} }
@ -791,30 +787,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree8(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.X != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"x\":") out.RawString("\"x\":")
out.Float64(float64(in.X)) out.Float64(float64(in.X))
}
if in.Y != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"y\":") out.RawString("\"y\":")
out.Float64(float64(in.Y)) out.Float64(float64(in.Y))
}
if in.Picture != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"picture\":") out.RawString("\"picture\":")
out.String(string(in.Picture)) out.String(string(in.Picture))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1270,14 +1260,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.LayerID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"layerId\":") out.RawString("\"layerId\":")
out.String(string(in.LayerID)) out.String(string(in.LayerID))
}
if in.ParentLayerID != "" { if in.ParentLayerID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1294,38 +1282,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(out *jwriter.Write
out.RawString("\"backendNodeId\":") out.RawString("\"backendNodeId\":")
out.Int64(int64(in.BackendNodeID)) out.Int64(int64(in.BackendNodeID))
} }
if in.OffsetX != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"offsetX\":") out.RawString("\"offsetX\":")
out.Float64(float64(in.OffsetX)) out.Float64(float64(in.OffsetX))
}
if in.OffsetY != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"offsetY\":") out.RawString("\"offsetY\":")
out.Float64(float64(in.OffsetY)) out.Float64(float64(in.OffsetY))
}
if in.Width != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"width\":") out.RawString("\"width\":")
out.Float64(float64(in.Width)) out.Float64(float64(in.Width))
}
if in.Height != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"height\":") out.RawString("\"height\":")
out.Float64(float64(in.Height)) out.Float64(float64(in.Height))
}
if len(in.Transform) != 0 { if len(in.Transform) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1369,22 +1349,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(out *jwriter.Write
out.RawString("\"anchorZ\":") out.RawString("\"anchorZ\":")
out.Float64(float64(in.AnchorZ)) out.Float64(float64(in.AnchorZ))
} }
if in.PaintCount != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"paintCount\":") out.RawString("\"paintCount\":")
out.Int64(int64(in.PaintCount)) out.Int64(int64(in.PaintCount))
}
if in.DrawsContent {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"drawsContent\":") out.RawString("\"drawsContent\":")
out.Bool(bool(in.DrawsContent)) out.Bool(bool(in.DrawsContent))
}
if in.Invisible { if in.Invisible {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1600,15 +1576,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree15(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.LayerID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"layerId\":") out.RawString("\"layerId\":")
out.String(string(in.LayerID)) out.String(string(in.LayerID))
}
if in.Clip != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1619,7 +1592,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree15(out *jwriter.Write
} else { } else {
(*in.Clip).MarshalEasyJSON(out) (*in.Clip).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -14,8 +14,8 @@ type EventLayerTreeDidChange struct {
// EventLayerPainted [no description]. // EventLayerPainted [no description].
type EventLayerPainted struct { type EventLayerPainted struct {
LayerID LayerID `json:"layerId,omitempty"` // The id of the painted layer. LayerID LayerID `json:"layerId"` // The id of the painted layer.
Clip *dom.Rect `json:"clip,omitempty"` // Clip rectangle. Clip *dom.Rect `json:"clip"` // Clip rectangle.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -30,33 +30,33 @@ func (t SnapshotID) String() string {
// ScrollRect rectangle where scrolling happens on the main thread. // ScrollRect rectangle where scrolling happens on the main thread.
type ScrollRect struct { type ScrollRect struct {
Rect *dom.Rect `json:"rect,omitempty"` // Rectangle itself. Rect *dom.Rect `json:"rect"` // Rectangle itself.
Type ScrollRectType `json:"type,omitempty"` // Reason for rectangle to force scrolling on the main thread Type ScrollRectType `json:"type"` // Reason for rectangle to force scrolling on the main thread
} }
// PictureTile serialized fragment of layer picture along with its offset // PictureTile serialized fragment of layer picture along with its offset
// within the layer. // within the layer.
type PictureTile struct { type PictureTile struct {
X float64 `json:"x,omitempty"` // Offset from owning layer left boundary X float64 `json:"x"` // Offset from owning layer left boundary
Y float64 `json:"y,omitempty"` // Offset from owning layer top boundary Y float64 `json:"y"` // Offset from owning layer top boundary
Picture string `json:"picture,omitempty"` // Base64-encoded snapshot data. Picture string `json:"picture"` // Base64-encoded snapshot data.
} }
// Layer information about a compositing layer. // Layer information about a compositing layer.
type Layer struct { type Layer struct {
LayerID LayerID `json:"layerId,omitempty"` // The unique id for this layer. LayerID LayerID `json:"layerId"` // The unique id for this layer.
ParentLayerID LayerID `json:"parentLayerId,omitempty"` // The id of parent (not present for root). ParentLayerID LayerID `json:"parentLayerId,omitempty"` // The id of parent (not present for root).
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // The backend id for the node associated with this layer. BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // The backend id for the node associated with this layer.
OffsetX float64 `json:"offsetX,omitempty"` // Offset from parent layer, X coordinate. OffsetX float64 `json:"offsetX"` // Offset from parent layer, X coordinate.
OffsetY float64 `json:"offsetY,omitempty"` // Offset from parent layer, Y coordinate. OffsetY float64 `json:"offsetY"` // Offset from parent layer, Y coordinate.
Width float64 `json:"width,omitempty"` // Layer width. Width float64 `json:"width"` // Layer width.
Height float64 `json:"height,omitempty"` // Layer height. Height float64 `json:"height"` // Layer height.
Transform []float64 `json:"transform,omitempty"` // Transformation matrix for layer, default is identity matrix Transform []float64 `json:"transform,omitempty"` // Transformation matrix for layer, default is identity matrix
AnchorX float64 `json:"anchorX,omitempty"` // Transform anchor point X, absent if no transform specified AnchorX float64 `json:"anchorX,omitempty"` // Transform anchor point X, absent if no transform specified
AnchorY float64 `json:"anchorY,omitempty"` // Transform anchor point Y, absent if no transform specified AnchorY float64 `json:"anchorY,omitempty"` // Transform anchor point Y, absent if no transform specified
AnchorZ float64 `json:"anchorZ,omitempty"` // Transform anchor point Z, absent if no transform specified AnchorZ float64 `json:"anchorZ,omitempty"` // Transform anchor point Z, absent if no transform specified
PaintCount int64 `json:"paintCount,omitempty"` // Indicates how many time this layer has painted. PaintCount int64 `json:"paintCount"` // Indicates how many time this layer has painted.
DrawsContent bool `json:"drawsContent,omitempty"` // Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only. DrawsContent bool `json:"drawsContent"` // Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
Invisible bool `json:"invisible,omitempty"` // Set if layer is not visible. Invisible bool `json:"invisible,omitempty"` // Set if layer is not visible.
ScrollRects []*ScrollRect `json:"scrollRects,omitempty"` // Rectangles scrolling on main thread only. ScrollRects []*ScrollRect `json:"scrollRects,omitempty"` // Rectangles scrolling on main thread only.
} }

View File

@ -56,22 +56,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog(out *jwriter.Writer, in Vi
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
(in.Name).MarshalEasyJSON(out) (in.Name).MarshalEasyJSON(out)
}
if in.Threshold != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"threshold\":") out.RawString("\"threshold\":")
out.Float64(float64(in.Threshold)) out.Float64(float64(in.Threshold))
}
out.RawByte('}') out.RawByte('}')
} }
@ -311,7 +307,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog3(out *jwriter.Writer, in E
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Entry != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -322,7 +317,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog3(out *jwriter.Writer, in E
} else { } else {
(*in.Entry).MarshalEasyJSON(out) (*in.Entry).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -416,31 +410,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(out *jwriter.Writer, in E
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Source != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"source\":") out.RawString("\"source\":")
(in.Source).MarshalEasyJSON(out) (in.Source).MarshalEasyJSON(out)
}
if in.Level != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"level\":") out.RawString("\"level\":")
(in.Level).MarshalEasyJSON(out) (in.Level).MarshalEasyJSON(out)
}
if in.Text != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"text\":") out.RawString("\"text\":")
out.String(string(in.Text)) out.String(string(in.Text))
}
if in.Timestamp != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -451,7 +438,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(out *jwriter.Writer, in E
} else { } else {
(*in.Timestamp).MarshalEasyJSON(out) (*in.Timestamp).MarshalEasyJSON(out)
} }
}
if in.URL != "" { if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')

View File

@ -8,7 +8,7 @@ import (
// EventEntryAdded issued when new message was logged. // EventEntryAdded issued when new message was logged.
type EventEntryAdded struct { type EventEntryAdded struct {
Entry *Entry `json:"entry,omitempty"` // The entry. Entry *Entry `json:"entry"` // The entry.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -14,10 +14,10 @@ import (
// Entry log entry. // Entry log entry.
type Entry struct { type Entry struct {
Source Source `json:"source,omitempty"` // Log entry source. Source Source `json:"source"` // Log entry source.
Level Level `json:"level,omitempty"` // Log entry severity. Level Level `json:"level"` // Log entry severity.
Text string `json:"text,omitempty"` // Logged text. Text string `json:"text"` // Logged text.
Timestamp *runtime.Timestamp `json:"timestamp,omitempty"` // Timestamp when this entry was added. Timestamp *runtime.Timestamp `json:"timestamp"` // Timestamp when this entry was added.
URL string `json:"url,omitempty"` // URL of the resource if known. URL string `json:"url,omitempty"` // URL of the resource if known.
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the resource. LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the resource.
StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace. StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace.
@ -27,8 +27,8 @@ type Entry struct {
// ViolationSetting violation configuration setting. // ViolationSetting violation configuration setting.
type ViolationSetting struct { type ViolationSetting struct {
Name Violation `json:"name,omitempty"` // Violation type. Name Violation `json:"name"` // Violation type.
Threshold float64 `json:"threshold,omitempty"` // Time threshold to trigger upon. Threshold float64 `json:"threshold"` // Time threshold to trigger upon.
} }
// Source log entry source. // Source log entry source.

File diff suppressed because it is too large Load Diff

View File

@ -10,61 +10,61 @@ import (
// EventResourceChangedPriority fired when resource loading priority is // EventResourceChangedPriority fired when resource loading priority is
// changed. // changed.
type EventResourceChangedPriority struct { type EventResourceChangedPriority struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
NewPriority ResourcePriority `json:"newPriority,omitempty"` // New priority NewPriority ResourcePriority `json:"newPriority"` // New priority
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
} }
// EventRequestWillBeSent fired when page is about to send HTTP request. // EventRequestWillBeSent fired when page is about to send HTTP request.
type EventRequestWillBeSent struct { type EventRequestWillBeSent struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier. FrameID cdp.FrameID `json:"frameId"` // Frame identifier.
LoaderID cdp.LoaderID `json:"loaderId,omitempty"` // Loader identifier. LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier.
DocumentURL string `json:"documentURL,omitempty"` // URL of the document this request is loaded for. DocumentURL string `json:"documentURL"` // URL of the document this request is loaded for.
Request *Request `json:"request,omitempty"` // Request data. Request *Request `json:"request"` // Request data.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
WallTime *cdp.Timestamp `json:"wallTime,omitempty"` // UTC Timestamp. WallTime *cdp.Timestamp `json:"wallTime"` // UTC Timestamp.
Initiator *Initiator `json:"initiator,omitempty"` // Request initiator. Initiator *Initiator `json:"initiator"` // Request initiator.
RedirectResponse *Response `json:"redirectResponse,omitempty"` // Redirect response data. RedirectResponse *Response `json:"redirectResponse,omitempty"` // Redirect response data.
Type page.ResourceType `json:"type,omitempty"` // Type of this resource. Type page.ResourceType `json:"type,omitempty"` // Type of this resource.
} }
// EventRequestServedFromCache fired if request ended up loading from cache. // EventRequestServedFromCache fired if request ended up loading from cache.
type EventRequestServedFromCache struct { type EventRequestServedFromCache struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
} }
// EventResponseReceived fired when HTTP response is available. // EventResponseReceived fired when HTTP response is available.
type EventResponseReceived struct { type EventResponseReceived struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier. FrameID cdp.FrameID `json:"frameId"` // Frame identifier.
LoaderID cdp.LoaderID `json:"loaderId,omitempty"` // Loader identifier. LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
Type page.ResourceType `json:"type,omitempty"` // Resource type. Type page.ResourceType `json:"type"` // Resource type.
Response *Response `json:"response,omitempty"` // Response data. Response *Response `json:"response"` // Response data.
} }
// EventDataReceived fired when data chunk was received over the network. // EventDataReceived fired when data chunk was received over the network.
type EventDataReceived struct { type EventDataReceived struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
DataLength int64 `json:"dataLength,omitempty"` // Data chunk length. DataLength int64 `json:"dataLength"` // Data chunk length.
EncodedDataLength int64 `json:"encodedDataLength,omitempty"` // Actual bytes received (might be less than dataLength for compressed encodings). EncodedDataLength int64 `json:"encodedDataLength"` // Actual bytes received (might be less than dataLength for compressed encodings).
} }
// EventLoadingFinished fired when HTTP request has finished loading. // EventLoadingFinished fired when HTTP request has finished loading.
type EventLoadingFinished struct { type EventLoadingFinished struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
EncodedDataLength float64 `json:"encodedDataLength,omitempty"` // Total number of bytes received for this request. EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request.
} }
// EventLoadingFailed fired when HTTP request has failed to load. // EventLoadingFailed fired when HTTP request has failed to load.
type EventLoadingFailed struct { type EventLoadingFailed struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
Type page.ResourceType `json:"type,omitempty"` // Resource type. Type page.ResourceType `json:"type"` // Resource type.
ErrorText string `json:"errorText,omitempty"` // User friendly error message. ErrorText string `json:"errorText"` // User friendly error message.
Canceled bool `json:"canceled,omitempty"` // True if loading was canceled. Canceled bool `json:"canceled,omitempty"` // True if loading was canceled.
BlockedReason BlockedReason `json:"blockedReason,omitempty"` // The reason why loading was blocked, if any. BlockedReason BlockedReason `json:"blockedReason,omitempty"` // The reason why loading was blocked, if any.
} }
@ -72,70 +72,70 @@ type EventLoadingFailed struct {
// EventWebSocketWillSendHandshakeRequest fired when WebSocket is about to // EventWebSocketWillSendHandshakeRequest fired when WebSocket is about to
// initiate handshake. // initiate handshake.
type EventWebSocketWillSendHandshakeRequest struct { type EventWebSocketWillSendHandshakeRequest struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
WallTime *cdp.Timestamp `json:"wallTime,omitempty"` // UTC Timestamp. WallTime *cdp.Timestamp `json:"wallTime"` // UTC Timestamp.
Request *WebSocketRequest `json:"request,omitempty"` // WebSocket request data. Request *WebSocketRequest `json:"request"` // WebSocket request data.
} }
// EventWebSocketHandshakeResponseReceived fired when WebSocket handshake // EventWebSocketHandshakeResponseReceived fired when WebSocket handshake
// response becomes available. // response becomes available.
type EventWebSocketHandshakeResponseReceived struct { type EventWebSocketHandshakeResponseReceived struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
Response *WebSocketResponse `json:"response,omitempty"` // WebSocket response data. Response *WebSocketResponse `json:"response"` // WebSocket response data.
} }
// EventWebSocketCreated fired upon WebSocket creation. // EventWebSocketCreated fired upon WebSocket creation.
type EventWebSocketCreated struct { type EventWebSocketCreated struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
URL string `json:"url,omitempty"` // WebSocket request URL. URL string `json:"url"` // WebSocket request URL.
Initiator *Initiator `json:"initiator,omitempty"` // Request initiator. Initiator *Initiator `json:"initiator,omitempty"` // Request initiator.
} }
// EventWebSocketClosed fired when WebSocket is closed. // EventWebSocketClosed fired when WebSocket is closed.
type EventWebSocketClosed struct { type EventWebSocketClosed struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
} }
// EventWebSocketFrameReceived fired when WebSocket frame is received. // EventWebSocketFrameReceived fired when WebSocket frame is received.
type EventWebSocketFrameReceived struct { type EventWebSocketFrameReceived struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
Response *WebSocketFrame `json:"response,omitempty"` // WebSocket response data. Response *WebSocketFrame `json:"response"` // WebSocket response data.
} }
// EventWebSocketFrameError fired when WebSocket frame error occurs. // EventWebSocketFrameError fired when WebSocket frame error occurs.
type EventWebSocketFrameError struct { type EventWebSocketFrameError struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
ErrorMessage string `json:"errorMessage,omitempty"` // WebSocket frame error message. ErrorMessage string `json:"errorMessage"` // WebSocket frame error message.
} }
// EventWebSocketFrameSent fired when WebSocket frame is sent. // EventWebSocketFrameSent fired when WebSocket frame is sent.
type EventWebSocketFrameSent struct { type EventWebSocketFrameSent struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
Response *WebSocketFrame `json:"response,omitempty"` // WebSocket response data. Response *WebSocketFrame `json:"response"` // WebSocket response data.
} }
// EventEventSourceMessageReceived fired when EventSource message is // EventEventSourceMessageReceived fired when EventSource message is
// received. // received.
type EventEventSourceMessageReceived struct { type EventEventSourceMessageReceived struct {
RequestID RequestID `json:"requestId,omitempty"` // Request identifier. RequestID RequestID `json:"requestId"` // Request identifier.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp. Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
EventName string `json:"eventName,omitempty"` // Message type. EventName string `json:"eventName"` // Message type.
EventID string `json:"eventId,omitempty"` // Message identifier. EventID string `json:"eventId"` // Message identifier.
Data string `json:"data,omitempty"` // Message content. Data string `json:"data"` // Message content.
} }
// EventRequestIntercepted details of an intercepted HTTP request, which must // EventRequestIntercepted details of an intercepted HTTP request, which must
// be either allowed, blocked, modified or mocked. // be either allowed, blocked, modified or mocked.
type EventRequestIntercepted struct { type EventRequestIntercepted struct {
InterceptionID InterceptionID `json:"interceptionId,omitempty"` // Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used. InterceptionID InterceptionID `json:"interceptionId"` // Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used.
Request *Request `json:"request,omitempty"` Request *Request `json:"request"`
ResourceType page.ResourceType `json:"resourceType,omitempty"` // How the requested resource will be used. ResourceType page.ResourceType `json:"resourceType"` // How the requested resource will be used.
RedirectHeaders Headers `json:"redirectHeaders,omitempty"` // HTTP response headers, only sent if a redirect was intercepted. RedirectHeaders Headers `json:"redirectHeaders,omitempty"` // HTTP response headers, only sent if a redirect was intercepted.
RedirectStatusCode int64 `json:"redirectStatusCode,omitempty"` // HTTP response code, only sent if a redirect was intercepted. RedirectStatusCode int64 `json:"redirectStatusCode,omitempty"` // HTTP response code, only sent if a redirect was intercepted.
RedirectURL string `json:"redirectUrl,omitempty"` // Redirect location, only sent if a redirect was intercepted. RedirectURL string `json:"redirectUrl,omitempty"` // Redirect location, only sent if a redirect was intercepted.

View File

@ -213,22 +213,22 @@ func (t *CookieSameSite) UnmarshalJSON(buf []byte) error {
// ResourceTiming timing information for the request. // ResourceTiming timing information for the request.
type ResourceTiming struct { type ResourceTiming struct {
RequestTime float64 `json:"requestTime,omitempty"` // Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime. RequestTime float64 `json:"requestTime"` // Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
ProxyStart float64 `json:"proxyStart,omitempty"` // Started resolving proxy. ProxyStart float64 `json:"proxyStart"` // Started resolving proxy.
ProxyEnd float64 `json:"proxyEnd,omitempty"` // Finished resolving proxy. ProxyEnd float64 `json:"proxyEnd"` // Finished resolving proxy.
DNSStart float64 `json:"dnsStart,omitempty"` // Started DNS address resolve. DNSStart float64 `json:"dnsStart"` // Started DNS address resolve.
DNSEnd float64 `json:"dnsEnd,omitempty"` // Finished DNS address resolve. DNSEnd float64 `json:"dnsEnd"` // Finished DNS address resolve.
ConnectStart float64 `json:"connectStart,omitempty"` // Started connecting to the remote host. ConnectStart float64 `json:"connectStart"` // Started connecting to the remote host.
ConnectEnd float64 `json:"connectEnd,omitempty"` // Connected to the remote host. ConnectEnd float64 `json:"connectEnd"` // Connected to the remote host.
SslStart float64 `json:"sslStart,omitempty"` // Started SSL handshake. SslStart float64 `json:"sslStart"` // Started SSL handshake.
SslEnd float64 `json:"sslEnd,omitempty"` // Finished SSL handshake. SslEnd float64 `json:"sslEnd"` // Finished SSL handshake.
WorkerStart float64 `json:"workerStart,omitempty"` // Started running ServiceWorker. WorkerStart float64 `json:"workerStart"` // Started running ServiceWorker.
WorkerReady float64 `json:"workerReady,omitempty"` // Finished Starting ServiceWorker. WorkerReady float64 `json:"workerReady"` // Finished Starting ServiceWorker.
SendStart float64 `json:"sendStart,omitempty"` // Started sending request. SendStart float64 `json:"sendStart"` // Started sending request.
SendEnd float64 `json:"sendEnd,omitempty"` // Finished sending request. SendEnd float64 `json:"sendEnd"` // Finished sending request.
PushStart float64 `json:"pushStart,omitempty"` // Time the server started pushing request. PushStart float64 `json:"pushStart"` // Time the server started pushing request.
PushEnd float64 `json:"pushEnd,omitempty"` // Time the server finished pushing request. PushEnd float64 `json:"pushEnd"` // Time the server finished pushing request.
ReceiveHeadersEnd float64 `json:"receiveHeadersEnd,omitempty"` // Finished receiving response headers. ReceiveHeadersEnd float64 `json:"receiveHeadersEnd"` // Finished receiving response headers.
} }
// ResourcePriority loading priority of a resource request. // ResourcePriority loading priority of a resource request.
@ -284,43 +284,43 @@ func (t *ResourcePriority) UnmarshalJSON(buf []byte) error {
// Request hTTP request data. // Request hTTP request data.
type Request struct { type Request struct {
URL string `json:"url,omitempty"` // Request URL. URL string `json:"url"` // Request URL.
Method string `json:"method,omitempty"` // HTTP request method. Method string `json:"method"` // HTTP request method.
Headers Headers `json:"headers,omitempty"` // HTTP request headers. Headers Headers `json:"headers"` // HTTP request headers.
PostData string `json:"postData,omitempty"` // HTTP POST request data. PostData string `json:"postData,omitempty"` // HTTP POST request data.
MixedContentType MixedContentType `json:"mixedContentType,omitempty"` // The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/ MixedContentType MixedContentType `json:"mixedContentType,omitempty"` // The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/
InitialPriority ResourcePriority `json:"initialPriority,omitempty"` // Priority of the resource request at the time request is sent. InitialPriority ResourcePriority `json:"initialPriority"` // Priority of the resource request at the time request is sent.
ReferrerPolicy ReferrerPolicy `json:"referrerPolicy,omitempty"` // The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ ReferrerPolicy ReferrerPolicy `json:"referrerPolicy"` // The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
IsLinkPreload bool `json:"isLinkPreload,omitempty"` // Whether is loaded via link preload. IsLinkPreload bool `json:"isLinkPreload,omitempty"` // Whether is loaded via link preload.
} }
// SignedCertificateTimestamp details of a signed certificate timestamp // SignedCertificateTimestamp details of a signed certificate timestamp
// (SCT). // (SCT).
type SignedCertificateTimestamp struct { type SignedCertificateTimestamp struct {
Status string `json:"status,omitempty"` // Validation status. Status string `json:"status"` // Validation status.
Origin string `json:"origin,omitempty"` // Origin. Origin string `json:"origin"` // Origin.
LogDescription string `json:"logDescription,omitempty"` // Log name / description. LogDescription string `json:"logDescription"` // Log name / description.
LogID string `json:"logId,omitempty"` // Log ID. LogID string `json:"logId"` // Log ID.
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Issuance date. Timestamp *cdp.Timestamp `json:"timestamp"` // Issuance date.
HashAlgorithm string `json:"hashAlgorithm,omitempty"` // Hash algorithm. HashAlgorithm string `json:"hashAlgorithm"` // Hash algorithm.
SignatureAlgorithm string `json:"signatureAlgorithm,omitempty"` // Signature algorithm. SignatureAlgorithm string `json:"signatureAlgorithm"` // Signature algorithm.
SignatureData string `json:"signatureData,omitempty"` // Signature data. SignatureData string `json:"signatureData"` // Signature data.
} }
// SecurityDetails security details about a request. // SecurityDetails security details about a request.
type SecurityDetails struct { type SecurityDetails struct {
Protocol string `json:"protocol,omitempty"` // Protocol name (e.g. "TLS 1.2" or "QUIC"). Protocol string `json:"protocol"` // Protocol name (e.g. "TLS 1.2" or "QUIC").
KeyExchange string `json:"keyExchange,omitempty"` // Key Exchange used by the connection, or the empty string if not applicable. KeyExchange string `json:"keyExchange"` // Key Exchange used by the connection, or the empty string if not applicable.
KeyExchangeGroup string `json:"keyExchangeGroup,omitempty"` // (EC)DH group used by the connection, if applicable. KeyExchangeGroup string `json:"keyExchangeGroup,omitempty"` // (EC)DH group used by the connection, if applicable.
Cipher string `json:"cipher,omitempty"` // Cipher name. Cipher string `json:"cipher"` // Cipher name.
Mac string `json:"mac,omitempty"` // TLS MAC. Note that AEAD ciphers do not have separate MACs. Mac string `json:"mac,omitempty"` // TLS MAC. Note that AEAD ciphers do not have separate MACs.
CertificateID security.CertificateID `json:"certificateId,omitempty"` // Certificate ID value. CertificateID security.CertificateID `json:"certificateId"` // Certificate ID value.
SubjectName string `json:"subjectName,omitempty"` // Certificate subject name. SubjectName string `json:"subjectName"` // Certificate subject name.
SanList []string `json:"sanList,omitempty"` // Subject Alternative Name (SAN) DNS names and IP addresses. SanList []string `json:"sanList"` // Subject Alternative Name (SAN) DNS names and IP addresses.
Issuer string `json:"issuer,omitempty"` // Name of the issuing CA. Issuer string `json:"issuer"` // Name of the issuing CA.
ValidFrom *cdp.Timestamp `json:"validFrom,omitempty"` // Certificate valid from date. ValidFrom *cdp.Timestamp `json:"validFrom"` // Certificate valid from date.
ValidTo *cdp.Timestamp `json:"validTo,omitempty"` // Certificate valid to (expiration) date ValidTo *cdp.Timestamp `json:"validTo"` // Certificate valid to (expiration) date
SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList,omitempty"` // List of signed certificate timestamps (SCTs). SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList"` // List of signed certificate timestamps (SCTs).
} }
// BlockedReason the reason why request was blocked. // BlockedReason the reason why request was blocked.
@ -379,37 +379,37 @@ func (t *BlockedReason) UnmarshalJSON(buf []byte) error {
// Response hTTP response data. // Response hTTP response data.
type Response struct { type Response struct {
URL string `json:"url,omitempty"` // Response URL. This URL can be different from CachedResource.url in case of redirect. URL string `json:"url"` // Response URL. This URL can be different from CachedResource.url in case of redirect.
Status float64 `json:"status,omitempty"` // HTTP response status code. Status float64 `json:"status"` // HTTP response status code.
StatusText string `json:"statusText,omitempty"` // HTTP response status text. StatusText string `json:"statusText"` // HTTP response status text.
Headers Headers `json:"headers,omitempty"` // HTTP response headers. Headers Headers `json:"headers"` // HTTP response headers.
HeadersText string `json:"headersText,omitempty"` // HTTP response headers text. HeadersText string `json:"headersText,omitempty"` // HTTP response headers text.
MimeType string `json:"mimeType,omitempty"` // Resource mimeType as determined by the browser. MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser.
RequestHeaders Headers `json:"requestHeaders,omitempty"` // Refined HTTP request headers that were actually transmitted over the network. RequestHeaders Headers `json:"requestHeaders,omitempty"` // Refined HTTP request headers that were actually transmitted over the network.
RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text. RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text.
ConnectionReused bool `json:"connectionReused,omitempty"` // Specifies whether physical connection was actually reused for this request. ConnectionReused bool `json:"connectionReused"` // Specifies whether physical connection was actually reused for this request.
ConnectionID float64 `json:"connectionId,omitempty"` // Physical connection id that was actually used for this request. ConnectionID float64 `json:"connectionId"` // Physical connection id that was actually used for this request.
RemoteIPAddress string `json:"remoteIPAddress,omitempty"` // Remote IP address. RemoteIPAddress string `json:"remoteIPAddress,omitempty"` // Remote IP address.
RemotePort int64 `json:"remotePort,omitempty"` // Remote port. RemotePort int64 `json:"remotePort,omitempty"` // Remote port.
FromDiskCache bool `json:"fromDiskCache,omitempty"` // Specifies that the request was served from the disk cache. FromDiskCache bool `json:"fromDiskCache,omitempty"` // Specifies that the request was served from the disk cache.
FromServiceWorker bool `json:"fromServiceWorker,omitempty"` // Specifies that the request was served from the ServiceWorker. FromServiceWorker bool `json:"fromServiceWorker,omitempty"` // Specifies that the request was served from the ServiceWorker.
EncodedDataLength float64 `json:"encodedDataLength,omitempty"` // Total number of bytes received for this request so far. EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request so far.
Timing *ResourceTiming `json:"timing,omitempty"` // Timing information for the given request. Timing *ResourceTiming `json:"timing,omitempty"` // Timing information for the given request.
Protocol string `json:"protocol,omitempty"` // Protocol used to fetch this request. Protocol string `json:"protocol,omitempty"` // Protocol used to fetch this request.
SecurityState security.State `json:"securityState,omitempty"` // Security state of the request resource. SecurityState security.State `json:"securityState"` // Security state of the request resource.
SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the request. SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the request.
} }
// WebSocketRequest webSocket request data. // WebSocketRequest webSocket request data.
type WebSocketRequest struct { type WebSocketRequest struct {
Headers Headers `json:"headers,omitempty"` // HTTP request headers. Headers Headers `json:"headers"` // HTTP request headers.
} }
// WebSocketResponse webSocket response data. // WebSocketResponse webSocket response data.
type WebSocketResponse struct { type WebSocketResponse struct {
Status float64 `json:"status,omitempty"` // HTTP response status code. Status float64 `json:"status"` // HTTP response status code.
StatusText string `json:"statusText,omitempty"` // HTTP response status text. StatusText string `json:"statusText"` // HTTP response status text.
Headers Headers `json:"headers,omitempty"` // HTTP response headers. Headers Headers `json:"headers"` // HTTP response headers.
HeadersText string `json:"headersText,omitempty"` // HTTP response headers text. HeadersText string `json:"headersText,omitempty"` // HTTP response headers text.
RequestHeaders Headers `json:"requestHeaders,omitempty"` // HTTP request headers. RequestHeaders Headers `json:"requestHeaders,omitempty"` // HTTP request headers.
RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text. RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text.
@ -417,22 +417,22 @@ type WebSocketResponse struct {
// WebSocketFrame webSocket frame data. // WebSocketFrame webSocket frame data.
type WebSocketFrame struct { type WebSocketFrame struct {
Opcode float64 `json:"opcode,omitempty"` // WebSocket frame opcode. Opcode float64 `json:"opcode"` // WebSocket frame opcode.
Mask bool `json:"mask,omitempty"` // WebSocke frame mask. Mask bool `json:"mask"` // WebSocke frame mask.
PayloadData string `json:"payloadData,omitempty"` // WebSocke frame payload data. PayloadData string `json:"payloadData"` // WebSocke frame payload data.
} }
// CachedResource information about the cached resource. // CachedResource information about the cached resource.
type CachedResource struct { type CachedResource struct {
URL string `json:"url,omitempty"` // Resource URL. This is the url of the original network request. URL string `json:"url"` // Resource URL. This is the url of the original network request.
Type page.ResourceType `json:"type,omitempty"` // Type of this resource. Type page.ResourceType `json:"type"` // Type of this resource.
Response *Response `json:"response,omitempty"` // Cached response data. Response *Response `json:"response,omitempty"` // Cached response data.
BodySize float64 `json:"bodySize,omitempty"` // Cached response body size. BodySize float64 `json:"bodySize"` // Cached response body size.
} }
// Initiator information about the request initiator. // Initiator information about the request initiator.
type Initiator struct { type Initiator struct {
Type InitiatorType `json:"type,omitempty"` // Type of this initiator. Type InitiatorType `json:"type"` // Type of this initiator.
Stack *runtime.StackTrace `json:"stack,omitempty"` // Initiator JavaScript stack trace, set for Script only. Stack *runtime.StackTrace `json:"stack,omitempty"` // Initiator JavaScript stack trace, set for Script only.
URL string `json:"url,omitempty"` // Initiator URL, set for Parser type or for Script type (when script is importing module). URL string `json:"url,omitempty"` // Initiator URL, set for Parser type or for Script type (when script is importing module).
LineNumber float64 `json:"lineNumber,omitempty"` // Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based). LineNumber float64 `json:"lineNumber,omitempty"` // Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based).
@ -440,29 +440,29 @@ type Initiator struct {
// Cookie cookie object. // Cookie cookie object.
type Cookie struct { type Cookie struct {
Name string `json:"name,omitempty"` // Cookie name. Name string `json:"name"` // Cookie name.
Value string `json:"value,omitempty"` // Cookie value. Value string `json:"value"` // Cookie value.
Domain string `json:"domain,omitempty"` // Cookie domain. Domain string `json:"domain"` // Cookie domain.
Path string `json:"path,omitempty"` // Cookie path. Path string `json:"path"` // Cookie path.
Expires float64 `json:"expires,omitempty"` // Cookie expiration date as the number of seconds since the UNIX epoch. Expires float64 `json:"expires"` // Cookie expiration date as the number of seconds since the UNIX epoch.
Size int64 `json:"size,omitempty"` // Cookie size. Size int64 `json:"size"` // Cookie size.
HTTPOnly bool `json:"httpOnly,omitempty"` // True if cookie is http-only. HTTPOnly bool `json:"httpOnly"` // True if cookie is http-only.
Secure bool `json:"secure,omitempty"` // True if cookie is secure. Secure bool `json:"secure"` // True if cookie is secure.
Session bool `json:"session,omitempty"` // True in case of session cookie. Session bool `json:"session"` // True in case of session cookie.
SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type.
} }
// AuthChallenge authorization challenge for HTTP status code 401 or 407. // AuthChallenge authorization challenge for HTTP status code 401 or 407.
type AuthChallenge struct { type AuthChallenge struct {
Source AuthChallengeSource `json:"source,omitempty"` // Source of the authentication challenge. Source AuthChallengeSource `json:"source,omitempty"` // Source of the authentication challenge.
Origin string `json:"origin,omitempty"` // Origin of the challenger. Origin string `json:"origin"` // Origin of the challenger.
Scheme string `json:"scheme,omitempty"` // The authentication scheme used, such as basic or digest Scheme string `json:"scheme"` // The authentication scheme used, such as basic or digest
Realm string `json:"realm,omitempty"` // The realm of the challenge. May be empty. Realm string `json:"realm"` // The realm of the challenge. May be empty.
} }
// AuthChallengeResponse response to an AuthChallenge. // AuthChallengeResponse response to an AuthChallenge.
type AuthChallengeResponse struct { type AuthChallengeResponse struct {
Response AuthChallengeResponseResponse `json:"response,omitempty"` // The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box. Response AuthChallengeResponseResponse `json:"response"` // The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.
Username string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials. Username string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials.
Password string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials. Password string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials.
} }

View File

@ -1571,14 +1571,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpOverlay16(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.NodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"nodeId\":") out.RawString("\"nodeId\":")
out.Int64(int64(in.NodeID)) out.Int64(int64(in.NodeID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1640,14 +1638,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpOverlay17(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.BackendNodeID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"backendNodeId\":") out.RawString("\"backendNodeId\":")
out.Int64(int64(in.BackendNodeID)) out.Int64(int64(in.BackendNodeID))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -9,14 +9,14 @@ import (
// EventNodeHighlightRequested fired when the node should be highlighted. // EventNodeHighlightRequested fired when the node should be highlighted.
// This happens after call to setInspectMode. // This happens after call to setInspectMode.
type EventNodeHighlightRequested struct { type EventNodeHighlightRequested struct {
NodeID cdp.NodeID `json:"nodeId,omitempty"` NodeID cdp.NodeID `json:"nodeId"`
} }
// EventInspectNodeRequested fired when the node should be inspected. This // EventInspectNodeRequested fired when the node should be inspected. This
// happens after call to setInspectMode or when user manually inspects an // happens after call to setInspectMode or when user manually inspects an
// element. // element.
type EventInspectNodeRequested struct { type EventInspectNodeRequested struct {
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Id of the node to inspect. BackendNodeID cdp.BackendNodeID `json:"backendNodeId"` // Id of the node to inspect.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -68,62 +68,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage(out *jwriter.Writer, in V
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.OffsetX != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"offsetX\":") out.RawString("\"offsetX\":")
out.Float64(float64(in.OffsetX)) out.Float64(float64(in.OffsetX))
}
if in.OffsetY != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"offsetY\":") out.RawString("\"offsetY\":")
out.Float64(float64(in.OffsetY)) out.Float64(float64(in.OffsetY))
}
if in.PageX != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"pageX\":") out.RawString("\"pageX\":")
out.Float64(float64(in.PageX)) out.Float64(float64(in.PageX))
}
if in.PageY != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"pageY\":") out.RawString("\"pageY\":")
out.Float64(float64(in.PageY)) out.Float64(float64(in.PageY))
}
if in.ClientWidth != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"clientWidth\":") out.RawString("\"clientWidth\":")
out.Float64(float64(in.ClientWidth)) out.Float64(float64(in.ClientWidth))
}
if in.ClientHeight != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"clientHeight\":") out.RawString("\"clientHeight\":")
out.Float64(float64(in.ClientHeight)) out.Float64(float64(in.ClientHeight))
}
if in.Scale != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scale\":") out.RawString("\"scale\":")
out.Float64(float64(in.Scale)) out.Float64(float64(in.Scale))
}
out.RawByte('}') out.RawByte('}')
} }
@ -857,54 +843,42 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage9(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.OffsetTop != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"offsetTop\":") out.RawString("\"offsetTop\":")
out.Float64(float64(in.OffsetTop)) out.Float64(float64(in.OffsetTop))
}
if in.PageScaleFactor != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"pageScaleFactor\":") out.RawString("\"pageScaleFactor\":")
out.Float64(float64(in.PageScaleFactor)) out.Float64(float64(in.PageScaleFactor))
}
if in.DeviceWidth != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"deviceWidth\":") out.RawString("\"deviceWidth\":")
out.Float64(float64(in.DeviceWidth)) out.Float64(float64(in.DeviceWidth))
}
if in.DeviceHeight != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"deviceHeight\":") out.RawString("\"deviceHeight\":")
out.Float64(float64(in.DeviceHeight)) out.Float64(float64(in.DeviceHeight))
}
if in.ScrollOffsetX != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scrollOffsetX\":") out.RawString("\"scrollOffsetX\":")
out.Float64(float64(in.ScrollOffsetX)) out.Float64(float64(in.ScrollOffsetX))
}
if in.ScrollOffsetY != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scrollOffsetY\":") out.RawString("\"scrollOffsetY\":")
out.Float64(float64(in.ScrollOffsetY)) out.Float64(float64(in.ScrollOffsetY))
}
if in.Timestamp != nil { if in.Timestamp != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1571,46 +1545,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage17(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.Int64(int64(in.ID)) out.Int64(int64(in.ID))
}
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if in.UserTypedURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"userTypedURL\":") out.RawString("\"userTypedURL\":")
out.String(string(in.UserTypedURL)) out.String(string(in.UserTypedURL))
}
if in.Title != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"title\":") out.RawString("\"title\":")
out.String(string(in.Title)) out.String(string(in.Title))
}
if in.TransitionType != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"transitionType\":") out.RawString("\"transitionType\":")
(in.TransitionType).MarshalEasyJSON(out) (in.TransitionType).MarshalEasyJSON(out)
}
out.RawByte('}') out.RawByte('}')
} }
@ -1901,38 +1865,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage21(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.PageX != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"pageX\":") out.RawString("\"pageX\":")
out.Int64(int64(in.PageX)) out.Int64(int64(in.PageX))
}
if in.PageY != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"pageY\":") out.RawString("\"pageY\":")
out.Int64(int64(in.PageY)) out.Int64(int64(in.PageY))
}
if in.ClientWidth != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"clientWidth\":") out.RawString("\"clientWidth\":")
out.Int64(int64(in.ClientWidth)) out.Int64(int64(in.ClientWidth))
}
if in.ClientHeight != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"clientHeight\":") out.RawString("\"clientHeight\":")
out.Int64(int64(in.ClientHeight)) out.Int64(int64(in.ClientHeight))
}
out.RawByte('}') out.RawByte('}')
} }
@ -2993,7 +2949,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Frame != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3004,7 +2959,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in
} else { } else {
(*in.Frame).MarshalEasyJSON(out) (*in.Frame).MarshalEasyJSON(out)
} }
}
if len(in.ChildFrames) != 0 { if len(in.ChildFrames) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3028,7 +2982,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in
out.RawByte(']') out.RawByte(']')
} }
} }
if len(in.Resources) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3050,7 +3003,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -3132,30 +3084,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.MimeType != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"mimeType\":") out.RawString("\"mimeType\":")
out.String(string(in.MimeType)) out.String(string(in.MimeType))
}
if in.LastModified != nil { if in.LastModified != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3253,14 +3199,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Visible {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"visible\":") out.RawString("\"visible\":")
out.Bool(bool(in.Visible)) out.Bool(bool(in.Visible))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3334,15 +3278,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Data != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"data\":") out.RawString("\"data\":")
out.String(string(in.Data)) out.String(string(in.Data))
}
if in.Metadata != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3353,15 +3294,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(out *jwriter.Writer, in
} else { } else {
(*in.Metadata).MarshalEasyJSON(out) (*in.Metadata).MarshalEasyJSON(out)
} }
}
if in.SessionID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"sessionId\":") out.RawString("\"sessionId\":")
out.Int64(int64(in.SessionID)) out.Int64(int64(in.SessionID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3429,38 +3367,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.IsInMainFrame {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"isInMainFrame\":") out.RawString("\"isInMainFrame\":")
out.Bool(bool(in.IsInMainFrame)) out.Bool(bool(in.IsInMainFrame))
}
if in.IsRedirect {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"isRedirect\":") out.RawString("\"isRedirect\":")
out.Bool(bool(in.IsRedirect)) out.Bool(bool(in.IsRedirect))
}
if in.NavigationID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"navigationId\":") out.RawString("\"navigationId\":")
out.Int64(int64(in.NavigationID)) out.Int64(int64(in.NavigationID))
}
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3530,7 +3460,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Timestamp != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3541,7 +3470,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in
} else { } else {
(*in.Timestamp).MarshalEasyJSON(out) (*in.Timestamp).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -3605,22 +3533,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Message != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"message\":") out.RawString("\"message\":")
out.String(string(in.Message)) out.String(string(in.Message))
}
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
out.RawByte('}') out.RawByte('}')
} }
@ -3682,14 +3606,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Result {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"result\":") out.RawString("\"result\":")
out.Bool(bool(in.Result)) out.Bool(bool(in.Result))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3869,14 +3791,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -3938,14 +3858,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -4009,22 +3927,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
if in.Delay != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"delay\":") out.RawString("\"delay\":")
out.Float64(float64(in.Delay)) out.Float64(float64(in.Delay))
}
out.RawByte('}') out.RawByte('}')
} }
@ -4153,7 +4067,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Frame != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4164,7 +4077,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(out *jwriter.Writer, in
} else { } else {
(*in.Frame).MarshalEasyJSON(out) (*in.Frame).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4226,14 +4138,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -4295,14 +4205,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -4376,22 +4284,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"frameId\":") out.RawString("\"frameId\":")
out.String(string(in.FrameID)) out.String(string(in.FrameID))
}
if in.ParentFrameID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"parentFrameId\":") out.RawString("\"parentFrameId\":")
out.String(string(in.ParentFrameID)) out.String(string(in.ParentFrameID))
}
if in.Stack != nil { if in.Stack != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -4473,7 +4377,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Timestamp != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -4484,7 +4387,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(out *jwriter.Writer, in
} else { } else {
(*in.Timestamp).MarshalEasyJSON(out) (*in.Timestamp).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -4984,38 +4886,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(out *jwriter.Writer, in
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Message != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"message\":") out.RawString("\"message\":")
out.String(string(in.Message)) out.String(string(in.Message))
}
if in.Critical != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"critical\":") out.RawString("\"critical\":")
out.Int64(int64(in.Critical)) out.Int64(int64(in.Critical))
}
if in.Line != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"line\":") out.RawString("\"line\":")
out.Int64(int64(in.Line)) out.Int64(int64(in.Line))
}
if in.Column != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"column\":") out.RawString("\"column\":")
out.Int64(int64(in.Column)) out.Int64(int64(in.Column))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -9,53 +9,53 @@ import (
// EventDomContentEventFired [no description]. // EventDomContentEventFired [no description].
type EventDomContentEventFired struct { type EventDomContentEventFired struct {
Timestamp *Bootstamp `json:"timestamp,omitempty"` Timestamp *Bootstamp `json:"timestamp"`
} }
// EventLoadEventFired [no description]. // EventLoadEventFired [no description].
type EventLoadEventFired struct { type EventLoadEventFired struct {
Timestamp *Bootstamp `json:"timestamp,omitempty"` Timestamp *Bootstamp `json:"timestamp"`
} }
// EventFrameAttached fired when frame has been attached to its parent. // EventFrameAttached fired when frame has been attached to its parent.
type EventFrameAttached struct { type EventFrameAttached struct {
FrameID cdp.FrameID `json:"frameId,omitempty"` // Id of the frame that has been attached. FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been attached.
ParentFrameID cdp.FrameID `json:"parentFrameId,omitempty"` // Parent frame identifier. ParentFrameID cdp.FrameID `json:"parentFrameId"` // Parent frame identifier.
Stack *runtime.StackTrace `json:"stack,omitempty"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script. Stack *runtime.StackTrace `json:"stack,omitempty"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script.
} }
// EventFrameNavigated fired once navigation of the frame has completed. // EventFrameNavigated fired once navigation of the frame has completed.
// Frame is now associated with the new loader. // Frame is now associated with the new loader.
type EventFrameNavigated struct { type EventFrameNavigated struct {
Frame *cdp.Frame `json:"frame,omitempty"` // Frame object. Frame *cdp.Frame `json:"frame"` // Frame object.
} }
// EventFrameDetached fired when frame has been detached from its parent. // EventFrameDetached fired when frame has been detached from its parent.
type EventFrameDetached struct { type EventFrameDetached struct {
FrameID cdp.FrameID `json:"frameId,omitempty"` // Id of the frame that has been detached. FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been detached.
} }
// EventFrameStartedLoading fired when frame has started loading. // EventFrameStartedLoading fired when frame has started loading.
type EventFrameStartedLoading struct { type EventFrameStartedLoading struct {
FrameID cdp.FrameID `json:"frameId,omitempty"` // Id of the frame that has started loading. FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has started loading.
} }
// EventFrameStoppedLoading fired when frame has stopped loading. // EventFrameStoppedLoading fired when frame has stopped loading.
type EventFrameStoppedLoading struct { type EventFrameStoppedLoading struct {
FrameID cdp.FrameID `json:"frameId,omitempty"` // Id of the frame that has stopped loading. FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has stopped loading.
} }
// EventFrameScheduledNavigation fired when frame schedules a potential // EventFrameScheduledNavigation fired when frame schedules a potential
// navigation. // navigation.
type EventFrameScheduledNavigation struct { type EventFrameScheduledNavigation struct {
FrameID cdp.FrameID `json:"frameId,omitempty"` // Id of the frame that has scheduled a navigation. FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has scheduled a navigation.
Delay float64 `json:"delay,omitempty"` // Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start. Delay float64 `json:"delay"` // Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.
} }
// EventFrameClearedScheduledNavigation fired when frame no longer has a // EventFrameClearedScheduledNavigation fired when frame no longer has a
// scheduled navigation. // scheduled navigation.
type EventFrameClearedScheduledNavigation struct { type EventFrameClearedScheduledNavigation struct {
FrameID cdp.FrameID `json:"frameId,omitempty"` // Id of the frame that has cleared its scheduled navigation. FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has cleared its scheduled navigation.
} }
// EventFrameResized [no description]. // EventFrameResized [no description].
@ -64,28 +64,28 @@ type EventFrameResized struct{}
// EventJavascriptDialogOpening fired when a JavaScript initiated dialog // EventJavascriptDialogOpening fired when a JavaScript initiated dialog
// (alert, confirm, prompt, or onbeforeunload) is about to open. // (alert, confirm, prompt, or onbeforeunload) is about to open.
type EventJavascriptDialogOpening struct { type EventJavascriptDialogOpening struct {
Message string `json:"message,omitempty"` // Message that will be displayed by the dialog. Message string `json:"message"` // Message that will be displayed by the dialog.
Type DialogType `json:"type,omitempty"` // Dialog type. Type DialogType `json:"type"` // Dialog type.
} }
// EventJavascriptDialogClosed fired when a JavaScript initiated dialog // EventJavascriptDialogClosed fired when a JavaScript initiated dialog
// (alert, confirm, prompt, or onbeforeunload) has been closed. // (alert, confirm, prompt, or onbeforeunload) has been closed.
type EventJavascriptDialogClosed struct { type EventJavascriptDialogClosed struct {
Result bool `json:"result,omitempty"` // Whether dialog was confirmed. Result bool `json:"result"` // Whether dialog was confirmed.
} }
// EventScreencastFrame compressed image data requested by the // EventScreencastFrame compressed image data requested by the
// startScreencast. // startScreencast.
type EventScreencastFrame struct { type EventScreencastFrame struct {
Data string `json:"data,omitempty"` // Base64-encoded compressed image. Data string `json:"data"` // Base64-encoded compressed image.
Metadata *ScreencastFrameMetadata `json:"metadata,omitempty"` // Screencast frame metadata. Metadata *ScreencastFrameMetadata `json:"metadata"` // Screencast frame metadata.
SessionID int64 `json:"sessionId,omitempty"` // Frame number. SessionID int64 `json:"sessionId"` // Frame number.
} }
// EventScreencastVisibilityChanged fired when the page with currently // EventScreencastVisibilityChanged fired when the page with currently
// enabled screencast was shown or hidden . // enabled screencast was shown or hidden .
type EventScreencastVisibilityChanged struct { type EventScreencastVisibilityChanged struct {
Visible bool `json:"visible,omitempty"` // True if the page is visible. Visible bool `json:"visible"` // True if the page is visible.
} }
// EventInterstitialShown fired when interstitial page was shown. // EventInterstitialShown fired when interstitial page was shown.
@ -98,10 +98,10 @@ type EventInterstitialHidden struct{}
// throttles are enabled. The navigation will be deferred until // throttles are enabled. The navigation will be deferred until
// processNavigation is called. // processNavigation is called.
type EventNavigationRequested struct { type EventNavigationRequested struct {
IsInMainFrame bool `json:"isInMainFrame,omitempty"` // Whether the navigation is taking place in the main frame or in a subframe. IsInMainFrame bool `json:"isInMainFrame"` // Whether the navigation is taking place in the main frame or in a subframe.
IsRedirect bool `json:"isRedirect,omitempty"` // Whether the navigation has encountered a server redirect or not. IsRedirect bool `json:"isRedirect"` // Whether the navigation has encountered a server redirect or not.
NavigationID int64 `json:"navigationId,omitempty"` NavigationID int64 `json:"navigationId"`
URL string `json:"url,omitempty"` // URL of requested navigation. URL string `json:"url"` // URL of requested navigation.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -91,9 +91,9 @@ func (t *ResourceType) UnmarshalJSON(buf []byte) error {
// FrameResource information about the Resource on the page. // FrameResource information about the Resource on the page.
type FrameResource struct { type FrameResource struct {
URL string `json:"url,omitempty"` // Resource URL. URL string `json:"url"` // Resource URL.
Type ResourceType `json:"type,omitempty"` // Type of this resource. Type ResourceType `json:"type"` // Type of this resource.
MimeType string `json:"mimeType,omitempty"` // Resource mimeType as determined by the browser. MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser.
LastModified *cdp.Timestamp `json:"lastModified,omitempty"` // last-modified timestamp as reported by server. LastModified *cdp.Timestamp `json:"lastModified,omitempty"` // last-modified timestamp as reported by server.
ContentSize float64 `json:"contentSize,omitempty"` // Resource content size. ContentSize float64 `json:"contentSize,omitempty"` // Resource content size.
Failed bool `json:"failed,omitempty"` // True if the resource failed to load. Failed bool `json:"failed,omitempty"` // True if the resource failed to load.
@ -103,9 +103,9 @@ type FrameResource struct {
// FrameResourceTree information about the Frame hierarchy along with their // FrameResourceTree information about the Frame hierarchy along with their
// cached resources. // cached resources.
type FrameResourceTree struct { type FrameResourceTree struct {
Frame *cdp.Frame `json:"frame,omitempty"` // Frame information for this tree item. Frame *cdp.Frame `json:"frame"` // Frame information for this tree item.
ChildFrames []*FrameResourceTree `json:"childFrames,omitempty"` // Child frames. ChildFrames []*FrameResourceTree `json:"childFrames,omitempty"` // Child frames.
Resources []*FrameResource `json:"resources,omitempty"` // Information about frame resources. Resources []*FrameResource `json:"resources"` // Information about frame resources.
} }
// ScriptIdentifier unique script identifier. // ScriptIdentifier unique script identifier.
@ -190,21 +190,21 @@ func (t *TransitionType) UnmarshalJSON(buf []byte) error {
// NavigationEntry navigation history entry. // NavigationEntry navigation history entry.
type NavigationEntry struct { type NavigationEntry struct {
ID int64 `json:"id,omitempty"` // Unique id of the navigation history entry. ID int64 `json:"id"` // Unique id of the navigation history entry.
URL string `json:"url,omitempty"` // URL of the navigation history entry. URL string `json:"url"` // URL of the navigation history entry.
UserTypedURL string `json:"userTypedURL,omitempty"` // URL that the user typed in the url bar. UserTypedURL string `json:"userTypedURL"` // URL that the user typed in the url bar.
Title string `json:"title,omitempty"` // Title of the navigation history entry. Title string `json:"title"` // Title of the navigation history entry.
TransitionType TransitionType `json:"transitionType,omitempty"` // Transition type. TransitionType TransitionType `json:"transitionType"` // Transition type.
} }
// ScreencastFrameMetadata screencast frame metadata. // ScreencastFrameMetadata screencast frame metadata.
type ScreencastFrameMetadata struct { type ScreencastFrameMetadata struct {
OffsetTop float64 `json:"offsetTop,omitempty"` // Top offset in DIP. OffsetTop float64 `json:"offsetTop"` // Top offset in DIP.
PageScaleFactor float64 `json:"pageScaleFactor,omitempty"` // Page scale factor. PageScaleFactor float64 `json:"pageScaleFactor"` // Page scale factor.
DeviceWidth float64 `json:"deviceWidth,omitempty"` // Device screen width in DIP. DeviceWidth float64 `json:"deviceWidth"` // Device screen width in DIP.
DeviceHeight float64 `json:"deviceHeight,omitempty"` // Device screen height in DIP. DeviceHeight float64 `json:"deviceHeight"` // Device screen height in DIP.
ScrollOffsetX float64 `json:"scrollOffsetX,omitempty"` // Position of horizontal scroll in CSS pixels. ScrollOffsetX float64 `json:"scrollOffsetX"` // Position of horizontal scroll in CSS pixels.
ScrollOffsetY float64 `json:"scrollOffsetY,omitempty"` // Position of vertical scroll in CSS pixels. ScrollOffsetY float64 `json:"scrollOffsetY"` // Position of vertical scroll in CSS pixels.
Timestamp *Bootstamp `json:"timestamp,omitempty"` // Frame swap timestamp. Timestamp *Bootstamp `json:"timestamp,omitempty"` // Frame swap timestamp.
} }
@ -258,10 +258,10 @@ func (t *DialogType) UnmarshalJSON(buf []byte) error {
// AppManifestError error while paring app manifest. // AppManifestError error while paring app manifest.
type AppManifestError struct { type AppManifestError struct {
Message string `json:"message,omitempty"` // Error message. Message string `json:"message"` // Error message.
Critical int64 `json:"critical,omitempty"` // If criticial, this is a non-recoverable parse error. Critical int64 `json:"critical"` // If criticial, this is a non-recoverable parse error.
Line int64 `json:"line,omitempty"` // Error line. Line int64 `json:"line"` // Error line.
Column int64 `json:"column,omitempty"` // Error column. Column int64 `json:"column"` // Error column.
} }
// NavigationResponse proceed: allow the navigation; Cancel: cancel the // NavigationResponse proceed: allow the navigation; Cancel: cancel the
@ -313,21 +313,21 @@ func (t *NavigationResponse) UnmarshalJSON(buf []byte) error {
// LayoutViewport layout viewport position and dimensions. // LayoutViewport layout viewport position and dimensions.
type LayoutViewport struct { type LayoutViewport struct {
PageX int64 `json:"pageX,omitempty"` // Horizontal offset relative to the document (CSS pixels). PageX int64 `json:"pageX"` // Horizontal offset relative to the document (CSS pixels).
PageY int64 `json:"pageY,omitempty"` // Vertical offset relative to the document (CSS pixels). PageY int64 `json:"pageY"` // Vertical offset relative to the document (CSS pixels).
ClientWidth int64 `json:"clientWidth,omitempty"` // Width (CSS pixels), excludes scrollbar if present. ClientWidth int64 `json:"clientWidth"` // Width (CSS pixels), excludes scrollbar if present.
ClientHeight int64 `json:"clientHeight,omitempty"` // Height (CSS pixels), excludes scrollbar if present. ClientHeight int64 `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present.
} }
// VisualViewport visual viewport position, dimensions, and scale. // VisualViewport visual viewport position, dimensions, and scale.
type VisualViewport struct { type VisualViewport struct {
OffsetX float64 `json:"offsetX,omitempty"` // Horizontal offset relative to the layout viewport (CSS pixels). OffsetX float64 `json:"offsetX"` // Horizontal offset relative to the layout viewport (CSS pixels).
OffsetY float64 `json:"offsetY,omitempty"` // Vertical offset relative to the layout viewport (CSS pixels). OffsetY float64 `json:"offsetY"` // Vertical offset relative to the layout viewport (CSS pixels).
PageX float64 `json:"pageX,omitempty"` // Horizontal offset relative to the document (CSS pixels). PageX float64 `json:"pageX"` // Horizontal offset relative to the document (CSS pixels).
PageY float64 `json:"pageY,omitempty"` // Vertical offset relative to the document (CSS pixels). PageY float64 `json:"pageY"` // Vertical offset relative to the document (CSS pixels).
ClientWidth float64 `json:"clientWidth,omitempty"` // Width (CSS pixels), excludes scrollbar if present. ClientWidth float64 `json:"clientWidth"` // Width (CSS pixels), excludes scrollbar if present.
ClientHeight float64 `json:"clientHeight,omitempty"` // Height (CSS pixels), excludes scrollbar if present. ClientHeight float64 `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present.
Scale float64 `json:"scale,omitempty"` // Scale relative to the ideal viewport (size at width=device-width). Scale float64 `json:"scale"` // Scale relative to the ideal viewport (size at width=device-width).
} }
// Bootstamp bootstamp type. // Bootstamp bootstamp type.

View File

@ -653,23 +653,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ScriptID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scriptId\":") out.RawString("\"scriptId\":")
out.String(string(in.ScriptID)) out.String(string(in.ScriptID))
}
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if len(in.Functions) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -691,7 +686,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(out *jwriter.Writer,
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -821,15 +815,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler9(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.Int64(int64(in.ID)) out.Int64(int64(in.ID))
}
if in.CallFrame != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -840,7 +831,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler9(out *jwriter.Writer,
} else { } else {
(*in.CallFrame).MarshalEasyJSON(out) (*in.CallFrame).MarshalEasyJSON(out)
} }
}
if in.HitCount != 0 { if in.HitCount != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1039,7 +1029,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler10(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Nodes) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1061,23 +1050,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler10(out *jwriter.Writer
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.StartTime != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startTime\":") out.RawString("\"startTime\":")
out.Float64(float64(in.StartTime)) out.Float64(float64(in.StartTime))
}
if in.EndTime != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endTime\":") out.RawString("\"endTime\":")
out.Float64(float64(in.EndTime)) out.Float64(float64(in.EndTime))
}
if len(in.Samples) != 0 { if len(in.Samples) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1179,22 +1163,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler11(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Line != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"line\":") out.RawString("\"line\":")
out.Int64(int64(in.Line)) out.Int64(int64(in.Line))
}
if in.Ticks != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"ticks\":") out.RawString("\"ticks\":")
out.Int64(int64(in.Ticks)) out.Int64(int64(in.Ticks))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1461,15 +1441,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler14(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FunctionName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"functionName\":") out.RawString("\"functionName\":")
out.String(string(in.FunctionName)) out.String(string(in.FunctionName))
}
if len(in.Ranges) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1491,15 +1468,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler14(out *jwriter.Writer
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.IsBlockCoverage {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"isBlockCoverage\":") out.RawString("\"isBlockCoverage\":")
out.Bool(bool(in.IsBlockCoverage)) out.Bool(bool(in.IsBlockCoverage))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1573,15 +1547,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler15(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.String(string(in.ID)) out.String(string(in.ID))
}
if in.Location != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1592,7 +1563,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler15(out *jwriter.Writer
} else { } else {
(*in.Location).MarshalEasyJSON(out) (*in.Location).MarshalEasyJSON(out)
} }
}
if in.Title != "" { if in.Title != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1684,15 +1654,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler16(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.String(string(in.ID)) out.String(string(in.ID))
}
if in.Location != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1703,8 +1670,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler16(out *jwriter.Writer
} else { } else {
(*in.Location).MarshalEasyJSON(out) (*in.Location).MarshalEasyJSON(out)
} }
}
if in.Profile != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1715,7 +1680,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler16(out *jwriter.Writer
} else { } else {
(*in.Profile).MarshalEasyJSON(out) (*in.Profile).MarshalEasyJSON(out)
} }
}
if in.Title != "" { if in.Title != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1907,30 +1871,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler19(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StartOffset != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"startOffset\":") out.RawString("\"startOffset\":")
out.Int64(int64(in.StartOffset)) out.Int64(int64(in.StartOffset))
}
if in.EndOffset != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"endOffset\":") out.RawString("\"endOffset\":")
out.Int64(int64(in.EndOffset)) out.Int64(int64(in.EndOffset))
}
if in.Count != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"count\":") out.RawString("\"count\":")
out.Int64(int64(in.Count)) out.Int64(int64(in.Count))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -10,16 +10,16 @@ import (
// EventConsoleProfileStarted sent when new profile recording is started // EventConsoleProfileStarted sent when new profile recording is started
// using console.profile() call. // using console.profile() call.
type EventConsoleProfileStarted struct { type EventConsoleProfileStarted struct {
ID string `json:"id,omitempty"` ID string `json:"id"`
Location *debugger.Location `json:"location,omitempty"` // Location of console.profile(). Location *debugger.Location `json:"location"` // Location of console.profile().
Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile(). Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
} }
// EventConsoleProfileFinished [no description]. // EventConsoleProfileFinished [no description].
type EventConsoleProfileFinished struct { type EventConsoleProfileFinished struct {
ID string `json:"id,omitempty"` ID string `json:"id"`
Location *debugger.Location `json:"location,omitempty"` // Location of console.profileEnd(). Location *debugger.Location `json:"location"` // Location of console.profileEnd().
Profile *Profile `json:"profile,omitempty"` Profile *Profile `json:"profile"`
Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile(). Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
} }

View File

@ -7,8 +7,8 @@ import "github.com/knq/chromedp/cdp/runtime"
// ProfileNode profile node. Holds callsite information, execution statistics // ProfileNode profile node. Holds callsite information, execution statistics
// and child nodes. // and child nodes.
type ProfileNode struct { type ProfileNode struct {
ID int64 `json:"id,omitempty"` // Unique id of the node. ID int64 `json:"id"` // Unique id of the node.
CallFrame *runtime.CallFrame `json:"callFrame,omitempty"` // Function location. CallFrame *runtime.CallFrame `json:"callFrame"` // Function location.
HitCount int64 `json:"hitCount,omitempty"` // Number of samples where this node was on top of the call stack. HitCount int64 `json:"hitCount,omitempty"` // Number of samples where this node was on top of the call stack.
Children []int64 `json:"children,omitempty"` // Child node ids. Children []int64 `json:"children,omitempty"` // Child node ids.
DeoptReason string `json:"deoptReason,omitempty"` // The reason of being not optimized. The function may be deoptimized or marked as don't optimize. DeoptReason string `json:"deoptReason,omitempty"` // The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
@ -17,9 +17,9 @@ type ProfileNode struct {
// Profile profile. // Profile profile.
type Profile struct { type Profile struct {
Nodes []*ProfileNode `json:"nodes,omitempty"` // The list of profile nodes. First item is the root node. Nodes []*ProfileNode `json:"nodes"` // The list of profile nodes. First item is the root node.
StartTime float64 `json:"startTime,omitempty"` // Profiling start timestamp in microseconds. StartTime float64 `json:"startTime"` // Profiling start timestamp in microseconds.
EndTime float64 `json:"endTime,omitempty"` // Profiling end timestamp in microseconds. EndTime float64 `json:"endTime"` // Profiling end timestamp in microseconds.
Samples []int64 `json:"samples,omitempty"` // Ids of samples top nodes. Samples []int64 `json:"samples,omitempty"` // Ids of samples top nodes.
TimeDeltas []int64 `json:"timeDeltas,omitempty"` // Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. TimeDeltas []int64 `json:"timeDeltas,omitempty"` // Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
} }
@ -27,27 +27,27 @@ type Profile struct {
// PositionTickInfo specifies a number of samples attributed to a certain // PositionTickInfo specifies a number of samples attributed to a certain
// source position. // source position.
type PositionTickInfo struct { type PositionTickInfo struct {
Line int64 `json:"line,omitempty"` // Source line number (1-based). Line int64 `json:"line"` // Source line number (1-based).
Ticks int64 `json:"ticks,omitempty"` // Number of samples attributed to the source line. Ticks int64 `json:"ticks"` // Number of samples attributed to the source line.
} }
// CoverageRange coverage data for a source range. // CoverageRange coverage data for a source range.
type CoverageRange struct { type CoverageRange struct {
StartOffset int64 `json:"startOffset,omitempty"` // JavaScript script source offset for the range start. StartOffset int64 `json:"startOffset"` // JavaScript script source offset for the range start.
EndOffset int64 `json:"endOffset,omitempty"` // JavaScript script source offset for the range end. EndOffset int64 `json:"endOffset"` // JavaScript script source offset for the range end.
Count int64 `json:"count,omitempty"` // Collected execution count of the source range. Count int64 `json:"count"` // Collected execution count of the source range.
} }
// FunctionCoverage coverage data for a JavaScript function. // FunctionCoverage coverage data for a JavaScript function.
type FunctionCoverage struct { type FunctionCoverage struct {
FunctionName string `json:"functionName,omitempty"` // JavaScript function name. FunctionName string `json:"functionName"` // JavaScript function name.
Ranges []*CoverageRange `json:"ranges,omitempty"` // Source ranges inside the function with coverage data. Ranges []*CoverageRange `json:"ranges"` // Source ranges inside the function with coverage data.
IsBlockCoverage bool `json:"isBlockCoverage,omitempty"` // Whether coverage data for this function has block granularity. IsBlockCoverage bool `json:"isBlockCoverage"` // Whether coverage data for this function has block granularity.
} }
// ScriptCoverage coverage data for a JavaScript script. // ScriptCoverage coverage data for a JavaScript script.
type ScriptCoverage struct { type ScriptCoverage struct {
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // JavaScript script id. ScriptID runtime.ScriptID `json:"scriptId"` // JavaScript script id.
URL string `json:"url,omitempty"` // JavaScript script name or url. URL string `json:"url"` // JavaScript script name or url.
Functions []*FunctionCoverage `json:"functions,omitempty"` // Functions contained in the script that has coverage data. Functions []*FunctionCoverage `json:"functions"` // Functions contained in the script that has coverage data.
} }

View File

@ -111,7 +111,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(out *jwriter.Writer, i
out.RawString("\"description\":") out.RawString("\"description\":")
out.String(string(in.Description)) out.String(string(in.Description))
} }
if len(in.CallFrames) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -133,7 +132,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(out *jwriter.Writer, i
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.Parent != nil { if in.Parent != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -617,14 +615,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime5(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.Subtype != "" { if in.Subtype != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -908,22 +904,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.Value != "" { if in.Value != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1063,14 +1055,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Value != nil { if in.Value != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1115,22 +1105,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(out *jwriter.Writer,
(*in.Set).MarshalEasyJSON(out) (*in.Set).MarshalEasyJSON(out)
} }
} }
if in.Configurable {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"configurable\":") out.RawString("\"configurable\":")
out.Bool(bool(in.Configurable)) out.Bool(bool(in.Configurable))
}
if in.Enumerable {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"enumerable\":") out.RawString("\"enumerable\":")
out.Bool(bool(in.Enumerable)) out.Bool(bool(in.Enumerable))
}
if in.WasThrown { if in.WasThrown {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1288,14 +1274,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if in.Subtype != "" { if in.Subtype != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1312,15 +1296,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(out *jwriter.Writer,
out.RawString("\"description\":") out.RawString("\"description\":")
out.String(string(in.Description)) out.String(string(in.Description))
} }
if in.Overflow {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"overflow\":") out.RawString("\"overflow\":")
out.Bool(bool(in.Overflow)) out.Bool(bool(in.Overflow))
}
if len(in.Properties) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1342,7 +1323,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(out *jwriter.Writer,
} }
out.RawByte(']') out.RawByte(']')
} }
}
if len(in.Entries) != 0 { if len(in.Entries) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1437,14 +1417,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime11(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Value != nil { if in.Value != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1810,30 +1788,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime14(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"id\":") out.RawString("\"id\":")
out.Int64(int64(in.ID)) out.Int64(int64(in.ID))
}
if in.Origin != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"origin\":") out.RawString("\"origin\":")
out.String(string(in.Origin)) out.String(string(in.Origin))
}
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if (in.AuxData).IsDefined() { if (in.AuxData).IsDefined() {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -1935,38 +1907,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime15(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ExceptionID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"exceptionId\":") out.RawString("\"exceptionId\":")
out.Int64(int64(in.ExceptionID)) out.Int64(int64(in.ExceptionID))
}
if in.Text != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"text\":") out.RawString("\"text\":")
out.String(string(in.Text)) out.String(string(in.Text))
}
if in.LineNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineNumber\":") out.RawString("\"lineNumber\":")
out.Int64(int64(in.LineNumber)) out.Int64(int64(in.LineNumber))
}
if in.ColumnNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"columnNumber\":") out.RawString("\"columnNumber\":")
out.Int64(int64(in.ColumnNumber)) out.Int64(int64(in.ColumnNumber))
}
if in.ScriptID != "" { if in.ScriptID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -2086,7 +2050,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Object != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2097,15 +2060,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(out *jwriter.Writer,
} else { } else {
(*in.Object).MarshalEasyJSON(out) (*in.Object).MarshalEasyJSON(out)
} }
}
if (in.Hints).IsDefined() {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"hints\":") out.RawString("\"hints\":")
(in.Hints).MarshalEasyJSON(out) (in.Hints).MarshalEasyJSON(out)
}
out.RawByte('}') out.RawByte('}')
} }
@ -2226,14 +2186,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime18(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ExecutionContextID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"executionContextId\":") out.RawString("\"executionContextId\":")
out.Int64(int64(in.ExecutionContextID)) out.Int64(int64(in.ExecutionContextID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -2303,7 +2261,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Context != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2314,7 +2271,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(out *jwriter.Writer,
} else { } else {
(*in.Context).MarshalEasyJSON(out) (*in.Context).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2394,7 +2350,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Timestamp != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2405,8 +2360,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(out *jwriter.Writer,
} else { } else {
(*in.Timestamp).MarshalEasyJSON(out) (*in.Timestamp).MarshalEasyJSON(out)
} }
}
if in.ExceptionDetails != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2417,7 +2370,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(out *jwriter.Writer,
} else { } else {
(*in.ExceptionDetails).MarshalEasyJSON(out) (*in.ExceptionDetails).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -2481,22 +2433,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime21(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Reason != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"reason\":") out.RawString("\"reason\":")
out.String(string(in.Reason)) out.String(string(in.Reason))
}
if in.ExceptionID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"exceptionId\":") out.RawString("\"exceptionId\":")
out.Int64(int64(in.ExceptionID)) out.Int64(int64(in.ExceptionID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -2613,15 +2561,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
(in.Type).MarshalEasyJSON(out) (in.Type).MarshalEasyJSON(out)
}
if len(in.Args) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2643,16 +2588,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(out *jwriter.Writer,
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.ExecutionContextID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"executionContextId\":") out.RawString("\"executionContextId\":")
out.Int64(int64(in.ExecutionContextID)) out.Int64(int64(in.ExecutionContextID))
}
if in.Timestamp != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -2663,7 +2604,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(out *jwriter.Writer,
} else { } else {
(*in.Timestamp).MarshalEasyJSON(out) (*in.Timestamp).MarshalEasyJSON(out)
} }
}
if in.StackTrace != nil { if in.StackTrace != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3025,7 +2965,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(out *jwriter.Writer,
(*in.Key).MarshalEasyJSON(out) (*in.Key).MarshalEasyJSON(out)
} }
} }
if in.Value != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -3036,7 +2975,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(out *jwriter.Writer,
} else { } else {
(*in.Value).MarshalEasyJSON(out) (*in.Value).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -3283,38 +3221,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime29(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Header != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"header\":") out.RawString("\"header\":")
out.String(string(in.Header)) out.String(string(in.Header))
}
if in.HasBody {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"hasBody\":") out.RawString("\"hasBody\":")
out.Bool(bool(in.HasBody)) out.Bool(bool(in.HasBody))
}
if in.FormatterObjectID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"formatterObjectId\":") out.RawString("\"formatterObjectId\":")
out.String(string(in.FormatterObjectID)) out.String(string(in.FormatterObjectID))
}
if in.BindRemoteObjectFunctionID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"bindRemoteObjectFunctionId\":") out.RawString("\"bindRemoteObjectFunctionId\":")
out.String(string(in.BindRemoteObjectFunctionID)) out.String(string(in.BindRemoteObjectFunctionID))
}
if in.ConfigObjectID != "" { if in.ConfigObjectID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -3858,46 +3788,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime34(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.FunctionName != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"functionName\":") out.RawString("\"functionName\":")
out.String(string(in.FunctionName)) out.String(string(in.FunctionName))
}
if in.ScriptID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scriptId\":") out.RawString("\"scriptId\":")
out.String(string(in.ScriptID)) out.String(string(in.ScriptID))
}
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if in.LineNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineNumber\":") out.RawString("\"lineNumber\":")
out.Int64(int64(in.LineNumber)) out.Int64(int64(in.LineNumber))
}
if in.ColumnNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"columnNumber\":") out.RawString("\"columnNumber\":")
out.Int64(int64(in.ColumnNumber)) out.Int64(int64(in.ColumnNumber))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -9,12 +9,12 @@ import (
// EventExecutionContextCreated issued when new execution context is created. // EventExecutionContextCreated issued when new execution context is created.
type EventExecutionContextCreated struct { type EventExecutionContextCreated struct {
Context *ExecutionContextDescription `json:"context,omitempty"` // A newly created execution context. Context *ExecutionContextDescription `json:"context"` // A newly created execution context.
} }
// EventExecutionContextDestroyed issued when execution context is destroyed. // EventExecutionContextDestroyed issued when execution context is destroyed.
type EventExecutionContextDestroyed struct { type EventExecutionContextDestroyed struct {
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Id of the destroyed context ExecutionContextID ExecutionContextID `json:"executionContextId"` // Id of the destroyed context
} }
// EventExecutionContextsCleared issued when all executionContexts were // EventExecutionContextsCleared issued when all executionContexts were
@ -23,22 +23,22 @@ type EventExecutionContextsCleared struct{}
// EventExceptionThrown issued when exception was thrown and unhandled. // EventExceptionThrown issued when exception was thrown and unhandled.
type EventExceptionThrown struct { type EventExceptionThrown struct {
Timestamp *Timestamp `json:"timestamp,omitempty"` // Timestamp of the exception. Timestamp *Timestamp `json:"timestamp"` // Timestamp of the exception.
ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`
} }
// EventExceptionRevoked issued when unhandled exception was revoked. // EventExceptionRevoked issued when unhandled exception was revoked.
type EventExceptionRevoked struct { type EventExceptionRevoked struct {
Reason string `json:"reason,omitempty"` // Reason describing why exception was revoked. Reason string `json:"reason"` // Reason describing why exception was revoked.
ExceptionID int64 `json:"exceptionId,omitempty"` // The id of revoked exception, as reported in exceptionUnhandled. ExceptionID int64 `json:"exceptionId"` // The id of revoked exception, as reported in exceptionUnhandled.
} }
// EventConsoleAPICalled issued when console API was called. // EventConsoleAPICalled issued when console API was called.
type EventConsoleAPICalled struct { type EventConsoleAPICalled struct {
Type APIType `json:"type,omitempty"` // Type of the call. Type APIType `json:"type"` // Type of the call.
Args []*RemoteObject `json:"args,omitempty"` // Call arguments. Args []*RemoteObject `json:"args"` // Call arguments.
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Identifier of the context where the call was made. ExecutionContextID ExecutionContextID `json:"executionContextId"` // Identifier of the context where the call was made.
Timestamp *Timestamp `json:"timestamp,omitempty"` // Call timestamp. Timestamp *Timestamp `json:"timestamp"` // Call timestamp.
StackTrace *StackTrace `json:"stackTrace,omitempty"` // Stack trace captured when the call was made. StackTrace *StackTrace `json:"stackTrace,omitempty"` // Stack trace captured when the call was made.
Context string `json:"context,omitempty"` // Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context. Context string `json:"context,omitempty"` // Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
} }
@ -46,8 +46,8 @@ type EventConsoleAPICalled struct {
// EventInspectRequested issued when object should be inspected (for example, // EventInspectRequested issued when object should be inspected (for example,
// as a result of inspect() command line API call). // as a result of inspect() command line API call).
type EventInspectRequested struct { type EventInspectRequested struct {
Object *RemoteObject `json:"object,omitempty"` Object *RemoteObject `json:"object"`
Hints easyjson.RawMessage `json:"hints,omitempty"` Hints easyjson.RawMessage `json:"hints"`
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -79,7 +79,7 @@ func (t *UnserializableValue) UnmarshalJSON(buf []byte) error {
// RemoteObject mirror object referencing original JavaScript object. // RemoteObject mirror object referencing original JavaScript object.
type RemoteObject struct { type RemoteObject struct {
Type Type `json:"type,omitempty"` // Object type. Type Type `json:"type"` // Object type.
Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only. Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only.
ClassName string `json:"className,omitempty"` // Object class (constructor) name. Specified for object type values only. ClassName string `json:"className,omitempty"` // Object class (constructor) name. Specified for object type values only.
Value easyjson.RawMessage `json:"value,omitempty"` // Remote object value in case of primitive values or JSON values (if it was requested). Value easyjson.RawMessage `json:"value,omitempty"` // Remote object value in case of primitive values or JSON values (if it was requested).
@ -92,27 +92,27 @@ type RemoteObject struct {
// CustomPreview [no description]. // CustomPreview [no description].
type CustomPreview struct { type CustomPreview struct {
Header string `json:"header,omitempty"` Header string `json:"header"`
HasBody bool `json:"hasBody,omitempty"` HasBody bool `json:"hasBody"`
FormatterObjectID RemoteObjectID `json:"formatterObjectId,omitempty"` FormatterObjectID RemoteObjectID `json:"formatterObjectId"`
BindRemoteObjectFunctionID RemoteObjectID `json:"bindRemoteObjectFunctionId,omitempty"` BindRemoteObjectFunctionID RemoteObjectID `json:"bindRemoteObjectFunctionId"`
ConfigObjectID RemoteObjectID `json:"configObjectId,omitempty"` ConfigObjectID RemoteObjectID `json:"configObjectId,omitempty"`
} }
// ObjectPreview object containing abbreviated remote object value. // ObjectPreview object containing abbreviated remote object value.
type ObjectPreview struct { type ObjectPreview struct {
Type Type `json:"type,omitempty"` // Object type. Type Type `json:"type"` // Object type.
Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only. Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only.
Description string `json:"description,omitempty"` // String representation of the object. Description string `json:"description,omitempty"` // String representation of the object.
Overflow bool `json:"overflow,omitempty"` // True iff some of the properties or entries of the original object did not fit. Overflow bool `json:"overflow"` // True iff some of the properties or entries of the original object did not fit.
Properties []*PropertyPreview `json:"properties,omitempty"` // List of the properties. Properties []*PropertyPreview `json:"properties"` // List of the properties.
Entries []*EntryPreview `json:"entries,omitempty"` // List of the entries. Specified for map and set subtype values only. Entries []*EntryPreview `json:"entries,omitempty"` // List of the entries. Specified for map and set subtype values only.
} }
// PropertyPreview [no description]. // PropertyPreview [no description].
type PropertyPreview struct { type PropertyPreview struct {
Name string `json:"name,omitempty"` // Property name. Name string `json:"name"` // Property name.
Type Type `json:"type,omitempty"` // Object type. Accessor means that the property itself is an accessor property. Type Type `json:"type"` // Object type. Accessor means that the property itself is an accessor property.
Value string `json:"value,omitempty"` // User-friendly property value string. Value string `json:"value,omitempty"` // User-friendly property value string.
ValuePreview *ObjectPreview `json:"valuePreview,omitempty"` // Nested value preview. ValuePreview *ObjectPreview `json:"valuePreview,omitempty"` // Nested value preview.
Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only. Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only.
@ -121,18 +121,18 @@ type PropertyPreview struct {
// EntryPreview [no description]. // EntryPreview [no description].
type EntryPreview struct { type EntryPreview struct {
Key *ObjectPreview `json:"key,omitempty"` // Preview of the key. Specified for map-like collection entries. Key *ObjectPreview `json:"key,omitempty"` // Preview of the key. Specified for map-like collection entries.
Value *ObjectPreview `json:"value,omitempty"` // Preview of the value. Value *ObjectPreview `json:"value"` // Preview of the value.
} }
// PropertyDescriptor object property descriptor. // PropertyDescriptor object property descriptor.
type PropertyDescriptor struct { type PropertyDescriptor struct {
Name string `json:"name,omitempty"` // Property name or symbol description. Name string `json:"name"` // Property name or symbol description.
Value *RemoteObject `json:"value,omitempty"` // The value associated with the property. Value *RemoteObject `json:"value,omitempty"` // The value associated with the property.
Writable bool `json:"writable,omitempty"` // True if the value associated with the property may be changed (data descriptors only). Writable bool `json:"writable,omitempty"` // True if the value associated with the property may be changed (data descriptors only).
Get *RemoteObject `json:"get,omitempty"` // A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). Get *RemoteObject `json:"get,omitempty"` // A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only).
Set *RemoteObject `json:"set,omitempty"` // A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). Set *RemoteObject `json:"set,omitempty"` // A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only).
Configurable bool `json:"configurable,omitempty"` // True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. Configurable bool `json:"configurable"` // True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
Enumerable bool `json:"enumerable,omitempty"` // True if this property shows up during enumeration of the properties on the corresponding object. Enumerable bool `json:"enumerable"` // True if this property shows up during enumeration of the properties on the corresponding object.
WasThrown bool `json:"wasThrown,omitempty"` // True if the result was thrown during the evaluation. WasThrown bool `json:"wasThrown,omitempty"` // True if the result was thrown during the evaluation.
IsOwn bool `json:"isOwn,omitempty"` // True if the property is owned for the object. IsOwn bool `json:"isOwn,omitempty"` // True if the property is owned for the object.
Symbol *RemoteObject `json:"symbol,omitempty"` // Property symbol object, if the property is of the symbol type. Symbol *RemoteObject `json:"symbol,omitempty"` // Property symbol object, if the property is of the symbol type.
@ -141,7 +141,7 @@ type PropertyDescriptor struct {
// InternalPropertyDescriptor object internal property descriptor. This // InternalPropertyDescriptor object internal property descriptor. This
// property isn't normally visible in JavaScript code. // property isn't normally visible in JavaScript code.
type InternalPropertyDescriptor struct { type InternalPropertyDescriptor struct {
Name string `json:"name,omitempty"` // Conventional property name. Name string `json:"name"` // Conventional property name.
Value *RemoteObject `json:"value,omitempty"` // The value associated with the property. Value *RemoteObject `json:"value,omitempty"` // The value associated with the property.
} }
@ -164,19 +164,19 @@ func (t ExecutionContextID) Int64() int64 {
// ExecutionContextDescription description of an isolated world. // ExecutionContextDescription description of an isolated world.
type ExecutionContextDescription struct { type ExecutionContextDescription struct {
ID ExecutionContextID `json:"id,omitempty"` // Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. ID ExecutionContextID `json:"id"` // Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
Origin string `json:"origin,omitempty"` // Execution context origin. Origin string `json:"origin"` // Execution context origin.
Name string `json:"name,omitempty"` // Human readable name describing given context. Name string `json:"name"` // Human readable name describing given context.
AuxData easyjson.RawMessage `json:"auxData,omitempty"` AuxData easyjson.RawMessage `json:"auxData,omitempty"`
} }
// ExceptionDetails detailed information about exception (or error) that was // ExceptionDetails detailed information about exception (or error) that was
// thrown during script compilation or execution. // thrown during script compilation or execution.
type ExceptionDetails struct { type ExceptionDetails struct {
ExceptionID int64 `json:"exceptionId,omitempty"` // Exception id. ExceptionID int64 `json:"exceptionId"` // Exception id.
Text string `json:"text,omitempty"` // Exception text, which should be used together with exception object when available. Text string `json:"text"` // Exception text, which should be used together with exception object when available.
LineNumber int64 `json:"lineNumber,omitempty"` // Line number of the exception location (0-based). LineNumber int64 `json:"lineNumber"` // Line number of the exception location (0-based).
ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number of the exception location (0-based). ColumnNumber int64 `json:"columnNumber"` // Column number of the exception location (0-based).
ScriptID ScriptID `json:"scriptId,omitempty"` // Script ID of the exception location. ScriptID ScriptID `json:"scriptId,omitempty"` // Script ID of the exception location.
URL string `json:"url,omitempty"` // URL of the exception location, to be used when the script was not reported. URL string `json:"url,omitempty"` // URL of the exception location, to be used when the script was not reported.
StackTrace *StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace if available. StackTrace *StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace if available.
@ -224,17 +224,17 @@ func (t *Timestamp) UnmarshalJSON(buf []byte) error {
// CallFrame stack entry for runtime errors and assertions. // CallFrame stack entry for runtime errors and assertions.
type CallFrame struct { type CallFrame struct {
FunctionName string `json:"functionName,omitempty"` // JavaScript function name. FunctionName string `json:"functionName"` // JavaScript function name.
ScriptID ScriptID `json:"scriptId,omitempty"` // JavaScript script id. ScriptID ScriptID `json:"scriptId"` // JavaScript script id.
URL string `json:"url,omitempty"` // JavaScript script name or url. URL string `json:"url"` // JavaScript script name or url.
LineNumber int64 `json:"lineNumber,omitempty"` // JavaScript script line number (0-based). LineNumber int64 `json:"lineNumber"` // JavaScript script line number (0-based).
ColumnNumber int64 `json:"columnNumber,omitempty"` // JavaScript script column number (0-based). ColumnNumber int64 `json:"columnNumber"` // JavaScript script column number (0-based).
} }
// StackTrace call frames for assertions or error messages. // StackTrace call frames for assertions or error messages.
type StackTrace struct { type StackTrace struct {
Description string `json:"description,omitempty"` // String label of this stack trace. For async traces this may be a name of the function that initiated the async call. Description string `json:"description,omitempty"` // String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
CallFrames []*CallFrame `json:"callFrames,omitempty"` // JavaScript function name. CallFrames []*CallFrame `json:"callFrames"` // JavaScript function name.
Parent *StackTrace `json:"parent,omitempty"` // Asynchronous JavaScript stack trace that preceded this stack, if available. Parent *StackTrace `json:"parent,omitempty"` // Asynchronous JavaScript stack trace that preceded this stack, if available.
PromiseCreationFrame *CallFrame `json:"promiseCreationFrame,omitempty"` // Creation frame of the Promise which produced the next synchronous trace when resolved, if available. PromiseCreationFrame *CallFrame `json:"promiseCreationFrame,omitempty"` // Creation frame of the Promise which produced the next synchronous trace when resolved, if available.
} }

View File

@ -226,22 +226,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema2(out *jwriter.Writer, i
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Name != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"name\":") out.RawString("\"name\":")
out.String(string(in.Name)) out.String(string(in.Name))
}
if in.Version != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"version\":") out.RawString("\"version\":")
out.String(string(in.Version)) out.String(string(in.Version))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -4,6 +4,6 @@ package schema
// Domain description of the protocol domain. // Domain description of the protocol domain.
type Domain struct { type Domain struct {
Name string `json:"name,omitempty"` // Domain name. Name string `json:"name"` // Domain name.
Version string `json:"version,omitempty"` // Domain version. Version string `json:"version"` // Domain version.
} }

View File

@ -58,38 +58,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.SecurityState != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"securityState\":") out.RawString("\"securityState\":")
(in.SecurityState).MarshalEasyJSON(out) (in.SecurityState).MarshalEasyJSON(out)
}
if in.Summary != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"summary\":") out.RawString("\"summary\":")
out.String(string(in.Summary)) out.String(string(in.Summary))
}
if in.Description != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"description\":") out.RawString("\"description\":")
out.String(string(in.Description)) out.String(string(in.Description))
}
if in.HasCertificate {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"hasCertificate\":") out.RawString("\"hasCertificate\":")
out.Bool(bool(in.HasCertificate)) out.Bool(bool(in.HasCertificate))
}
out.RawByte('}') out.RawByte('}')
} }
@ -289,62 +281,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.RanMixedContent {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"ranMixedContent\":") out.RawString("\"ranMixedContent\":")
out.Bool(bool(in.RanMixedContent)) out.Bool(bool(in.RanMixedContent))
}
if in.DisplayedMixedContent {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"displayedMixedContent\":") out.RawString("\"displayedMixedContent\":")
out.Bool(bool(in.DisplayedMixedContent)) out.Bool(bool(in.DisplayedMixedContent))
}
if in.ContainedMixedForm {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"containedMixedForm\":") out.RawString("\"containedMixedForm\":")
out.Bool(bool(in.ContainedMixedForm)) out.Bool(bool(in.ContainedMixedForm))
}
if in.RanContentWithCertErrors {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"ranContentWithCertErrors\":") out.RawString("\"ranContentWithCertErrors\":")
out.Bool(bool(in.RanContentWithCertErrors)) out.Bool(bool(in.RanContentWithCertErrors))
}
if in.DisplayedContentWithCertErrors {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"displayedContentWithCertErrors\":") out.RawString("\"displayedContentWithCertErrors\":")
out.Bool(bool(in.DisplayedContentWithCertErrors)) out.Bool(bool(in.DisplayedContentWithCertErrors))
}
if in.RanInsecureContentStyle != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"ranInsecureContentStyle\":") out.RawString("\"ranInsecureContentStyle\":")
(in.RanInsecureContentStyle).MarshalEasyJSON(out) (in.RanInsecureContentStyle).MarshalEasyJSON(out)
}
if in.DisplayedInsecureContentStyle != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"displayedInsecureContentStyle\":") out.RawString("\"displayedInsecureContentStyle\":")
(in.DisplayedInsecureContentStyle).MarshalEasyJSON(out) (in.DisplayedInsecureContentStyle).MarshalEasyJSON(out)
}
out.RawByte('}') out.RawByte('}')
} }
@ -526,23 +504,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.SecurityState != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"securityState\":") out.RawString("\"securityState\":")
(in.SecurityState).MarshalEasyJSON(out) (in.SecurityState).MarshalEasyJSON(out)
}
if in.SchemeIsCryptographic {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"schemeIsCryptographic\":") out.RawString("\"schemeIsCryptographic\":")
out.Bool(bool(in.SchemeIsCryptographic)) out.Bool(bool(in.SchemeIsCryptographic))
}
if len(in.Explanations) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -564,8 +537,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(out *jwriter.Writer,
} }
out.RawByte(']') out.RawByte(']')
} }
}
if in.InsecureContentStatus != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -576,7 +547,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(out *jwriter.Writer,
} else { } else {
(*in.InsecureContentStatus).MarshalEasyJSON(out) (*in.InsecureContentStatus).MarshalEasyJSON(out)
} }
}
if in.Summary != "" { if in.Summary != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -650,30 +620,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity6(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.EventID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"eventId\":") out.RawString("\"eventId\":")
out.Int64(int64(in.EventID)) out.Int64(int64(in.EventID))
}
if in.ErrorType != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"errorType\":") out.RawString("\"errorType\":")
out.String(string(in.ErrorType)) out.String(string(in.ErrorType))
}
if in.RequestURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"requestURL\":") out.RawString("\"requestURL\":")
out.String(string(in.RequestURL)) out.String(string(in.RequestURL))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -8,10 +8,10 @@ import (
// EventSecurityStateChanged the security state of the page changed. // EventSecurityStateChanged the security state of the page changed.
type EventSecurityStateChanged struct { type EventSecurityStateChanged struct {
SecurityState State `json:"securityState,omitempty"` // Security state. SecurityState State `json:"securityState"` // Security state.
SchemeIsCryptographic bool `json:"schemeIsCryptographic,omitempty"` // True if the page was loaded over cryptographic transport such as HTTPS. SchemeIsCryptographic bool `json:"schemeIsCryptographic"` // True if the page was loaded over cryptographic transport such as HTTPS.
Explanations []*StateExplanation `json:"explanations,omitempty"` // List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included. Explanations []*StateExplanation `json:"explanations"` // List of explanations for the security state. If the overall security state is `insecure` or `warning`, at least one corresponding explanation should be included.
InsecureContentStatus *InsecureContentStatus `json:"insecureContentStatus,omitempty"` // Information about insecure content on the page. InsecureContentStatus *InsecureContentStatus `json:"insecureContentStatus"` // Information about insecure content on the page.
Summary string `json:"summary,omitempty"` // Overrides user-visible description of the state. Summary string `json:"summary,omitempty"` // Overrides user-visible description of the state.
} }
@ -20,9 +20,9 @@ type EventSecurityStateChanged struct {
// handleCertificateError command. Note: this event does not fire if the // handleCertificateError command. Note: this event does not fire if the
// certificate error has been allowed internally. // certificate error has been allowed internally.
type EventCertificateError struct { type EventCertificateError struct {
EventID int64 `json:"eventId,omitempty"` // The ID of the event. EventID int64 `json:"eventId"` // The ID of the event.
ErrorType string `json:"errorType,omitempty"` // The type of the error. ErrorType string `json:"errorType"` // The type of the error.
RequestURL string `json:"requestURL,omitempty"` // The url that was requested. RequestURL string `json:"requestURL"` // The url that was requested.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -75,21 +75,21 @@ func (t *State) UnmarshalJSON(buf []byte) error {
// StateExplanation an explanation of an factor contributing to the security // StateExplanation an explanation of an factor contributing to the security
// state. // state.
type StateExplanation struct { type StateExplanation struct {
SecurityState State `json:"securityState,omitempty"` // Security state representing the severity of the factor being explained. SecurityState State `json:"securityState"` // Security state representing the severity of the factor being explained.
Summary string `json:"summary,omitempty"` // Short phrase describing the type of factor. Summary string `json:"summary"` // Short phrase describing the type of factor.
Description string `json:"description,omitempty"` // Full text explanation of the factor. Description string `json:"description"` // Full text explanation of the factor.
HasCertificate bool `json:"hasCertificate,omitempty"` // True if the page has a certificate. HasCertificate bool `json:"hasCertificate"` // True if the page has a certificate.
} }
// InsecureContentStatus information about insecure content on the page. // InsecureContentStatus information about insecure content on the page.
type InsecureContentStatus struct { type InsecureContentStatus struct {
RanMixedContent bool `json:"ranMixedContent,omitempty"` // True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts. RanMixedContent bool `json:"ranMixedContent"` // True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts.
DisplayedMixedContent bool `json:"displayedMixedContent,omitempty"` // True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images. DisplayedMixedContent bool `json:"displayedMixedContent"` // True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images.
ContainedMixedForm bool `json:"containedMixedForm,omitempty"` // True if the page was loaded over HTTPS and contained a form targeting an insecure url. ContainedMixedForm bool `json:"containedMixedForm"` // True if the page was loaded over HTTPS and contained a form targeting an insecure url.
RanContentWithCertErrors bool `json:"ranContentWithCertErrors,omitempty"` // True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors. RanContentWithCertErrors bool `json:"ranContentWithCertErrors"` // True if the page was loaded over HTTPS without certificate errors, and ran content such as scripts that were loaded with certificate errors.
DisplayedContentWithCertErrors bool `json:"displayedContentWithCertErrors,omitempty"` // True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors. DisplayedContentWithCertErrors bool `json:"displayedContentWithCertErrors"` // True if the page was loaded over HTTPS without certificate errors, and displayed content such as images that were loaded with certificate errors.
RanInsecureContentStyle State `json:"ranInsecureContentStyle,omitempty"` // Security state representing a page that ran insecure content. RanInsecureContentStyle State `json:"ranInsecureContentStyle"` // Security state representing a page that ran insecure content.
DisplayedInsecureContentStyle State `json:"displayedInsecureContentStyle,omitempty"` // Security state representing a page that displayed insecure content. DisplayedInsecureContentStyle State `json:"displayedInsecureContentStyle"` // Security state representing a page that displayed insecure content.
} }
// CertificateErrorAction the action to take when a certificate error occurs. // CertificateErrorAction the action to take when a certificate error occurs.

View File

@ -90,46 +90,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(out *jwriter.Wri
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.VersionID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"versionId\":") out.RawString("\"versionId\":")
out.String(string(in.VersionID)) out.String(string(in.VersionID))
}
if in.RegistrationID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"registrationId\":") out.RawString("\"registrationId\":")
out.String(string(in.RegistrationID)) out.String(string(in.RegistrationID))
}
if in.ScriptURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scriptURL\":") out.RawString("\"scriptURL\":")
out.String(string(in.ScriptURL)) out.String(string(in.ScriptURL))
}
if in.RunningStatus != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"runningStatus\":") out.RawString("\"runningStatus\":")
(in.RunningStatus).MarshalEasyJSON(out) (in.RunningStatus).MarshalEasyJSON(out)
}
if in.Status != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"status\":") out.RawString("\"status\":")
(in.Status).MarshalEasyJSON(out) (in.Status).MarshalEasyJSON(out)
}
if in.ScriptLastModified != 0 { if in.ScriptLastModified != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -640,30 +630,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.RegistrationID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"registrationId\":") out.RawString("\"registrationId\":")
out.String(string(in.RegistrationID)) out.String(string(in.RegistrationID))
}
if in.ScopeURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"scopeURL\":") out.RawString("\"scopeURL\":")
out.String(string(in.ScopeURL)) out.String(string(in.ScopeURL))
}
if in.IsDeleted {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"isDeleted\":") out.RawString("\"isDeleted\":")
out.Bool(bool(in.IsDeleted)) out.Bool(bool(in.IsDeleted))
}
out.RawByte('}') out.RawByte('}')
} }
@ -821,7 +805,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(out *jwriter.Wr
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Versions) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -843,7 +826,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(out *jwriter.Wr
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -934,7 +916,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(out *jwriter.W
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Registrations) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -956,7 +937,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(out *jwriter.W
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1026,7 +1006,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(out *jwriter.W
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ErrorMessage != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1037,7 +1016,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(out *jwriter.W
} else { } else {
(*in.ErrorMessage).MarshalEasyJSON(out) (*in.ErrorMessage).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1109,54 +1087,42 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker12(out *jwriter.W
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.ErrorMessage != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"errorMessage\":") out.RawString("\"errorMessage\":")
out.String(string(in.ErrorMessage)) out.String(string(in.ErrorMessage))
}
if in.RegistrationID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"registrationId\":") out.RawString("\"registrationId\":")
out.String(string(in.RegistrationID)) out.String(string(in.RegistrationID))
}
if in.VersionID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"versionId\":") out.RawString("\"versionId\":")
out.String(string(in.VersionID)) out.String(string(in.VersionID))
}
if in.SourceURL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"sourceURL\":") out.RawString("\"sourceURL\":")
out.String(string(in.SourceURL)) out.String(string(in.SourceURL))
}
if in.LineNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"lineNumber\":") out.RawString("\"lineNumber\":")
out.Int64(int64(in.LineNumber)) out.Int64(int64(in.LineNumber))
}
if in.ColumnNumber != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"columnNumber\":") out.RawString("\"columnNumber\":")
out.Int64(int64(in.ColumnNumber)) out.Int64(int64(in.ColumnNumber))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -8,17 +8,17 @@ import (
// EventWorkerRegistrationUpdated [no description]. // EventWorkerRegistrationUpdated [no description].
type EventWorkerRegistrationUpdated struct { type EventWorkerRegistrationUpdated struct {
Registrations []*Registration `json:"registrations,omitempty"` Registrations []*Registration `json:"registrations"`
} }
// EventWorkerVersionUpdated [no description]. // EventWorkerVersionUpdated [no description].
type EventWorkerVersionUpdated struct { type EventWorkerVersionUpdated struct {
Versions []*Version `json:"versions,omitempty"` Versions []*Version `json:"versions"`
} }
// EventWorkerErrorReported [no description]. // EventWorkerErrorReported [no description].
type EventWorkerErrorReported struct { type EventWorkerErrorReported struct {
ErrorMessage *ErrorMessage `json:"errorMessage,omitempty"` ErrorMessage *ErrorMessage `json:"errorMessage"`
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -13,9 +13,9 @@ import (
// Registration serviceWorker registration. // Registration serviceWorker registration.
type Registration struct { type Registration struct {
RegistrationID string `json:"registrationId,omitempty"` RegistrationID string `json:"registrationId"`
ScopeURL string `json:"scopeURL,omitempty"` ScopeURL string `json:"scopeURL"`
IsDeleted bool `json:"isDeleted,omitempty"` IsDeleted bool `json:"isDeleted"`
} }
// VersionRunningStatus [no description]. // VersionRunningStatus [no description].
@ -122,11 +122,11 @@ func (t *VersionStatus) UnmarshalJSON(buf []byte) error {
// Version serviceWorker version. // Version serviceWorker version.
type Version struct { type Version struct {
VersionID string `json:"versionId,omitempty"` VersionID string `json:"versionId"`
RegistrationID string `json:"registrationId,omitempty"` RegistrationID string `json:"registrationId"`
ScriptURL string `json:"scriptURL,omitempty"` ScriptURL string `json:"scriptURL"`
RunningStatus VersionRunningStatus `json:"runningStatus,omitempty"` RunningStatus VersionRunningStatus `json:"runningStatus"`
Status VersionStatus `json:"status,omitempty"` Status VersionStatus `json:"status"`
ScriptLastModified float64 `json:"scriptLastModified,omitempty"` // The Last-Modified header value of the main script. ScriptLastModified float64 `json:"scriptLastModified,omitempty"` // The Last-Modified header value of the main script.
ScriptResponseTime float64 `json:"scriptResponseTime,omitempty"` // The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated. ScriptResponseTime float64 `json:"scriptResponseTime,omitempty"` // The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated.
ControlledClients []target.ID `json:"controlledClients,omitempty"` ControlledClients []target.ID `json:"controlledClients,omitempty"`
@ -135,10 +135,10 @@ type Version struct {
// ErrorMessage serviceWorker error message. // ErrorMessage serviceWorker error message.
type ErrorMessage struct { type ErrorMessage struct {
ErrorMessage string `json:"errorMessage,omitempty"` ErrorMessage string `json:"errorMessage"`
RegistrationID string `json:"registrationId,omitempty"` RegistrationID string `json:"registrationId"`
VersionID string `json:"versionId,omitempty"` VersionID string `json:"versionId"`
SourceURL string `json:"sourceURL,omitempty"` SourceURL string `json:"sourceURL"`
LineNumber int64 `json:"lineNumber,omitempty"` LineNumber int64 `json:"lineNumber"`
ColumnNumber int64 `json:"columnNumber,omitempty"` ColumnNumber int64 `json:"columnNumber"`
} }

View File

@ -54,22 +54,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(out *jwriter.Writer, i
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.StorageType != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"storageType\":") out.RawString("\"storageType\":")
(in.StorageType).MarshalEasyJSON(out) (in.StorageType).MarshalEasyJSON(out)
}
if in.Usage != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"usage\":") out.RawString("\"usage\":")
out.Float64(float64(in.Usage)) out.Float64(float64(in.Usage))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -81,6 +81,6 @@ func (t *Type) UnmarshalJSON(buf []byte) error {
// UsageForType usage for a storage type. // UsageForType usage for a storage type.
type UsageForType struct { type UsageForType struct {
StorageType Type `json:"storageType,omitempty"` // Name of storage type. StorageType Type `json:"storageType"` // Name of storage type.
Usage float64 `json:"usage,omitempty"` // Storage usage (bytes). Usage float64 `json:"usage"` // Storage usage (bytes).
} }

View File

@ -278,7 +278,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Devices) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -300,7 +299,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Write
} }
out.RawByte(']') out.RawByte(']')
} }
}
if (in.AuxAttributes).IsDefined() { if (in.AuxAttributes).IsDefined() {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
@ -317,7 +315,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Write
out.RawString("\"featureStatus\":") out.RawString("\"featureStatus\":")
(in.FeatureStatus).MarshalEasyJSON(out) (in.FeatureStatus).MarshalEasyJSON(out)
} }
if len(in.DriverBugWorkarounds) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -335,7 +332,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Write
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -403,38 +399,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(out *jwriter.Write
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.VendorID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"vendorId\":") out.RawString("\"vendorId\":")
out.Float64(float64(in.VendorID)) out.Float64(float64(in.VendorID))
}
if in.DeviceID != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"deviceId\":") out.RawString("\"deviceId\":")
out.Float64(float64(in.DeviceID)) out.Float64(float64(in.DeviceID))
}
if in.VendorString != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"vendorString\":") out.RawString("\"vendorString\":")
out.String(string(in.VendorString)) out.String(string(in.VendorString))
}
if in.DeviceString != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"deviceString\":") out.RawString("\"deviceString\":")
out.String(string(in.DeviceString)) out.String(string(in.DeviceString))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -6,16 +6,16 @@ import "github.com/mailru/easyjson"
// GPUDevice describes a single graphics processor (GPU). // GPUDevice describes a single graphics processor (GPU).
type GPUDevice struct { type GPUDevice struct {
VendorID float64 `json:"vendorId,omitempty"` // PCI ID of the GPU vendor, if available; 0 otherwise. VendorID float64 `json:"vendorId"` // PCI ID of the GPU vendor, if available; 0 otherwise.
DeviceID float64 `json:"deviceId,omitempty"` // PCI ID of the GPU device, if available; 0 otherwise. DeviceID float64 `json:"deviceId"` // PCI ID of the GPU device, if available; 0 otherwise.
VendorString string `json:"vendorString,omitempty"` // String description of the GPU vendor, if the PCI ID is not available. VendorString string `json:"vendorString"` // String description of the GPU vendor, if the PCI ID is not available.
DeviceString string `json:"deviceString,omitempty"` // String description of the GPU device, if the PCI ID is not available. DeviceString string `json:"deviceString"` // String description of the GPU device, if the PCI ID is not available.
} }
// GPUInfo provides information about the GPU(s) on the system. // GPUInfo provides information about the GPU(s) on the system.
type GPUInfo struct { type GPUInfo struct {
Devices []*GPUDevice `json:"devices,omitempty"` // The graphics devices on the system. Element 0 is the primary GPU. Devices []*GPUDevice `json:"devices"` // The graphics devices on the system. Element 0 is the primary GPU.
AuxAttributes easyjson.RawMessage `json:"auxAttributes,omitempty"` AuxAttributes easyjson.RawMessage `json:"auxAttributes,omitempty"`
FeatureStatus easyjson.RawMessage `json:"featureStatus,omitempty"` FeatureStatus easyjson.RawMessage `json:"featureStatus,omitempty"`
DriverBugWorkarounds []string `json:"driverBugWorkarounds,omitempty"` // An optional array of GPU driver bug workarounds. DriverBugWorkarounds []string `json:"driverBugWorkarounds"` // An optional array of GPU driver bug workarounds.
} }

View File

@ -449,22 +449,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(out *jwriter.Writer, i
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Host != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"host\":") out.RawString("\"host\":")
out.String(string(in.Host)) out.String(string(in.Host))
}
if in.Port != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"port\":") out.RawString("\"port\":")
out.Int64(int64(in.Port)) out.Int64(int64(in.Port))
}
out.RawByte('}') out.RawByte('}')
} }
@ -534,46 +530,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(out *jwriter.Writer, i
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.TargetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"targetId\":") out.RawString("\"targetId\":")
out.String(string(in.TargetID)) out.String(string(in.TargetID))
}
if in.Type != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"type\":") out.RawString("\"type\":")
out.String(string(in.Type)) out.String(string(in.Type))
}
if in.Title != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"title\":") out.RawString("\"title\":")
out.String(string(in.Title)) out.String(string(in.Title))
}
if in.URL != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"url\":") out.RawString("\"url\":")
out.String(string(in.URL)) out.String(string(in.URL))
}
if in.Attached {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"attached\":") out.RawString("\"attached\":")
out.Bool(bool(in.Attached)) out.Bool(bool(in.Attached))
}
out.RawByte('}') out.RawByte('}')
} }
@ -963,7 +949,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.TargetInfo != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -974,7 +959,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(out *jwriter.Writer,
} else { } else {
(*in.TargetInfo).MarshalEasyJSON(out) (*in.TargetInfo).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1036,14 +1020,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget12(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.TargetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"targetId\":") out.RawString("\"targetId\":")
out.String(string(in.TargetID)) out.String(string(in.TargetID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1113,7 +1095,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.TargetInfo != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1124,7 +1105,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(out *jwriter.Writer,
} else { } else {
(*in.TargetInfo).MarshalEasyJSON(out) (*in.TargetInfo).MarshalEasyJSON(out)
} }
}
out.RawByte('}') out.RawByte('}')
} }
@ -1188,22 +1168,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.TargetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"targetId\":") out.RawString("\"targetId\":")
out.String(string(in.TargetID)) out.String(string(in.TargetID))
}
if in.Message != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"message\":") out.RawString("\"message\":")
out.String(string(in.Message)) out.String(string(in.Message))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1265,14 +1241,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.TargetID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"targetId\":") out.RawString("\"targetId\":")
out.String(string(in.TargetID)) out.String(string(in.TargetID))
}
out.RawByte('}') out.RawByte('}')
} }
@ -1344,7 +1318,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.TargetInfo != nil {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -1355,15 +1328,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(out *jwriter.Writer,
} else { } else {
(*in.TargetInfo).MarshalEasyJSON(out) (*in.TargetInfo).MarshalEasyJSON(out)
} }
}
if in.WaitingForDebugger {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"waitingForDebugger\":") out.RawString("\"waitingForDebugger\":")
out.Bool(bool(in.WaitingForDebugger)) out.Bool(bool(in.WaitingForDebugger))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -8,38 +8,38 @@ import (
// EventTargetCreated issued when a possible inspection target is created. // EventTargetCreated issued when a possible inspection target is created.
type EventTargetCreated struct { type EventTargetCreated struct {
TargetInfo *Info `json:"targetInfo,omitempty"` TargetInfo *Info `json:"targetInfo"`
} }
// EventTargetInfoChanged issued when some information about a target has // EventTargetInfoChanged issued when some information about a target has
// changed. This only happens between targetCreated and targetDestroyed. // changed. This only happens between targetCreated and targetDestroyed.
type EventTargetInfoChanged struct { type EventTargetInfoChanged struct {
TargetInfo *Info `json:"targetInfo,omitempty"` TargetInfo *Info `json:"targetInfo"`
} }
// EventTargetDestroyed issued when a target is destroyed. // EventTargetDestroyed issued when a target is destroyed.
type EventTargetDestroyed struct { type EventTargetDestroyed struct {
TargetID ID `json:"targetId,omitempty"` TargetID ID `json:"targetId"`
} }
// EventAttachedToTarget issued when attached to target because of // EventAttachedToTarget issued when attached to target because of
// auto-attach or attachToTarget command. // auto-attach or attachToTarget command.
type EventAttachedToTarget struct { type EventAttachedToTarget struct {
TargetInfo *Info `json:"targetInfo,omitempty"` TargetInfo *Info `json:"targetInfo"`
WaitingForDebugger bool `json:"waitingForDebugger,omitempty"` WaitingForDebugger bool `json:"waitingForDebugger"`
} }
// EventDetachedFromTarget issued when detached from target for any reason // EventDetachedFromTarget issued when detached from target for any reason
// (including detachFromTarget command). // (including detachFromTarget command).
type EventDetachedFromTarget struct { type EventDetachedFromTarget struct {
TargetID ID `json:"targetId,omitempty"` TargetID ID `json:"targetId"`
} }
// EventReceivedMessageFromTarget notifies about new protocol message from // EventReceivedMessageFromTarget notifies about new protocol message from
// attached target. // attached target.
type EventReceivedMessageFromTarget struct { type EventReceivedMessageFromTarget struct {
TargetID ID `json:"targetId,omitempty"` TargetID ID `json:"targetId"`
Message string `json:"message,omitempty"` Message string `json:"message"`
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -20,15 +20,15 @@ func (t BrowserContextID) String() string {
// Info [no description]. // Info [no description].
type Info struct { type Info struct {
TargetID ID `json:"targetId,omitempty"` TargetID ID `json:"targetId"`
Type string `json:"type,omitempty"` Type string `json:"type"`
Title string `json:"title,omitempty"` Title string `json:"title"`
URL string `json:"url,omitempty"` URL string `json:"url"`
Attached bool `json:"attached,omitempty"` // Whether the target has an attached client. Attached bool `json:"attached"` // Whether the target has an attached client.
} }
// RemoteLocation [no description]. // RemoteLocation [no description].
type RemoteLocation struct { type RemoteLocation struct {
Host string `json:"host,omitempty"` Host string `json:"host"`
Port int64 `json:"port,omitempty"` Port int64 `json:"port"`
} }

View File

@ -121,22 +121,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(out *jwriter.Writer
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if in.Port != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"port\":") out.RawString("\"port\":")
out.Int64(int64(in.Port)) out.Int64(int64(in.Port))
}
if in.ConnectionID != "" {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
first = false first = false
out.RawString("\"connectionId\":") out.RawString("\"connectionId\":")
out.String(string(in.ConnectionID)) out.String(string(in.ConnectionID))
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -9,8 +9,8 @@ import (
// EventAccepted informs that port was successfully bound and got a specified // EventAccepted informs that port was successfully bound and got a specified
// connection id. // connection id.
type EventAccepted struct { type EventAccepted struct {
Port int64 `json:"port,omitempty"` // Port number that was successfully bound. Port int64 `json:"port"` // Port number that was successfully bound.
ConnectionID string `json:"connectionId,omitempty"` // Connection id to be used. ConnectionID string `json:"connectionId"` // Connection id to be used.
} }
// EventTypes all event types in the domain. // EventTypes all event types in the domain.

View File

@ -915,7 +915,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(out *jwriter.Writer,
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
if len(in.Value) != 0 {
if !first { if !first {
out.RawByte(',') out.RawByte(',')
} }
@ -933,7 +932,6 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(out *jwriter.Writer,
} }
out.RawByte(']') out.RawByte(']')
} }
}
out.RawByte('}') out.RawByte('}')
} }

View File

@ -12,7 +12,7 @@ import (
// tracing is stopped collected events will be send as a sequence of // tracing is stopped collected events will be send as a sequence of
// dataCollected events followed by tracingComplete event. // dataCollected events followed by tracingComplete event.
type EventDataCollected struct { type EventDataCollected struct {
Value []easyjson.RawMessage `json:"value,omitempty"` Value []easyjson.RawMessage `json:"value"`
} }
// EventTracingComplete signals that tracing is stopped and there is no trace // EventTracingComplete signals that tracing is stopped and there is no trace

View File

@ -132,26 +132,31 @@ func FixDomains(domains []*internal.Domain) {
Name: "id", Name: "id",
Type: internal.TypeInteger, Type: internal.TypeInteger,
Description: "Unique message identifier.", Description: "Unique message identifier.",
Optional: true,
}, },
{ {
Name: "method", Name: "method",
Ref: "Inspector.MethodType", Ref: "Inspector.MethodType",
Description: "Event or command type.", Description: "Event or command type.",
Optional: true,
}, },
{ {
Name: "params", Name: "params",
Type: internal.TypeAny, Type: internal.TypeAny,
Description: "Event or command parameters.", Description: "Event or command parameters.",
Optional: true,
}, },
{ {
Name: "result", Name: "result",
Type: internal.TypeAny, Type: internal.TypeAny,
Description: "Command return values.", Description: "Command return values.",
Optional: true,
}, },
{ {
Name: "error", Name: "error",
Ref: "MessageError", Ref: "MessageError",
Description: "Error message.", Description: "Error message.",
Optional: true,
}, },
}, },
} }

View File

@ -0,0 +1,261 @@
// +build ignore
package main
import (
"bufio"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"log"
"sort"
"strings"
"github.com/PuerkitoBio/goquery"
"github.com/gedex/inflector"
"github.com/knq/chromedp/cmd/chromedp-gen/internal"
)
const (
specURL = "http://www.softwareishard.com/blog/har-12-spec/"
cacheDataID = "CacheData"
)
var (
flagOut = flag.String("out", "har.json", "out file")
)
// propRefMap is the map of property names to their respective type.
var propRefMap = map[string]string{
"Log.creator": "Creator",
"Log.browser": "Creator",
"Log.pages": "Page",
"Log.entries": "Entry",
"Page.pageTimings": "PageTimings",
"Entry.request": "Request",
"Entry.response": "Response",
"Entry.cache": "Cache",
"Entry.timings": "Timings",
"Request.cookies": "Cookie",
"Request.headers": "NameValuePair",
"Request.queryString": "NameValuePair",
"Request.postData": "PostData",
"Response.cookies": "Cookie",
"Response.headers": "NameValuePair",
"Response.content": "Content",
"PostData.params": "Param",
"Cache.beforeRequest": cacheDataID,
"Cache.afterRequest": cacheDataID,
}
func main() {
var err error
flag.Parse()
// initial type map
typeMap := map[string]internal.Type{
"HAR": {
ID: "HAR",
Type: internal.TypeObject,
Description: "Parent container for HAR log.",
Properties: []*internal.Type{{
Name: "log",
Ref: "Log",
}},
},
"NameValuePair": {
ID: "NameValuePair",
Type: internal.TypeObject,
Description: "Describes a name/value pair.",
Properties: []*internal.Type{{
Name: "name",
Type: internal.TypeString,
Description: "Name of the pair.",
}, {
Name: "value",
Type: internal.TypeString,
Description: "Value of the pair.",
}, {
Name: "comment",
Type: internal.TypeString,
Description: "A comment provided by the user or the application.",
Optional: internal.Bool(true),
}},
},
}
// load remote definition
doc, err := goquery.NewDocument(specURL)
if err != nil {
log.Fatal(err)
}
// loop over type definitions
doc.Find(`h3:contains("HAR Data Structure") + p + p + ul a`).Each(func(i int, s *goquery.Selection) {
n := s.Text()
// skip browser (same as creator)
switch n {
case "browser", "queryString", "headers":
return
}
// generate the object ID
id := inflector.Singularize(internal.ForceCamel(n))
if strings.HasSuffix(id, "um") {
id = strings.TrimSuffix(id, "um") + "a"
}
if strings.HasSuffix(id, "Timing") {
id += "s"
}
log.Printf("processing '%s', id: '%s'", n, id)
// base selector
sel := fmt.Sprintf(".harType#%s", n)
// grab description
desc := strings.TrimSpace(doc.Find(sel + " + p").Text())
if desc == "" {
panic(fmt.Sprintf("%s (%s) has no description", n, id))
}
// grab properties and scan
props, err := scanProps(id, readPropText(sel, doc))
if err != nil {
log.Fatal(err)
}
// add to type map
typeMap[id] = internal.Type{
ID: id,
Type: internal.TypeObject,
Description: desc,
Properties: props,
}
})
// grab and scan cachedata properties
cacheDataPropText := readPropText(`p:contains("Both beforeRequest and afterRequest object share the following structure.")`, doc)
cacheDataProps, err := scanProps(cacheDataID, cacheDataPropText)
if err != nil {
log.Fatal(err)
}
typeMap[cacheDataID] = internal.Type{
ID: cacheDataID,
Type: internal.TypeObject,
Description: "Describes the cache data for beforeRequest and afterRequest.",
Properties: cacheDataProps,
}
// sort by type names
var typeNames []string
for n := range typeMap {
typeNames = append(typeNames, n)
}
sort.Strings(typeNames)
// add to type list
var types []*internal.Type
for _, n := range typeNames {
typ := typeMap[n]
types = append(types, &typ)
}
// create the protocol info
def := internal.ProtocolInfo{
Version: &internal.Version{Major: "1", Minor: "2"},
Domains: []*internal.Domain{{
Domain: internal.DomainType("HAR"),
Description: "HTTP Archive Format",
Types: types,
}},
}
// json marshal
buf, err := json.MarshalIndent(def, "", " ")
if err != nil {
log.Fatal(buf)
}
// write
err = ioutil.WriteFile(*flagOut, buf, 0644)
if err != nil {
log.Fatal(err)
}
}
func scanProps(id string, propText string) ([]*internal.Type, error) {
// scan properties
var props []*internal.Type
scanner := bufio.NewScanner(strings.NewReader(propText))
i := 0
for scanner.Scan() {
line := strings.TrimSpace(scanner.Text())
// grab prop stuff
propName := strings.TrimSpace(line[:strings.IndexAny(line, "[")])
propDesc := strings.TrimSpace(line[strings.Index(line, "-")+1:])
if propName == "" || propDesc == "" {
return nil, fmt.Errorf("line %d missing either name or description", i)
}
opts := strings.TrimSpace(line[strings.Index(line, "[")+1 : strings.Index(line, "]")])
// determine type
typ := internal.TypeEnum(opts)
if z := strings.Index(opts, ","); z != -1 {
typ = internal.TypeEnum(strings.TrimSpace(opts[:z]))
}
// convert some fields to integers
if strings.Contains(strings.ToLower(propName), "size") ||
propName == "compression" || propName == "status" ||
propName == "hitCount" {
typ = internal.TypeInteger
}
// fix object/array refs
var ref string
var items *internal.Type
fqPropName := fmt.Sprintf("%s.%s", id, propName)
switch typ {
case internal.TypeObject:
typ = internal.TypeEnum("")
ref = propRefMap[fqPropName]
case internal.TypeArray:
items = &internal.Type{
Ref: propRefMap[fqPropName],
}
}
// add property
props = append(props, &internal.Type{
Name: propName,
Type: typ,
Description: propDesc,
Ref: ref,
Items: items,
Optional: internal.Bool(strings.Contains(opts, "optional")),
})
i++
}
if err := scanner.Err(); err != nil {
return nil, err
}
return props, nil
}
func readPropText(sel string, doc *goquery.Document) string {
text := strings.TrimSpace(doc.Find(sel).NextAllFiltered("ul").Text())
j := strings.Index(text, "\n\n")
if j == -1 {
panic(fmt.Sprintf("could not find property description for `%s`", sel))
}
return text[:j]
}

View File

@ -92,7 +92,7 @@ func (fb fileBuffers) generateCDPTypes(domains []*internal.Domain) {
w := fb.get(pkg+".go", pkg, nil) w := fb.get(pkg+".go", pkg, nil)
for _, t := range types { for _, t := range types {
templates.StreamTypeTemplate(w, t, internal.TypePrefix, internal.TypeSuffix, cdpDomain, doms, nil, false, false) templates.StreamTypeTemplate(w, t, internal.TypePrefix, internal.TypeSuffix, cdpDomain, doms, nil, false, true)
} }
fb.release(w) fb.release(w)
} }
@ -133,7 +133,7 @@ func (fb fileBuffers) generateTypes(
if internal.IsCDPType(d.Domain, t.IDorName()) { if internal.IsCDPType(d.Domain, t.IDorName()) {
continue continue
} }
templates.StreamTypeTemplate(w, t, prefix, suffix, d, domains, nil, false, false) templates.StreamTypeTemplate(w, t, prefix, suffix, d, domains, nil, false, true)
names = append(names, t.TypeName(emitPrefix, emitSuffix)) names = append(names, t.TypeName(emitPrefix, emitSuffix))
} }

640
cmd/chromedp-gen/har.json Normal file
View File

@ -0,0 +1,640 @@
{
"version": {
"major": "1",
"minor": "2"
},
"domains": [
{
"domain": "HAR",
"description": "HTTP Archive Format",
"types": [
{
"type": "object",
"id": "Cache",
"description": "This objects contains info about a request coming from browser cache.",
"properties": [
{
"name": "beforeRequest",
"description": "State of a cache entry before the request. Leave out this field if the information is not available.",
"optional": true,
"$ref": "CacheData"
},
{
"name": "afterRequest",
"description": "State of a cache entry after the request. Leave out this field if the information is not available.",
"optional": true,
"$ref": "CacheData"
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "CacheData",
"description": "Describes the cache data for beforeRequest and afterRequest.",
"properties": [
{
"type": "string",
"name": "expires",
"description": "Expiration time of the cache entry.",
"optional": true
},
{
"type": "string",
"name": "lastAccess",
"description": "The last time the cache entry was opened."
},
{
"type": "string",
"name": "eTag",
"description": "Etag"
},
{
"type": "integer",
"name": "hitCount",
"description": "The number of times the cache entry has been opened."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Content",
"description": "This object describes details about response content (embedded in \u003cresponse\u003e object).",
"properties": [
{
"type": "integer",
"name": "size",
"description": "Length of the returned content in bytes. Should be equal to response.bodySize if there is no compression and bigger when the content has been compressed."
},
{
"type": "integer",
"name": "compression",
"description": "Number of bytes saved. Leave out this field if the information is not available.",
"optional": true
},
{
"type": "string",
"name": "mimeType",
"description": "MIME type of the response text (value of the Content-Type response header). The charset attribute of the MIME type is included (if available)."
},
{
"type": "string",
"name": "text",
"description": "Response body sent from the server or loaded from the browser cache. This field is populated with textual content only. The text field is either HTTP decoded text or a encoded (e.g. \"base64\") representation of the response body. Leave out this field if the information is not available.",
"optional": true
},
{
"type": "string",
"name": "encoding",
"description": "Encoding used for response text field e.g \"base64\". Leave out this field if the text field is HTTP decoded (decompressed \u0026 unchunked), than trans-coded from its original character set into UTF-8.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Cookie",
"description": "This object contains list of all cookies (used in \u003crequest\u003e and \u003cresponse\u003e objects).",
"properties": [
{
"type": "string",
"name": "name",
"description": "The name of the cookie."
},
{
"type": "string",
"name": "value",
"description": "The cookie value."
},
{
"type": "string",
"name": "path",
"description": "The path pertaining to the cookie.",
"optional": true
},
{
"type": "string",
"name": "domain",
"description": "The host of the cookie.",
"optional": true
},
{
"type": "string",
"name": "expires",
"description": "Cookie expiration time. (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g. 2009-07-24T19:20:30.123+02:00).",
"optional": true
},
{
"type": "boolean",
"name": "httpOnly",
"description": "Set to true if the cookie is HTTP only, false otherwise.",
"optional": true
},
{
"type": "boolean",
"name": "secure",
"description": "True if the cookie was transmitted over ssl, false otherwise.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Creator",
"description": "Creator and browser objects share the same structure.",
"properties": [
{
"type": "string",
"name": "name",
"description": "Name of the application/browser used to export the log."
},
{
"type": "string",
"name": "version",
"description": "Version of the application/browser used to export the log."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Entry",
"description": "This object represents an array with all exported HTTP requests. Sorting entries by startedDateTime (starting from the oldest) is preferred way how to export data since it can make importing faster. However the reader application should always make sure the array is sorted (if required for the import).",
"properties": [
{
"type": "string",
"name": "pageref",
"description": "Reference to the parent page. Leave out this field if the application does not support grouping by pages.",
"optional": true
},
{
"type": "string",
"name": "startedDateTime",
"description": "Date and time stamp of the request start (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD)."
},
{
"type": "number",
"name": "time",
"description": "Total elapsed time of the request in milliseconds. This is the sum of all timings available in the timings object (i.e. not including -1 values) ."
},
{
"name": "request",
"description": "Detailed info about the request.",
"$ref": "Request"
},
{
"name": "response",
"description": "Detailed info about the response.",
"$ref": "Response"
},
{
"name": "cache",
"description": "Info about cache usage.",
"$ref": "Cache"
},
{
"name": "timings",
"description": "Detailed timing info about request/response round trip.",
"$ref": "Timings"
},
{
"type": "string",
"name": "serverIPAddress",
"description": "IP address of the server that was connected (result of DNS resolution).",
"optional": true
},
{
"type": "string",
"name": "connection",
"description": "Unique ID of the parent TCP/IP connection, can be the client or server port number. Note that a port number doesn't have to be unique identifier in cases where the port is shared for more connections. If the port isn't available for the application, any other unique connection ID can be used instead (e.g. connection index). Leave out this field if the application doesn't support this info.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "HAR",
"description": "Parent container for HAR log.",
"properties": [
{
"name": "log",
"$ref": "Log"
}
]
},
{
"type": "object",
"id": "Log",
"description": "This object represents the root of exported data.",
"properties": [
{
"type": "string",
"name": "version",
"description": "Version number of the format. If empty, string \"1.1\" is assumed by default."
},
{
"name": "creator",
"description": "Name and version info of the log creator application.",
"$ref": "Creator"
},
{
"name": "browser",
"description": "Name and version info of used browser.",
"optional": true,
"$ref": "Creator"
},
{
"type": "array",
"name": "pages",
"description": "List of all exported (tracked) pages. Leave out this field if the application does not support grouping by pages.",
"optional": true,
"items": {
"$ref": "Page"
}
},
{
"type": "array",
"name": "entries",
"description": "List of all exported (tracked) requests.",
"items": {
"$ref": "Entry"
}
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "NameValuePair",
"description": "Describes a name/value pair.",
"properties": [
{
"type": "string",
"name": "name",
"description": "Name of the pair."
},
{
"type": "string",
"name": "value",
"description": "Value of the pair."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Page",
"description": "This object represents list of exported pages.",
"properties": [
{
"type": "string",
"name": "startedDateTime",
"description": "Date and time stamp for the beginning of the page load (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g. 2009-07-24T19:20:30.45+01:00)."
},
{
"type": "string",
"name": "id",
"description": "Unique identifier of a page within the \u003clog\u003e. Entries use it to refer the parent page."
},
{
"type": "string",
"name": "title",
"description": "Page title."
},
{
"name": "pageTimings",
"description": "Detailed timing info about page load.",
"$ref": "PageTimings"
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "PageTimings",
"description": "This object describes timings for various events (states) fired during the page load. All times are specified in milliseconds. If a time info is not available appropriate field is set to -1.",
"properties": [
{
"type": "number",
"name": "onContentLoad",
"description": "Content of the page loaded. Number of milliseconds since page load started (page.startedDateTime). Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "number",
"name": "onLoad",
"description": "Page is loaded (onLoad event fired). Number of milliseconds since page load started (page.startedDateTime). Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Param",
"description": "List of posted parameters, if any (embedded in \u003cpostData\u003e object).",
"properties": [
{
"type": "string",
"name": "name",
"description": "name of a posted parameter."
},
{
"type": "string",
"name": "value",
"description": "value of a posted parameter or content of a posted file.",
"optional": true
},
{
"type": "string",
"name": "fileName",
"description": "name of a posted file.",
"optional": true
},
{
"type": "string",
"name": "contentType",
"description": "content type of a posted file.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "PostData",
"description": "This object describes posted data, if any (embedded in \u003crequest\u003e object).",
"properties": [
{
"type": "string",
"name": "mimeType",
"description": "Mime type of posted data."
},
{
"type": "array",
"name": "params",
"description": "List of posted parameters (in case of URL encoded parameters).",
"items": {
"$ref": "Param"
}
},
{
"type": "string",
"name": "text",
"description": "Plain text posted data"
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Request",
"description": "This object contains detailed info about performed request.",
"properties": [
{
"type": "string",
"name": "method",
"description": "Request method (GET, POST, ...)."
},
{
"type": "string",
"name": "url",
"description": "Absolute URL of the request (fragments are not included)."
},
{
"type": "string",
"name": "httpVersion",
"description": "Request HTTP Version."
},
{
"type": "array",
"name": "cookies",
"description": "List of cookie objects.",
"items": {
"$ref": "Cookie"
}
},
{
"type": "array",
"name": "headers",
"description": "List of header objects.",
"items": {
"$ref": "NameValuePair"
}
},
{
"type": "array",
"name": "queryString",
"description": "List of query parameter objects.",
"items": {
"$ref": "NameValuePair"
}
},
{
"name": "postData",
"description": "Posted data info.",
"optional": true,
"$ref": "PostData"
},
{
"type": "integer",
"name": "headersSize",
"description": "Total number of bytes from the start of the HTTP request message until (and including) the double CRLF before the body. Set to -1 if the info is not available."
},
{
"type": "integer",
"name": "bodySize",
"description": "Size of the request body (POST data payload) in bytes. Set to -1 if the info is not available."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Response",
"description": "This object contains detailed info about the response.",
"properties": [
{
"type": "integer",
"name": "status",
"description": "Response status."
},
{
"type": "string",
"name": "statusText",
"description": "Response status description."
},
{
"type": "string",
"name": "httpVersion",
"description": "Response HTTP Version."
},
{
"type": "array",
"name": "cookies",
"description": "List of cookie objects.",
"items": {
"$ref": "Cookie"
}
},
{
"type": "array",
"name": "headers",
"description": "List of header objects.",
"items": {
"$ref": "NameValuePair"
}
},
{
"name": "content",
"description": "Details about the response body.",
"$ref": "Content"
},
{
"type": "string",
"name": "redirectURL",
"description": "Redirection target URL from the Location response header."
},
{
"type": "integer",
"name": "headersSize",
"description": "Total number of bytes from the start of the HTTP response message until (and including) the double CRLF before the body. Set to -1 if the info is not available."
},
{
"type": "integer",
"name": "bodySize",
"description": "Size of the received response body in bytes. Set to zero in case of responses coming from the cache (304). Set to -1 if the info is not available."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Timings",
"description": "This object describes various phases within request-response round trip. All times are specified in milliseconds.",
"properties": [
{
"type": "number",
"name": "blocked",
"description": "Time spent in a queue waiting for a network connection. Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "number",
"name": "dns",
"description": "DNS resolution time. The time required to resolve a host name. Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "number",
"name": "connect",
"description": "Time required to create TCP connection. Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "number",
"name": "send",
"description": "Time required to send HTTP request to the server."
},
{
"type": "number",
"name": "wait",
"description": "Waiting for a response from the server."
},
{
"type": "number",
"name": "receive",
"description": "Time required to read entire response from the server (or cache)."
},
{
"type": "number",
"name": "ssl",
"description": "Time required for SSL/TLS negotiation. If this field is defined then the time is also included in the connect field (to ensure backward compatibility with HAR 1.1). Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
}
]
}
]
}

View File

@ -27,6 +27,7 @@ const (
DomainDebugger DomainType = "Debugger" DomainDebugger DomainType = "Debugger"
DomainDeviceOrientation DomainType = "DeviceOrientation" DomainDeviceOrientation DomainType = "DeviceOrientation"
DomainEmulation DomainType = "Emulation" DomainEmulation DomainType = "Emulation"
DomainHAR DomainType = "HAR"
DomainHeapProfiler DomainType = "HeapProfiler" DomainHeapProfiler DomainType = "HeapProfiler"
DomainIO DomainType = "IO" DomainIO DomainType = "IO"
DomainIndexedDB DomainType = "IndexedDB" DomainIndexedDB DomainType = "IndexedDB"
@ -98,6 +99,8 @@ func (dt *DomainType) UnmarshalJSON(buf []byte) error {
*dt = DomainDeviceOrientation *dt = DomainDeviceOrientation
case DomainEmulation: case DomainEmulation:
*dt = DomainEmulation *dt = DomainEmulation
case DomainHAR:
*dt = DomainHAR
case DomainHeapProfiler: case DomainHeapProfiler:
*dt = DomainHeapProfiler *dt = DomainHeapProfiler
case DomainIO: case DomainIO:

View File

@ -4,7 +4,7 @@
// Please see README.md for more information on using this tool. // Please see README.md for more information on using this tool.
package main package main
//go:generate go run domain-gen.go //go:generate go run gen-domain.go
//go:generate qtc -dir templates -ext qtpl //go:generate qtc -dir templates -ext qtpl
//go:generate gofmt -w -s templates/ //go:generate gofmt -w -s templates/

View File

@ -13633,6 +13633,638 @@
] ]
} }
] ]
},
{
"domain": "HAR",
"description": "HTTP Archive Format",
"types": [
{
"type": "object",
"id": "Cache",
"description": "This objects contains info about a request coming from browser cache.",
"properties": [
{
"name": "beforeRequest",
"description": "State of a cache entry before the request. Leave out this field if the information is not available.",
"optional": true,
"$ref": "CacheData"
},
{
"name": "afterRequest",
"description": "State of a cache entry after the request. Leave out this field if the information is not available.",
"optional": true,
"$ref": "CacheData"
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "CacheData",
"description": "Describes the cache data for beforeRequest and afterRequest.",
"properties": [
{
"type": "string",
"name": "expires",
"description": "Expiration time of the cache entry.",
"optional": true
},
{
"type": "string",
"name": "lastAccess",
"description": "The last time the cache entry was opened."
},
{
"type": "string",
"name": "eTag",
"description": "Etag"
},
{
"type": "integer",
"name": "hitCount",
"description": "The number of times the cache entry has been opened."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Content",
"description": "This object describes details about response content (embedded in <response> object).",
"properties": [
{
"type": "integer",
"name": "size",
"description": "Length of the returned content in bytes. Should be equal to response.bodySize if there is no compression and bigger when the content has been compressed."
},
{
"type": "integer",
"name": "compression",
"description": "Number of bytes saved. Leave out this field if the information is not available.",
"optional": true
},
{
"type": "string",
"name": "mimeType",
"description": "MIME type of the response text (value of the Content-Type response header). The charset attribute of the MIME type is included (if available)."
},
{
"type": "string",
"name": "text",
"description": "Response body sent from the server or loaded from the browser cache. This field is populated with textual content only. The text field is either HTTP decoded text or a encoded (e.g. \"base64\") representation of the response body. Leave out this field if the information is not available.",
"optional": true
},
{
"type": "string",
"name": "encoding",
"description": "Encoding used for response text field e.g \"base64\". Leave out this field if the text field is HTTP decoded (decompressed & unchunked), than trans-coded from its original character set into UTF-8.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Cookie",
"description": "This object contains list of all cookies (used in <request> and <response> objects).",
"properties": [
{
"type": "string",
"name": "name",
"description": "The name of the cookie."
},
{
"type": "string",
"name": "value",
"description": "The cookie value."
},
{
"type": "string",
"name": "path",
"description": "The path pertaining to the cookie.",
"optional": true
},
{
"type": "string",
"name": "domain",
"description": "The host of the cookie.",
"optional": true
},
{
"type": "string",
"name": "expires",
"description": "Cookie expiration time. (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g. 2009-07-24T19:20:30.123+02:00).",
"optional": true
},
{
"type": "boolean",
"name": "httpOnly",
"description": "Set to true if the cookie is HTTP only, false otherwise.",
"optional": true
},
{
"type": "boolean",
"name": "secure",
"description": "True if the cookie was transmitted over ssl, false otherwise.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Creator",
"description": "Creator and browser objects share the same structure.",
"properties": [
{
"type": "string",
"name": "name",
"description": "Name of the application/browser used to export the log."
},
{
"type": "string",
"name": "version",
"description": "Version of the application/browser used to export the log."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Entry",
"description": "This object represents an array with all exported HTTP requests. Sorting entries by startedDateTime (starting from the oldest) is preferred way how to export data since it can make importing faster. However the reader application should always make sure the array is sorted (if required for the import).",
"properties": [
{
"type": "string",
"name": "pageref",
"description": "Reference to the parent page. Leave out this field if the application does not support grouping by pages.",
"optional": true
},
{
"type": "string",
"name": "startedDateTime",
"description": "Date and time stamp of the request start (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD)."
},
{
"type": "number",
"name": "time",
"description": "Total elapsed time of the request in milliseconds. This is the sum of all timings available in the timings object (i.e. not including -1 values) ."
},
{
"name": "request",
"description": "Detailed info about the request.",
"$ref": "Request"
},
{
"name": "response",
"description": "Detailed info about the response.",
"$ref": "Response"
},
{
"name": "cache",
"description": "Info about cache usage.",
"$ref": "Cache"
},
{
"name": "timings",
"description": "Detailed timing info about request/response round trip.",
"$ref": "Timings"
},
{
"type": "string",
"name": "serverIPAddress",
"description": "IP address of the server that was connected (result of DNS resolution).",
"optional": true
},
{
"type": "string",
"name": "connection",
"description": "Unique ID of the parent TCP/IP connection, can be the client or server port number. Note that a port number doesn't have to be unique identifier in cases where the port is shared for more connections. If the port isn't available for the application, any other unique connection ID can be used instead (e.g. connection index). Leave out this field if the application doesn't support this info.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "HAR",
"description": "Parent container for HAR log.",
"properties": [
{
"name": "log",
"$ref": "Log"
}
]
},
{
"type": "object",
"id": "Log",
"description": "This object represents the root of exported data.",
"properties": [
{
"type": "string",
"name": "version",
"description": "Version number of the format. If empty, string \"1.1\" is assumed by default."
},
{
"name": "creator",
"description": "Name and version info of the log creator application.",
"$ref": "Creator"
},
{
"name": "browser",
"description": "Name and version info of used browser.",
"optional": true,
"$ref": "Creator"
},
{
"type": "array",
"name": "pages",
"description": "List of all exported (tracked) pages. Leave out this field if the application does not support grouping by pages.",
"optional": true,
"items": {
"$ref": "Page"
}
},
{
"type": "array",
"name": "entries",
"description": "List of all exported (tracked) requests.",
"items": {
"$ref": "Entry"
}
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "NameValuePair",
"description": "Describes a name/value pair.",
"properties": [
{
"type": "string",
"name": "name",
"description": "Name of the pair."
},
{
"type": "string",
"name": "value",
"description": "Value of the pair."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Page",
"description": "This object represents list of exported pages.",
"properties": [
{
"type": "string",
"name": "startedDateTime",
"description": "Date and time stamp for the beginning of the page load (ISO 8601 - YYYY-MM-DDThh:mm:ss.sTZD, e.g. 2009-07-24T19:20:30.45+01:00)."
},
{
"type": "string",
"name": "id",
"description": "Unique identifier of a page within the <log>. Entries use it to refer the parent page."
},
{
"type": "string",
"name": "title",
"description": "Page title."
},
{
"name": "pageTimings",
"description": "Detailed timing info about page load.",
"$ref": "PageTimings"
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "PageTimings",
"description": "This object describes timings for various events (states) fired during the page load. All times are specified in milliseconds. If a time info is not available appropriate field is set to -1.",
"properties": [
{
"type": "number",
"name": "onContentLoad",
"description": "Content of the page loaded. Number of milliseconds since page load started (page.startedDateTime). Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "number",
"name": "onLoad",
"description": "Page is loaded (onLoad event fired). Number of milliseconds since page load started (page.startedDateTime). Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Param",
"description": "List of posted parameters, if any (embedded in <postData> object).",
"properties": [
{
"type": "string",
"name": "name",
"description": "name of a posted parameter."
},
{
"type": "string",
"name": "value",
"description": "value of a posted parameter or content of a posted file.",
"optional": true
},
{
"type": "string",
"name": "fileName",
"description": "name of a posted file.",
"optional": true
},
{
"type": "string",
"name": "contentType",
"description": "content type of a posted file.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "PostData",
"description": "This object describes posted data, if any (embedded in <request> object).",
"properties": [
{
"type": "string",
"name": "mimeType",
"description": "Mime type of posted data."
},
{
"type": "array",
"name": "params",
"description": "List of posted parameters (in case of URL encoded parameters).",
"items": {
"$ref": "Param"
}
},
{
"type": "string",
"name": "text",
"description": "Plain text posted data"
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Request",
"description": "This object contains detailed info about performed request.",
"properties": [
{
"type": "string",
"name": "method",
"description": "Request method (GET, POST, ...)."
},
{
"type": "string",
"name": "url",
"description": "Absolute URL of the request (fragments are not included)."
},
{
"type": "string",
"name": "httpVersion",
"description": "Request HTTP Version."
},
{
"type": "array",
"name": "cookies",
"description": "List of cookie objects.",
"items": {
"$ref": "Cookie"
}
},
{
"type": "array",
"name": "headers",
"description": "List of header objects.",
"items": {
"$ref": "NameValuePair"
}
},
{
"type": "array",
"name": "queryString",
"description": "List of query parameter objects.",
"items": {
"$ref": "NameValuePair"
}
},
{
"name": "postData",
"description": "Posted data info.",
"optional": true,
"$ref": "PostData"
},
{
"type": "integer",
"name": "headersSize",
"description": "Total number of bytes from the start of the HTTP request message until (and including) the double CRLF before the body. Set to -1 if the info is not available."
},
{
"type": "integer",
"name": "bodySize",
"description": "Size of the request body (POST data payload) in bytes. Set to -1 if the info is not available."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Response",
"description": "This object contains detailed info about the response.",
"properties": [
{
"type": "integer",
"name": "status",
"description": "Response status."
},
{
"type": "string",
"name": "statusText",
"description": "Response status description."
},
{
"type": "string",
"name": "httpVersion",
"description": "Response HTTP Version."
},
{
"type": "array",
"name": "cookies",
"description": "List of cookie objects.",
"items": {
"$ref": "Cookie"
}
},
{
"type": "array",
"name": "headers",
"description": "List of header objects.",
"items": {
"$ref": "NameValuePair"
}
},
{
"name": "content",
"description": "Details about the response body.",
"$ref": "Content"
},
{
"type": "string",
"name": "redirectURL",
"description": "Redirection target URL from the Location response header."
},
{
"type": "integer",
"name": "headersSize",
"description": "Total number of bytes from the start of the HTTP response message until (and including) the double CRLF before the body. Set to -1 if the info is not available."
},
{
"type": "integer",
"name": "bodySize",
"description": "Size of the received response body in bytes. Set to zero in case of responses coming from the cache (304). Set to -1 if the info is not available."
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
},
{
"type": "object",
"id": "Timings",
"description": "This object describes various phases within request-response round trip. All times are specified in milliseconds.",
"properties": [
{
"type": "number",
"name": "blocked",
"description": "Time spent in a queue waiting for a network connection. Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "number",
"name": "dns",
"description": "DNS resolution time. The time required to resolve a host name. Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "number",
"name": "connect",
"description": "Time required to create TCP connection. Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "number",
"name": "send",
"description": "Time required to send HTTP request to the server."
},
{
"type": "number",
"name": "wait",
"description": "Waiting for a response from the server."
},
{
"type": "number",
"name": "receive",
"description": "Time required to read entire response from the server (or cache)."
},
{
"type": "number",
"name": "ssl",
"description": "Time required for SSL/TLS negotiation. If this field is defined then the time is also included in the connect field (to ensure backward compatibility with HAR 1.1). Use -1 if the timing does not apply to the current request.",
"optional": true
},
{
"type": "string",
"name": "comment",
"description": "A comment provided by the user or the application.",
"optional": true
}
]
}
]
} }
] ]
} }

View File

@ -4,6 +4,8 @@
SRC=$(realpath $(cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )) SRC=$(realpath $(cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))
HAR_PROTO="$SRC/har.json"
BASE_URL="https://chromium.googlesource.com" BASE_URL="https://chromium.googlesource.com"
BROWSER_PROTO="$BASE_URL/chromium/src/+/master/third_party/WebKit/Source/core/inspector/browser_protocol.json?format=TEXT" BROWSER_PROTO="$BASE_URL/chromium/src/+/master/third_party/WebKit/Source/core/inspector/browser_protocol.json?format=TEXT"
JS_PROTO="$BASE_URL/v8/v8/+/master/src/inspector/js_protocol.json?format=TEXT" JS_PROTO="$BASE_URL/v8/v8/+/master/src/inspector/js_protocol.json?format=TEXT"
@ -20,7 +22,7 @@ curl -s $BROWSER_PROTO | base64 -d > $BROWSER_TMP
curl -s $JS_PROTO | base64 -d > $JS_TMP curl -s $JS_PROTO | base64 -d > $JS_TMP
# merge browser_protocol.json and js_protocol.json # merge browser_protocol.json and js_protocol.json
jq -s '[.[] | to_entries] | flatten | reduce .[] as $dot ({}; .[$dot.key] += $dot.value)' $BROWSER_TMP $JS_TMP > $OUT jq -s '[.[] | to_entries] | flatten | reduce .[] as $dot ({}; .[$dot.key] += $dot.value)' $BROWSER_TMP $JS_TMP $HAR_PROTO > $OUT
UPDATE=0 UPDATE=0
LASTUPDATE=0 LASTUPDATE=0