Adding synthesized "HAR" domain to protocol generation
* Added "HAR" domain * Fixed issue with omitempty on domain types
This commit is contained in:
parent
d70d54233f
commit
7fbfef7cf1
|
@ -282,14 +282,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility2(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if in.Value != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -491,14 +489,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility3(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if (in.Value).IsDefined() {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -618,14 +614,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility4(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.BackendDOMNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendDOMNodeId\":")
|
||||
out.Int64(int64(in.BackendDOMNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendDOMNodeId\":")
|
||||
out.Int64(int64(in.BackendDOMNodeID))
|
||||
if in.Idref != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -713,25 +707,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility5(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Value != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
if in.Value == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Value).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
if in.Value == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Value).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -923,22 +913,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAccessibility6(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.String(string(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Ignored {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ignored\":")
|
||||
out.Bool(bool(in.Ignored))
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.String(string(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ignored\":")
|
||||
out.Bool(bool(in.Ignored))
|
||||
if len(in.IgnoredReasons) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
|
|
@ -223,7 +223,7 @@ func (t *AXValueNativeSourceType) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// AXValueSource a single source for a computed AX property.
|
||||
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.
|
||||
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.
|
||||
|
@ -236,20 +236,20 @@ type AXValueSource struct {
|
|||
|
||||
// AXRelatedNode [no description].
|
||||
type AXRelatedNode struct {
|
||||
BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId,omitempty"` // The BackendNodeId of the related DOM node.
|
||||
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.
|
||||
BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId"` // The BackendNodeId of the related DOM node.
|
||||
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.
|
||||
}
|
||||
|
||||
// AXProperty [no description].
|
||||
type AXProperty struct {
|
||||
Name string `json:"name,omitempty"` // The name of this property.
|
||||
Value *AXValue `json:"value,omitempty"` // The value of this property.
|
||||
Name string `json:"name"` // The name of this property.
|
||||
Value *AXValue `json:"value"` // The value of this property.
|
||||
}
|
||||
|
||||
// AXValue a single computed AX property.
|
||||
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.
|
||||
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.
|
||||
|
@ -543,8 +543,8 @@ func (t *AXRelationshipAttributes) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// AXNode a node in the accessibility tree.
|
||||
type AXNode struct {
|
||||
NodeID AXNodeID `json:"nodeId,omitempty"` // Unique identifier for this node.
|
||||
Ignored bool `json:"ignored,omitempty"` // Whether this node is ignored for accessibility
|
||||
NodeID AXNodeID `json:"nodeId"` // Unique identifier for this node.
|
||||
Ignored bool `json:"ignored"` // Whether this node is ignored for accessibility
|
||||
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.
|
||||
Name *AXValue `json:"name,omitempty"` // The accessible name for this Node.
|
||||
|
|
|
@ -703,28 +703,26 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation7(out *jwriter.Writer
|
|||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
}
|
||||
if len(in.Keyframes) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"keyframes\":")
|
||||
if in.Keyframes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v11, v12 := range in.Keyframes {
|
||||
if v11 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v12 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v12).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"keyframes\":")
|
||||
if in.Keyframes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v11, v12 := range in.Keyframes {
|
||||
if v11 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v12 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v12).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -789,22 +787,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation8(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Offset != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"offset\":")
|
||||
out.String(string(in.Offset))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Easing != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"easing\":")
|
||||
out.String(string(in.Easing))
|
||||
first = false
|
||||
out.RawString("\"offset\":")
|
||||
out.String(string(in.Offset))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"easing\":")
|
||||
out.String(string(in.Easing))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1138,17 +1132,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation13(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Animation != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"animation\":")
|
||||
if in.Animation == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Animation).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"animation\":")
|
||||
if in.Animation == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Animation).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1211,14 +1203,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation14(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1280,14 +1270,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation15(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1434,70 +1422,54 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Delay != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"delay\":")
|
||||
out.Float64(float64(in.Delay))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.EndDelay != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"endDelay\":")
|
||||
out.Float64(float64(in.EndDelay))
|
||||
first = false
|
||||
out.RawString("\"delay\":")
|
||||
out.Float64(float64(in.Delay))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.IterationStart != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"iterationStart\":")
|
||||
out.Float64(float64(in.IterationStart))
|
||||
first = false
|
||||
out.RawString("\"endDelay\":")
|
||||
out.Float64(float64(in.EndDelay))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Iterations != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"iterations\":")
|
||||
out.Float64(float64(in.Iterations))
|
||||
first = false
|
||||
out.RawString("\"iterationStart\":")
|
||||
out.Float64(float64(in.IterationStart))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Duration != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"duration\":")
|
||||
out.Float64(float64(in.Duration))
|
||||
first = false
|
||||
out.RawString("\"iterations\":")
|
||||
out.Float64(float64(in.Iterations))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Direction != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"direction\":")
|
||||
out.String(string(in.Direction))
|
||||
first = false
|
||||
out.RawString("\"duration\":")
|
||||
out.Float64(float64(in.Duration))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Fill != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"fill\":")
|
||||
out.String(string(in.Fill))
|
||||
first = false
|
||||
out.RawString("\"direction\":")
|
||||
out.String(string(in.Direction))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.BackendNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
first = false
|
||||
out.RawString("\"fill\":")
|
||||
out.String(string(in.Fill))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
if in.KeyframesRule != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1510,14 +1482,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation17(out *jwriter.Write
|
|||
(*in.KeyframesRule).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
if in.Easing != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"easing\":")
|
||||
out.String(string(in.Easing))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"easing\":")
|
||||
out.String(string(in.Easing))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1664,82 +1634,64 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpAnimation19(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PausedState {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pausedState\":")
|
||||
out.Bool(bool(in.PausedState))
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PlayState != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"playState\":")
|
||||
out.String(string(in.PlayState))
|
||||
first = false
|
||||
out.RawString("\"pausedState\":")
|
||||
out.Bool(bool(in.PausedState))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PlaybackRate != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"playbackRate\":")
|
||||
out.Float64(float64(in.PlaybackRate))
|
||||
first = false
|
||||
out.RawString("\"playState\":")
|
||||
out.String(string(in.PlayState))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.StartTime != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"startTime\":")
|
||||
out.Float64(float64(in.StartTime))
|
||||
first = false
|
||||
out.RawString("\"playbackRate\":")
|
||||
out.Float64(float64(in.PlaybackRate))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.CurrentTime != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"currentTime\":")
|
||||
out.Float64(float64(in.CurrentTime))
|
||||
first = false
|
||||
out.RawString("\"startTime\":")
|
||||
out.Float64(float64(in.StartTime))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Source != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"source\":")
|
||||
if in.Source == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Source).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"currentTime\":")
|
||||
out.Float64(float64(in.CurrentTime))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"source\":")
|
||||
if in.Source == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Source).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if in.CSSID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
|
|
@ -8,17 +8,17 @@ import (
|
|||
|
||||
// EventAnimationCreated event for each animation that has been created.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
|
|
|
@ -13,42 +13,42 @@ import (
|
|||
|
||||
// Animation animation instance.
|
||||
type Animation struct {
|
||||
ID string `json:"id,omitempty"` // Animation's id.
|
||||
Name string `json:"name,omitempty"` // Animation's name.
|
||||
PausedState bool `json:"pausedState,omitempty"` // Animation's internal paused state.
|
||||
PlayState string `json:"playState,omitempty"` // Animation's play state.
|
||||
PlaybackRate float64 `json:"playbackRate,omitempty"` // Animation's playback rate.
|
||||
StartTime float64 `json:"startTime,omitempty"` // Animation's start time.
|
||||
CurrentTime float64 `json:"currentTime,omitempty"` // Animation's current time.
|
||||
Source *Effect `json:"source,omitempty"` // Animation's source animation node.
|
||||
Type Type `json:"type,omitempty"` // Animation type of Animation.
|
||||
CSSID string `json:"cssId,omitempty"` // A unique ID for Animation representing the sources that triggered this CSS animation/transition.
|
||||
ID string `json:"id"` // Animation's id.
|
||||
Name string `json:"name"` // Animation's name.
|
||||
PausedState bool `json:"pausedState"` // Animation's internal paused state.
|
||||
PlayState string `json:"playState"` // Animation's play state.
|
||||
PlaybackRate float64 `json:"playbackRate"` // Animation's playback rate.
|
||||
StartTime float64 `json:"startTime"` // Animation's start time.
|
||||
CurrentTime float64 `json:"currentTime"` // Animation's current time.
|
||||
Source *Effect `json:"source"` // Animation's source animation node.
|
||||
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.
|
||||
}
|
||||
|
||||
// Effect animationEffect instance.
|
||||
type Effect struct {
|
||||
Delay float64 `json:"delay,omitempty"` // AnimationEffect's delay.
|
||||
EndDelay float64 `json:"endDelay,omitempty"` // AnimationEffect's end delay.
|
||||
IterationStart float64 `json:"iterationStart,omitempty"` // AnimationEffect's iteration start.
|
||||
Iterations float64 `json:"iterations,omitempty"` // AnimationEffect's iterations.
|
||||
Duration float64 `json:"duration,omitempty"` // AnimationEffect's iteration duration.
|
||||
Direction string `json:"direction,omitempty"` // AnimationEffect's playback direction.
|
||||
Fill string `json:"fill,omitempty"` // AnimationEffect's fill mode.
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // AnimationEffect's target node.
|
||||
KeyframesRule *KeyframesRule `json:"keyframesRule,omitempty"` // AnimationEffect's keyframes.
|
||||
Easing string `json:"easing,omitempty"` // AnimationEffect's timing function.
|
||||
Delay float64 `json:"delay"` // AnimationEffect's delay.
|
||||
EndDelay float64 `json:"endDelay"` // AnimationEffect's end delay.
|
||||
IterationStart float64 `json:"iterationStart"` // AnimationEffect's iteration start.
|
||||
Iterations float64 `json:"iterations"` // AnimationEffect's iterations.
|
||||
Duration float64 `json:"duration"` // AnimationEffect's iteration duration.
|
||||
Direction string `json:"direction"` // AnimationEffect's playback direction.
|
||||
Fill string `json:"fill"` // AnimationEffect's fill mode.
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId"` // AnimationEffect's target node.
|
||||
KeyframesRule *KeyframesRule `json:"keyframesRule,omitempty"` // AnimationEffect's keyframes.
|
||||
Easing string `json:"easing"` // AnimationEffect's timing function.
|
||||
}
|
||||
|
||||
// KeyframesRule keyframes Rule.
|
||||
type KeyframesRule struct {
|
||||
Name string `json:"name,omitempty"` // CSS keyframed animation's name.
|
||||
Keyframes []*KeyframeStyle `json:"keyframes,omitempty"` // List of animation keyframes.
|
||||
Name string `json:"name,omitempty"` // CSS keyframed animation's name.
|
||||
Keyframes []*KeyframeStyle `json:"keyframes"` // List of animation keyframes.
|
||||
}
|
||||
|
||||
// KeyframeStyle keyframe Style.
|
||||
type KeyframeStyle struct {
|
||||
Offset string `json:"offset,omitempty"` // Keyframe's time offset.
|
||||
Easing string `json:"easing,omitempty"` // AnimationEffect's timing function.
|
||||
Offset string `json:"offset"` // Keyframe's time offset.
|
||||
Easing string `json:"easing"` // AnimationEffect's timing function.
|
||||
}
|
||||
|
||||
// Type animation type of Animation.
|
||||
|
|
|
@ -56,30 +56,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache(out *jwriter.
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Size != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"size\":")
|
||||
out.Int64(int64(in.Size))
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
out.String(string(in.Type))
|
||||
first = false
|
||||
out.RawString("\"size\":")
|
||||
out.Int64(int64(in.Size))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
out.String(string(in.Type))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -601,30 +595,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache7(out *jwriter
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ManifestURL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"manifestURL\":")
|
||||
out.String(string(in.ManifestURL))
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Status != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"status\":")
|
||||
out.Int64(int64(in.Status))
|
||||
first = false
|
||||
out.RawString("\"manifestURL\":")
|
||||
out.String(string(in.ManifestURL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"status\":")
|
||||
out.Int64(int64(in.Status))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -686,14 +674,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache8(out *jwriter
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.IsNowOnline {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isNowOnline\":")
|
||||
out.Bool(bool(in.IsNowOnline))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isNowOnline\":")
|
||||
out.Bool(bool(in.IsNowOnline))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -759,30 +745,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache9(out *jwriter
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ManifestURL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"manifestURL\":")
|
||||
out.String(string(in.ManifestURL))
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Status != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"status\":")
|
||||
out.Int64(int64(in.Status))
|
||||
first = false
|
||||
out.RawString("\"manifestURL\":")
|
||||
out.String(string(in.ManifestURL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"status\":")
|
||||
out.Int64(int64(in.Status))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -940,60 +920,50 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpApplicationcache11(out *jwrite
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ManifestURL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"manifestURL\":")
|
||||
out.String(string(in.ManifestURL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Size != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"size\":")
|
||||
out.Float64(float64(in.Size))
|
||||
first = false
|
||||
out.RawString("\"manifestURL\":")
|
||||
out.String(string(in.ManifestURL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.CreationTime != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"creationTime\":")
|
||||
out.Float64(float64(in.CreationTime))
|
||||
first = false
|
||||
out.RawString("\"size\":")
|
||||
out.Float64(float64(in.Size))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.UpdateTime != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"updateTime\":")
|
||||
out.Float64(float64(in.UpdateTime))
|
||||
first = false
|
||||
out.RawString("\"creationTime\":")
|
||||
out.Float64(float64(in.CreationTime))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.Resources) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"resources\":")
|
||||
if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Resources {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"updateTime\":")
|
||||
out.Float64(float64(in.UpdateTime))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"resources\":")
|
||||
if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Resources {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
|
|
@ -8,14 +8,14 @@ import (
|
|||
|
||||
// EventApplicationCacheStatusUpdated [no description].
|
||||
type EventApplicationCacheStatusUpdated struct {
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Identifier of the frame containing document whose application cache updated status.
|
||||
ManifestURL string `json:"manifestURL,omitempty"` // Manifest URL.
|
||||
Status int64 `json:"status,omitempty"` // Updated application cache status.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame containing document whose application cache updated status.
|
||||
ManifestURL string `json:"manifestURL"` // Manifest URL.
|
||||
Status int64 `json:"status"` // Updated application cache status.
|
||||
}
|
||||
|
||||
// EventNetworkStateUpdated [no description].
|
||||
type EventNetworkStateUpdated struct {
|
||||
IsNowOnline bool `json:"isNowOnline,omitempty"`
|
||||
IsNowOnline bool `json:"isNowOnline"`
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -8,23 +8,23 @@ import (
|
|||
|
||||
// Resource detailed application cache resource information.
|
||||
type Resource struct {
|
||||
URL string `json:"url,omitempty"` // Resource url.
|
||||
Size int64 `json:"size,omitempty"` // Resource size.
|
||||
Type string `json:"type,omitempty"` // Resource type.
|
||||
URL string `json:"url"` // Resource url.
|
||||
Size int64 `json:"size"` // Resource size.
|
||||
Type string `json:"type"` // Resource type.
|
||||
}
|
||||
|
||||
// ApplicationCache detailed application cache information.
|
||||
type ApplicationCache struct {
|
||||
ManifestURL string `json:"manifestURL,omitempty"` // Manifest URL.
|
||||
Size float64 `json:"size,omitempty"` // Application cache size.
|
||||
CreationTime float64 `json:"creationTime,omitempty"` // Application cache creation time.
|
||||
UpdateTime float64 `json:"updateTime,omitempty"` // Application cache update time.
|
||||
Resources []*Resource `json:"resources,omitempty"` // Application cache resources.
|
||||
ManifestURL string `json:"manifestURL"` // Manifest URL.
|
||||
Size float64 `json:"size"` // Application cache size.
|
||||
CreationTime float64 `json:"creationTime"` // Application cache creation time.
|
||||
UpdateTime float64 `json:"updateTime"` // Application cache update time.
|
||||
Resources []*Resource `json:"resources"` // Application cache resources.
|
||||
}
|
||||
|
||||
// FrameWithManifest frame identifier - manifest URL pair.
|
||||
type FrameWithManifest struct {
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
|
||||
ManifestURL string `json:"manifestURL,omitempty"` // Manifest URL.
|
||||
Status int64 `json:"status,omitempty"` // Application cache status.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Frame identifier.
|
||||
ManifestURL string `json:"manifestURL"` // Manifest URL.
|
||||
Status int64 `json:"status"` // Application cache status.
|
||||
}
|
||||
|
|
|
@ -584,30 +584,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage6(out *jwriter.Wri
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Request != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"request\":")
|
||||
out.String(string(in.Request))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Response != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"response\":")
|
||||
out.String(string(in.Response))
|
||||
first = false
|
||||
out.RawString("\"request\":")
|
||||
out.String(string(in.Request))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ResponseTime != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"responseTime\":")
|
||||
out.Float64(float64(in.ResponseTime))
|
||||
first = false
|
||||
out.RawString("\"response\":")
|
||||
out.String(string(in.Response))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"responseTime\":")
|
||||
out.Float64(float64(in.ResponseTime))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -673,30 +667,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpCachestorage7(out *jwriter.Wri
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.CacheID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"cacheId\":")
|
||||
out.String(string(in.CacheID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.SecurityOrigin != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"securityOrigin\":")
|
||||
out.String(string(in.SecurityOrigin))
|
||||
first = false
|
||||
out.RawString("\"cacheId\":")
|
||||
out.String(string(in.CacheID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.CacheName != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"cacheName\":")
|
||||
out.String(string(in.CacheName))
|
||||
first = false
|
||||
out.RawString("\"securityOrigin\":")
|
||||
out.String(string(in.SecurityOrigin))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"cacheName\":")
|
||||
out.String(string(in.CacheName))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -12,14 +12,14 @@ func (t CacheID) String() string {
|
|||
|
||||
// DataEntry data entry.
|
||||
type DataEntry struct {
|
||||
Request string `json:"request,omitempty"` // Request url spec.
|
||||
Response string `json:"response,omitempty"` // Response status text.
|
||||
ResponseTime float64 `json:"responseTime,omitempty"` // Number of seconds since epoch.
|
||||
Request string `json:"request"` // Request url spec.
|
||||
Response string `json:"response"` // Response status text.
|
||||
ResponseTime float64 `json:"responseTime"` // Number of seconds since epoch.
|
||||
}
|
||||
|
||||
// Cache cache identifier.
|
||||
type Cache struct {
|
||||
CacheID CacheID `json:"cacheId,omitempty"` // An opaque unique id of the cache.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // Security origin of the cache.
|
||||
CacheName string `json:"cacheName,omitempty"` // The name of the cache.
|
||||
CacheID CacheID `json:"cacheId"` // An opaque unique id of the cache.
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin of the cache.
|
||||
CacheName string `json:"cacheName"` // The name of the cache.
|
||||
}
|
||||
|
|
48
cdp/cdp.go
48
cdp/cdp.go
|
@ -18,8 +18,8 @@ import (
|
|||
|
||||
// MessageError message error type.
|
||||
type MessageError struct {
|
||||
Code int64 `json:"code,omitempty"` // Error code.
|
||||
Message string `json:"message,omitempty"` // Error message.
|
||||
Code int64 `json:"code"` // Error code.
|
||||
Message string `json:"message"` // Error message.
|
||||
}
|
||||
|
||||
// Error satisfies error interface.
|
||||
|
@ -1443,16 +1443,16 @@ func (t *FrameID) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// Frame information about the Frame on the page.
|
||||
type Frame struct {
|
||||
ID FrameID `json:"id,omitempty"` // Frame unique identifier.
|
||||
ParentID FrameID `json:"parentId,omitempty"` // Parent frame identifier.
|
||||
LoaderID LoaderID `json:"loaderId,omitempty"` // Identifier of the loader associated with this frame.
|
||||
Name string `json:"name,omitempty"` // Frame's name as specified in the tag.
|
||||
URL string `json:"url,omitempty"` // Frame document's URL.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // Frame document's security origin.
|
||||
MimeType string `json:"mimeType,omitempty"` // Frame document's mimeType as determined by the browser.
|
||||
State FrameState `json:"-"` // Frame state.
|
||||
Root *Node `json:"-"` // Frame document root.
|
||||
Nodes map[NodeID]*Node `json:"-"` // Frame nodes.
|
||||
ID FrameID `json:"id"` // Frame unique identifier.
|
||||
ParentID FrameID `json:"parentId,omitempty"` // Parent frame identifier.
|
||||
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.
|
||||
URL string `json:"url"` // Frame document's URL.
|
||||
SecurityOrigin string `json:"securityOrigin"` // Frame document's security origin.
|
||||
MimeType string `json:"mimeType"` // Frame document's mimeType as determined by the browser.
|
||||
State FrameState `json:"-"` // Frame state.
|
||||
Root *Node `json:"-"` // Frame document root.
|
||||
Nodes map[NodeID]*Node `json:"-"` // Frame nodes.
|
||||
sync.RWMutex `json:"-"` // Read write mutex.
|
||||
}
|
||||
|
||||
|
@ -1591,9 +1591,9 @@ func (t *BackendNodeID) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// BackendNode backend node with a friendly name.
|
||||
type BackendNode struct {
|
||||
NodeType NodeType `json:"nodeType,omitempty"` // Node's nodeType.
|
||||
NodeName string `json:"nodeName,omitempty"` // Node's nodeName.
|
||||
BackendNodeID BackendNodeID `json:"backendNodeId,omitempty"`
|
||||
NodeType NodeType `json:"nodeType"` // Node's nodeType.
|
||||
NodeName string `json:"nodeName"` // Node's nodeName.
|
||||
BackendNodeID BackendNodeID `json:"backendNodeId"`
|
||||
}
|
||||
|
||||
// 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
|
||||
// represent the actual DOM nodes. DOMNode is a base node mirror type.
|
||||
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.
|
||||
BackendNodeID BackendNodeID `json:"backendNodeId,omitempty"` // The BackendNodeId for this node.
|
||||
NodeType NodeType `json:"nodeType,omitempty"` // Node's nodeType.
|
||||
NodeName string `json:"nodeName,omitempty"` // Node's nodeName.
|
||||
LocalName string `json:"localName,omitempty"` // Node's localName.
|
||||
NodeValue string `json:"nodeValue,omitempty"` // Node's nodeValue.
|
||||
BackendNodeID BackendNodeID `json:"backendNodeId"` // The BackendNodeId for this node.
|
||||
NodeType NodeType `json:"nodeType"` // Node's nodeType.
|
||||
NodeName string `json:"nodeName"` // Node's nodeName.
|
||||
LocalName string `json:"localName"` // Node's localName.
|
||||
NodeValue string `json:"nodeValue"` // Node's nodeValue.
|
||||
ChildNodeCount int64 `json:"childNodeCount,omitempty"` // Child count for Container nodes.
|
||||
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].
|
||||
|
@ -1875,9 +1875,9 @@ const EmptyNodeID = NodeID(0)
|
|||
|
||||
// RGBA a structure holding an RGBA color.
|
||||
type RGBA struct {
|
||||
R int64 `json:"r,omitempty"` // The red component, in the [0-255] range.
|
||||
G int64 `json:"g,omitempty"` // The green component, in the [0-255] range.
|
||||
B int64 `json:"b,omitempty"` // The blue component, in the [0-255] range.
|
||||
R int64 `json:"r"` // The red component, in the [0-255] range.
|
||||
G int64 `json:"g"` // The green 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).
|
||||
}
|
||||
|
||||
|
|
1008
cdp/css/easyjson.go
1008
cdp/css/easyjson.go
File diff suppressed because it is too large
Load Diff
|
@ -17,19 +17,19 @@ type EventFontsUpdated struct{}
|
|||
// EventStyleSheetChanged fired whenever a stylesheet is changed as a result
|
||||
// of the client operation.
|
||||
type EventStyleSheetChanged struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"`
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"`
|
||||
}
|
||||
|
||||
// EventStyleSheetAdded fired whenever an active document stylesheet is
|
||||
// added.
|
||||
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
|
||||
// removed.
|
||||
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.
|
||||
|
|
124
cdp/css/types.go
124
cdp/css/types.go
|
@ -73,103 +73,103 @@ func (t *StyleSheetOrigin) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// PseudoElementMatches cSS rule collection for a single pseudo style.
|
||||
type PseudoElementMatches struct {
|
||||
PseudoType cdp.PseudoType `json:"pseudoType,omitempty"` // Pseudo element type.
|
||||
Matches []*RuleMatch `json:"matches,omitempty"` // Matches of CSS rules applicable to the pseudo style.
|
||||
PseudoType cdp.PseudoType `json:"pseudoType"` // Pseudo element type.
|
||||
Matches []*RuleMatch `json:"matches"` // Matches of CSS rules applicable to the pseudo style.
|
||||
}
|
||||
|
||||
// InheritedStyleEntry inherited CSS rule collection from ancestor node.
|
||||
type InheritedStyleEntry struct {
|
||||
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.
|
||||
InlineStyle *Style `json:"inlineStyle,omitempty"` // The ancestor node's inline style, if any, 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.
|
||||
type RuleMatch struct {
|
||||
Rule *Rule `json:"rule,omitempty"` // CSS rule in the match.
|
||||
MatchingSelectors []int64 `json:"matchingSelectors,omitempty"` // Matching selector indices in the rule's selectorList selectors (0-based).
|
||||
Rule *Rule `json:"rule"` // CSS rule in the match.
|
||||
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
|
||||
// selector list).
|
||||
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).
|
||||
}
|
||||
|
||||
// SelectorList selector list data.
|
||||
type SelectorList struct {
|
||||
Selectors []*Value `json:"selectors,omitempty"` // Selectors in the list.
|
||||
Text string `json:"text,omitempty"` // Rule selector text.
|
||||
Selectors []*Value `json:"selectors"` // Selectors in the list.
|
||||
Text string `json:"text"` // Rule selector text.
|
||||
}
|
||||
|
||||
// StyleSheetHeader cSS stylesheet metainformation.
|
||||
type StyleSheetHeader struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The stylesheet identifier.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Owner frame identifier.
|
||||
SourceURL string `json:"sourceURL,omitempty"` // Stylesheet resource URL.
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"` // The stylesheet identifier.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Owner frame identifier.
|
||||
SourceURL string `json:"sourceURL"` // Stylesheet resource URL.
|
||||
SourceMapURL string `json:"sourceMapURL,omitempty"` // URL of source map associated with the stylesheet (if any).
|
||||
Origin StyleSheetOrigin `json:"origin,omitempty"` // Stylesheet origin.
|
||||
Title string `json:"title,omitempty"` // Stylesheet title.
|
||||
Origin StyleSheetOrigin `json:"origin"` // Stylesheet origin.
|
||||
Title string `json:"title"` // Stylesheet title.
|
||||
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.
|
||||
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.
|
||||
StartLine float64 `json:"startLine,omitempty"` // 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).
|
||||
Length float64 `json:"length,omitempty"` // Size of the content (in characters).
|
||||
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"` // Line 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"` // Size of the content (in characters).
|
||||
}
|
||||
|
||||
// Rule cSS rule representation.
|
||||
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.
|
||||
SelectorList *SelectorList `json:"selectorList,omitempty"` // Rule selector data.
|
||||
Origin StyleSheetOrigin `json:"origin,omitempty"` // Parent stylesheet's origin.
|
||||
Style *Style `json:"style,omitempty"` // Associated style declaration.
|
||||
SelectorList *SelectorList `json:"selectorList"` // Rule selector data.
|
||||
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
|
||||
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.
|
||||
}
|
||||
|
||||
// RuleUsage cSS coverage information.
|
||||
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.
|
||||
StartOffset float64 `json:"startOffset,omitempty"` // 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.
|
||||
Used bool `json:"used,omitempty"` // Indicates whether the rule was actually used by some element in the page.
|
||||
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"` // Offset of the start of the rule (including selector) 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"` // Indicates whether the rule was actually used by some element in the page.
|
||||
}
|
||||
|
||||
// SourceRange text range within a resource. All numbers are zero-based.
|
||||
type SourceRange struct {
|
||||
StartLine int64 `json:"startLine,omitempty"` // Start line of range.
|
||||
StartColumn int64 `json:"startColumn,omitempty"` // Start column of range (inclusive).
|
||||
EndLine int64 `json:"endLine,omitempty"` // End line of range
|
||||
EndColumn int64 `json:"endColumn,omitempty"` // End column of range (exclusive).
|
||||
StartLine int64 `json:"startLine"` // Start line of range.
|
||||
StartColumn int64 `json:"startColumn"` // Start column of range (inclusive).
|
||||
EndLine int64 `json:"endLine"` // End line of range
|
||||
EndColumn int64 `json:"endColumn"` // End column of range (exclusive).
|
||||
}
|
||||
|
||||
// ShorthandEntry [no description].
|
||||
type ShorthandEntry struct {
|
||||
Name string `json:"name,omitempty"` // Shorthand name.
|
||||
Value string `json:"value,omitempty"` // Shorthand value.
|
||||
Name string `json:"name"` // Shorthand name.
|
||||
Value string `json:"value"` // Shorthand value.
|
||||
Important bool `json:"important,omitempty"` // Whether the property has "!important" annotation (implies false if absent).
|
||||
}
|
||||
|
||||
// ComputedProperty [no description].
|
||||
type ComputedProperty struct {
|
||||
Name string `json:"name,omitempty"` // Computed style property name.
|
||||
Value string `json:"value,omitempty"` // Computed style property value.
|
||||
Name string `json:"name"` // Computed style property name.
|
||||
Value string `json:"value"` // Computed style property value.
|
||||
}
|
||||
|
||||
// Style cSS style representation.
|
||||
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.
|
||||
CSSProperties []*Property `json:"cssProperties,omitempty"` // CSS properties in the style.
|
||||
ShorthandEntries []*ShorthandEntry `json:"shorthandEntries,omitempty"` // Computed values for all shorthands found in the style.
|
||||
CSSText string `json:"cssText,omitempty"` // Style declaration text (if available).
|
||||
Range *SourceRange `json:"range,omitempty"` // Style declaration range in the enclosing stylesheet (if available).
|
||||
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"` // CSS properties 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).
|
||||
Range *SourceRange `json:"range,omitempty"` // Style declaration range in the enclosing stylesheet (if available).
|
||||
}
|
||||
|
||||
// Property cSS property declaration data.
|
||||
type Property struct {
|
||||
Name string `json:"name,omitempty"` // The property name.
|
||||
Value string `json:"value,omitempty"` // The property value.
|
||||
Name string `json:"name"` // The property name.
|
||||
Value string `json:"value"` // The property value.
|
||||
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).
|
||||
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.
|
||||
type Media struct {
|
||||
Text string `json:"text,omitempty"` // 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.
|
||||
Text string `json:"text"` // Media query text.
|
||||
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.
|
||||
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).
|
||||
|
@ -190,15 +190,15 @@ type Media struct {
|
|||
|
||||
// MediaQuery media query descriptor.
|
||||
type MediaQuery struct {
|
||||
Expressions []*MediaQueryExpression `json:"expressions,omitempty"` // Array of media query expressions.
|
||||
Active bool `json:"active,omitempty"` // Whether the media query condition is satisfied.
|
||||
Expressions []*MediaQueryExpression `json:"expressions"` // Array of media query expressions.
|
||||
Active bool `json:"active"` // Whether the media query condition is satisfied.
|
||||
}
|
||||
|
||||
// MediaQueryExpression media query expression descriptor.
|
||||
type MediaQueryExpression struct {
|
||||
Value float64 `json:"value,omitempty"` // Media query expression value.
|
||||
Unit string `json:"unit,omitempty"` // Media query expression units.
|
||||
Feature string `json:"feature,omitempty"` // Media query expression feature.
|
||||
Value float64 `json:"value"` // Media query expression value.
|
||||
Unit string `json:"unit"` // Media query expression units.
|
||||
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).
|
||||
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
|
||||
// with given font.
|
||||
type PlatformFontUsage struct {
|
||||
FamilyName string `json:"familyName,omitempty"` // Font's family name reported by platform.
|
||||
IsCustomFont bool `json:"isCustomFont,omitempty"` // Indicates if the font was downloaded or resolved locally.
|
||||
GlyphCount float64 `json:"glyphCount,omitempty"` // Amount of glyphs that were rendered with this font.
|
||||
FamilyName string `json:"familyName"` // Font's family name reported by platform.
|
||||
IsCustomFont bool `json:"isCustomFont"` // Indicates if the font was downloaded or resolved locally.
|
||||
GlyphCount float64 `json:"glyphCount"` // Amount of glyphs that were rendered with this font.
|
||||
}
|
||||
|
||||
// KeyframesRule cSS keyframes rule representation.
|
||||
type KeyframesRule struct {
|
||||
AnimationName *Value `json:"animationName,omitempty"` // Animation name.
|
||||
Keyframes []*KeyframeRule `json:"keyframes,omitempty"` // List of keyframes.
|
||||
AnimationName *Value `json:"animationName"` // Animation name.
|
||||
Keyframes []*KeyframeRule `json:"keyframes"` // List of keyframes.
|
||||
}
|
||||
|
||||
// KeyframeRule cSS keyframe rule representation.
|
||||
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.
|
||||
Origin StyleSheetOrigin `json:"origin,omitempty"` // Parent stylesheet's origin.
|
||||
KeyText *Value `json:"keyText,omitempty"` // Associated key text.
|
||||
Style *Style `json:"style,omitempty"` // Associated style declaration.
|
||||
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
|
||||
KeyText *Value `json:"keyText"` // Associated key text.
|
||||
Style *Style `json:"style"` // Associated style declaration.
|
||||
}
|
||||
|
||||
// StyleDeclarationEdit a descriptor of operation to mutate style declaration
|
||||
// text.
|
||||
type StyleDeclarationEdit struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // The css style sheet identifier.
|
||||
Range *SourceRange `json:"range,omitempty"` // The range of the style text in the enclosing stylesheet.
|
||||
Text string `json:"text,omitempty"` // New style text.
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"` // The css style sheet identifier.
|
||||
Range *SourceRange `json:"range"` // The range of the style text in the enclosing stylesheet.
|
||||
Text string `json:"text"` // New style text.
|
||||
}
|
||||
|
||||
// InlineTextBox details of post layout rendered text positions. The exact
|
||||
// layout should not be regarded as stable and may change between versions.
|
||||
type InlineTextBox struct {
|
||||
BoundingBox *dom.Rect `json:"boundingBox,omitempty"` // The absolute position bounding box.
|
||||
StartCharacterIndex int64 `json:"startCharacterIndex,omitempty"` // 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.
|
||||
BoundingBox *dom.Rect `json:"boundingBox"` // The absolute position bounding box.
|
||||
StartCharacterIndex int64 `json:"startCharacterIndex"` // The starting index in characters, for 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
|
||||
|
|
|
@ -468,17 +468,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase4(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Database != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"database\":")
|
||||
if in.Database == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Database).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"database\":")
|
||||
if in.Database == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Database).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -543,22 +541,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase5(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Message != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Code != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"code\":")
|
||||
out.Int64(int64(in.Code))
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"code\":")
|
||||
out.Int64(int64(in.Code))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -744,38 +738,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDatabase8(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Domain != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"domain\":")
|
||||
out.String(string(in.Domain))
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
first = false
|
||||
out.RawString("\"domain\":")
|
||||
out.String(string(in.Domain))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Version != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"version\":")
|
||||
out.String(string(in.Version))
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"version\":")
|
||||
out.String(string(in.Version))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
// EventAddDatabase [no description].
|
||||
type EventAddDatabase struct {
|
||||
Database *Database `json:"database,omitempty"`
|
||||
Database *Database `json:"database"`
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -12,14 +12,14 @@ func (t ID) String() string {
|
|||
|
||||
// Database database object.
|
||||
type Database struct {
|
||||
ID ID `json:"id,omitempty"` // Database ID.
|
||||
Domain string `json:"domain,omitempty"` // Database domain.
|
||||
Name string `json:"name,omitempty"` // Database name.
|
||||
Version string `json:"version,omitempty"` // Database version.
|
||||
ID ID `json:"id"` // Database ID.
|
||||
Domain string `json:"domain"` // Database domain.
|
||||
Name string `json:"name"` // Database name.
|
||||
Version string `json:"version"` // Database version.
|
||||
}
|
||||
|
||||
// Error database error.
|
||||
type Error struct {
|
||||
Message string `json:"message,omitempty"` // Error message.
|
||||
Code int64 `json:"code,omitempty"` // Error code.
|
||||
Message string `json:"message"` // Error message.
|
||||
Code int64 `json:"code"` // Error code.
|
||||
}
|
||||
|
|
|
@ -1483,22 +1483,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger16(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.LineNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Float64(float64(in.LineNumber))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.LineContent != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineContent\":")
|
||||
out.String(string(in.LineContent))
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Float64(float64(in.LineNumber))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineContent\":")
|
||||
out.String(string(in.LineContent))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1770,22 +1766,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger19(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.LineNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ColumnNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1879,25 +1871,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger20(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Object != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"object\":")
|
||||
if in.Object == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Object).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"object\":")
|
||||
if in.Object == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Object).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
|
@ -2442,22 +2430,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger27(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ScriptID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.LineNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
if in.ColumnNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -2923,70 +2907,54 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger32(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ScriptID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.StartLine != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"startLine\":")
|
||||
out.Int64(int64(in.StartLine))
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.StartColumn != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"startColumn\":")
|
||||
out.Int64(int64(in.StartColumn))
|
||||
first = false
|
||||
out.RawString("\"startLine\":")
|
||||
out.Int64(int64(in.StartLine))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.EndLine != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"endLine\":")
|
||||
out.Int64(int64(in.EndLine))
|
||||
first = false
|
||||
out.RawString("\"startColumn\":")
|
||||
out.Int64(int64(in.StartColumn))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.EndColumn != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"endColumn\":")
|
||||
out.Int64(int64(in.EndColumn))
|
||||
first = false
|
||||
out.RawString("\"endLine\":")
|
||||
out.Int64(int64(in.EndLine))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ExecutionContextID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"executionContextId\":")
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
first = false
|
||||
out.RawString("\"endColumn\":")
|
||||
out.Int64(int64(in.EndColumn))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Hash != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hash\":")
|
||||
out.String(string(in.Hash))
|
||||
first = false
|
||||
out.RawString("\"executionContextId\":")
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hash\":")
|
||||
out.String(string(in.Hash))
|
||||
if (in.ExecutionContextAuxData).IsDefined() {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -3142,70 +3110,54 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger33(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ScriptID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.StartLine != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"startLine\":")
|
||||
out.Int64(int64(in.StartLine))
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.StartColumn != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"startColumn\":")
|
||||
out.Int64(int64(in.StartColumn))
|
||||
first = false
|
||||
out.RawString("\"startLine\":")
|
||||
out.Int64(int64(in.StartLine))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.EndLine != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"endLine\":")
|
||||
out.Int64(int64(in.EndLine))
|
||||
first = false
|
||||
out.RawString("\"startColumn\":")
|
||||
out.Int64(int64(in.StartColumn))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.EndColumn != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"endColumn\":")
|
||||
out.Int64(int64(in.EndColumn))
|
||||
first = false
|
||||
out.RawString("\"endLine\":")
|
||||
out.Int64(int64(in.EndLine))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ExecutionContextID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"executionContextId\":")
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
first = false
|
||||
out.RawString("\"endColumn\":")
|
||||
out.Int64(int64(in.EndColumn))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Hash != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hash\":")
|
||||
out.String(string(in.Hash))
|
||||
first = false
|
||||
out.RawString("\"executionContextId\":")
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hash\":")
|
||||
out.String(string(in.Hash))
|
||||
if (in.ExecutionContextAuxData).IsDefined() {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -3444,37 +3396,33 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger35(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.CallFrames) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"callFrames\":")
|
||||
if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v24, v25 := range in.CallFrames {
|
||||
if v24 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v25 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v25).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"callFrames\":")
|
||||
if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v24, v25 := range in.CallFrames {
|
||||
if v24 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v25 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v25).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if in.Reason != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"reason\":")
|
||||
(in.Reason).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"reason\":")
|
||||
(in.Reason).MarshalEasyJSON(out)
|
||||
if (in.Data).IsDefined() {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -3585,25 +3533,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger36(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.BreakpointID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"breakpointId\":")
|
||||
out.String(string(in.BreakpointID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Location != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"location\":")
|
||||
if in.Location == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Location).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"breakpointId\":")
|
||||
out.String(string(in.BreakpointID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"location\":")
|
||||
if in.Location == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Location).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4184,22 +4128,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.CallFrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"callFrameId\":")
|
||||
out.String(string(in.CallFrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.FunctionName != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"functionName\":")
|
||||
out.String(string(in.FunctionName))
|
||||
first = false
|
||||
out.RawString("\"callFrameId\":")
|
||||
out.String(string(in.CallFrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"functionName\":")
|
||||
out.String(string(in.FunctionName))
|
||||
if in.FunctionLocation != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -4212,52 +4152,46 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger42(out *jwriter.Writer
|
|||
(*in.FunctionLocation).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
if in.Location != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"location\":")
|
||||
if in.Location == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Location).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.ScopeChain) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scopeChain\":")
|
||||
if in.ScopeChain == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v29, v30 := range in.ScopeChain {
|
||||
if v29 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v30 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v30).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"location\":")
|
||||
if in.Location == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Location).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scopeChain\":")
|
||||
if in.ScopeChain == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v29, v30 := range in.ScopeChain {
|
||||
if v29 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v30 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v30).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if in.This != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"this\":")
|
||||
if in.This == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.This).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"this\":")
|
||||
if in.This == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.This).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.ReturnValue != nil {
|
||||
if !first {
|
||||
|
@ -4338,22 +4272,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDebugger43(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ScriptID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.LineNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
if in.ColumnNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
|
|
@ -11,14 +11,14 @@ import (
|
|||
// EventScriptParsed fired when virtual machine parses script. This event is
|
||||
// also fired for all known and uncollected scripts upon enabling debugger.
|
||||
type EventScriptParsed struct {
|
||||
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Identifier of the script parsed.
|
||||
URL string `json:"url,omitempty"` // 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).
|
||||
StartColumn int64 `json:"startColumn,omitempty"` // Column offset of the script within the resource with given URL.
|
||||
EndLine int64 `json:"endLine,omitempty"` // Last line of the script.
|
||||
EndColumn int64 `json:"endColumn,omitempty"` // Length of the last line of the script.
|
||||
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId,omitempty"` // Specifies script creation context.
|
||||
Hash string `json:"hash,omitempty"` // Content hash of the script.
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed.
|
||||
URL string `json:"url"` // URL or name of the script parsed (if any).
|
||||
StartLine int64 `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags).
|
||||
StartColumn int64 `json:"startColumn"` // Column offset of the script within the resource with given URL.
|
||||
EndLine int64 `json:"endLine"` // Last line of the script.
|
||||
EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
|
||||
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
|
||||
Hash string `json:"hash"` // Content hash of the script.
|
||||
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.
|
||||
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
|
||||
// script.
|
||||
type EventScriptFailedToParse struct {
|
||||
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Identifier of the script parsed.
|
||||
URL string `json:"url,omitempty"` // 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).
|
||||
StartColumn int64 `json:"startColumn,omitempty"` // Column offset of the script within the resource with given URL.
|
||||
EndLine int64 `json:"endLine,omitempty"` // Last line of the script.
|
||||
EndColumn int64 `json:"endColumn,omitempty"` // Length of the last line of the script.
|
||||
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId,omitempty"` // Specifies script creation context.
|
||||
Hash string `json:"hash,omitempty"` // Content hash of the script.
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // Identifier of the script parsed.
|
||||
URL string `json:"url"` // URL or name of the script parsed (if any).
|
||||
StartLine int64 `json:"startLine"` // Line offset of the script within the resource with given URL (for script tags).
|
||||
StartColumn int64 `json:"startColumn"` // Column offset of the script within the resource with given URL.
|
||||
EndLine int64 `json:"endLine"` // Last line of the script.
|
||||
EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
|
||||
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
|
||||
Hash string `json:"hash"` // Content hash of the script.
|
||||
ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
|
||||
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.
|
||||
|
@ -50,15 +50,15 @@ type EventScriptFailedToParse struct {
|
|||
// EventBreakpointResolved fired when breakpoint is resolved to an actual
|
||||
// script and location.
|
||||
type EventBreakpointResolved struct {
|
||||
BreakpointID BreakpointID `json:"breakpointId,omitempty"` // Breakpoint unique identifier.
|
||||
Location *Location `json:"location,omitempty"` // Actual breakpoint location.
|
||||
BreakpointID BreakpointID `json:"breakpointId"` // Breakpoint unique identifier.
|
||||
Location *Location `json:"location"` // Actual breakpoint location.
|
||||
}
|
||||
|
||||
// EventPaused fired when the virtual machine stopped on breakpoint or
|
||||
// exception or any other stop criteria.
|
||||
type EventPaused struct {
|
||||
CallFrames []*CallFrame `json:"callFrames,omitempty"` // Call stack the virtual machine stopped on.
|
||||
Reason PausedReason `json:"reason,omitempty"` // Pause reason.
|
||||
CallFrames []*CallFrame `json:"callFrames"` // Call stack the virtual machine stopped on.
|
||||
Reason PausedReason `json:"reason"` // Pause reason.
|
||||
Data easyjson.RawMessage `json:"data,omitempty"`
|
||||
HitBreakpoints []string `json:"hitBreakpoints,omitempty"` // Hit breakpoints IDs
|
||||
AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.
|
||||
|
|
|
@ -29,32 +29,32 @@ func (t CallFrameID) String() string {
|
|||
|
||||
// Location location in the source code.
|
||||
type Location struct {
|
||||
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Script identifier as reported in the Debugger.scriptParsed.
|
||||
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the script (0-based).
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // Script identifier as reported in the Debugger.scriptParsed.
|
||||
LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
|
||||
ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based).
|
||||
}
|
||||
|
||||
// ScriptPosition location in the source code.
|
||||
type ScriptPosition struct {
|
||||
LineNumber int64 `json:"lineNumber,omitempty"`
|
||||
ColumnNumber int64 `json:"columnNumber,omitempty"`
|
||||
LineNumber int64 `json:"lineNumber"`
|
||||
ColumnNumber int64 `json:"columnNumber"`
|
||||
}
|
||||
|
||||
// CallFrame javaScript call frame. Array of call frames form the call stack.
|
||||
type CallFrame struct {
|
||||
CallFrameID CallFrameID `json:"callFrameId,omitempty"` // 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.
|
||||
CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier. This identifier is only valid while the virtual machine is paused.
|
||||
FunctionName string `json:"functionName"` // Name of the JavaScript function called on this call frame.
|
||||
FunctionLocation *Location `json:"functionLocation,omitempty"` // Location in the source code.
|
||||
Location *Location `json:"location,omitempty"` // Location in the source code.
|
||||
ScopeChain []*Scope `json:"scopeChain,omitempty"` // Scope chain for this call frame.
|
||||
This *runtime.RemoteObject `json:"this,omitempty"` // this object for this call frame.
|
||||
Location *Location `json:"location"` // Location in the source code.
|
||||
ScopeChain []*Scope `json:"scopeChain"` // Scope chain 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.
|
||||
}
|
||||
|
||||
// Scope scope description.
|
||||
type Scope struct {
|
||||
Type ScopeType `json:"type,omitempty"` // 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.
|
||||
Type ScopeType `json:"type"` // Scope type.
|
||||
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"`
|
||||
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
|
||||
|
@ -62,14 +62,14 @@ type Scope struct {
|
|||
|
||||
// SearchMatch search match for resource.
|
||||
type SearchMatch struct {
|
||||
LineNumber float64 `json:"lineNumber,omitempty"` // Line number in resource content.
|
||||
LineContent string `json:"lineContent,omitempty"` // Line with match content.
|
||||
LineNumber float64 `json:"lineNumber"` // Line number in resource content.
|
||||
LineContent string `json:"lineContent"` // Line with match content.
|
||||
}
|
||||
|
||||
// BreakLocation [no description].
|
||||
type BreakLocation struct {
|
||||
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Script identifier as reported in the Debugger.scriptParsed.
|
||||
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the script (0-based).
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // Script identifier as reported in the Debugger.scriptParsed.
|
||||
LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based).
|
||||
ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based).
|
||||
Type BreakLocationType `json:"type,omitempty"`
|
||||
}
|
||||
|
|
|
@ -180,62 +180,56 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom1(out *jwriter.Writer, in S
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.Bounds) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"bounds\":")
|
||||
if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v4, v5 := range in.Bounds {
|
||||
if v4 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.Float64(float64(v5))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.Shape) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"shape\":")
|
||||
if in.Shape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v6, v7 := range in.Shape {
|
||||
if v6 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
(v7).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"bounds\":")
|
||||
if in.Bounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v4, v5 := range in.Bounds {
|
||||
if v4 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
out.Float64(float64(v5))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if len(in.MarginShape) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"marginShape\":")
|
||||
if in.MarginShape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.MarginShape {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
(v9).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"shape\":")
|
||||
if in.Shape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v6, v7 := range in.Shape {
|
||||
if v6 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
(v7).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"marginShape\":")
|
||||
if in.MarginShape == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.MarginShape {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
(v9).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1522,38 +1516,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom18(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.X != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"x\":")
|
||||
out.Float64(float64(in.X))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Y != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"y\":")
|
||||
out.Float64(float64(in.Y))
|
||||
first = false
|
||||
out.RawString("\"x\":")
|
||||
out.Float64(float64(in.X))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Width != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"width\":")
|
||||
out.Float64(float64(in.Width))
|
||||
first = false
|
||||
out.RawString("\"y\":")
|
||||
out.Float64(float64(in.Y))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Height != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"height\":")
|
||||
out.Float64(float64(in.Height))
|
||||
first = false
|
||||
out.RawString("\"width\":")
|
||||
out.Float64(float64(in.Width))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"height\":")
|
||||
out.Float64(float64(in.Height))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -3995,25 +3981,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom49(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.HostID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hostId\":")
|
||||
out.Int64(int64(in.HostID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Root != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"root\":")
|
||||
if in.Root == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Root).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hostId\":")
|
||||
out.Int64(int64(in.HostID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"root\":")
|
||||
if in.Root == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Root).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4078,22 +4060,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom50(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.HostID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hostId\":")
|
||||
out.Int64(int64(in.HostID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.RootID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"rootId\":")
|
||||
out.Int64(int64(in.RootID))
|
||||
first = false
|
||||
out.RawString("\"hostId\":")
|
||||
out.Int64(int64(in.HostID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"rootId\":")
|
||||
out.Int64(int64(in.RootID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -4186,36 +4164,32 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom51(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ParentID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentId\":")
|
||||
out.Int64(int64(in.ParentID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.Nodes) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodes\":")
|
||||
if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v32, v33 := range in.Nodes {
|
||||
if v32 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v33 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v33).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentId\":")
|
||||
out.Int64(int64(in.ParentID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodes\":")
|
||||
if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v32, v33 := range in.Nodes {
|
||||
if v32 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v33 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v33).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4280,22 +4254,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom52(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ParentID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentId\":")
|
||||
out.Int64(int64(in.ParentID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PseudoElementID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pseudoElementId\":")
|
||||
out.Int64(int64(in.PseudoElementID))
|
||||
first = false
|
||||
out.RawString("\"parentId\":")
|
||||
out.Int64(int64(in.ParentID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pseudoElementId\":")
|
||||
out.Int64(int64(in.PseudoElementID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -4367,25 +4337,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom53(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ParentID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentId\":")
|
||||
out.Int64(int64(in.ParentID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PseudoElement != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pseudoElement\":")
|
||||
if in.PseudoElement == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.PseudoElement).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentId\":")
|
||||
out.Int64(int64(in.ParentID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pseudoElement\":")
|
||||
if in.PseudoElement == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.PseudoElement).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4469,24 +4435,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom54(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.NodeIds) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeIds\":")
|
||||
if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v35, v36 := range in.NodeIds {
|
||||
if v35 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.Int64(int64(v36))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeIds\":")
|
||||
if in.NodeIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v35, v36 := range in.NodeIds {
|
||||
if v35 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
out.Int64(int64(v36))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4639,36 +4603,32 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom56(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.InsertionPointID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"insertionPointId\":")
|
||||
out.Int64(int64(in.InsertionPointID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.DistributedNodes) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"distributedNodes\":")
|
||||
if in.DistributedNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v38, v39 := range in.DistributedNodes {
|
||||
if v38 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v39 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v39).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"insertionPointId\":")
|
||||
out.Int64(int64(in.InsertionPointID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"distributedNodes\":")
|
||||
if in.DistributedNodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v38, v39 := range in.DistributedNodes {
|
||||
if v38 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v39 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v39).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4733,22 +4693,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom57(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ParentNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentNodeId\":")
|
||||
out.Int64(int64(in.ParentNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
first = false
|
||||
out.RawString("\"parentNodeId\":")
|
||||
out.Int64(int64(in.ParentNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -4822,33 +4778,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom58(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ParentNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentNodeId\":")
|
||||
out.Int64(int64(in.ParentNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PreviousNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"previousNodeId\":")
|
||||
out.Int64(int64(in.PreviousNodeID))
|
||||
first = false
|
||||
out.RawString("\"parentNodeId\":")
|
||||
out.Int64(int64(in.ParentNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Node != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"node\":")
|
||||
if in.Node == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Node).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"previousNodeId\":")
|
||||
out.Int64(int64(in.PreviousNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"node\":")
|
||||
if in.Node == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Node).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4913,22 +4863,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom59(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ChildNodeCount != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"childNodeCount\":")
|
||||
out.Int64(int64(in.ChildNodeCount))
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"childNodeCount\":")
|
||||
out.Int64(int64(in.ChildNodeCount))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -4992,22 +4938,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom60(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.CharacterData != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"characterData\":")
|
||||
out.String(string(in.CharacterData))
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"characterData\":")
|
||||
out.String(string(in.CharacterData))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -5071,22 +5013,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom61(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -5152,30 +5090,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom62(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Value != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
out.String(string(in.Value))
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
out.String(string(in.Value))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -5848,98 +5780,86 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.Content) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"content\":")
|
||||
if in.Content == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v47, v48 := range in.Content {
|
||||
if v47 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.Float64(float64(v48))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"content\":")
|
||||
if in.Content == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v47, v48 := range in.Content {
|
||||
if v47 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
out.Float64(float64(v48))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if len(in.Padding) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"padding\":")
|
||||
if in.Padding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v49, v50 := range in.Padding {
|
||||
if v49 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.Float64(float64(v50))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"padding\":")
|
||||
if in.Padding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v49, v50 := range in.Padding {
|
||||
if v49 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
out.Float64(float64(v50))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if len(in.Border) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"border\":")
|
||||
if in.Border == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v51, v52 := range in.Border {
|
||||
if v51 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.Float64(float64(v52))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"border\":")
|
||||
if in.Border == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v51, v52 := range in.Border {
|
||||
if v51 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
out.Float64(float64(v52))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if len(in.Margin) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"margin\":")
|
||||
if in.Margin == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v53, v54 := range in.Margin {
|
||||
if v53 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.Float64(float64(v54))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"margin\":")
|
||||
if in.Margin == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v53, v54 := range in.Margin {
|
||||
if v53 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
out.Float64(float64(v54))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if in.Width != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"width\":")
|
||||
out.Int64(int64(in.Width))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Height != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"height\":")
|
||||
out.Int64(int64(in.Height))
|
||||
first = false
|
||||
out.RawString("\"width\":")
|
||||
out.Int64(int64(in.Width))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"height\":")
|
||||
out.Int64(int64(in.Height))
|
||||
if in.ShapeOutside != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
|
|
@ -14,85 +14,85 @@ type EventDocumentUpdated struct{}
|
|||
// missing DOM structure. This happens upon most of the calls requesting node
|
||||
// ids.
|
||||
type EventSetChildNodes struct {
|
||||
ParentID cdp.NodeID `json:"parentId,omitempty"` // Parent node id to populate with children.
|
||||
Nodes []*cdp.Node `json:"nodes,omitempty"` // Child nodes array.
|
||||
ParentID cdp.NodeID `json:"parentId"` // Parent node id to populate with children.
|
||||
Nodes []*cdp.Node `json:"nodes"` // Child nodes array.
|
||||
}
|
||||
|
||||
// EventAttributeModified fired when Element's attribute is modified.
|
||||
type EventAttributeModified struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
|
||||
Name string `json:"name,omitempty"` // Attribute name.
|
||||
Value string `json:"value,omitempty"` // Attribute value.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
|
||||
Name string `json:"name"` // Attribute name.
|
||||
Value string `json:"value"` // Attribute value.
|
||||
}
|
||||
|
||||
// EventAttributeRemoved fired when Element's attribute is removed.
|
||||
type EventAttributeRemoved struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
|
||||
Name string `json:"name,omitempty"` // A ttribute name.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
|
||||
Name string `json:"name"` // A ttribute name.
|
||||
}
|
||||
|
||||
// EventInlineStyleInvalidated fired when Element's inline style is modified
|
||||
// via a CSS property modification.
|
||||
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.
|
||||
type EventCharacterDataModified struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
|
||||
CharacterData string `json:"characterData,omitempty"` // New text value.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
|
||||
CharacterData string `json:"characterData"` // New text value.
|
||||
}
|
||||
|
||||
// EventChildNodeCountUpdated fired when Container's child node count has
|
||||
// changed.
|
||||
type EventChildNodeCountUpdated struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has changed.
|
||||
ChildNodeCount int64 `json:"childNodeCount,omitempty"` // New node count.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has changed.
|
||||
ChildNodeCount int64 `json:"childNodeCount"` // New node count.
|
||||
}
|
||||
|
||||
// EventChildNodeInserted mirrors DOMNodeInserted event.
|
||||
type EventChildNodeInserted struct {
|
||||
ParentNodeID cdp.NodeID `json:"parentNodeId,omitempty"` // Id of the node that has changed.
|
||||
PreviousNodeID cdp.NodeID `json:"previousNodeId,omitempty"` // If of the previous siblint.
|
||||
Node *cdp.Node `json:"node,omitempty"` // Inserted node data.
|
||||
ParentNodeID cdp.NodeID `json:"parentNodeId"` // Id of the node that has changed.
|
||||
PreviousNodeID cdp.NodeID `json:"previousNodeId"` // If of the previous siblint.
|
||||
Node *cdp.Node `json:"node"` // Inserted node data.
|
||||
}
|
||||
|
||||
// EventChildNodeRemoved mirrors DOMNodeRemoved event.
|
||||
type EventChildNodeRemoved struct {
|
||||
ParentNodeID cdp.NodeID `json:"parentNodeId,omitempty"` // Parent id.
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Id of the node that has been removed.
|
||||
ParentNodeID cdp.NodeID `json:"parentNodeId"` // Parent id.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the node that has been removed.
|
||||
}
|
||||
|
||||
// EventShadowRootPushed called when shadow root is pushed into the element.
|
||||
type EventShadowRootPushed struct {
|
||||
HostID cdp.NodeID `json:"hostId,omitempty"` // Host element id.
|
||||
Root *cdp.Node `json:"root,omitempty"` // Shadow root.
|
||||
HostID cdp.NodeID `json:"hostId"` // Host element id.
|
||||
Root *cdp.Node `json:"root"` // Shadow root.
|
||||
}
|
||||
|
||||
// EventShadowRootPopped called when shadow root is popped from the element.
|
||||
type EventShadowRootPopped struct {
|
||||
HostID cdp.NodeID `json:"hostId,omitempty"` // Host element id.
|
||||
RootID cdp.NodeID `json:"rootId,omitempty"` // Shadow root id.
|
||||
HostID cdp.NodeID `json:"hostId"` // Host element id.
|
||||
RootID cdp.NodeID `json:"rootId"` // Shadow root id.
|
||||
}
|
||||
|
||||
// EventPseudoElementAdded called when a pseudo element is added to an
|
||||
// element.
|
||||
type EventPseudoElementAdded struct {
|
||||
ParentID cdp.NodeID `json:"parentId,omitempty"` // Pseudo element's parent element id.
|
||||
PseudoElement *cdp.Node `json:"pseudoElement,omitempty"` // The added pseudo element.
|
||||
ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
|
||||
PseudoElement *cdp.Node `json:"pseudoElement"` // The added pseudo element.
|
||||
}
|
||||
|
||||
// EventPseudoElementRemoved called when a pseudo element is removed from an
|
||||
// element.
|
||||
type EventPseudoElementRemoved struct {
|
||||
ParentID cdp.NodeID `json:"parentId,omitempty"` // Pseudo element's parent element id.
|
||||
PseudoElementID cdp.NodeID `json:"pseudoElementId,omitempty"` // The removed pseudo element id.
|
||||
ParentID cdp.NodeID `json:"parentId"` // Pseudo element's parent element id.
|
||||
PseudoElementID cdp.NodeID `json:"pseudoElementId"` // The removed pseudo element id.
|
||||
}
|
||||
|
||||
// EventDistributedNodesUpdated called when distribution is changed.
|
||||
type EventDistributedNodesUpdated struct {
|
||||
InsertionPointID cdp.NodeID `json:"insertionPointId,omitempty"` // Insertion point where distributed nodes were updated.
|
||||
DistributedNodes []*cdp.BackendNode `json:"distributedNodes,omitempty"` // Distributed nodes for given insertion point.
|
||||
InsertionPointID cdp.NodeID `json:"insertionPointId"` // Insertion point where distributed nodes were updated.
|
||||
DistributedNodes []*cdp.BackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point.
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -10,26 +10,26 @@ type Quad []float64
|
|||
|
||||
// BoxModel box model.
|
||||
type BoxModel struct {
|
||||
Content Quad `json:"content,omitempty"` // Content box
|
||||
Padding Quad `json:"padding,omitempty"` // Padding box
|
||||
Border Quad `json:"border,omitempty"` // Border box
|
||||
Margin Quad `json:"margin,omitempty"` // Margin box
|
||||
Width int64 `json:"width,omitempty"` // Node width
|
||||
Height int64 `json:"height,omitempty"` // Node height
|
||||
Content Quad `json:"content"` // Content box
|
||||
Padding Quad `json:"padding"` // Padding box
|
||||
Border Quad `json:"border"` // Border box
|
||||
Margin Quad `json:"margin"` // Margin box
|
||||
Width int64 `json:"width"` // Node width
|
||||
Height int64 `json:"height"` // Node height
|
||||
ShapeOutside *ShapeOutsideInfo `json:"shapeOutside,omitempty"` // Shape outside coordinates
|
||||
}
|
||||
|
||||
// ShapeOutsideInfo cSS Shape Outside details.
|
||||
type ShapeOutsideInfo struct {
|
||||
Bounds Quad `json:"bounds,omitempty"` // Shape bounds
|
||||
Shape []easyjson.RawMessage `json:"shape,omitempty"` // Shape coordinate details
|
||||
MarginShape []easyjson.RawMessage `json:"marginShape,omitempty"` // Margin shape bounds
|
||||
Bounds Quad `json:"bounds"` // Shape bounds
|
||||
Shape []easyjson.RawMessage `json:"shape"` // Shape coordinate details
|
||||
MarginShape []easyjson.RawMessage `json:"marginShape"` // Margin shape bounds
|
||||
}
|
||||
|
||||
// Rect rectangle.
|
||||
type Rect struct {
|
||||
X float64 `json:"x,omitempty"` // X coordinate
|
||||
Y float64 `json:"y,omitempty"` // Y coordinate
|
||||
Width float64 `json:"width,omitempty"` // Rectangle width
|
||||
Height float64 `json:"height,omitempty"` // Rectangle height
|
||||
X float64 `json:"x"` // X coordinate
|
||||
Y float64 `json:"y"` // Y coordinate
|
||||
Width float64 `json:"width"` // Rectangle width
|
||||
Height float64 `json:"height"` // Rectangle height
|
||||
}
|
||||
|
|
|
@ -859,62 +859,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomdebugger10(out *jwriter.Wri
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
out.String(string(in.Type))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.UseCapture {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"useCapture\":")
|
||||
out.Bool(bool(in.UseCapture))
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
out.String(string(in.Type))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Passive {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"passive\":")
|
||||
out.Bool(bool(in.Passive))
|
||||
first = false
|
||||
out.RawString("\"useCapture\":")
|
||||
out.Bool(bool(in.UseCapture))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Once {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"once\":")
|
||||
out.Bool(bool(in.Once))
|
||||
first = false
|
||||
out.RawString("\"passive\":")
|
||||
out.Bool(bool(in.Passive))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ScriptID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
first = false
|
||||
out.RawString("\"once\":")
|
||||
out.Bool(bool(in.Once))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.LineNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ColumnNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
if in.Handler != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
|
|
@ -59,13 +59,13 @@ func (t *DOMBreakpointType) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// EventListener object event listener.
|
||||
type EventListener struct {
|
||||
Type string `json:"type,omitempty"` // EventListener's type.
|
||||
UseCapture bool `json:"useCapture,omitempty"` // EventListener's useCapture.
|
||||
Passive bool `json:"passive,omitempty"` // EventListener's passive flag.
|
||||
Once bool `json:"once,omitempty"` // EventListener's once flag.
|
||||
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // Script id of the handler code.
|
||||
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the script (0-based).
|
||||
ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number in the script (0-based).
|
||||
Type string `json:"type"` // EventListener's type.
|
||||
UseCapture bool `json:"useCapture"` // EventListener's useCapture.
|
||||
Passive bool `json:"passive"` // EventListener's passive flag.
|
||||
Once bool `json:"once"` // EventListener's once flag.
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // Script id of the handler code.
|
||||
LineNumber int64 `json:"lineNumber"` // Line 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.
|
||||
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).
|
||||
|
|
|
@ -56,22 +56,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Value != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
out.String(string(in.Value))
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
out.String(string(in.Value))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -178,25 +174,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot1(out *jwriter.Writ
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.DomNodeIndex != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"domNodeIndex\":")
|
||||
out.Int64(int64(in.DomNodeIndex))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.BoundingBox != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"boundingBox\":")
|
||||
if in.BoundingBox == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.BoundingBox).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"domNodeIndex\":")
|
||||
out.Int64(int64(in.DomNodeIndex))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"boundingBox\":")
|
||||
if in.BoundingBox == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.BoundingBox).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.LayoutText != "" {
|
||||
if !first {
|
||||
|
@ -725,38 +717,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot4(out *jwriter.Writ
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeType != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeType\":")
|
||||
(in.NodeType).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NodeName != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeName\":")
|
||||
out.String(string(in.NodeName))
|
||||
first = false
|
||||
out.RawString("\"nodeType\":")
|
||||
(in.NodeType).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NodeValue != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeValue\":")
|
||||
out.String(string(in.NodeValue))
|
||||
first = false
|
||||
out.RawString("\"nodeName\":")
|
||||
out.String(string(in.NodeName))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.BackendNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
first = false
|
||||
out.RawString("\"nodeValue\":")
|
||||
out.String(string(in.NodeValue))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
if len(in.ChildNodeIndexes) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1004,28 +988,26 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomsnapshot5(out *jwriter.Writ
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.Properties) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"properties\":")
|
||||
if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v26, v27 := range in.Properties {
|
||||
if v26 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v27 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v27).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"properties\":")
|
||||
if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v26, v27 := range in.Properties {
|
||||
if v26 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v27 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v27).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@ import (
|
|||
|
||||
// DOMNode a Node in the DOM tree.
|
||||
type DOMNode struct {
|
||||
NodeType cdp.NodeType `json:"nodeType,omitempty"` // Node's nodeType.
|
||||
NodeName string `json:"nodeName,omitempty"` // Node's nodeName.
|
||||
NodeValue string `json:"nodeValue,omitempty"` // Node's nodeValue.
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node's id, corresponds to DOM.Node.backendNodeId.
|
||||
NodeType cdp.NodeType `json:"nodeType"` // Node's nodeType.
|
||||
NodeName string `json:"nodeName"` // Node's nodeName.
|
||||
NodeValue string `json:"nodeValue"` // Node's nodeValue.
|
||||
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.
|
||||
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.
|
||||
|
@ -33,8 +33,8 @@ type DOMNode struct {
|
|||
|
||||
// LayoutTreeNode details of an element in the DOM tree with a LayoutObject.
|
||||
type LayoutTreeNode struct {
|
||||
DomNodeIndex int64 `json:"domNodeIndex,omitempty"` // 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.
|
||||
DomNodeIndex int64 `json:"domNodeIndex"` // The index of the related DOM node in the domNodes array returned by getSnapshot.
|
||||
BoundingBox *dom.Rect `json:"boundingBox"` // The absolute position bounding box.
|
||||
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.
|
||||
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
|
||||
// whitelist.
|
||||
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.
|
||||
type NameValue struct {
|
||||
Name string `json:"name,omitempty"` // Attribute/property name.
|
||||
Value string `json:"value,omitempty"` // Attribute/property value.
|
||||
Name string `json:"name"` // Attribute/property name.
|
||||
Value string `json:"value"` // Attribute/property value.
|
||||
}
|
||||
|
|
|
@ -54,22 +54,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.SecurityOrigin != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"securityOrigin\":")
|
||||
out.String(string(in.SecurityOrigin))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.IsLocalStorage {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isLocalStorage\":")
|
||||
out.Bool(bool(in.IsLocalStorage))
|
||||
first = false
|
||||
out.RawString("\"securityOrigin\":")
|
||||
out.String(string(in.SecurityOrigin))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isLocalStorage\":")
|
||||
out.Bool(bool(in.IsLocalStorage))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -533,17 +529,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage5(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.StorageID != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"storageId\":")
|
||||
if in.StorageID == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.StorageID).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"storageId\":")
|
||||
if in.StorageID == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.StorageID).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -620,42 +614,34 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage6(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.StorageID != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"storageId\":")
|
||||
if in.StorageID == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.StorageID).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Key != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"key\":")
|
||||
out.String(string(in.Key))
|
||||
first = false
|
||||
out.RawString("\"storageId\":")
|
||||
if in.StorageID == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.StorageID).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.OldValue != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"oldValue\":")
|
||||
out.String(string(in.OldValue))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NewValue != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"newValue\":")
|
||||
out.String(string(in.NewValue))
|
||||
first = false
|
||||
out.RawString("\"key\":")
|
||||
out.String(string(in.Key))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"oldValue\":")
|
||||
out.String(string(in.OldValue))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"newValue\":")
|
||||
out.String(string(in.NewValue))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -727,26 +713,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage7(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.StorageID != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"storageId\":")
|
||||
if in.StorageID == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.StorageID).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Key != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"key\":")
|
||||
out.String(string(in.Key))
|
||||
first = false
|
||||
out.RawString("\"storageId\":")
|
||||
if in.StorageID == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.StorageID).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"key\":")
|
||||
out.String(string(in.Key))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -820,34 +802,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDomstorage8(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.StorageID != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"storageId\":")
|
||||
if in.StorageID == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.StorageID).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Key != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"key\":")
|
||||
out.String(string(in.Key))
|
||||
first = false
|
||||
out.RawString("\"storageId\":")
|
||||
if in.StorageID == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.StorageID).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.NewValue != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"newValue\":")
|
||||
out.String(string(in.NewValue))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"key\":")
|
||||
out.String(string(in.Key))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"newValue\":")
|
||||
out.String(string(in.NewValue))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -8,28 +8,28 @@ import (
|
|||
|
||||
// EventDomStorageItemsCleared [no description].
|
||||
type EventDomStorageItemsCleared struct {
|
||||
StorageID *StorageID `json:"storageId,omitempty"`
|
||||
StorageID *StorageID `json:"storageId"`
|
||||
}
|
||||
|
||||
// EventDomStorageItemRemoved [no description].
|
||||
type EventDomStorageItemRemoved struct {
|
||||
StorageID *StorageID `json:"storageId,omitempty"`
|
||||
Key string `json:"key,omitempty"`
|
||||
StorageID *StorageID `json:"storageId"`
|
||||
Key string `json:"key"`
|
||||
}
|
||||
|
||||
// EventDomStorageItemAdded [no description].
|
||||
type EventDomStorageItemAdded struct {
|
||||
StorageID *StorageID `json:"storageId,omitempty"`
|
||||
Key string `json:"key,omitempty"`
|
||||
NewValue string `json:"newValue,omitempty"`
|
||||
StorageID *StorageID `json:"storageId"`
|
||||
Key string `json:"key"`
|
||||
NewValue string `json:"newValue"`
|
||||
}
|
||||
|
||||
// EventDomStorageItemUpdated [no description].
|
||||
type EventDomStorageItemUpdated struct {
|
||||
StorageID *StorageID `json:"storageId,omitempty"`
|
||||
Key string `json:"key,omitempty"`
|
||||
OldValue string `json:"oldValue,omitempty"`
|
||||
NewValue string `json:"newValue,omitempty"`
|
||||
StorageID *StorageID `json:"storageId"`
|
||||
Key string `json:"key"`
|
||||
OldValue string `json:"oldValue"`
|
||||
NewValue string `json:"newValue"`
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -4,8 +4,8 @@ package domstorage
|
|||
|
||||
// StorageID dOM Storage identifier.
|
||||
type StorageID struct {
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // Security origin for the storage.
|
||||
IsLocalStorage bool `json:"isLocalStorage,omitempty"` // Whether the storage is local storage (not session storage).
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin for the storage.
|
||||
IsLocalStorage bool `json:"isLocalStorage"` // Whether the storage is local storage (not session storage).
|
||||
}
|
||||
|
||||
// Item dOM Storage item.
|
||||
|
|
228
cdp/easyjson.go
228
cdp/easyjson.go
|
@ -58,30 +58,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp(out *jwriter.Writer, in RGBA)
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.R != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"r\":")
|
||||
out.Int64(int64(in.R))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.G != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"g\":")
|
||||
out.Int64(int64(in.G))
|
||||
first = false
|
||||
out.RawString("\"r\":")
|
||||
out.Int64(int64(in.R))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.B != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"b\":")
|
||||
out.Int64(int64(in.B))
|
||||
first = false
|
||||
out.RawString("\"g\":")
|
||||
out.Int64(int64(in.G))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"b\":")
|
||||
out.Int64(int64(in.B))
|
||||
if in.A != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -366,14 +360,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp1(out *jwriter.Writer, in Node
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if in.ParentID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -382,46 +374,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp1(out *jwriter.Writer, in Node
|
|||
out.RawString("\"parentId\":")
|
||||
out.Int64(int64(in.ParentID))
|
||||
}
|
||||
if in.BackendNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NodeType != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeType\":")
|
||||
(in.NodeType).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NodeName != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeName\":")
|
||||
out.String(string(in.NodeName))
|
||||
first = false
|
||||
out.RawString("\"nodeType\":")
|
||||
(in.NodeType).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.LocalName != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"localName\":")
|
||||
out.String(string(in.LocalName))
|
||||
first = false
|
||||
out.RawString("\"nodeName\":")
|
||||
out.String(string(in.NodeName))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NodeValue != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeValue\":")
|
||||
out.String(string(in.NodeValue))
|
||||
first = false
|
||||
out.RawString("\"localName\":")
|
||||
out.String(string(in.LocalName))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeValue\":")
|
||||
out.String(string(in.NodeValue))
|
||||
if in.ChildNodeCount != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -736,22 +718,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp2(out *jwriter.Writer, in Mess
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Code != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"code\":")
|
||||
out.Int64(int64(in.Code))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Message != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
first = false
|
||||
out.RawString("\"code\":")
|
||||
out.Int64(int64(in.Code))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -946,14 +924,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Fram
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if in.ParentID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -962,14 +938,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Fram
|
|||
out.RawString("\"parentId\":")
|
||||
out.String(string(in.ParentID))
|
||||
}
|
||||
if in.LoaderID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"loaderId\":")
|
||||
out.String(string(in.LoaderID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"loaderId\":")
|
||||
out.String(string(in.LoaderID))
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -978,30 +952,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp4(out *jwriter.Writer, in Fram
|
|||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.SecurityOrigin != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"securityOrigin\":")
|
||||
out.String(string(in.SecurityOrigin))
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.MimeType != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"mimeType\":")
|
||||
out.String(string(in.MimeType))
|
||||
first = false
|
||||
out.RawString("\"securityOrigin\":")
|
||||
out.String(string(in.SecurityOrigin))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"mimeType\":")
|
||||
out.String(string(in.MimeType))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1067,30 +1035,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdp5(out *jwriter.Writer, in Back
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeType != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeType\":")
|
||||
(in.NodeType).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NodeName != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeName\":")
|
||||
out.String(string(in.NodeName))
|
||||
first = false
|
||||
out.RawString("\"nodeType\":")
|
||||
(in.NodeType).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.BackendNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
first = false
|
||||
out.RawString("\"nodeName\":")
|
||||
out.String(string(in.NodeName))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -893,22 +893,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpEmulation10(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Angle != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"angle\":")
|
||||
out.Int64(int64(in.Angle))
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"angle\":")
|
||||
out.Int64(int64(in.Angle))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,8 @@ import (
|
|||
|
||||
// ScreenOrientation screen orientation.
|
||||
type ScreenOrientation struct {
|
||||
Type OrientationType `json:"type,omitempty"` // Orientation type.
|
||||
Angle int64 `json:"angle,omitempty"` // Orientation angle.
|
||||
Type OrientationType `json:"type"` // Orientation type.
|
||||
Angle int64 `json:"angle"` // Orientation angle.
|
||||
}
|
||||
|
||||
// VirtualTimePolicy advance: If the scheduler runs out of immediate work,
|
||||
|
|
2261
cdp/har/easyjson.go
Normal file
2261
cdp/har/easyjson.go
Normal file
File diff suppressed because it is too large
Load Diff
9
cdp/har/har.go
Normal file
9
cdp/har/har.go
Normal 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
168
cdp/har/types.go
Normal 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.
|
||||
}
|
|
@ -511,48 +511,42 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler6(out *jwriter.Wri
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.CallFrame != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"callFrame\":")
|
||||
if in.CallFrame == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.CallFrame).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.SelfSize != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"selfSize\":")
|
||||
out.Float64(float64(in.SelfSize))
|
||||
first = false
|
||||
out.RawString("\"callFrame\":")
|
||||
if in.CallFrame == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.CallFrame).MarshalEasyJSON(out)
|
||||
}
|
||||
if len(in.Children) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"children\":")
|
||||
if in.Children == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Children {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"selfSize\":")
|
||||
out.Float64(float64(in.SelfSize))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"children\":")
|
||||
if in.Children == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Children {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -623,17 +617,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler7(out *jwriter.Wri
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Head != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"head\":")
|
||||
if in.Head == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Head).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"head\":")
|
||||
if in.Head == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Head).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1053,22 +1045,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler13(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Done != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"done\":")
|
||||
out.Int64(int64(in.Done))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Total != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"total\":")
|
||||
out.Int64(int64(in.Total))
|
||||
first = false
|
||||
out.RawString("\"done\":")
|
||||
out.Int64(int64(in.Done))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"total\":")
|
||||
out.Int64(int64(in.Total))
|
||||
if in.Finished {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1148,25 +1136,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler14(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.LastSeenObjectID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lastSeenObjectId\":")
|
||||
out.Int64(int64(in.LastSeenObjectID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Timestamp != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lastSeenObjectId\":")
|
||||
out.Int64(int64(in.LastSeenObjectID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1250,24 +1234,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler15(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.StatsUpdate) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"statsUpdate\":")
|
||||
if in.StatsUpdate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.StatsUpdate {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.Int64(int64(v6))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"statsUpdate\":")
|
||||
if in.StatsUpdate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.StatsUpdate {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
out.Int64(int64(v6))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1330,14 +1312,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpHeapprofiler16(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Chunk != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"chunk\":")
|
||||
out.String(string(in.Chunk))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"chunk\":")
|
||||
out.String(string(in.Chunk))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
// EventAddHeapSnapshotChunk [no description].
|
||||
type EventAddHeapSnapshotChunk struct {
|
||||
Chunk string `json:"chunk,omitempty"`
|
||||
Chunk string `json:"chunk"`
|
||||
}
|
||||
|
||||
// EventResetProfiles [no description].
|
||||
|
@ -16,8 +16,8 @@ type EventResetProfiles struct{}
|
|||
|
||||
// EventReportHeapSnapshotProgress [no description].
|
||||
type EventReportHeapSnapshotProgress struct {
|
||||
Done int64 `json:"done,omitempty"`
|
||||
Total int64 `json:"total,omitempty"`
|
||||
Done int64 `json:"done"`
|
||||
Total int64 `json:"total"`
|
||||
Finished bool `json:"finished,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -27,14 +27,14 @@ type EventReportHeapSnapshotProgress struct {
|
|||
// then one or more heapStatsUpdate events will be sent before a new
|
||||
// lastSeenObjectId event.
|
||||
type EventLastSeenObjectID struct {
|
||||
LastSeenObjectID int64 `json:"lastSeenObjectId,omitempty"`
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"`
|
||||
LastSeenObjectID int64 `json:"lastSeenObjectId"`
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"`
|
||||
}
|
||||
|
||||
// EventHeapStatsUpdate if heap objects tracking has been started then
|
||||
// backend may send update for one or more fragments.
|
||||
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.
|
||||
|
|
|
@ -15,12 +15,12 @@ func (t HeapSnapshotObjectID) String() string {
|
|||
// SamplingHeapProfileNode sampling Heap Profile node. Holds callsite
|
||||
// information, allocation statistics and child nodes.
|
||||
type SamplingHeapProfileNode struct {
|
||||
CallFrame *runtime.CallFrame `json:"callFrame,omitempty"` // Function location.
|
||||
SelfSize float64 `json:"selfSize,omitempty"` // Allocations size in bytes for the node excluding children.
|
||||
Children []*SamplingHeapProfileNode `json:"children,omitempty"` // Child nodes.
|
||||
CallFrame *runtime.CallFrame `json:"callFrame"` // Function location.
|
||||
SelfSize float64 `json:"selfSize"` // Allocations size in bytes for the node excluding children.
|
||||
Children []*SamplingHeapProfileNode `json:"children"` // Child nodes.
|
||||
}
|
||||
|
||||
// SamplingHeapProfile profile.
|
||||
type SamplingHeapProfile struct {
|
||||
Head *SamplingHeapProfileNode `json:"head,omitempty"`
|
||||
Head *SamplingHeapProfileNode `json:"head"`
|
||||
}
|
||||
|
|
|
@ -643,42 +643,34 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb6(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.KeyPath != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"keyPath\":")
|
||||
if in.KeyPath == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.KeyPath).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Unique {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"unique\":")
|
||||
out.Bool(bool(in.Unique))
|
||||
first = false
|
||||
out.RawString("\"keyPath\":")
|
||||
if in.KeyPath == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.KeyPath).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.MultiEntry {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"multiEntry\":")
|
||||
out.Bool(bool(in.MultiEntry))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"unique\":")
|
||||
out.Bool(bool(in.Unique))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"multiEntry\":")
|
||||
out.Bool(bool(in.MultiEntry))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -783,56 +775,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb7(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.KeyPath != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"keyPath\":")
|
||||
if in.KeyPath == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.KeyPath).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.AutoIncrement {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"autoIncrement\":")
|
||||
out.Bool(bool(in.AutoIncrement))
|
||||
first = false
|
||||
out.RawString("\"keyPath\":")
|
||||
if in.KeyPath == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.KeyPath).MarshalEasyJSON(out)
|
||||
}
|
||||
if len(in.Indexes) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"indexes\":")
|
||||
if in.Indexes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.Indexes {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v9 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v9).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"autoIncrement\":")
|
||||
out.Bool(bool(in.AutoIncrement))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"indexes\":")
|
||||
if in.Indexes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.Indexes {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v9 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v9).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -941,22 +925,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb8(out *jwriter.Writer
|
|||
(*in.Upper).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
if in.LowerOpen {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lowerOpen\":")
|
||||
out.Bool(bool(in.LowerOpen))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.UpperOpen {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"upperOpen\":")
|
||||
out.Bool(bool(in.UpperOpen))
|
||||
first = false
|
||||
out.RawString("\"lowerOpen\":")
|
||||
out.Bool(bool(in.LowerOpen))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"upperOpen\":")
|
||||
out.Bool(bool(in.UpperOpen))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1043,14 +1023,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb9(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if in.String != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1176,14 +1154,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb10(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if in.Number != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1518,44 +1494,38 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb14(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Version != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"version\":")
|
||||
out.Int64(int64(in.Version))
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.ObjectStores) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"objectStores\":")
|
||||
if in.ObjectStores == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v17, v18 := range in.ObjectStores {
|
||||
if v17 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v18 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v18).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"version\":")
|
||||
out.Int64(int64(in.Version))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"objectStores\":")
|
||||
if in.ObjectStores == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v17, v18 := range in.ObjectStores {
|
||||
if v17 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v18 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v18).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1646,41 +1616,35 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpIndexeddb15(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Key != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"key\":")
|
||||
if in.Key == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Key).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PrimaryKey != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"primaryKey\":")
|
||||
if in.PrimaryKey == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.PrimaryKey).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"key\":")
|
||||
if in.Key == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Key).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.Value != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
if in.Value == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Value).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"primaryKey\":")
|
||||
if in.PrimaryKey == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.PrimaryKey).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
if in.Value == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Value).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
|
|
@ -13,30 +13,30 @@ import (
|
|||
|
||||
// DatabaseWithObjectStores database with an array of object stores.
|
||||
type DatabaseWithObjectStores struct {
|
||||
Name string `json:"name,omitempty"` // Database name.
|
||||
Version int64 `json:"version,omitempty"` // Database version.
|
||||
ObjectStores []*ObjectStore `json:"objectStores,omitempty"` // Object stores in this database.
|
||||
Name string `json:"name"` // Database name.
|
||||
Version int64 `json:"version"` // Database version.
|
||||
ObjectStores []*ObjectStore `json:"objectStores"` // Object stores in this database.
|
||||
}
|
||||
|
||||
// ObjectStore object store.
|
||||
type ObjectStore struct {
|
||||
Name string `json:"name,omitempty"` // Object store name.
|
||||
KeyPath *KeyPath `json:"keyPath,omitempty"` // Object store key path.
|
||||
AutoIncrement bool `json:"autoIncrement,omitempty"` // If true, object store has auto increment flag set.
|
||||
Indexes []*ObjectStoreIndex `json:"indexes,omitempty"` // Indexes in this object store.
|
||||
Name string `json:"name"` // Object store name.
|
||||
KeyPath *KeyPath `json:"keyPath"` // Object store key path.
|
||||
AutoIncrement bool `json:"autoIncrement"` // If true, object store has auto increment flag set.
|
||||
Indexes []*ObjectStoreIndex `json:"indexes"` // Indexes in this object store.
|
||||
}
|
||||
|
||||
// ObjectStoreIndex object store index.
|
||||
type ObjectStoreIndex struct {
|
||||
Name string `json:"name,omitempty"` // Index name.
|
||||
KeyPath *KeyPath `json:"keyPath,omitempty"` // Index key path.
|
||||
Unique bool `json:"unique,omitempty"` // If true, index is unique.
|
||||
MultiEntry bool `json:"multiEntry,omitempty"` // If true, index allows multiple entries for a key.
|
||||
Name string `json:"name"` // Index name.
|
||||
KeyPath *KeyPath `json:"keyPath"` // Index key path.
|
||||
Unique bool `json:"unique"` // If true, index is unique.
|
||||
MultiEntry bool `json:"multiEntry"` // If true, index allows multiple entries for a key.
|
||||
}
|
||||
|
||||
// Key key.
|
||||
type Key struct {
|
||||
Type KeyType `json:"type,omitempty"` // Key type.
|
||||
Type KeyType `json:"type"` // Key type.
|
||||
Number float64 `json:"number,omitempty"` // Number value.
|
||||
String string `json:"string,omitempty"` // String value.
|
||||
Date float64 `json:"date,omitempty"` // Date value.
|
||||
|
@ -45,22 +45,22 @@ type Key struct {
|
|||
|
||||
// KeyRange key range.
|
||||
type KeyRange struct {
|
||||
Lower *Key `json:"lower,omitempty"` // Lower bound.
|
||||
Upper *Key `json:"upper,omitempty"` // Upper bound.
|
||||
LowerOpen bool `json:"lowerOpen,omitempty"` // If true lower bound is open.
|
||||
UpperOpen bool `json:"upperOpen,omitempty"` // If true upper bound is open.
|
||||
Lower *Key `json:"lower,omitempty"` // Lower bound.
|
||||
Upper *Key `json:"upper,omitempty"` // Upper bound.
|
||||
LowerOpen bool `json:"lowerOpen"` // If true lower bound is open.
|
||||
UpperOpen bool `json:"upperOpen"` // If true upper bound is open.
|
||||
}
|
||||
|
||||
// DataEntry data entry.
|
||||
type DataEntry struct {
|
||||
Key *runtime.RemoteObject `json:"key,omitempty"` // Key object.
|
||||
PrimaryKey *runtime.RemoteObject `json:"primaryKey,omitempty"` // Primary key object.
|
||||
Value *runtime.RemoteObject `json:"value,omitempty"` // Value object.
|
||||
Key *runtime.RemoteObject `json:"key"` // Key object.
|
||||
PrimaryKey *runtime.RemoteObject `json:"primaryKey"` // Primary key object.
|
||||
Value *runtime.RemoteObject `json:"value"` // Value object.
|
||||
}
|
||||
|
||||
// KeyPath key path.
|
||||
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.
|
||||
Array []string `json:"array,omitempty"` // Array value.
|
||||
}
|
||||
|
|
|
@ -67,30 +67,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInput(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.State != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"state\":")
|
||||
(in.State).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.X != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"x\":")
|
||||
out.Int64(int64(in.X))
|
||||
first = false
|
||||
out.RawString("\"state\":")
|
||||
(in.State).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Y != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"y\":")
|
||||
out.Int64(int64(in.Y))
|
||||
first = false
|
||||
out.RawString("\"x\":")
|
||||
out.Int64(int64(in.X))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"y\":")
|
||||
out.Int64(int64(in.Y))
|
||||
if in.RadiusX != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
|
|
@ -13,9 +13,9 @@ import (
|
|||
|
||||
// TouchPoint [no description].
|
||||
type TouchPoint struct {
|
||||
State TouchState `json:"state,omitempty"` // State of the touch point.
|
||||
X int64 `json:"x,omitempty"` // 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.
|
||||
State TouchState `json:"state"` // State of the touch point.
|
||||
X int64 `json:"x"` // X coordinate of the event relative to the main frame's 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).
|
||||
RadiusY int64 `json:"radiusY,omitempty"` // Y radius of the touch area (default: 1).
|
||||
RotationAngle float64 `json:"rotationAngle,omitempty"` // Rotation angle (default: 0.0).
|
||||
|
|
|
@ -111,14 +111,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpInspector1(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Reason != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"reason\":")
|
||||
(in.Reason).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"reason\":")
|
||||
(in.Reason).MarshalEasyJSON(out)
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
// EventDetached fired when remote debugging connection is about to be
|
||||
// terminated. Contains detach reason.
|
||||
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.
|
||||
|
|
|
@ -231,26 +231,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree2(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Rect != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"rect\":")
|
||||
if in.Rect == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Rect).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"rect\":")
|
||||
if in.Rect == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Rect).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -791,30 +787,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree8(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.X != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"x\":")
|
||||
out.Float64(float64(in.X))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Y != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"y\":")
|
||||
out.Float64(float64(in.Y))
|
||||
first = false
|
||||
out.RawString("\"x\":")
|
||||
out.Float64(float64(in.X))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Picture != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"picture\":")
|
||||
out.String(string(in.Picture))
|
||||
first = false
|
||||
out.RawString("\"y\":")
|
||||
out.Float64(float64(in.Y))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"picture\":")
|
||||
out.String(string(in.Picture))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1270,14 +1260,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.LayerID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"layerId\":")
|
||||
out.String(string(in.LayerID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"layerId\":")
|
||||
out.String(string(in.LayerID))
|
||||
if in.ParentLayerID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1294,38 +1282,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(out *jwriter.Write
|
|||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
}
|
||||
if in.OffsetX != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"offsetX\":")
|
||||
out.Float64(float64(in.OffsetX))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.OffsetY != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"offsetY\":")
|
||||
out.Float64(float64(in.OffsetY))
|
||||
first = false
|
||||
out.RawString("\"offsetX\":")
|
||||
out.Float64(float64(in.OffsetX))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Width != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"width\":")
|
||||
out.Float64(float64(in.Width))
|
||||
first = false
|
||||
out.RawString("\"offsetY\":")
|
||||
out.Float64(float64(in.OffsetY))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Height != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"height\":")
|
||||
out.Float64(float64(in.Height))
|
||||
first = false
|
||||
out.RawString("\"width\":")
|
||||
out.Float64(float64(in.Width))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"height\":")
|
||||
out.Float64(float64(in.Height))
|
||||
if len(in.Transform) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1369,22 +1349,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree13(out *jwriter.Write
|
|||
out.RawString("\"anchorZ\":")
|
||||
out.Float64(float64(in.AnchorZ))
|
||||
}
|
||||
if in.PaintCount != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"paintCount\":")
|
||||
out.Int64(int64(in.PaintCount))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.DrawsContent {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"drawsContent\":")
|
||||
out.Bool(bool(in.DrawsContent))
|
||||
first = false
|
||||
out.RawString("\"paintCount\":")
|
||||
out.Int64(int64(in.PaintCount))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"drawsContent\":")
|
||||
out.Bool(bool(in.DrawsContent))
|
||||
if in.Invisible {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1600,25 +1576,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLayertree15(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.LayerID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"layerId\":")
|
||||
out.String(string(in.LayerID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Clip != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"clip\":")
|
||||
if in.Clip == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Clip).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"layerId\":")
|
||||
out.String(string(in.LayerID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"clip\":")
|
||||
if in.Clip == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Clip).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
|
|
@ -14,8 +14,8 @@ type EventLayerTreeDidChange struct {
|
|||
|
||||
// EventLayerPainted [no description].
|
||||
type EventLayerPainted struct {
|
||||
LayerID LayerID `json:"layerId,omitempty"` // The id of the painted layer.
|
||||
Clip *dom.Rect `json:"clip,omitempty"` // Clip rectangle.
|
||||
LayerID LayerID `json:"layerId"` // The id of the painted layer.
|
||||
Clip *dom.Rect `json:"clip"` // Clip rectangle.
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -30,33 +30,33 @@ func (t SnapshotID) String() string {
|
|||
|
||||
// ScrollRect rectangle where scrolling happens on the main thread.
|
||||
type ScrollRect struct {
|
||||
Rect *dom.Rect `json:"rect,omitempty"` // Rectangle itself.
|
||||
Type ScrollRectType `json:"type,omitempty"` // Reason for rectangle to force scrolling on the main thread
|
||||
Rect *dom.Rect `json:"rect"` // Rectangle itself.
|
||||
Type ScrollRectType `json:"type"` // Reason for rectangle to force scrolling on the main thread
|
||||
}
|
||||
|
||||
// PictureTile serialized fragment of layer picture along with its offset
|
||||
// within the layer.
|
||||
type PictureTile struct {
|
||||
X float64 `json:"x,omitempty"` // Offset from owning layer left boundary
|
||||
Y float64 `json:"y,omitempty"` // Offset from owning layer top boundary
|
||||
Picture string `json:"picture,omitempty"` // Base64-encoded snapshot data.
|
||||
X float64 `json:"x"` // Offset from owning layer left boundary
|
||||
Y float64 `json:"y"` // Offset from owning layer top boundary
|
||||
Picture string `json:"picture"` // Base64-encoded snapshot data.
|
||||
}
|
||||
|
||||
// Layer information about a compositing layer.
|
||||
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).
|
||||
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.
|
||||
OffsetY float64 `json:"offsetY,omitempty"` // Offset from parent layer, Y coordinate.
|
||||
Width float64 `json:"width,omitempty"` // Layer width.
|
||||
Height float64 `json:"height,omitempty"` // Layer height.
|
||||
OffsetX float64 `json:"offsetX"` // Offset from parent layer, X coordinate.
|
||||
OffsetY float64 `json:"offsetY"` // Offset from parent layer, Y coordinate.
|
||||
Width float64 `json:"width"` // Layer width.
|
||||
Height float64 `json:"height"` // Layer height.
|
||||
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
|
||||
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
|
||||
PaintCount int64 `json:"paintCount,omitempty"` // 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.
|
||||
PaintCount int64 `json:"paintCount"` // Indicates how many time this layer has painted.
|
||||
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.
|
||||
ScrollRects []*ScrollRect `json:"scrollRects,omitempty"` // Rectangles scrolling on main thread only.
|
||||
}
|
||||
|
|
|
@ -56,22 +56,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog(out *jwriter.Writer, in Vi
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
(in.Name).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Threshold != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"threshold\":")
|
||||
out.Float64(float64(in.Threshold))
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
(in.Name).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"threshold\":")
|
||||
out.Float64(float64(in.Threshold))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -311,17 +307,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog3(out *jwriter.Writer, in E
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Entry != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"entry\":")
|
||||
if in.Entry == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Entry).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"entry\":")
|
||||
if in.Entry == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Entry).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -416,41 +410,33 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpLog4(out *jwriter.Writer, in E
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Source != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"source\":")
|
||||
(in.Source).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Level != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"level\":")
|
||||
(in.Level).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"source\":")
|
||||
(in.Source).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Text != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"text\":")
|
||||
out.String(string(in.Text))
|
||||
first = false
|
||||
out.RawString("\"level\":")
|
||||
(in.Level).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Timestamp != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"text\":")
|
||||
out.String(string(in.Text))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
// EventEntryAdded issued when new message was logged.
|
||||
type EventEntryAdded struct {
|
||||
Entry *Entry `json:"entry,omitempty"` // The entry.
|
||||
Entry *Entry `json:"entry"` // The entry.
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -14,10 +14,10 @@ import (
|
|||
|
||||
// Entry log entry.
|
||||
type Entry struct {
|
||||
Source Source `json:"source,omitempty"` // Log entry source.
|
||||
Level Level `json:"level,omitempty"` // Log entry severity.
|
||||
Text string `json:"text,omitempty"` // Logged text.
|
||||
Timestamp *runtime.Timestamp `json:"timestamp,omitempty"` // Timestamp when this entry was added.
|
||||
Source Source `json:"source"` // Log entry source.
|
||||
Level Level `json:"level"` // Log entry severity.
|
||||
Text string `json:"text"` // Logged text.
|
||||
Timestamp *runtime.Timestamp `json:"timestamp"` // Timestamp when this entry was added.
|
||||
URL string `json:"url,omitempty"` // URL of the resource if known.
|
||||
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the resource.
|
||||
StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace.
|
||||
|
@ -27,8 +27,8 @@ type Entry struct {
|
|||
|
||||
// ViolationSetting violation configuration setting.
|
||||
type ViolationSetting struct {
|
||||
Name Violation `json:"name,omitempty"` // Violation type.
|
||||
Threshold float64 `json:"threshold,omitempty"` // Time threshold to trigger upon.
|
||||
Name Violation `json:"name"` // Violation type.
|
||||
Threshold float64 `json:"threshold"` // Time threshold to trigger upon.
|
||||
}
|
||||
|
||||
// Source log entry source.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,61 +10,61 @@ import (
|
|||
// EventResourceChangedPriority fired when resource loading priority is
|
||||
// changed.
|
||||
type EventResourceChangedPriority struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
NewPriority ResourcePriority `json:"newPriority,omitempty"` // New priority
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
NewPriority ResourcePriority `json:"newPriority"` // New priority
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
}
|
||||
|
||||
// EventRequestWillBeSent fired when page is about to send HTTP request.
|
||||
type EventRequestWillBeSent struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
|
||||
LoaderID cdp.LoaderID `json:"loaderId,omitempty"` // Loader identifier.
|
||||
DocumentURL string `json:"documentURL,omitempty"` // URL of the document this request is loaded for.
|
||||
Request *Request `json:"request,omitempty"` // Request data.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
WallTime *cdp.Timestamp `json:"wallTime,omitempty"` // UTC Timestamp.
|
||||
Initiator *Initiator `json:"initiator,omitempty"` // Request initiator.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Frame identifier.
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier.
|
||||
DocumentURL string `json:"documentURL"` // URL of the document this request is loaded for.
|
||||
Request *Request `json:"request"` // Request data.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
WallTime *cdp.Timestamp `json:"wallTime"` // UTC Timestamp.
|
||||
Initiator *Initiator `json:"initiator"` // Request initiator.
|
||||
RedirectResponse *Response `json:"redirectResponse,omitempty"` // Redirect response data.
|
||||
Type page.ResourceType `json:"type,omitempty"` // Type of this resource.
|
||||
}
|
||||
|
||||
// EventRequestServedFromCache fired if request ended up loading from cache.
|
||||
type EventRequestServedFromCache struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
}
|
||||
|
||||
// EventResponseReceived fired when HTTP response is available.
|
||||
type EventResponseReceived struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
|
||||
LoaderID cdp.LoaderID `json:"loaderId,omitempty"` // Loader identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
Type page.ResourceType `json:"type,omitempty"` // Resource type.
|
||||
Response *Response `json:"response,omitempty"` // Response data.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Frame identifier.
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
Type page.ResourceType `json:"type"` // Resource type.
|
||||
Response *Response `json:"response"` // Response data.
|
||||
}
|
||||
|
||||
// EventDataReceived fired when data chunk was received over the network.
|
||||
type EventDataReceived struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
DataLength int64 `json:"dataLength,omitempty"` // Data chunk length.
|
||||
EncodedDataLength int64 `json:"encodedDataLength,omitempty"` // Actual bytes received (might be less than dataLength for compressed encodings).
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
DataLength int64 `json:"dataLength"` // Data chunk length.
|
||||
EncodedDataLength int64 `json:"encodedDataLength"` // Actual bytes received (might be less than dataLength for compressed encodings).
|
||||
}
|
||||
|
||||
// EventLoadingFinished fired when HTTP request has finished loading.
|
||||
type EventLoadingFinished struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
EncodedDataLength float64 `json:"encodedDataLength,omitempty"` // Total number of bytes received for this request.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request.
|
||||
}
|
||||
|
||||
// EventLoadingFailed fired when HTTP request has failed to load.
|
||||
type EventLoadingFailed struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
Type page.ResourceType `json:"type,omitempty"` // Resource type.
|
||||
ErrorText string `json:"errorText,omitempty"` // User friendly error message.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
Type page.ResourceType `json:"type"` // Resource type.
|
||||
ErrorText string `json:"errorText"` // User friendly error message.
|
||||
Canceled bool `json:"canceled,omitempty"` // True if loading was canceled.
|
||||
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
|
||||
// initiate handshake.
|
||||
type EventWebSocketWillSendHandshakeRequest struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
WallTime *cdp.Timestamp `json:"wallTime,omitempty"` // UTC Timestamp.
|
||||
Request *WebSocketRequest `json:"request,omitempty"` // WebSocket request data.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
WallTime *cdp.Timestamp `json:"wallTime"` // UTC Timestamp.
|
||||
Request *WebSocketRequest `json:"request"` // WebSocket request data.
|
||||
}
|
||||
|
||||
// EventWebSocketHandshakeResponseReceived fired when WebSocket handshake
|
||||
// response becomes available.
|
||||
type EventWebSocketHandshakeResponseReceived struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
Response *WebSocketResponse `json:"response,omitempty"` // WebSocket response data.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
Response *WebSocketResponse `json:"response"` // WebSocket response data.
|
||||
}
|
||||
|
||||
// EventWebSocketCreated fired upon WebSocket creation.
|
||||
type EventWebSocketCreated struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
URL string `json:"url,omitempty"` // WebSocket request URL.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
URL string `json:"url"` // WebSocket request URL.
|
||||
Initiator *Initiator `json:"initiator,omitempty"` // Request initiator.
|
||||
}
|
||||
|
||||
// EventWebSocketClosed fired when WebSocket is closed.
|
||||
type EventWebSocketClosed struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
}
|
||||
|
||||
// EventWebSocketFrameReceived fired when WebSocket frame is received.
|
||||
type EventWebSocketFrameReceived struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
Response *WebSocketFrame `json:"response,omitempty"` // WebSocket response data.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
Response *WebSocketFrame `json:"response"` // WebSocket response data.
|
||||
}
|
||||
|
||||
// EventWebSocketFrameError fired when WebSocket frame error occurs.
|
||||
type EventWebSocketFrameError struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
ErrorMessage string `json:"errorMessage,omitempty"` // WebSocket frame error message.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
ErrorMessage string `json:"errorMessage"` // WebSocket frame error message.
|
||||
}
|
||||
|
||||
// EventWebSocketFrameSent fired when WebSocket frame is sent.
|
||||
type EventWebSocketFrameSent struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
Response *WebSocketFrame `json:"response,omitempty"` // WebSocket response data.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
Response *WebSocketFrame `json:"response"` // WebSocket response data.
|
||||
}
|
||||
|
||||
// EventEventSourceMessageReceived fired when EventSource message is
|
||||
// received.
|
||||
type EventEventSourceMessageReceived struct {
|
||||
RequestID RequestID `json:"requestId,omitempty"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp.
|
||||
EventName string `json:"eventName,omitempty"` // Message type.
|
||||
EventID string `json:"eventId,omitempty"` // Message identifier.
|
||||
Data string `json:"data,omitempty"` // Message content.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Timestamp.
|
||||
EventName string `json:"eventName"` // Message type.
|
||||
EventID string `json:"eventId"` // Message identifier.
|
||||
Data string `json:"data"` // Message content.
|
||||
}
|
||||
|
||||
// EventRequestIntercepted details of an intercepted HTTP request, which must
|
||||
// be either allowed, blocked, modified or mocked.
|
||||
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.
|
||||
Request *Request `json:"request,omitempty"`
|
||||
ResourceType page.ResourceType `json:"resourceType,omitempty"` // How the requested resource 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"`
|
||||
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.
|
||||
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.
|
||||
|
|
|
@ -213,22 +213,22 @@ func (t *CookieSameSite) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// ResourceTiming timing information for the request.
|
||||
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.
|
||||
ProxyStart float64 `json:"proxyStart,omitempty"` // Started resolving proxy.
|
||||
ProxyEnd float64 `json:"proxyEnd,omitempty"` // Finished resolving proxy.
|
||||
DNSStart float64 `json:"dnsStart,omitempty"` // Started DNS address resolve.
|
||||
DNSEnd float64 `json:"dnsEnd,omitempty"` // Finished DNS address resolve.
|
||||
ConnectStart float64 `json:"connectStart,omitempty"` // Started connecting to the remote host.
|
||||
ConnectEnd float64 `json:"connectEnd,omitempty"` // Connected to the remote host.
|
||||
SslStart float64 `json:"sslStart,omitempty"` // Started SSL handshake.
|
||||
SslEnd float64 `json:"sslEnd,omitempty"` // Finished SSL handshake.
|
||||
WorkerStart float64 `json:"workerStart,omitempty"` // Started running ServiceWorker.
|
||||
WorkerReady float64 `json:"workerReady,omitempty"` // Finished Starting ServiceWorker.
|
||||
SendStart float64 `json:"sendStart,omitempty"` // Started sending request.
|
||||
SendEnd float64 `json:"sendEnd,omitempty"` // Finished sending request.
|
||||
PushStart float64 `json:"pushStart,omitempty"` // Time the server started pushing request.
|
||||
PushEnd float64 `json:"pushEnd,omitempty"` // Time the server finished pushing request.
|
||||
ReceiveHeadersEnd float64 `json:"receiveHeadersEnd,omitempty"` // Finished receiving response headers.
|
||||
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"` // Started resolving proxy.
|
||||
ProxyEnd float64 `json:"proxyEnd"` // Finished resolving proxy.
|
||||
DNSStart float64 `json:"dnsStart"` // Started DNS address resolve.
|
||||
DNSEnd float64 `json:"dnsEnd"` // Finished DNS address resolve.
|
||||
ConnectStart float64 `json:"connectStart"` // Started connecting to the remote host.
|
||||
ConnectEnd float64 `json:"connectEnd"` // Connected to the remote host.
|
||||
SslStart float64 `json:"sslStart"` // Started SSL handshake.
|
||||
SslEnd float64 `json:"sslEnd"` // Finished SSL handshake.
|
||||
WorkerStart float64 `json:"workerStart"` // Started running ServiceWorker.
|
||||
WorkerReady float64 `json:"workerReady"` // Finished Starting ServiceWorker.
|
||||
SendStart float64 `json:"sendStart"` // Started sending request.
|
||||
SendEnd float64 `json:"sendEnd"` // Finished sending request.
|
||||
PushStart float64 `json:"pushStart"` // Time the server started pushing request.
|
||||
PushEnd float64 `json:"pushEnd"` // Time the server finished pushing request.
|
||||
ReceiveHeadersEnd float64 `json:"receiveHeadersEnd"` // Finished receiving response headers.
|
||||
}
|
||||
|
||||
// ResourcePriority loading priority of a resource request.
|
||||
|
@ -284,43 +284,43 @@ func (t *ResourcePriority) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// Request hTTP request data.
|
||||
type Request struct {
|
||||
URL string `json:"url,omitempty"` // Request URL.
|
||||
Method string `json:"method,omitempty"` // HTTP request method.
|
||||
Headers Headers `json:"headers,omitempty"` // HTTP request headers.
|
||||
URL string `json:"url"` // Request URL.
|
||||
Method string `json:"method"` // HTTP request method.
|
||||
Headers Headers `json:"headers"` // HTTP request headers.
|
||||
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/
|
||||
InitialPriority ResourcePriority `json:"initialPriority,omitempty"` // 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/
|
||||
InitialPriority ResourcePriority `json:"initialPriority"` // Priority of the resource request at the time request is sent.
|
||||
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.
|
||||
}
|
||||
|
||||
// SignedCertificateTimestamp details of a signed certificate timestamp
|
||||
// (SCT).
|
||||
type SignedCertificateTimestamp struct {
|
||||
Status string `json:"status,omitempty"` // Validation status.
|
||||
Origin string `json:"origin,omitempty"` // Origin.
|
||||
LogDescription string `json:"logDescription,omitempty"` // Log name / description.
|
||||
LogID string `json:"logId,omitempty"` // Log ID.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp,omitempty"` // Issuance date.
|
||||
HashAlgorithm string `json:"hashAlgorithm,omitempty"` // Hash algorithm.
|
||||
SignatureAlgorithm string `json:"signatureAlgorithm,omitempty"` // Signature algorithm.
|
||||
SignatureData string `json:"signatureData,omitempty"` // Signature data.
|
||||
Status string `json:"status"` // Validation status.
|
||||
Origin string `json:"origin"` // Origin.
|
||||
LogDescription string `json:"logDescription"` // Log name / description.
|
||||
LogID string `json:"logId"` // Log ID.
|
||||
Timestamp *cdp.Timestamp `json:"timestamp"` // Issuance date.
|
||||
HashAlgorithm string `json:"hashAlgorithm"` // Hash algorithm.
|
||||
SignatureAlgorithm string `json:"signatureAlgorithm"` // Signature algorithm.
|
||||
SignatureData string `json:"signatureData"` // Signature data.
|
||||
}
|
||||
|
||||
// SecurityDetails security details about a request.
|
||||
type SecurityDetails struct {
|
||||
Protocol string `json:"protocol,omitempty"` // 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.
|
||||
KeyExchangeGroup string `json:"keyExchangeGroup,omitempty"` // (EC)DH group used by the connection, if applicable.
|
||||
Cipher string `json:"cipher,omitempty"` // Cipher name.
|
||||
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.
|
||||
SubjectName string `json:"subjectName,omitempty"` // Certificate subject name.
|
||||
SanList []string `json:"sanList,omitempty"` // Subject Alternative Name (SAN) DNS names and IP addresses.
|
||||
Issuer string `json:"issuer,omitempty"` // Name of the issuing CA.
|
||||
ValidFrom *cdp.Timestamp `json:"validFrom,omitempty"` // Certificate valid from date.
|
||||
ValidTo *cdp.Timestamp `json:"validTo,omitempty"` // Certificate valid to (expiration) date
|
||||
SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList,omitempty"` // List of signed certificate timestamps (SCTs).
|
||||
Protocol string `json:"protocol"` // Protocol name (e.g. "TLS 1.2" or "QUIC").
|
||||
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.
|
||||
Cipher string `json:"cipher"` // Cipher name.
|
||||
Mac string `json:"mac,omitempty"` // TLS MAC. Note that AEAD ciphers do not have separate MACs.
|
||||
CertificateID security.CertificateID `json:"certificateId"` // Certificate ID value.
|
||||
SubjectName string `json:"subjectName"` // Certificate subject name.
|
||||
SanList []string `json:"sanList"` // Subject Alternative Name (SAN) DNS names and IP addresses.
|
||||
Issuer string `json:"issuer"` // Name of the issuing CA.
|
||||
ValidFrom *cdp.Timestamp `json:"validFrom"` // Certificate valid from date.
|
||||
ValidTo *cdp.Timestamp `json:"validTo"` // Certificate valid to (expiration) date
|
||||
SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList"` // List of signed certificate timestamps (SCTs).
|
||||
}
|
||||
|
||||
// BlockedReason the reason why request was blocked.
|
||||
|
@ -379,37 +379,37 @@ func (t *BlockedReason) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// Response hTTP response data.
|
||||
type Response struct {
|
||||
URL string `json:"url,omitempty"` // Response URL. This URL can be different from CachedResource.url in case of redirect.
|
||||
Status float64 `json:"status,omitempty"` // HTTP response status code.
|
||||
StatusText string `json:"statusText,omitempty"` // HTTP response status text.
|
||||
Headers Headers `json:"headers,omitempty"` // HTTP response headers.
|
||||
URL string `json:"url"` // Response URL. This URL can be different from CachedResource.url in case of redirect.
|
||||
Status float64 `json:"status"` // HTTP response status code.
|
||||
StatusText string `json:"statusText"` // HTTP response status text.
|
||||
Headers Headers `json:"headers"` // HTTP response headers.
|
||||
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.
|
||||
RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text.
|
||||
ConnectionReused bool `json:"connectionReused,omitempty"` // 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.
|
||||
ConnectionReused bool `json:"connectionReused"` // Specifies whether physical connection was actually reused 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.
|
||||
RemotePort int64 `json:"remotePort,omitempty"` // Remote port.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
}
|
||||
|
||||
// WebSocketRequest webSocket request data.
|
||||
type WebSocketRequest struct {
|
||||
Headers Headers `json:"headers,omitempty"` // HTTP request headers.
|
||||
Headers Headers `json:"headers"` // HTTP request headers.
|
||||
}
|
||||
|
||||
// WebSocketResponse webSocket response data.
|
||||
type WebSocketResponse struct {
|
||||
Status float64 `json:"status,omitempty"` // HTTP response status code.
|
||||
StatusText string `json:"statusText,omitempty"` // HTTP response status text.
|
||||
Headers Headers `json:"headers,omitempty"` // HTTP response headers.
|
||||
Status float64 `json:"status"` // HTTP response status code.
|
||||
StatusText string `json:"statusText"` // HTTP response status text.
|
||||
Headers Headers `json:"headers"` // HTTP response headers.
|
||||
HeadersText string `json:"headersText,omitempty"` // HTTP response headers text.
|
||||
RequestHeaders Headers `json:"requestHeaders,omitempty"` // HTTP request headers.
|
||||
RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text.
|
||||
|
@ -417,22 +417,22 @@ type WebSocketResponse struct {
|
|||
|
||||
// WebSocketFrame webSocket frame data.
|
||||
type WebSocketFrame struct {
|
||||
Opcode float64 `json:"opcode,omitempty"` // WebSocket frame opcode.
|
||||
Mask bool `json:"mask,omitempty"` // WebSocke frame mask.
|
||||
PayloadData string `json:"payloadData,omitempty"` // WebSocke frame payload data.
|
||||
Opcode float64 `json:"opcode"` // WebSocket frame opcode.
|
||||
Mask bool `json:"mask"` // WebSocke frame mask.
|
||||
PayloadData string `json:"payloadData"` // WebSocke frame payload data.
|
||||
}
|
||||
|
||||
// CachedResource information about the cached resource.
|
||||
type CachedResource struct {
|
||||
URL string `json:"url,omitempty"` // Resource URL. This is the url of the original network request.
|
||||
Type page.ResourceType `json:"type,omitempty"` // Type of this resource.
|
||||
URL string `json:"url"` // Resource URL. This is the url of the original network request.
|
||||
Type page.ResourceType `json:"type"` // Type of this resource.
|
||||
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.
|
||||
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.
|
||||
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).
|
||||
|
@ -440,29 +440,29 @@ type Initiator struct {
|
|||
|
||||
// Cookie cookie object.
|
||||
type Cookie struct {
|
||||
Name string `json:"name,omitempty"` // Cookie name.
|
||||
Value string `json:"value,omitempty"` // Cookie value.
|
||||
Domain string `json:"domain,omitempty"` // Cookie domain.
|
||||
Path string `json:"path,omitempty"` // Cookie path.
|
||||
Expires float64 `json:"expires,omitempty"` // Cookie expiration date as the number of seconds since the UNIX epoch.
|
||||
Size int64 `json:"size,omitempty"` // Cookie size.
|
||||
HTTPOnly bool `json:"httpOnly,omitempty"` // True if cookie is http-only.
|
||||
Secure bool `json:"secure,omitempty"` // True if cookie is secure.
|
||||
Session bool `json:"session,omitempty"` // True in case of session cookie.
|
||||
Name string `json:"name"` // Cookie name.
|
||||
Value string `json:"value"` // Cookie value.
|
||||
Domain string `json:"domain"` // Cookie domain.
|
||||
Path string `json:"path"` // Cookie path.
|
||||
Expires float64 `json:"expires"` // Cookie expiration date as the number of seconds since the UNIX epoch.
|
||||
Size int64 `json:"size"` // Cookie size.
|
||||
HTTPOnly bool `json:"httpOnly"` // True if cookie is http-only.
|
||||
Secure bool `json:"secure"` // True if cookie is secure.
|
||||
Session bool `json:"session"` // True in case of session cookie.
|
||||
SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type.
|
||||
}
|
||||
|
||||
// AuthChallenge authorization challenge for HTTP status code 401 or 407.
|
||||
type AuthChallenge struct {
|
||||
Source AuthChallengeSource `json:"source,omitempty"` // Source of the authentication challenge.
|
||||
Origin string `json:"origin,omitempty"` // Origin of the challenger.
|
||||
Scheme string `json:"scheme,omitempty"` // The authentication scheme used, such as basic or digest
|
||||
Realm string `json:"realm,omitempty"` // The realm of the challenge. May be empty.
|
||||
Origin string `json:"origin"` // Origin of the challenger.
|
||||
Scheme string `json:"scheme"` // The authentication scheme used, such as basic or digest
|
||||
Realm string `json:"realm"` // The realm of the challenge. May be empty.
|
||||
}
|
||||
|
||||
// AuthChallengeResponse response to an AuthChallenge.
|
||||
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.
|
||||
Password string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials.
|
||||
}
|
||||
|
|
|
@ -1571,14 +1571,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpOverlay16(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.NodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodeId\":")
|
||||
out.Int64(int64(in.NodeID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1640,14 +1638,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpOverlay17(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.BackendNodeID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"backendNodeId\":")
|
||||
out.Int64(int64(in.BackendNodeID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@ import (
|
|||
// EventNodeHighlightRequested fired when the node should be highlighted.
|
||||
// This happens after call to setInspectMode.
|
||||
type EventNodeHighlightRequested struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"`
|
||||
NodeID cdp.NodeID `json:"nodeId"`
|
||||
}
|
||||
|
||||
// EventInspectNodeRequested fired when the node should be inspected. This
|
||||
// happens after call to setInspectMode or when user manually inspects an
|
||||
// element.
|
||||
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.
|
||||
|
|
|
@ -68,62 +68,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage(out *jwriter.Writer, in V
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.OffsetX != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"offsetX\":")
|
||||
out.Float64(float64(in.OffsetX))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.OffsetY != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"offsetY\":")
|
||||
out.Float64(float64(in.OffsetY))
|
||||
first = false
|
||||
out.RawString("\"offsetX\":")
|
||||
out.Float64(float64(in.OffsetX))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PageX != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pageX\":")
|
||||
out.Float64(float64(in.PageX))
|
||||
first = false
|
||||
out.RawString("\"offsetY\":")
|
||||
out.Float64(float64(in.OffsetY))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PageY != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pageY\":")
|
||||
out.Float64(float64(in.PageY))
|
||||
first = false
|
||||
out.RawString("\"pageX\":")
|
||||
out.Float64(float64(in.PageX))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ClientWidth != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"clientWidth\":")
|
||||
out.Float64(float64(in.ClientWidth))
|
||||
first = false
|
||||
out.RawString("\"pageY\":")
|
||||
out.Float64(float64(in.PageY))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ClientHeight != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"clientHeight\":")
|
||||
out.Float64(float64(in.ClientHeight))
|
||||
first = false
|
||||
out.RawString("\"clientWidth\":")
|
||||
out.Float64(float64(in.ClientWidth))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Scale != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scale\":")
|
||||
out.Float64(float64(in.Scale))
|
||||
first = false
|
||||
out.RawString("\"clientHeight\":")
|
||||
out.Float64(float64(in.ClientHeight))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scale\":")
|
||||
out.Float64(float64(in.Scale))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -857,54 +843,42 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage9(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.OffsetTop != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"offsetTop\":")
|
||||
out.Float64(float64(in.OffsetTop))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PageScaleFactor != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pageScaleFactor\":")
|
||||
out.Float64(float64(in.PageScaleFactor))
|
||||
first = false
|
||||
out.RawString("\"offsetTop\":")
|
||||
out.Float64(float64(in.OffsetTop))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.DeviceWidth != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"deviceWidth\":")
|
||||
out.Float64(float64(in.DeviceWidth))
|
||||
first = false
|
||||
out.RawString("\"pageScaleFactor\":")
|
||||
out.Float64(float64(in.PageScaleFactor))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.DeviceHeight != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"deviceHeight\":")
|
||||
out.Float64(float64(in.DeviceHeight))
|
||||
first = false
|
||||
out.RawString("\"deviceWidth\":")
|
||||
out.Float64(float64(in.DeviceWidth))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ScrollOffsetX != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scrollOffsetX\":")
|
||||
out.Float64(float64(in.ScrollOffsetX))
|
||||
first = false
|
||||
out.RawString("\"deviceHeight\":")
|
||||
out.Float64(float64(in.DeviceHeight))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ScrollOffsetY != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scrollOffsetY\":")
|
||||
out.Float64(float64(in.ScrollOffsetY))
|
||||
first = false
|
||||
out.RawString("\"scrollOffsetX\":")
|
||||
out.Float64(float64(in.ScrollOffsetX))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scrollOffsetY\":")
|
||||
out.Float64(float64(in.ScrollOffsetY))
|
||||
if in.Timestamp != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1571,46 +1545,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage17(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.Int64(int64(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.Int64(int64(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.UserTypedURL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"userTypedURL\":")
|
||||
out.String(string(in.UserTypedURL))
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Title != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"title\":")
|
||||
out.String(string(in.Title))
|
||||
first = false
|
||||
out.RawString("\"userTypedURL\":")
|
||||
out.String(string(in.UserTypedURL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.TransitionType != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"transitionType\":")
|
||||
(in.TransitionType).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"title\":")
|
||||
out.String(string(in.Title))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"transitionType\":")
|
||||
(in.TransitionType).MarshalEasyJSON(out)
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1901,38 +1865,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage21(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.PageX != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pageX\":")
|
||||
out.Int64(int64(in.PageX))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.PageY != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"pageY\":")
|
||||
out.Int64(int64(in.PageY))
|
||||
first = false
|
||||
out.RawString("\"pageX\":")
|
||||
out.Int64(int64(in.PageX))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ClientWidth != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"clientWidth\":")
|
||||
out.Int64(int64(in.ClientWidth))
|
||||
first = false
|
||||
out.RawString("\"pageY\":")
|
||||
out.Int64(int64(in.PageY))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ClientHeight != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"clientHeight\":")
|
||||
out.Int64(int64(in.ClientHeight))
|
||||
first = false
|
||||
out.RawString("\"clientWidth\":")
|
||||
out.Int64(int64(in.ClientWidth))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"clientHeight\":")
|
||||
out.Int64(int64(in.ClientHeight))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -2993,17 +2949,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Frame != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frame\":")
|
||||
if in.Frame == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Frame).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frame\":")
|
||||
if in.Frame == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Frame).MarshalEasyJSON(out)
|
||||
}
|
||||
if len(in.ChildFrames) != 0 {
|
||||
if !first {
|
||||
|
@ -3028,28 +2982,26 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage33(out *jwriter.Writer, in
|
|||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if len(in.Resources) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"resources\":")
|
||||
if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v14, v15 := range in.Resources {
|
||||
if v14 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v15 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v15).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"resources\":")
|
||||
if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v14, v15 := range in.Resources {
|
||||
if v14 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v15 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v15).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -3132,30 +3084,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage34(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.MimeType != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"mimeType\":")
|
||||
out.String(string(in.MimeType))
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"mimeType\":")
|
||||
out.String(string(in.MimeType))
|
||||
if in.LastModified != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -3253,14 +3199,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage35(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Visible {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"visible\":")
|
||||
out.Bool(bool(in.Visible))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"visible\":")
|
||||
out.Bool(bool(in.Visible))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -3334,34 +3278,28 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage36(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Data != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"data\":")
|
||||
out.String(string(in.Data))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Metadata != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"metadata\":")
|
||||
if in.Metadata == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Metadata).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"data\":")
|
||||
out.String(string(in.Data))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.SessionID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"sessionId\":")
|
||||
out.Int64(int64(in.SessionID))
|
||||
first = false
|
||||
out.RawString("\"metadata\":")
|
||||
if in.Metadata == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Metadata).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"sessionId\":")
|
||||
out.Int64(int64(in.SessionID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -3429,38 +3367,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage37(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.IsInMainFrame {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isInMainFrame\":")
|
||||
out.Bool(bool(in.IsInMainFrame))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.IsRedirect {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isRedirect\":")
|
||||
out.Bool(bool(in.IsRedirect))
|
||||
first = false
|
||||
out.RawString("\"isInMainFrame\":")
|
||||
out.Bool(bool(in.IsInMainFrame))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.NavigationID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"navigationId\":")
|
||||
out.Int64(int64(in.NavigationID))
|
||||
first = false
|
||||
out.RawString("\"isRedirect\":")
|
||||
out.Bool(bool(in.IsRedirect))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
first = false
|
||||
out.RawString("\"navigationId\":")
|
||||
out.Int64(int64(in.NavigationID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -3530,17 +3460,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage38(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Timestamp != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -3605,22 +3533,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage39(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Message != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -3682,14 +3606,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage40(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Result {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"result\":")
|
||||
out.Bool(bool(in.Result))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"result\":")
|
||||
out.Bool(bool(in.Result))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -3869,14 +3791,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage43(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -3938,14 +3858,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage44(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -4009,22 +3927,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage45(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Delay != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"delay\":")
|
||||
out.Float64(float64(in.Delay))
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"delay\":")
|
||||
out.Float64(float64(in.Delay))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -4153,17 +4067,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage47(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Frame != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frame\":")
|
||||
if in.Frame == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Frame).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frame\":")
|
||||
if in.Frame == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Frame).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4226,14 +4138,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage48(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -4295,14 +4205,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage49(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -4376,22 +4284,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage50(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ParentFrameID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentFrameId\":")
|
||||
out.String(string(in.ParentFrameID))
|
||||
first = false
|
||||
out.RawString("\"frameId\":")
|
||||
out.String(string(in.FrameID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"parentFrameId\":")
|
||||
out.String(string(in.ParentFrameID))
|
||||
if in.Stack != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -4473,17 +4377,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage51(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Timestamp != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -4984,38 +4886,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpPage58(out *jwriter.Writer, in
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Message != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Critical != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"critical\":")
|
||||
out.Int64(int64(in.Critical))
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Line != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"line\":")
|
||||
out.Int64(int64(in.Line))
|
||||
first = false
|
||||
out.RawString("\"critical\":")
|
||||
out.Int64(int64(in.Critical))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Column != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"column\":")
|
||||
out.Int64(int64(in.Column))
|
||||
first = false
|
||||
out.RawString("\"line\":")
|
||||
out.Int64(int64(in.Line))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"column\":")
|
||||
out.Int64(int64(in.Column))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -9,53 +9,53 @@ import (
|
|||
|
||||
// EventDomContentEventFired [no description].
|
||||
type EventDomContentEventFired struct {
|
||||
Timestamp *Bootstamp `json:"timestamp,omitempty"`
|
||||
Timestamp *Bootstamp `json:"timestamp"`
|
||||
}
|
||||
|
||||
// EventLoadEventFired [no description].
|
||||
type EventLoadEventFired struct {
|
||||
Timestamp *Bootstamp `json:"timestamp,omitempty"`
|
||||
Timestamp *Bootstamp `json:"timestamp"`
|
||||
}
|
||||
|
||||
// EventFrameAttached fired when frame has been attached to its parent.
|
||||
type EventFrameAttached struct {
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Id of the frame that has been attached.
|
||||
ParentFrameID cdp.FrameID `json:"parentFrameId,omitempty"` // Parent frame identifier.
|
||||
Stack *runtime.StackTrace `json:"stack,omitempty"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been attached.
|
||||
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.
|
||||
}
|
||||
|
||||
// EventFrameNavigated fired once navigation of the frame has completed.
|
||||
// Frame is now associated with the new loader.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
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
|
||||
// navigation.
|
||||
type EventFrameScheduledNavigation struct {
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // 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.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has scheduled a navigation.
|
||||
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
|
||||
// scheduled navigation.
|
||||
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].
|
||||
|
@ -64,28 +64,28 @@ type EventFrameResized struct{}
|
|||
// EventJavascriptDialogOpening fired when a JavaScript initiated dialog
|
||||
// (alert, confirm, prompt, or onbeforeunload) is about to open.
|
||||
type EventJavascriptDialogOpening struct {
|
||||
Message string `json:"message,omitempty"` // Message that will be displayed by the dialog.
|
||||
Type DialogType `json:"type,omitempty"` // Dialog type.
|
||||
Message string `json:"message"` // Message that will be displayed by the dialog.
|
||||
Type DialogType `json:"type"` // Dialog type.
|
||||
}
|
||||
|
||||
// EventJavascriptDialogClosed fired when a JavaScript initiated dialog
|
||||
// (alert, confirm, prompt, or onbeforeunload) has been closed.
|
||||
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
|
||||
// startScreencast.
|
||||
type EventScreencastFrame struct {
|
||||
Data string `json:"data,omitempty"` // Base64-encoded compressed image.
|
||||
Metadata *ScreencastFrameMetadata `json:"metadata,omitempty"` // Screencast frame metadata.
|
||||
SessionID int64 `json:"sessionId,omitempty"` // Frame number.
|
||||
Data string `json:"data"` // Base64-encoded compressed image.
|
||||
Metadata *ScreencastFrameMetadata `json:"metadata"` // Screencast frame metadata.
|
||||
SessionID int64 `json:"sessionId"` // Frame number.
|
||||
}
|
||||
|
||||
// EventScreencastVisibilityChanged fired when the page with currently
|
||||
// enabled screencast was shown or hidden .
|
||||
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.
|
||||
|
@ -98,10 +98,10 @@ type EventInterstitialHidden struct{}
|
|||
// throttles are enabled. The navigation will be deferred until
|
||||
// processNavigation is called.
|
||||
type EventNavigationRequested struct {
|
||||
IsInMainFrame bool `json:"isInMainFrame,omitempty"` // 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.
|
||||
NavigationID int64 `json:"navigationId,omitempty"`
|
||||
URL string `json:"url,omitempty"` // URL of requested navigation.
|
||||
IsInMainFrame bool `json:"isInMainFrame"` // Whether the navigation is taking place in the main frame or in a subframe.
|
||||
IsRedirect bool `json:"isRedirect"` // Whether the navigation has encountered a server redirect or not.
|
||||
NavigationID int64 `json:"navigationId"`
|
||||
URL string `json:"url"` // URL of requested navigation.
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -91,9 +91,9 @@ func (t *ResourceType) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// FrameResource information about the Resource on the page.
|
||||
type FrameResource struct {
|
||||
URL string `json:"url,omitempty"` // Resource URL.
|
||||
Type ResourceType `json:"type,omitempty"` // Type of this resource.
|
||||
MimeType string `json:"mimeType,omitempty"` // Resource mimeType as determined by the browser.
|
||||
URL string `json:"url"` // Resource URL.
|
||||
Type ResourceType `json:"type"` // Type of this resource.
|
||||
MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser.
|
||||
LastModified *cdp.Timestamp `json:"lastModified,omitempty"` // last-modified timestamp as reported by server.
|
||||
ContentSize float64 `json:"contentSize,omitempty"` // Resource content size.
|
||||
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
|
||||
// cached resources.
|
||||
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.
|
||||
Resources []*FrameResource `json:"resources,omitempty"` // Information about frame resources.
|
||||
Resources []*FrameResource `json:"resources"` // Information about frame resources.
|
||||
}
|
||||
|
||||
// ScriptIdentifier unique script identifier.
|
||||
|
@ -190,22 +190,22 @@ func (t *TransitionType) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// NavigationEntry navigation history entry.
|
||||
type NavigationEntry struct {
|
||||
ID int64 `json:"id,omitempty"` // Unique id of the navigation history entry.
|
||||
URL string `json:"url,omitempty"` // URL of the navigation history entry.
|
||||
UserTypedURL string `json:"userTypedURL,omitempty"` // URL that the user typed in the url bar.
|
||||
Title string `json:"title,omitempty"` // Title of the navigation history entry.
|
||||
TransitionType TransitionType `json:"transitionType,omitempty"` // Transition type.
|
||||
ID int64 `json:"id"` // Unique id of the navigation history entry.
|
||||
URL string `json:"url"` // URL of the navigation history entry.
|
||||
UserTypedURL string `json:"userTypedURL"` // URL that the user typed in the url bar.
|
||||
Title string `json:"title"` // Title of the navigation history entry.
|
||||
TransitionType TransitionType `json:"transitionType"` // Transition type.
|
||||
}
|
||||
|
||||
// ScreencastFrameMetadata screencast frame metadata.
|
||||
type ScreencastFrameMetadata struct {
|
||||
OffsetTop float64 `json:"offsetTop,omitempty"` // Top offset in DIP.
|
||||
PageScaleFactor float64 `json:"pageScaleFactor,omitempty"` // Page scale factor.
|
||||
DeviceWidth float64 `json:"deviceWidth,omitempty"` // Device screen width in DIP.
|
||||
DeviceHeight float64 `json:"deviceHeight,omitempty"` // Device screen height in DIP.
|
||||
ScrollOffsetX float64 `json:"scrollOffsetX,omitempty"` // Position of horizontal scroll in CSS pixels.
|
||||
ScrollOffsetY float64 `json:"scrollOffsetY,omitempty"` // Position of vertical scroll in CSS pixels.
|
||||
Timestamp *Bootstamp `json:"timestamp,omitempty"` // Frame swap timestamp.
|
||||
OffsetTop float64 `json:"offsetTop"` // Top offset in DIP.
|
||||
PageScaleFactor float64 `json:"pageScaleFactor"` // Page scale factor.
|
||||
DeviceWidth float64 `json:"deviceWidth"` // Device screen width in DIP.
|
||||
DeviceHeight float64 `json:"deviceHeight"` // Device screen height in DIP.
|
||||
ScrollOffsetX float64 `json:"scrollOffsetX"` // Position of horizontal scroll in CSS pixels.
|
||||
ScrollOffsetY float64 `json:"scrollOffsetY"` // Position of vertical scroll in CSS pixels.
|
||||
Timestamp *Bootstamp `json:"timestamp,omitempty"` // Frame swap timestamp.
|
||||
}
|
||||
|
||||
// DialogType javascript dialog type.
|
||||
|
@ -258,10 +258,10 @@ func (t *DialogType) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// AppManifestError error while paring app manifest.
|
||||
type AppManifestError struct {
|
||||
Message string `json:"message,omitempty"` // Error message.
|
||||
Critical int64 `json:"critical,omitempty"` // If criticial, this is a non-recoverable parse error.
|
||||
Line int64 `json:"line,omitempty"` // Error line.
|
||||
Column int64 `json:"column,omitempty"` // Error column.
|
||||
Message string `json:"message"` // Error message.
|
||||
Critical int64 `json:"critical"` // If criticial, this is a non-recoverable parse error.
|
||||
Line int64 `json:"line"` // Error line.
|
||||
Column int64 `json:"column"` // Error column.
|
||||
}
|
||||
|
||||
// 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.
|
||||
type LayoutViewport struct {
|
||||
PageX int64 `json:"pageX,omitempty"` // Horizontal offset relative to the document (CSS pixels).
|
||||
PageY int64 `json:"pageY,omitempty"` // Vertical offset relative to the document (CSS pixels).
|
||||
ClientWidth int64 `json:"clientWidth,omitempty"` // Width (CSS pixels), excludes scrollbar if present.
|
||||
ClientHeight int64 `json:"clientHeight,omitempty"` // Height (CSS pixels), excludes scrollbar if present.
|
||||
PageX int64 `json:"pageX"` // Horizontal offset relative to the document (CSS pixels).
|
||||
PageY int64 `json:"pageY"` // Vertical offset relative to the document (CSS pixels).
|
||||
ClientWidth int64 `json:"clientWidth"` // Width (CSS pixels), excludes scrollbar if present.
|
||||
ClientHeight int64 `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present.
|
||||
}
|
||||
|
||||
// VisualViewport visual viewport position, dimensions, and scale.
|
||||
type VisualViewport struct {
|
||||
OffsetX float64 `json:"offsetX,omitempty"` // Horizontal offset relative to the layout viewport (CSS pixels).
|
||||
OffsetY float64 `json:"offsetY,omitempty"` // Vertical offset relative to the layout viewport (CSS pixels).
|
||||
PageX float64 `json:"pageX,omitempty"` // Horizontal offset relative to the document (CSS pixels).
|
||||
PageY float64 `json:"pageY,omitempty"` // Vertical offset relative to the document (CSS pixels).
|
||||
ClientWidth float64 `json:"clientWidth,omitempty"` // Width (CSS pixels), excludes scrollbar if present.
|
||||
ClientHeight float64 `json:"clientHeight,omitempty"` // Height (CSS pixels), excludes scrollbar if present.
|
||||
Scale float64 `json:"scale,omitempty"` // Scale relative to the ideal viewport (size at width=device-width).
|
||||
OffsetX float64 `json:"offsetX"` // Horizontal 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"` // Horizontal offset relative to the document (CSS pixels).
|
||||
PageY float64 `json:"pageY"` // Vertical offset relative to the document (CSS pixels).
|
||||
ClientWidth float64 `json:"clientWidth"` // Width (CSS pixels), excludes scrollbar if present.
|
||||
ClientHeight float64 `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present.
|
||||
Scale float64 `json:"scale"` // Scale relative to the ideal viewport (size at width=device-width).
|
||||
}
|
||||
|
||||
// Bootstamp bootstamp type.
|
||||
|
|
|
@ -653,44 +653,38 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler8(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ScriptID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.Functions) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"functions\":")
|
||||
if in.Functions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Functions {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"functions\":")
|
||||
if in.Functions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Functions {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -821,25 +815,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler9(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.Int64(int64(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.CallFrame != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"callFrame\":")
|
||||
if in.CallFrame == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.CallFrame).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.Int64(int64(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"callFrame\":")
|
||||
if in.CallFrame == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.CallFrame).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.HitCount != 0 {
|
||||
if !first {
|
||||
|
@ -1039,45 +1029,39 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler10(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.Nodes) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodes\":")
|
||||
if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v16, v17 := range in.Nodes {
|
||||
if v16 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v17 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v17).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"nodes\":")
|
||||
if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v16, v17 := range in.Nodes {
|
||||
if v16 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v17 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v17).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if in.StartTime != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"startTime\":")
|
||||
out.Float64(float64(in.StartTime))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.EndTime != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"endTime\":")
|
||||
out.Float64(float64(in.EndTime))
|
||||
first = false
|
||||
out.RawString("\"startTime\":")
|
||||
out.Float64(float64(in.StartTime))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"endTime\":")
|
||||
out.Float64(float64(in.EndTime))
|
||||
if len(in.Samples) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1179,22 +1163,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler11(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Line != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"line\":")
|
||||
out.Int64(int64(in.Line))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Ticks != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ticks\":")
|
||||
out.Int64(int64(in.Ticks))
|
||||
first = false
|
||||
out.RawString("\"line\":")
|
||||
out.Int64(int64(in.Line))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ticks\":")
|
||||
out.Int64(int64(in.Ticks))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1461,45 +1441,39 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler14(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FunctionName != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"functionName\":")
|
||||
out.String(string(in.FunctionName))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.Ranges) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ranges\":")
|
||||
if in.Ranges == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v26, v27 := range in.Ranges {
|
||||
if v26 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v27 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v27).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"functionName\":")
|
||||
out.String(string(in.FunctionName))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ranges\":")
|
||||
if in.Ranges == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v26, v27 := range in.Ranges {
|
||||
if v26 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v27 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v27).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if in.IsBlockCoverage {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isBlockCoverage\":")
|
||||
out.Bool(bool(in.IsBlockCoverage))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isBlockCoverage\":")
|
||||
out.Bool(bool(in.IsBlockCoverage))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1573,25 +1547,21 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler15(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Location != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"location\":")
|
||||
if in.Location == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Location).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"location\":")
|
||||
if in.Location == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Location).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.Title != "" {
|
||||
if !first {
|
||||
|
@ -1684,37 +1654,31 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler16(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Location != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"location\":")
|
||||
if in.Location == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Location).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.String(string(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Profile != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"profile\":")
|
||||
if in.Profile == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Profile).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"location\":")
|
||||
if in.Location == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Location).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"profile\":")
|
||||
if in.Profile == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Profile).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.Title != "" {
|
||||
if !first {
|
||||
|
@ -1907,30 +1871,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpProfiler19(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.StartOffset != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"startOffset\":")
|
||||
out.Int64(int64(in.StartOffset))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.EndOffset != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"endOffset\":")
|
||||
out.Int64(int64(in.EndOffset))
|
||||
first = false
|
||||
out.RawString("\"startOffset\":")
|
||||
out.Int64(int64(in.StartOffset))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Count != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"count\":")
|
||||
out.Int64(int64(in.Count))
|
||||
first = false
|
||||
out.RawString("\"endOffset\":")
|
||||
out.Int64(int64(in.EndOffset))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"count\":")
|
||||
out.Int64(int64(in.Count))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -10,16 +10,16 @@ import (
|
|||
// EventConsoleProfileStarted sent when new profile recording is started
|
||||
// using console.profile() call.
|
||||
type EventConsoleProfileStarted struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Location *debugger.Location `json:"location,omitempty"` // Location of console.profile().
|
||||
Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
|
||||
ID string `json:"id"`
|
||||
Location *debugger.Location `json:"location"` // Location of console.profile().
|
||||
Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
|
||||
}
|
||||
|
||||
// EventConsoleProfileFinished [no description].
|
||||
type EventConsoleProfileFinished struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Location *debugger.Location `json:"location,omitempty"` // Location of console.profileEnd().
|
||||
Profile *Profile `json:"profile,omitempty"`
|
||||
ID string `json:"id"`
|
||||
Location *debugger.Location `json:"location"` // Location of console.profileEnd().
|
||||
Profile *Profile `json:"profile"`
|
||||
Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ import "github.com/knq/chromedp/cdp/runtime"
|
|||
// ProfileNode profile node. Holds callsite information, execution statistics
|
||||
// and child nodes.
|
||||
type ProfileNode struct {
|
||||
ID int64 `json:"id,omitempty"` // Unique id of the node.
|
||||
CallFrame *runtime.CallFrame `json:"callFrame,omitempty"` // Function location.
|
||||
ID int64 `json:"id"` // Unique id of the node.
|
||||
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.
|
||||
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.
|
||||
|
@ -17,9 +17,9 @@ type ProfileNode struct {
|
|||
|
||||
// Profile profile.
|
||||
type Profile struct {
|
||||
Nodes []*ProfileNode `json:"nodes,omitempty"` // The list of profile nodes. First item is the root node.
|
||||
StartTime float64 `json:"startTime,omitempty"` // Profiling start timestamp in microseconds.
|
||||
EndTime float64 `json:"endTime,omitempty"` // Profiling end timestamp in microseconds.
|
||||
Nodes []*ProfileNode `json:"nodes"` // The list of profile nodes. First item is the root node.
|
||||
StartTime float64 `json:"startTime"` // Profiling start timestamp in microseconds.
|
||||
EndTime float64 `json:"endTime"` // Profiling end timestamp in microseconds.
|
||||
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.
|
||||
}
|
||||
|
@ -27,27 +27,27 @@ type Profile struct {
|
|||
// PositionTickInfo specifies a number of samples attributed to a certain
|
||||
// source position.
|
||||
type PositionTickInfo struct {
|
||||
Line int64 `json:"line,omitempty"` // Source line number (1-based).
|
||||
Ticks int64 `json:"ticks,omitempty"` // Number of samples attributed to the source line.
|
||||
Line int64 `json:"line"` // Source line number (1-based).
|
||||
Ticks int64 `json:"ticks"` // Number of samples attributed to the source line.
|
||||
}
|
||||
|
||||
// CoverageRange coverage data for a source range.
|
||||
type CoverageRange struct {
|
||||
StartOffset int64 `json:"startOffset,omitempty"` // JavaScript script source offset for the range start.
|
||||
EndOffset int64 `json:"endOffset,omitempty"` // JavaScript script source offset for the range end.
|
||||
Count int64 `json:"count,omitempty"` // Collected execution count of the source range.
|
||||
StartOffset int64 `json:"startOffset"` // JavaScript script source offset for the range start.
|
||||
EndOffset int64 `json:"endOffset"` // JavaScript script source offset for the range end.
|
||||
Count int64 `json:"count"` // Collected execution count of the source range.
|
||||
}
|
||||
|
||||
// FunctionCoverage coverage data for a JavaScript function.
|
||||
type FunctionCoverage struct {
|
||||
FunctionName string `json:"functionName,omitempty"` // JavaScript function name.
|
||||
Ranges []*CoverageRange `json:"ranges,omitempty"` // Source ranges inside the function with coverage data.
|
||||
IsBlockCoverage bool `json:"isBlockCoverage,omitempty"` // Whether coverage data for this function has block granularity.
|
||||
FunctionName string `json:"functionName"` // JavaScript function name.
|
||||
Ranges []*CoverageRange `json:"ranges"` // Source ranges inside the function with coverage data.
|
||||
IsBlockCoverage bool `json:"isBlockCoverage"` // Whether coverage data for this function has block granularity.
|
||||
}
|
||||
|
||||
// ScriptCoverage coverage data for a JavaScript script.
|
||||
type ScriptCoverage struct {
|
||||
ScriptID runtime.ScriptID `json:"scriptId,omitempty"` // JavaScript script id.
|
||||
URL string `json:"url,omitempty"` // JavaScript script name or url.
|
||||
Functions []*FunctionCoverage `json:"functions,omitempty"` // Functions contained in the script that has coverage data.
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // JavaScript script id.
|
||||
URL string `json:"url"` // JavaScript script name or url.
|
||||
Functions []*FunctionCoverage `json:"functions"` // Functions contained in the script that has coverage data.
|
||||
}
|
||||
|
|
|
@ -111,28 +111,26 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime(out *jwriter.Writer, i
|
|||
out.RawString("\"description\":")
|
||||
out.String(string(in.Description))
|
||||
}
|
||||
if len(in.CallFrames) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"callFrames\":")
|
||||
if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.CallFrames {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"callFrames\":")
|
||||
if in.CallFrames == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.CallFrames {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if in.Parent != nil {
|
||||
if !first {
|
||||
|
@ -617,14 +615,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime5(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if in.Subtype != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -908,22 +904,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime8(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if in.Value != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1063,14 +1055,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if in.Value != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1115,22 +1105,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime9(out *jwriter.Writer,
|
|||
(*in.Set).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
if in.Configurable {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"configurable\":")
|
||||
out.Bool(bool(in.Configurable))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Enumerable {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"enumerable\":")
|
||||
out.Bool(bool(in.Enumerable))
|
||||
first = false
|
||||
out.RawString("\"configurable\":")
|
||||
out.Bool(bool(in.Configurable))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"enumerable\":")
|
||||
out.Bool(bool(in.Enumerable))
|
||||
if in.WasThrown {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1288,14 +1274,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if in.Subtype != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1312,36 +1296,32 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime10(out *jwriter.Writer,
|
|||
out.RawString("\"description\":")
|
||||
out.String(string(in.Description))
|
||||
}
|
||||
if in.Overflow {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"overflow\":")
|
||||
out.Bool(bool(in.Overflow))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.Properties) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"properties\":")
|
||||
if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v6, v7 := range in.Properties {
|
||||
if v6 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v7 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v7).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"overflow\":")
|
||||
out.Bool(bool(in.Overflow))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"properties\":")
|
||||
if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v6, v7 := range in.Properties {
|
||||
if v6 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v7 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v7).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if len(in.Entries) != 0 {
|
||||
if !first {
|
||||
|
@ -1437,14 +1417,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime11(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if in.Value != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1810,30 +1788,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime14(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.Int64(int64(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Origin != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"origin\":")
|
||||
out.String(string(in.Origin))
|
||||
first = false
|
||||
out.RawString("\"id\":")
|
||||
out.Int64(int64(in.ID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
first = false
|
||||
out.RawString("\"origin\":")
|
||||
out.String(string(in.Origin))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if (in.AuxData).IsDefined() {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -1935,38 +1907,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime15(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ExceptionID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"exceptionId\":")
|
||||
out.Int64(int64(in.ExceptionID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Text != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"text\":")
|
||||
out.String(string(in.Text))
|
||||
first = false
|
||||
out.RawString("\"exceptionId\":")
|
||||
out.Int64(int64(in.ExceptionID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.LineNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
first = false
|
||||
out.RawString("\"text\":")
|
||||
out.String(string(in.Text))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ColumnNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
if in.ScriptID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -2086,26 +2050,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime16(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Object != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"object\":")
|
||||
if in.Object == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Object).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if (in.Hints).IsDefined() {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hints\":")
|
||||
(in.Hints).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"object\":")
|
||||
if in.Object == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Object).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hints\":")
|
||||
(in.Hints).MarshalEasyJSON(out)
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -2226,14 +2186,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime18(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ExecutionContextID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"executionContextId\":")
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"executionContextId\":")
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -2303,17 +2261,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime19(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Context != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"context\":")
|
||||
if in.Context == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Context).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"context\":")
|
||||
if in.Context == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Context).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -2394,29 +2350,25 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime20(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Timestamp != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ExceptionDetails != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"exceptionDetails\":")
|
||||
if in.ExceptionDetails == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.ExceptionDetails).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"exceptionDetails\":")
|
||||
if in.ExceptionDetails == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.ExceptionDetails).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -2481,22 +2433,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime21(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Reason != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"reason\":")
|
||||
out.String(string(in.Reason))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ExceptionID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"exceptionId\":")
|
||||
out.Int64(int64(in.ExceptionID))
|
||||
first = false
|
||||
out.RawString("\"reason\":")
|
||||
out.String(string(in.Reason))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"exceptionId\":")
|
||||
out.Int64(int64(in.ExceptionID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -2613,56 +2561,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime22(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.Args) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"args\":")
|
||||
if in.Args == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v17, v18 := range in.Args {
|
||||
if v17 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v18 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v18).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"args\":")
|
||||
if in.Args == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v17, v18 := range in.Args {
|
||||
if v17 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v18 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v18).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if in.ExecutionContextID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"executionContextId\":")
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Timestamp != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"executionContextId\":")
|
||||
out.Int64(int64(in.ExecutionContextID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"timestamp\":")
|
||||
if in.Timestamp == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.StackTrace != nil {
|
||||
if !first {
|
||||
|
@ -3025,17 +2965,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime25(out *jwriter.Writer,
|
|||
(*in.Key).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
if in.Value != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
if in.Value == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Value).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
if in.Value == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.Value).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -3283,38 +3221,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime29(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Header != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"header\":")
|
||||
out.String(string(in.Header))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.HasBody {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hasBody\":")
|
||||
out.Bool(bool(in.HasBody))
|
||||
first = false
|
||||
out.RawString("\"header\":")
|
||||
out.String(string(in.Header))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.FormatterObjectID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"formatterObjectId\":")
|
||||
out.String(string(in.FormatterObjectID))
|
||||
first = false
|
||||
out.RawString("\"hasBody\":")
|
||||
out.Bool(bool(in.HasBody))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.BindRemoteObjectFunctionID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"bindRemoteObjectFunctionId\":")
|
||||
out.String(string(in.BindRemoteObjectFunctionID))
|
||||
first = false
|
||||
out.RawString("\"formatterObjectId\":")
|
||||
out.String(string(in.FormatterObjectID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"bindRemoteObjectFunctionId\":")
|
||||
out.String(string(in.BindRemoteObjectFunctionID))
|
||||
if in.ConfigObjectID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -3858,46 +3788,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpRuntime34(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.FunctionName != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"functionName\":")
|
||||
out.String(string(in.FunctionName))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ScriptID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
first = false
|
||||
out.RawString("\"functionName\":")
|
||||
out.String(string(in.FunctionName))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
first = false
|
||||
out.RawString("\"scriptId\":")
|
||||
out.String(string(in.ScriptID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.LineNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ColumnNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ import (
|
|||
|
||||
// EventExecutionContextCreated issued when new execution context is created.
|
||||
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.
|
||||
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
|
||||
|
@ -23,31 +23,31 @@ type EventExecutionContextsCleared struct{}
|
|||
|
||||
// EventExceptionThrown issued when exception was thrown and unhandled.
|
||||
type EventExceptionThrown struct {
|
||||
Timestamp *Timestamp `json:"timestamp,omitempty"` // Timestamp of the exception.
|
||||
ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"`
|
||||
Timestamp *Timestamp `json:"timestamp"` // Timestamp of the exception.
|
||||
ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`
|
||||
}
|
||||
|
||||
// EventExceptionRevoked issued when unhandled exception was revoked.
|
||||
type EventExceptionRevoked struct {
|
||||
Reason string `json:"reason,omitempty"` // Reason describing why exception was revoked.
|
||||
ExceptionID int64 `json:"exceptionId,omitempty"` // The id of revoked exception, as reported in exceptionUnhandled.
|
||||
Reason string `json:"reason"` // Reason describing why exception was revoked.
|
||||
ExceptionID int64 `json:"exceptionId"` // The id of revoked exception, as reported in exceptionUnhandled.
|
||||
}
|
||||
|
||||
// EventConsoleAPICalled issued when console API was called.
|
||||
type EventConsoleAPICalled struct {
|
||||
Type APIType `json:"type,omitempty"` // Type of the call.
|
||||
Args []*RemoteObject `json:"args,omitempty"` // Call arguments.
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Identifier of the context where the call was made.
|
||||
Timestamp *Timestamp `json:"timestamp,omitempty"` // Call timestamp.
|
||||
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.
|
||||
Type APIType `json:"type"` // Type of the call.
|
||||
Args []*RemoteObject `json:"args"` // Call arguments.
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId"` // Identifier of the context where the call was made.
|
||||
Timestamp *Timestamp `json:"timestamp"` // Call timestamp.
|
||||
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.
|
||||
}
|
||||
|
||||
// EventInspectRequested issued when object should be inspected (for example,
|
||||
// as a result of inspect() command line API call).
|
||||
type EventInspectRequested struct {
|
||||
Object *RemoteObject `json:"object,omitempty"`
|
||||
Hints easyjson.RawMessage `json:"hints,omitempty"`
|
||||
Object *RemoteObject `json:"object"`
|
||||
Hints easyjson.RawMessage `json:"hints"`
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -79,7 +79,7 @@ func (t *UnserializableValue) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// RemoteObject mirror object referencing original JavaScript object.
|
||||
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.
|
||||
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).
|
||||
|
@ -92,27 +92,27 @@ type RemoteObject struct {
|
|||
|
||||
// CustomPreview [no description].
|
||||
type CustomPreview struct {
|
||||
Header string `json:"header,omitempty"`
|
||||
HasBody bool `json:"hasBody,omitempty"`
|
||||
FormatterObjectID RemoteObjectID `json:"formatterObjectId,omitempty"`
|
||||
BindRemoteObjectFunctionID RemoteObjectID `json:"bindRemoteObjectFunctionId,omitempty"`
|
||||
Header string `json:"header"`
|
||||
HasBody bool `json:"hasBody"`
|
||||
FormatterObjectID RemoteObjectID `json:"formatterObjectId"`
|
||||
BindRemoteObjectFunctionID RemoteObjectID `json:"bindRemoteObjectFunctionId"`
|
||||
ConfigObjectID RemoteObjectID `json:"configObjectId,omitempty"`
|
||||
}
|
||||
|
||||
// ObjectPreview object containing abbreviated remote object value.
|
||||
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.
|
||||
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.
|
||||
Properties []*PropertyPreview `json:"properties,omitempty"` // List of the properties.
|
||||
Overflow bool `json:"overflow"` // True iff some of the properties or entries of the original object did not fit.
|
||||
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.
|
||||
}
|
||||
|
||||
// PropertyPreview [no description].
|
||||
type PropertyPreview struct {
|
||||
Name string `json:"name,omitempty"` // Property name.
|
||||
Type Type `json:"type,omitempty"` // Object type. Accessor means that the property itself is an accessor property.
|
||||
Name string `json:"name"` // Property name.
|
||||
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.
|
||||
ValuePreview *ObjectPreview `json:"valuePreview,omitempty"` // Nested value preview.
|
||||
Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only.
|
||||
|
@ -120,28 +120,28 @@ type PropertyPreview struct {
|
|||
|
||||
// EntryPreview [no description].
|
||||
type EntryPreview struct {
|
||||
Key *ObjectPreview `json:"key,omitempty"` // Preview of the key. Specified for map-like collection entries.
|
||||
Value *ObjectPreview `json:"value,omitempty"` // Preview of the value.
|
||||
Key *ObjectPreview `json:"key,omitempty"` // Preview of the key. Specified for map-like collection entries.
|
||||
Value *ObjectPreview `json:"value"` // Preview of the value.
|
||||
}
|
||||
|
||||
// PropertyDescriptor object property descriptor.
|
||||
type PropertyDescriptor struct {
|
||||
Name string `json:"name,omitempty"` // Property name or symbol description.
|
||||
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).
|
||||
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).
|
||||
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.
|
||||
Enumerable bool `json:"enumerable,omitempty"` // 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.
|
||||
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.
|
||||
Name string `json:"name"` // Property name or symbol description.
|
||||
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).
|
||||
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).
|
||||
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"` // 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.
|
||||
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.
|
||||
}
|
||||
|
||||
// InternalPropertyDescriptor object internal property descriptor. This
|
||||
// property isn't normally visible in JavaScript code.
|
||||
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.
|
||||
}
|
||||
|
||||
|
@ -164,19 +164,19 @@ func (t ExecutionContextID) Int64() int64 {
|
|||
|
||||
// ExecutionContextDescription description of an isolated world.
|
||||
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.
|
||||
Origin string `json:"origin,omitempty"` // Execution context origin.
|
||||
Name string `json:"name,omitempty"` // Human readable name describing given context.
|
||||
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"` // Execution context origin.
|
||||
Name string `json:"name"` // Human readable name describing given context.
|
||||
AuxData easyjson.RawMessage `json:"auxData,omitempty"`
|
||||
}
|
||||
|
||||
// ExceptionDetails detailed information about exception (or error) that was
|
||||
// thrown during script compilation or execution.
|
||||
type ExceptionDetails struct {
|
||||
ExceptionID int64 `json:"exceptionId,omitempty"` // Exception id.
|
||||
Text string `json:"text,omitempty"` // 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).
|
||||
ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number of the exception location (0-based).
|
||||
ExceptionID int64 `json:"exceptionId"` // Exception id.
|
||||
Text string `json:"text"` // Exception text, which should be used together with exception object when available.
|
||||
LineNumber int64 `json:"lineNumber"` // Line 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.
|
||||
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.
|
||||
|
@ -224,17 +224,17 @@ func (t *Timestamp) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// CallFrame stack entry for runtime errors and assertions.
|
||||
type CallFrame struct {
|
||||
FunctionName string `json:"functionName,omitempty"` // JavaScript function name.
|
||||
ScriptID ScriptID `json:"scriptId,omitempty"` // JavaScript script id.
|
||||
URL string `json:"url,omitempty"` // JavaScript script name or url.
|
||||
LineNumber int64 `json:"lineNumber,omitempty"` // JavaScript script line number (0-based).
|
||||
ColumnNumber int64 `json:"columnNumber,omitempty"` // JavaScript script column number (0-based).
|
||||
FunctionName string `json:"functionName"` // JavaScript function name.
|
||||
ScriptID ScriptID `json:"scriptId"` // JavaScript script id.
|
||||
URL string `json:"url"` // JavaScript script name or url.
|
||||
LineNumber int64 `json:"lineNumber"` // JavaScript script line number (0-based).
|
||||
ColumnNumber int64 `json:"columnNumber"` // JavaScript script column number (0-based).
|
||||
}
|
||||
|
||||
// StackTrace call frames for assertions or error messages.
|
||||
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.
|
||||
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.
|
||||
PromiseCreationFrame *CallFrame `json:"promiseCreationFrame,omitempty"` // Creation frame of the Promise which produced the next synchronous trace when resolved, if available.
|
||||
}
|
||||
|
|
|
@ -226,22 +226,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema2(out *jwriter.Writer, i
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Name != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Version != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"version\":")
|
||||
out.String(string(in.Version))
|
||||
first = false
|
||||
out.RawString("\"name\":")
|
||||
out.String(string(in.Name))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"version\":")
|
||||
out.String(string(in.Version))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,6 @@ package schema
|
|||
|
||||
// Domain description of the protocol domain.
|
||||
type Domain struct {
|
||||
Name string `json:"name,omitempty"` // Domain name.
|
||||
Version string `json:"version,omitempty"` // Domain version.
|
||||
Name string `json:"name"` // Domain name.
|
||||
Version string `json:"version"` // Domain version.
|
||||
}
|
||||
|
|
|
@ -58,38 +58,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.SecurityState != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"securityState\":")
|
||||
(in.SecurityState).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Summary != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"summary\":")
|
||||
out.String(string(in.Summary))
|
||||
first = false
|
||||
out.RawString("\"securityState\":")
|
||||
(in.SecurityState).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Description != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"description\":")
|
||||
out.String(string(in.Description))
|
||||
first = false
|
||||
out.RawString("\"summary\":")
|
||||
out.String(string(in.Summary))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.HasCertificate {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hasCertificate\":")
|
||||
out.Bool(bool(in.HasCertificate))
|
||||
first = false
|
||||
out.RawString("\"description\":")
|
||||
out.String(string(in.Description))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"hasCertificate\":")
|
||||
out.Bool(bool(in.HasCertificate))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -289,62 +281,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.RanMixedContent {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ranMixedContent\":")
|
||||
out.Bool(bool(in.RanMixedContent))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.DisplayedMixedContent {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"displayedMixedContent\":")
|
||||
out.Bool(bool(in.DisplayedMixedContent))
|
||||
first = false
|
||||
out.RawString("\"ranMixedContent\":")
|
||||
out.Bool(bool(in.RanMixedContent))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ContainedMixedForm {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"containedMixedForm\":")
|
||||
out.Bool(bool(in.ContainedMixedForm))
|
||||
first = false
|
||||
out.RawString("\"displayedMixedContent\":")
|
||||
out.Bool(bool(in.DisplayedMixedContent))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.RanContentWithCertErrors {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ranContentWithCertErrors\":")
|
||||
out.Bool(bool(in.RanContentWithCertErrors))
|
||||
first = false
|
||||
out.RawString("\"containedMixedForm\":")
|
||||
out.Bool(bool(in.ContainedMixedForm))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.DisplayedContentWithCertErrors {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"displayedContentWithCertErrors\":")
|
||||
out.Bool(bool(in.DisplayedContentWithCertErrors))
|
||||
first = false
|
||||
out.RawString("\"ranContentWithCertErrors\":")
|
||||
out.Bool(bool(in.RanContentWithCertErrors))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.RanInsecureContentStyle != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"ranInsecureContentStyle\":")
|
||||
(in.RanInsecureContentStyle).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"displayedContentWithCertErrors\":")
|
||||
out.Bool(bool(in.DisplayedContentWithCertErrors))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.DisplayedInsecureContentStyle != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"displayedInsecureContentStyle\":")
|
||||
(in.DisplayedInsecureContentStyle).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"ranInsecureContentStyle\":")
|
||||
(in.RanInsecureContentStyle).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"displayedInsecureContentStyle\":")
|
||||
(in.DisplayedInsecureContentStyle).MarshalEasyJSON(out)
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -526,56 +504,48 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.SecurityState != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"securityState\":")
|
||||
(in.SecurityState).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.SchemeIsCryptographic {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"schemeIsCryptographic\":")
|
||||
out.Bool(bool(in.SchemeIsCryptographic))
|
||||
first = false
|
||||
out.RawString("\"securityState\":")
|
||||
(in.SecurityState).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if len(in.Explanations) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"explanations\":")
|
||||
if in.Explanations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Explanations {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"schemeIsCryptographic\":")
|
||||
out.Bool(bool(in.SchemeIsCryptographic))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"explanations\":")
|
||||
if in.Explanations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Explanations {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if in.InsecureContentStatus != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"insecureContentStatus\":")
|
||||
if in.InsecureContentStatus == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.InsecureContentStatus).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"insecureContentStatus\":")
|
||||
if in.InsecureContentStatus == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.InsecureContentStatus).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.Summary != "" {
|
||||
if !first {
|
||||
|
@ -650,30 +620,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity6(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.EventID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"eventId\":")
|
||||
out.Int64(int64(in.EventID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ErrorType != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"errorType\":")
|
||||
out.String(string(in.ErrorType))
|
||||
first = false
|
||||
out.RawString("\"eventId\":")
|
||||
out.Int64(int64(in.EventID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.RequestURL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"requestURL\":")
|
||||
out.String(string(in.RequestURL))
|
||||
first = false
|
||||
out.RawString("\"errorType\":")
|
||||
out.String(string(in.ErrorType))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"requestURL\":")
|
||||
out.String(string(in.RequestURL))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@ import (
|
|||
|
||||
// EventSecurityStateChanged the security state of the page changed.
|
||||
type EventSecurityStateChanged struct {
|
||||
SecurityState State `json:"securityState,omitempty"` // Security state.
|
||||
SchemeIsCryptographic bool `json:"schemeIsCryptographic,omitempty"` // 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.
|
||||
InsecureContentStatus *InsecureContentStatus `json:"insecureContentStatus,omitempty"` // Information about insecure content on the page.
|
||||
Summary string `json:"summary,omitempty"` // Overrides user-visible description of the state.
|
||||
SecurityState State `json:"securityState"` // Security state.
|
||||
SchemeIsCryptographic bool `json:"schemeIsCryptographic"` // True if the page was loaded over cryptographic transport such as HTTPS.
|
||||
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"` // Information about insecure content on the page.
|
||||
Summary string `json:"summary,omitempty"` // Overrides user-visible description of the state.
|
||||
}
|
||||
|
||||
// EventCertificateError there is a certificate error. If overriding
|
||||
|
@ -20,9 +20,9 @@ type EventSecurityStateChanged struct {
|
|||
// handleCertificateError command. Note: this event does not fire if the
|
||||
// certificate error has been allowed internally.
|
||||
type EventCertificateError struct {
|
||||
EventID int64 `json:"eventId,omitempty"` // The ID of the event.
|
||||
ErrorType string `json:"errorType,omitempty"` // The type of the error.
|
||||
RequestURL string `json:"requestURL,omitempty"` // The url that was requested.
|
||||
EventID int64 `json:"eventId"` // The ID of the event.
|
||||
ErrorType string `json:"errorType"` // The type of the error.
|
||||
RequestURL string `json:"requestURL"` // The url that was requested.
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -75,21 +75,21 @@ func (t *State) UnmarshalJSON(buf []byte) error {
|
|||
// StateExplanation an explanation of an factor contributing to the security
|
||||
// state.
|
||||
type StateExplanation struct {
|
||||
SecurityState State `json:"securityState,omitempty"` // Security state representing the severity of the factor being explained.
|
||||
Summary string `json:"summary,omitempty"` // Short phrase describing the type of factor.
|
||||
Description string `json:"description,omitempty"` // Full text explanation of the factor.
|
||||
HasCertificate bool `json:"hasCertificate,omitempty"` // True if the page has a certificate.
|
||||
SecurityState State `json:"securityState"` // Security state representing the severity of the factor being explained.
|
||||
Summary string `json:"summary"` // Short phrase describing the type of factor.
|
||||
Description string `json:"description"` // Full text explanation of the factor.
|
||||
HasCertificate bool `json:"hasCertificate"` // True if the page has a certificate.
|
||||
}
|
||||
|
||||
// InsecureContentStatus information about insecure content on the page.
|
||||
type InsecureContentStatus struct {
|
||||
RanMixedContent bool `json:"ranMixedContent,omitempty"` // 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.
|
||||
ContainedMixedForm bool `json:"containedMixedForm,omitempty"` // 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.
|
||||
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.
|
||||
RanInsecureContentStyle State `json:"ranInsecureContentStyle,omitempty"` // Security state representing a page that ran insecure content.
|
||||
DisplayedInsecureContentStyle State `json:"displayedInsecureContentStyle,omitempty"` // Security state representing a page that displayed insecure content.
|
||||
RanMixedContent bool `json:"ranMixedContent"` // True if the page was loaded over HTTPS and ran mixed (HTTP) content such as scripts.
|
||||
DisplayedMixedContent bool `json:"displayedMixedContent"` // True if the page was loaded over HTTPS and displayed mixed (HTTP) content such as images.
|
||||
ContainedMixedForm bool `json:"containedMixedForm"` // True if the page was loaded over HTTPS and contained a form targeting an insecure url.
|
||||
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"` // 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"` // Security state representing a page that ran 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.
|
||||
|
|
|
@ -90,46 +90,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker(out *jwriter.Wri
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.VersionID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"versionId\":")
|
||||
out.String(string(in.VersionID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.RegistrationID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"registrationId\":")
|
||||
out.String(string(in.RegistrationID))
|
||||
first = false
|
||||
out.RawString("\"versionId\":")
|
||||
out.String(string(in.VersionID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ScriptURL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scriptURL\":")
|
||||
out.String(string(in.ScriptURL))
|
||||
first = false
|
||||
out.RawString("\"registrationId\":")
|
||||
out.String(string(in.RegistrationID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.RunningStatus != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"runningStatus\":")
|
||||
(in.RunningStatus).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"scriptURL\":")
|
||||
out.String(string(in.ScriptURL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Status != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"status\":")
|
||||
(in.Status).MarshalEasyJSON(out)
|
||||
first = false
|
||||
out.RawString("\"runningStatus\":")
|
||||
(in.RunningStatus).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"status\":")
|
||||
(in.Status).MarshalEasyJSON(out)
|
||||
if in.ScriptLastModified != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
|
@ -640,30 +630,24 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker7(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.RegistrationID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"registrationId\":")
|
||||
out.String(string(in.RegistrationID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ScopeURL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"scopeURL\":")
|
||||
out.String(string(in.ScopeURL))
|
||||
first = false
|
||||
out.RawString("\"registrationId\":")
|
||||
out.String(string(in.RegistrationID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.IsDeleted {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isDeleted\":")
|
||||
out.Bool(bool(in.IsDeleted))
|
||||
first = false
|
||||
out.RawString("\"scopeURL\":")
|
||||
out.String(string(in.ScopeURL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"isDeleted\":")
|
||||
out.Bool(bool(in.IsDeleted))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -821,28 +805,26 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker9(out *jwriter.Wr
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.Versions) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"versions\":")
|
||||
if in.Versions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Versions {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"versions\":")
|
||||
if in.Versions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Versions {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -934,28 +916,26 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker10(out *jwriter.W
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.Registrations) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"registrations\":")
|
||||
if in.Registrations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.Registrations {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v9 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v9).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"registrations\":")
|
||||
if in.Registrations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.Registrations {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v9 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v9).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1026,17 +1006,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker11(out *jwriter.W
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ErrorMessage != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"errorMessage\":")
|
||||
if in.ErrorMessage == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.ErrorMessage).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"errorMessage\":")
|
||||
if in.ErrorMessage == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.ErrorMessage).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1109,54 +1087,42 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpServiceworker12(out *jwriter.W
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ErrorMessage != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"errorMessage\":")
|
||||
out.String(string(in.ErrorMessage))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.RegistrationID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"registrationId\":")
|
||||
out.String(string(in.RegistrationID))
|
||||
first = false
|
||||
out.RawString("\"errorMessage\":")
|
||||
out.String(string(in.ErrorMessage))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.VersionID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"versionId\":")
|
||||
out.String(string(in.VersionID))
|
||||
first = false
|
||||
out.RawString("\"registrationId\":")
|
||||
out.String(string(in.RegistrationID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.SourceURL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"sourceURL\":")
|
||||
out.String(string(in.SourceURL))
|
||||
first = false
|
||||
out.RawString("\"versionId\":")
|
||||
out.String(string(in.VersionID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.LineNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
first = false
|
||||
out.RawString("\"sourceURL\":")
|
||||
out.String(string(in.SourceURL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ColumnNumber != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
first = false
|
||||
out.RawString("\"lineNumber\":")
|
||||
out.Int64(int64(in.LineNumber))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"columnNumber\":")
|
||||
out.Int64(int64(in.ColumnNumber))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -8,17 +8,17 @@ import (
|
|||
|
||||
// EventWorkerRegistrationUpdated [no description].
|
||||
type EventWorkerRegistrationUpdated struct {
|
||||
Registrations []*Registration `json:"registrations,omitempty"`
|
||||
Registrations []*Registration `json:"registrations"`
|
||||
}
|
||||
|
||||
// EventWorkerVersionUpdated [no description].
|
||||
type EventWorkerVersionUpdated struct {
|
||||
Versions []*Version `json:"versions,omitempty"`
|
||||
Versions []*Version `json:"versions"`
|
||||
}
|
||||
|
||||
// EventWorkerErrorReported [no description].
|
||||
type EventWorkerErrorReported struct {
|
||||
ErrorMessage *ErrorMessage `json:"errorMessage,omitempty"`
|
||||
ErrorMessage *ErrorMessage `json:"errorMessage"`
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -13,9 +13,9 @@ import (
|
|||
|
||||
// Registration serviceWorker registration.
|
||||
type Registration struct {
|
||||
RegistrationID string `json:"registrationId,omitempty"`
|
||||
ScopeURL string `json:"scopeURL,omitempty"`
|
||||
IsDeleted bool `json:"isDeleted,omitempty"`
|
||||
RegistrationID string `json:"registrationId"`
|
||||
ScopeURL string `json:"scopeURL"`
|
||||
IsDeleted bool `json:"isDeleted"`
|
||||
}
|
||||
|
||||
// VersionRunningStatus [no description].
|
||||
|
@ -122,11 +122,11 @@ func (t *VersionStatus) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// Version serviceWorker version.
|
||||
type Version struct {
|
||||
VersionID string `json:"versionId,omitempty"`
|
||||
RegistrationID string `json:"registrationId,omitempty"`
|
||||
ScriptURL string `json:"scriptURL,omitempty"`
|
||||
RunningStatus VersionRunningStatus `json:"runningStatus,omitempty"`
|
||||
Status VersionStatus `json:"status,omitempty"`
|
||||
VersionID string `json:"versionId"`
|
||||
RegistrationID string `json:"registrationId"`
|
||||
ScriptURL string `json:"scriptURL"`
|
||||
RunningStatus VersionRunningStatus `json:"runningStatus"`
|
||||
Status VersionStatus `json:"status"`
|
||||
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.
|
||||
ControlledClients []target.ID `json:"controlledClients,omitempty"`
|
||||
|
@ -135,10 +135,10 @@ type Version struct {
|
|||
|
||||
// ErrorMessage serviceWorker error message.
|
||||
type ErrorMessage struct {
|
||||
ErrorMessage string `json:"errorMessage,omitempty"`
|
||||
RegistrationID string `json:"registrationId,omitempty"`
|
||||
VersionID string `json:"versionId,omitempty"`
|
||||
SourceURL string `json:"sourceURL,omitempty"`
|
||||
LineNumber int64 `json:"lineNumber,omitempty"`
|
||||
ColumnNumber int64 `json:"columnNumber,omitempty"`
|
||||
ErrorMessage string `json:"errorMessage"`
|
||||
RegistrationID string `json:"registrationId"`
|
||||
VersionID string `json:"versionId"`
|
||||
SourceURL string `json:"sourceURL"`
|
||||
LineNumber int64 `json:"lineNumber"`
|
||||
ColumnNumber int64 `json:"columnNumber"`
|
||||
}
|
||||
|
|
|
@ -54,22 +54,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpStorage(out *jwriter.Writer, i
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.StorageType != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"storageType\":")
|
||||
(in.StorageType).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Usage != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"usage\":")
|
||||
out.Float64(float64(in.Usage))
|
||||
first = false
|
||||
out.RawString("\"storageType\":")
|
||||
(in.StorageType).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"usage\":")
|
||||
out.Float64(float64(in.Usage))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -81,6 +81,6 @@ func (t *Type) UnmarshalJSON(buf []byte) error {
|
|||
|
||||
// UsageForType usage for a storage type.
|
||||
type UsageForType struct {
|
||||
StorageType Type `json:"storageType,omitempty"` // Name of storage type.
|
||||
Usage float64 `json:"usage,omitempty"` // Storage usage (bytes).
|
||||
StorageType Type `json:"storageType"` // Name of storage type.
|
||||
Usage float64 `json:"usage"` // Storage usage (bytes).
|
||||
}
|
||||
|
|
|
@ -278,28 +278,26 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.Devices) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"devices\":")
|
||||
if in.Devices == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v3, v4 := range in.Devices {
|
||||
if v3 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v4 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v4).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"devices\":")
|
||||
if in.Devices == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v3, v4 := range in.Devices {
|
||||
if v3 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v4 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v4).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
if (in.AuxAttributes).IsDefined() {
|
||||
if !first {
|
||||
|
@ -317,24 +315,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo2(out *jwriter.Write
|
|||
out.RawString("\"featureStatus\":")
|
||||
(in.FeatureStatus).MarshalEasyJSON(out)
|
||||
}
|
||||
if len(in.DriverBugWorkarounds) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"driverBugWorkarounds\":")
|
||||
if in.DriverBugWorkarounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.DriverBugWorkarounds {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v6))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"driverBugWorkarounds\":")
|
||||
if in.DriverBugWorkarounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.DriverBugWorkarounds {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
out.String(string(v6))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -403,38 +399,30 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSysteminfo3(out *jwriter.Write
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.VendorID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"vendorId\":")
|
||||
out.Float64(float64(in.VendorID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.DeviceID != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"deviceId\":")
|
||||
out.Float64(float64(in.DeviceID))
|
||||
first = false
|
||||
out.RawString("\"vendorId\":")
|
||||
out.Float64(float64(in.VendorID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.VendorString != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"vendorString\":")
|
||||
out.String(string(in.VendorString))
|
||||
first = false
|
||||
out.RawString("\"deviceId\":")
|
||||
out.Float64(float64(in.DeviceID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.DeviceString != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"deviceString\":")
|
||||
out.String(string(in.DeviceString))
|
||||
first = false
|
||||
out.RawString("\"vendorString\":")
|
||||
out.String(string(in.VendorString))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"deviceString\":")
|
||||
out.String(string(in.DeviceString))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -6,16 +6,16 @@ import "github.com/mailru/easyjson"
|
|||
|
||||
// GPUDevice describes a single graphics processor (GPU).
|
||||
type GPUDevice struct {
|
||||
VendorID float64 `json:"vendorId,omitempty"` // 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.
|
||||
VendorString string `json:"vendorString,omitempty"` // 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.
|
||||
VendorID float64 `json:"vendorId"` // PCI ID of the GPU vendor, if available; 0 otherwise.
|
||||
DeviceID float64 `json:"deviceId"` // PCI ID of the GPU device, if available; 0 otherwise.
|
||||
VendorString string `json:"vendorString"` // String description of the GPU vendor, 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.
|
||||
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"`
|
||||
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.
|
||||
}
|
||||
|
|
|
@ -449,22 +449,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget5(out *jwriter.Writer, i
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Host != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"host\":")
|
||||
out.String(string(in.Host))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Port != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"port\":")
|
||||
out.Int64(int64(in.Port))
|
||||
first = false
|
||||
out.RawString("\"host\":")
|
||||
out.String(string(in.Host))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"port\":")
|
||||
out.Int64(int64(in.Port))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -534,46 +530,36 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget6(out *jwriter.Writer, i
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.TargetID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetId\":")
|
||||
out.String(string(in.TargetID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Type != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
out.String(string(in.Type))
|
||||
first = false
|
||||
out.RawString("\"targetId\":")
|
||||
out.String(string(in.TargetID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Title != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"title\":")
|
||||
out.String(string(in.Title))
|
||||
first = false
|
||||
out.RawString("\"type\":")
|
||||
out.String(string(in.Type))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.URL != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
first = false
|
||||
out.RawString("\"title\":")
|
||||
out.String(string(in.Title))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Attached {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"attached\":")
|
||||
out.Bool(bool(in.Attached))
|
||||
first = false
|
||||
out.RawString("\"url\":")
|
||||
out.String(string(in.URL))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"attached\":")
|
||||
out.Bool(bool(in.Attached))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -963,17 +949,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget11(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.TargetInfo != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetInfo\":")
|
||||
if in.TargetInfo == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.TargetInfo).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetInfo\":")
|
||||
if in.TargetInfo == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.TargetInfo).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1036,14 +1020,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget12(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.TargetID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetId\":")
|
||||
out.String(string(in.TargetID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetId\":")
|
||||
out.String(string(in.TargetID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1113,17 +1095,15 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget13(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.TargetInfo != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetInfo\":")
|
||||
if in.TargetInfo == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.TargetInfo).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetInfo\":")
|
||||
if in.TargetInfo == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.TargetInfo).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
@ -1188,22 +1168,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget14(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.TargetID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetId\":")
|
||||
out.String(string(in.TargetID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.Message != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
first = false
|
||||
out.RawString("\"targetId\":")
|
||||
out.String(string(in.TargetID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"message\":")
|
||||
out.String(string(in.Message))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1265,14 +1241,12 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget15(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.TargetID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetId\":")
|
||||
out.String(string(in.TargetID))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetId\":")
|
||||
out.String(string(in.TargetID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
@ -1344,26 +1318,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTarget16(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.TargetInfo != nil {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"targetInfo\":")
|
||||
if in.TargetInfo == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.TargetInfo).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.WaitingForDebugger {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"waitingForDebugger\":")
|
||||
out.Bool(bool(in.WaitingForDebugger))
|
||||
first = false
|
||||
out.RawString("\"targetInfo\":")
|
||||
if in.TargetInfo == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*in.TargetInfo).MarshalEasyJSON(out)
|
||||
}
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"waitingForDebugger\":")
|
||||
out.Bool(bool(in.WaitingForDebugger))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -8,38 +8,38 @@ import (
|
|||
|
||||
// EventTargetCreated issued when a possible inspection target is created.
|
||||
type EventTargetCreated struct {
|
||||
TargetInfo *Info `json:"targetInfo,omitempty"`
|
||||
TargetInfo *Info `json:"targetInfo"`
|
||||
}
|
||||
|
||||
// EventTargetInfoChanged issued when some information about a target has
|
||||
// changed. This only happens between targetCreated and targetDestroyed.
|
||||
type EventTargetInfoChanged struct {
|
||||
TargetInfo *Info `json:"targetInfo,omitempty"`
|
||||
TargetInfo *Info `json:"targetInfo"`
|
||||
}
|
||||
|
||||
// EventTargetDestroyed issued when a target is destroyed.
|
||||
type EventTargetDestroyed struct {
|
||||
TargetID ID `json:"targetId,omitempty"`
|
||||
TargetID ID `json:"targetId"`
|
||||
}
|
||||
|
||||
// EventAttachedToTarget issued when attached to target because of
|
||||
// auto-attach or attachToTarget command.
|
||||
type EventAttachedToTarget struct {
|
||||
TargetInfo *Info `json:"targetInfo,omitempty"`
|
||||
WaitingForDebugger bool `json:"waitingForDebugger,omitempty"`
|
||||
TargetInfo *Info `json:"targetInfo"`
|
||||
WaitingForDebugger bool `json:"waitingForDebugger"`
|
||||
}
|
||||
|
||||
// EventDetachedFromTarget issued when detached from target for any reason
|
||||
// (including detachFromTarget command).
|
||||
type EventDetachedFromTarget struct {
|
||||
TargetID ID `json:"targetId,omitempty"`
|
||||
TargetID ID `json:"targetId"`
|
||||
}
|
||||
|
||||
// EventReceivedMessageFromTarget notifies about new protocol message from
|
||||
// attached target.
|
||||
type EventReceivedMessageFromTarget struct {
|
||||
TargetID ID `json:"targetId,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
TargetID ID `json:"targetId"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -20,15 +20,15 @@ func (t BrowserContextID) String() string {
|
|||
|
||||
// Info [no description].
|
||||
type Info struct {
|
||||
TargetID ID `json:"targetId,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
URL string `json:"url,omitempty"`
|
||||
Attached bool `json:"attached,omitempty"` // Whether the target has an attached client.
|
||||
TargetID ID `json:"targetId"`
|
||||
Type string `json:"type"`
|
||||
Title string `json:"title"`
|
||||
URL string `json:"url"`
|
||||
Attached bool `json:"attached"` // Whether the target has an attached client.
|
||||
}
|
||||
|
||||
// RemoteLocation [no description].
|
||||
type RemoteLocation struct {
|
||||
Host string `json:"host,omitempty"`
|
||||
Port int64 `json:"port,omitempty"`
|
||||
Host string `json:"host"`
|
||||
Port int64 `json:"port"`
|
||||
}
|
||||
|
|
|
@ -121,22 +121,18 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTethering1(out *jwriter.Writer
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.Port != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"port\":")
|
||||
out.Int64(int64(in.Port))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if in.ConnectionID != "" {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"connectionId\":")
|
||||
out.String(string(in.ConnectionID))
|
||||
first = false
|
||||
out.RawString("\"port\":")
|
||||
out.Int64(int64(in.Port))
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"connectionId\":")
|
||||
out.String(string(in.ConnectionID))
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ import (
|
|||
// EventAccepted informs that port was successfully bound and got a specified
|
||||
// connection id.
|
||||
type EventAccepted struct {
|
||||
Port int64 `json:"port,omitempty"` // Port number that was successfully bound.
|
||||
ConnectionID string `json:"connectionId,omitempty"` // Connection id to be used.
|
||||
Port int64 `json:"port"` // Port number that was successfully bound.
|
||||
ConnectionID string `json:"connectionId"` // Connection id to be used.
|
||||
}
|
||||
|
||||
// EventTypes all event types in the domain.
|
||||
|
|
|
@ -915,24 +915,22 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpTracing9(out *jwriter.Writer,
|
|||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.Value) != 0 {
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v14, v15 := range in.Value {
|
||||
if v14 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
(v15).MarshalEasyJSON(out)
|
||||
if !first {
|
||||
out.RawByte(',')
|
||||
}
|
||||
first = false
|
||||
out.RawString("\"value\":")
|
||||
if in.Value == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v14, v15 := range in.Value {
|
||||
if v14 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.RawByte(']')
|
||||
(v15).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
// tracing is stopped collected events will be send as a sequence of
|
||||
// dataCollected events followed by tracingComplete event.
|
||||
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
|
||||
|
|
|
@ -132,26 +132,31 @@ func FixDomains(domains []*internal.Domain) {
|
|||
Name: "id",
|
||||
Type: internal.TypeInteger,
|
||||
Description: "Unique message identifier.",
|
||||
Optional: true,
|
||||
},
|
||||
{
|
||||
Name: "method",
|
||||
Ref: "Inspector.MethodType",
|
||||
Description: "Event or command type.",
|
||||
Optional: true,
|
||||
},
|
||||
{
|
||||
Name: "params",
|
||||
Type: internal.TypeAny,
|
||||
Description: "Event or command parameters.",
|
||||
Optional: true,
|
||||
},
|
||||
{
|
||||
Name: "result",
|
||||
Type: internal.TypeAny,
|
||||
Description: "Command return values.",
|
||||
Optional: true,
|
||||
},
|
||||
{
|
||||
Name: "error",
|
||||
Ref: "MessageError",
|
||||
Description: "Error message.",
|
||||
Optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
261
cmd/chromedp-gen/gen-har-proto.go
Normal file
261
cmd/chromedp-gen/gen-har-proto.go
Normal 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]
|
||||
}
|
|
@ -92,7 +92,7 @@ func (fb fileBuffers) generateCDPTypes(domains []*internal.Domain) {
|
|||
|
||||
w := fb.get(pkg+".go", pkg, nil)
|
||||
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)
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ func (fb fileBuffers) generateTypes(
|
|||
if internal.IsCDPType(d.Domain, t.IDorName()) {
|
||||
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))
|
||||
}
|
||||
|
||||
|
|
640
cmd/chromedp-gen/har.json
Normal file
640
cmd/chromedp-gen/har.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -27,6 +27,7 @@ const (
|
|||
DomainDebugger DomainType = "Debugger"
|
||||
DomainDeviceOrientation DomainType = "DeviceOrientation"
|
||||
DomainEmulation DomainType = "Emulation"
|
||||
DomainHAR DomainType = "HAR"
|
||||
DomainHeapProfiler DomainType = "HeapProfiler"
|
||||
DomainIO DomainType = "IO"
|
||||
DomainIndexedDB DomainType = "IndexedDB"
|
||||
|
@ -98,6 +99,8 @@ func (dt *DomainType) UnmarshalJSON(buf []byte) error {
|
|||
*dt = DomainDeviceOrientation
|
||||
case DomainEmulation:
|
||||
*dt = DomainEmulation
|
||||
case DomainHAR:
|
||||
*dt = DomainHAR
|
||||
case DomainHeapProfiler:
|
||||
*dt = DomainHeapProfiler
|
||||
case DomainIO:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Please see README.md for more information on using this tool.
|
||||
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 gofmt -w -s templates/
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
SRC=$(realpath $(cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))
|
||||
|
||||
HAR_PROTO="$SRC/har.json"
|
||||
|
||||
BASE_URL="https://chromium.googlesource.com"
|
||||
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"
|
||||
|
@ -20,7 +22,7 @@ curl -s $BROWSER_PROTO | base64 -d > $BROWSER_TMP
|
|||
curl -s $JS_PROTO | base64 -d > $JS_TMP
|
||||
|
||||
# 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
|
||||
LASTUPDATE=0
|
||||
|
|
Loading…
Reference in New Issue
Block a user