diff --git a/cdp/cdp.go b/cdp/cdp.go index 94dc5b7..18dfe8e 100644 --- a/cdp/cdp.go +++ b/cdp/cdp.go @@ -156,6 +156,7 @@ const ( EventNetworkWebSocketFrameError MethodType = "Network.webSocketFrameError" EventNetworkWebSocketFrameSent MethodType = "Network.webSocketFrameSent" EventNetworkEventSourceMessageReceived MethodType = "Network.eventSourceMessageReceived" + EventNetworkRequestIntercepted MethodType = "Network.requestIntercepted" CommandNetworkEnable MethodType = "Network.enable" CommandNetworkDisable MethodType = "Network.disable" CommandNetworkSetUserAgentOverride MethodType = "Network.setUserAgentOverride" @@ -177,6 +178,8 @@ const ( CommandNetworkSetBypassServiceWorker MethodType = "Network.setBypassServiceWorker" CommandNetworkSetDataSizeLimitsForTest MethodType = "Network.setDataSizeLimitsForTest" CommandNetworkGetCertificate MethodType = "Network.getCertificate" + CommandNetworkEnableRequestInterception MethodType = "Network.enableRequestInterception" + CommandNetworkContinueInterceptedRequest MethodType = "Network.continueInterceptedRequest" EventDatabaseAddDatabase MethodType = "Database.addDatabase" CommandDatabaseEnable MethodType = "Database.enable" CommandDatabaseDisable MethodType = "Database.disable" @@ -694,6 +697,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = EventNetworkWebSocketFrameSent case EventNetworkEventSourceMessageReceived: *t = EventNetworkEventSourceMessageReceived + case EventNetworkRequestIntercepted: + *t = EventNetworkRequestIntercepted case CommandNetworkEnable: *t = CommandNetworkEnable case CommandNetworkDisable: @@ -736,6 +741,10 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) { *t = CommandNetworkSetDataSizeLimitsForTest case CommandNetworkGetCertificate: *t = CommandNetworkGetCertificate + case CommandNetworkEnableRequestInterception: + *t = CommandNetworkEnableRequestInterception + case CommandNetworkContinueInterceptedRequest: + *t = CommandNetworkContinueInterceptedRequest case EventDatabaseAddDatabase: *t = EventDatabaseAddDatabase case CommandDatabaseEnable: diff --git a/cdp/cdputil/cdputil.go b/cdp/cdputil/cdputil.go index 382dde2..371176d 100644 --- a/cdp/cdputil/cdputil.go +++ b/cdp/cdputil/cdputil.go @@ -387,6 +387,12 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { case cdp.CommandNetworkGetCertificate: v = new(network.GetCertificateReturns) + case cdp.CommandNetworkEnableRequestInterception: + return emptyVal, nil + + case cdp.CommandNetworkContinueInterceptedRequest: + return emptyVal, nil + case cdp.EventNetworkResourceChangedPriority: v = new(network.EventResourceChangedPriority) @@ -432,6 +438,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) { case cdp.EventNetworkEventSourceMessageReceived: v = new(network.EventEventSourceMessageReceived) + case cdp.EventNetworkRequestIntercepted: + v = new(network.EventRequestIntercepted) + case cdp.CommandDatabaseEnable: return emptyVal, nil diff --git a/cdp/network/easyjson.go b/cdp/network/easyjson.go index 5b58732..26b8220 100644 --- a/cdp/network/easyjson.go +++ b/cdp/network/easyjson.go @@ -4164,7 +4164,140 @@ func (v *EventRequestServedFromCache) UnmarshalJSON(data []byte) error { func (v *EventRequestServedFromCache) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork37(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(in *jlexer.Lexer, out *EventLoadingFinished) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(in *jlexer.Lexer, out *EventRequestIntercepted) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "InterceptionId": + out.InterceptionID = InterceptionID(in.String()) + case "request": + if in.IsNull() { + in.Skip() + out.Request = nil + } else { + if out.Request == nil { + out.Request = new(Request) + } + (*out.Request).UnmarshalEasyJSON(in) + } + case "redirectHeaders": + if in.IsNull() { + in.Skip() + out.RedirectHeaders = nil + } else { + if out.RedirectHeaders == nil { + out.RedirectHeaders = new(Headers) + } + (*out.RedirectHeaders).UnmarshalEasyJSON(in) + } + case "redirectStatusCode": + out.RedirectStatusCode = int64(in.Int64()) + case "redirectUrl": + out.RedirectURL = string(in.String()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(out *jwriter.Writer, in EventRequestIntercepted) { + out.RawByte('{') + first := true + _ = first + if in.InterceptionID != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"InterceptionId\":") + out.String(string(in.InterceptionID)) + } + if in.Request != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"request\":") + if in.Request == nil { + out.RawString("null") + } else { + (*in.Request).MarshalEasyJSON(out) + } + } + if in.RedirectHeaders != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"redirectHeaders\":") + if in.RedirectHeaders == nil { + out.RawString("null") + } else { + (*in.RedirectHeaders).MarshalEasyJSON(out) + } + } + if in.RedirectStatusCode != 0 { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"redirectStatusCode\":") + out.Int64(int64(in.RedirectStatusCode)) + } + if in.RedirectURL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"redirectUrl\":") + out.String(string(in.RedirectURL)) + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EventRequestIntercepted) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EventRequestIntercepted) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EventRequestIntercepted) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EventRequestIntercepted) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(in *jlexer.Lexer, out *EventLoadingFinished) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4199,7 +4332,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(out *jwriter.Writer, in EventLoadingFinished) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(out *jwriter.Writer, in EventLoadingFinished) { out.RawByte('{') first := true _ = first @@ -4233,27 +4366,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventLoadingFinished) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventLoadingFinished) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork38(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventLoadingFinished) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventLoadingFinished) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork38(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(in *jlexer.Lexer, out *EventLoadingFailed) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(in *jlexer.Lexer, out *EventLoadingFailed) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4294,7 +4427,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(out *jwriter.Writer, in EventLoadingFailed) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(out *jwriter.Writer, in EventLoadingFailed) { out.RawByte('{') first := true _ = first @@ -4352,27 +4485,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventLoadingFailed) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventLoadingFailed) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork39(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventLoadingFailed) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventLoadingFailed) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork39(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(in *jlexer.Lexer, out *EventEventSourceMessageReceived) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(in *jlexer.Lexer, out *EventEventSourceMessageReceived) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4411,7 +4544,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(out *jwriter.Writer, in EventEventSourceMessageReceived) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(out *jwriter.Writer, in EventEventSourceMessageReceived) { out.RawByte('{') first := true _ = first @@ -4461,27 +4594,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventEventSourceMessageReceived) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventEventSourceMessageReceived) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork40(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventEventSourceMessageReceived) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventEventSourceMessageReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork40(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(in *jlexer.Lexer, out *EventDataReceived) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(in *jlexer.Lexer, out *EventDataReceived) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4518,7 +4651,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(out *jwriter.Writer, in EventDataReceived) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(out *jwriter.Writer, in EventDataReceived) { out.RawByte('{') first := true _ = first @@ -4560,27 +4693,94 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EventDataReceived) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EventDataReceived) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork41(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EventDataReceived) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EventDataReceived) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork41(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(in *jlexer.Lexer, out *EnableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(in *jlexer.Lexer, out *EnableRequestInterceptionParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "enabled": + out.Enabled = bool(in.Bool()) + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(out *jwriter.Writer, in EnableRequestInterceptionParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"enabled\":") + out.Bool(bool(in.Enabled)) + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v EnableRequestInterceptionParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v EnableRequestInterceptionParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *EnableRequestInterceptionParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *EnableRequestInterceptionParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(in *jlexer.Lexer, out *EnableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4613,7 +4813,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(out *jwriter.Writer, in EnableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(out *jwriter.Writer, in EnableParams) { out.RawByte('{') first := true _ = first @@ -4639,27 +4839,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EnableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork42(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EnableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork42(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(in *jlexer.Lexer, out *EmulateNetworkConditionsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(in *jlexer.Lexer, out *EmulateNetworkConditionsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4698,7 +4898,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(out *jwriter.Writer, in EmulateNetworkConditionsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(out *jwriter.Writer, in EmulateNetworkConditionsParams) { out.RawByte('{') first := true _ = first @@ -4740,27 +4940,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v EmulateNetworkConditionsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v EmulateNetworkConditionsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork43(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EmulateNetworkConditionsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *EmulateNetworkConditionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork43(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(in *jlexer.Lexer, out *DisableParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(in *jlexer.Lexer, out *DisableParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4789,7 +4989,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(out *jwriter.Writer, in DisableParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(out *jwriter.Writer, in DisableParams) { out.RawByte('{') first := true _ = first @@ -4799,27 +4999,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v DisableParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork44(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DisableParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork44(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(in *jlexer.Lexer, out *DeleteCookieParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(in *jlexer.Lexer, out *DeleteCookieParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4852,7 +5052,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(out *jwriter.Writer, in DeleteCookieParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(out *jwriter.Writer, in DeleteCookieParams) { out.RawByte('{') first := true _ = first @@ -4874,27 +5074,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v DeleteCookieParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v DeleteCookieParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork45(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DeleteCookieParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *DeleteCookieParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork45(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(in *jlexer.Lexer, out *Cookie) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(in *jlexer.Lexer, out *Cookie) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -4943,7 +5143,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(out *jwriter.Writer, in Cookie) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(out *jwriter.Writer, in Cookie) { out.RawByte('{') first := true _ = first @@ -5033,27 +5233,166 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v Cookie) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v Cookie) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork46(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Cookie) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *Cookie) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork46(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(in *jlexer.Lexer, out *ClearBrowserCookiesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(in *jlexer.Lexer, out *ContinueInterceptedRequestParams) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeString() + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "interceptionId": + out.InterceptionID = InterceptionID(in.String()) + case "errorReason": + (out.ErrorReason).UnmarshalEasyJSON(in) + case "rawResponse": + out.RawResponse = string(in.String()) + case "url": + out.URL = string(in.String()) + case "method": + out.Method = string(in.String()) + case "postData": + out.PostData = string(in.String()) + case "headers": + if in.IsNull() { + in.Skip() + out.Headers = nil + } else { + if out.Headers == nil { + out.Headers = new(Headers) + } + (*out.Headers).UnmarshalEasyJSON(in) + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(out *jwriter.Writer, in ContinueInterceptedRequestParams) { + out.RawByte('{') + first := true + _ = first + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"interceptionId\":") + out.String(string(in.InterceptionID)) + if in.ErrorReason != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"errorReason\":") + (in.ErrorReason).MarshalEasyJSON(out) + } + if in.RawResponse != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"rawResponse\":") + out.String(string(in.RawResponse)) + } + if in.URL != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"url\":") + out.String(string(in.URL)) + } + if in.Method != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"method\":") + out.String(string(in.Method)) + } + if in.PostData != "" { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"postData\":") + out.String(string(in.PostData)) + } + if in.Headers != nil { + if !first { + out.RawByte(',') + } + first = false + out.RawString("\"headers\":") + if in.Headers == nil { + out.RawString("null") + } else { + (*in.Headers).MarshalEasyJSON(out) + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v ContinueInterceptedRequestParams) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalEasyJSON supports easyjson.Marshaler interface +func (v ContinueInterceptedRequestParams) MarshalEasyJSON(w *jwriter.Writer) { + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *ContinueInterceptedRequestParams) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(&r, v) + return r.Error() +} + +// UnmarshalEasyJSON supports easyjson.Unmarshaler interface +func (v *ContinueInterceptedRequestParams) UnmarshalEasyJSON(l *jlexer.Lexer) { + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(l, v) +} +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(in *jlexer.Lexer, out *ClearBrowserCookiesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5082,7 +5421,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(out *jwriter.Writer, in ClearBrowserCookiesParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(out *jwriter.Writer, in ClearBrowserCookiesParams) { out.RawByte('{') first := true _ = first @@ -5092,27 +5431,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v ClearBrowserCookiesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ClearBrowserCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork47(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ClearBrowserCookiesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ClearBrowserCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork47(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(in *jlexer.Lexer, out *ClearBrowserCacheParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(in *jlexer.Lexer, out *ClearBrowserCacheParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5141,7 +5480,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(out *jwriter.Writer, in ClearBrowserCacheParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(out *jwriter.Writer, in ClearBrowserCacheParams) { out.RawByte('{') first := true _ = first @@ -5151,27 +5490,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v ClearBrowserCacheParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v ClearBrowserCacheParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork48(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ClearBrowserCacheParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *ClearBrowserCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork48(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(in *jlexer.Lexer, out *CanEmulateNetworkConditionsReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(in *jlexer.Lexer, out *CanEmulateNetworkConditionsReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5202,7 +5541,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(out *jwriter.Writer, in CanEmulateNetworkConditionsReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(out *jwriter.Writer, in CanEmulateNetworkConditionsReturns) { out.RawByte('{') first := true _ = first @@ -5220,27 +5559,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v CanEmulateNetworkConditionsReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CanEmulateNetworkConditionsReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork49(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CanEmulateNetworkConditionsReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CanEmulateNetworkConditionsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork49(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(in *jlexer.Lexer, out *CanEmulateNetworkConditionsParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(in *jlexer.Lexer, out *CanEmulateNetworkConditionsParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5269,7 +5608,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(out *jwriter.Writer, in CanEmulateNetworkConditionsParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(out *jwriter.Writer, in CanEmulateNetworkConditionsParams) { out.RawByte('{') first := true _ = first @@ -5279,27 +5618,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v CanEmulateNetworkConditionsParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CanEmulateNetworkConditionsParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork50(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CanEmulateNetworkConditionsParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CanEmulateNetworkConditionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork50(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(in *jlexer.Lexer, out *CanClearBrowserCookiesReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(in *jlexer.Lexer, out *CanClearBrowserCookiesReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5330,7 +5669,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(out *jwriter.Writer, in CanClearBrowserCookiesReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(out *jwriter.Writer, in CanClearBrowserCookiesReturns) { out.RawByte('{') first := true _ = first @@ -5348,27 +5687,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v CanClearBrowserCookiesReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CanClearBrowserCookiesReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork51(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CanClearBrowserCookiesReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CanClearBrowserCookiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork51(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(in *jlexer.Lexer, out *CanClearBrowserCookiesParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(in *jlexer.Lexer, out *CanClearBrowserCookiesParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5397,7 +5736,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(out *jwriter.Writer, in CanClearBrowserCookiesParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(out *jwriter.Writer, in CanClearBrowserCookiesParams) { out.RawByte('{') first := true _ = first @@ -5407,27 +5746,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v CanClearBrowserCookiesParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CanClearBrowserCookiesParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork52(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CanClearBrowserCookiesParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CanClearBrowserCookiesParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork52(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(in *jlexer.Lexer, out *CanClearBrowserCacheReturns) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(in *jlexer.Lexer, out *CanClearBrowserCacheReturns) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5458,7 +5797,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(out *jwriter.Writer, in CanClearBrowserCacheReturns) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(out *jwriter.Writer, in CanClearBrowserCacheReturns) { out.RawByte('{') first := true _ = first @@ -5476,27 +5815,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v CanClearBrowserCacheReturns) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CanClearBrowserCacheReturns) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork53(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork56(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CanClearBrowserCacheReturns) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CanClearBrowserCacheReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork53(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork56(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(in *jlexer.Lexer, out *CanClearBrowserCacheParams) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(in *jlexer.Lexer, out *CanClearBrowserCacheParams) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5525,7 +5864,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(out *jwriter.Writer, in CanClearBrowserCacheParams) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(out *jwriter.Writer, in CanClearBrowserCacheParams) { out.RawByte('{') first := true _ = first @@ -5535,27 +5874,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v CanClearBrowserCacheParams) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CanClearBrowserCacheParams) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork54(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork57(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CanClearBrowserCacheParams) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CanClearBrowserCacheParams) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork54(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork57(l, v) } -func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(in *jlexer.Lexer, out *CachedResource) { +func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork58(in *jlexer.Lexer, out *CachedResource) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -5600,7 +5939,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(in *jlexer.Lexer, ou in.Consumed() } } -func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(out *jwriter.Writer, in CachedResource) { +func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork58(out *jwriter.Writer, in CachedResource) { out.RawByte('{') first := true _ = first @@ -5646,23 +5985,23 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(out *jwriter.Writer, // MarshalJSON supports json.Marshaler interface func (v CachedResource) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(&w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork58(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalEasyJSON supports easyjson.Marshaler interface func (v CachedResource) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork55(w, v) + easyjsonC5a4559bEncodeGithubComKnqChromedpCdpNetwork58(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *CachedResource) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(&r, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork58(&r, v) return r.Error() } // UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *CachedResource) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork55(l, v) + easyjsonC5a4559bDecodeGithubComKnqChromedpCdpNetwork58(l, v) } diff --git a/cdp/network/events.go b/cdp/network/events.go index 42dbeaa..01945ea 100644 --- a/cdp/network/events.go +++ b/cdp/network/events.go @@ -130,6 +130,16 @@ type EventEventSourceMessageReceived struct { Data string `json:"data,omitempty"` // 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. + Request *Request `json:"request,omitempty"` + 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. +} + // EventTypes all event types in the domain. var EventTypes = []cdp.MethodType{ cdp.EventNetworkResourceChangedPriority, @@ -147,4 +157,5 @@ var EventTypes = []cdp.MethodType{ cdp.EventNetworkWebSocketFrameError, cdp.EventNetworkWebSocketFrameSent, cdp.EventNetworkEventSourceMessageReceived, + cdp.EventNetworkRequestIntercepted, } diff --git a/cdp/network/network.go b/cdp/network/network.go index d59e45d..04b7e65 100644 --- a/cdp/network/network.go +++ b/cdp/network/network.go @@ -655,3 +655,98 @@ func (p *GetCertificateParams) Do(ctxt context.Context, h cdp.Handler) (tableNam return res.TableNames, nil } + +// EnableRequestInterceptionParams [no description]. +type EnableRequestInterceptionParams struct { + Enabled bool `json:"enabled"` // Whether or not HTTP requests should be intercepted and Network.requestIntercepted events sent. +} + +// EnableRequestInterception [no description]. +// +// parameters: +// enabled - Whether or not HTTP requests should be intercepted and Network.requestIntercepted events sent. +func EnableRequestInterception(enabled bool) *EnableRequestInterceptionParams { + return &EnableRequestInterceptionParams{ + Enabled: enabled, + } +} + +// Do executes Network.enableRequestInterception against the provided context and +// target handler. +func (p *EnableRequestInterceptionParams) Do(ctxt context.Context, h cdp.Handler) (err error) { + return h.Execute(ctxt, cdp.CommandNetworkEnableRequestInterception, p, nil) +} + +// ContinueInterceptedRequestParams response to Network.requestIntercepted +// which either modifies the request to continue with any modifications, or +// blocks it, or completes it with the provided response bytes. If a network +// fetch occurs as a result which encounters a redirect an additional +// Network.requestIntercepted event will be sent with the same InterceptionId. +type ContinueInterceptedRequestParams struct { + InterceptionID InterceptionID `json:"interceptionId"` + ErrorReason ErrorReason `json:"errorReason,omitempty"` // If set this causes the request to fail with the given reason. + RawResponse string `json:"rawResponse,omitempty"` // If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... + URL string `json:"url,omitempty"` // If set the request url will be modified in a way that's not observable by page. + Method string `json:"method,omitempty"` // If set this allows the request method to be overridden. + PostData string `json:"postData,omitempty"` // If set this allows postData to be set. + Headers *Headers `json:"headers,omitempty"` // If set this allows the request headers to be changed. +} + +// ContinueInterceptedRequest response to Network.requestIntercepted which +// either modifies the request to continue with any modifications, or blocks it, +// or completes it with the provided response bytes. If a network fetch occurs +// as a result which encounters a redirect an additional +// Network.requestIntercepted event will be sent with the same InterceptionId. +// +// parameters: +// interceptionID +func ContinueInterceptedRequest(interceptionID InterceptionID) *ContinueInterceptedRequestParams { + return &ContinueInterceptedRequestParams{ + InterceptionID: interceptionID, + } +} + +// WithErrorReason if set this causes the request to fail with the given +// reason. +func (p ContinueInterceptedRequestParams) WithErrorReason(errorReason ErrorReason) *ContinueInterceptedRequestParams { + p.ErrorReason = errorReason + return &p +} + +// WithRawResponse if set the requests completes using with the provided +// base64 encoded raw response, including HTTP status line and headers etc... +func (p ContinueInterceptedRequestParams) WithRawResponse(rawResponse string) *ContinueInterceptedRequestParams { + p.RawResponse = rawResponse + return &p +} + +// WithURL if set the request url will be modified in a way that's not +// observable by page. +func (p ContinueInterceptedRequestParams) WithURL(url string) *ContinueInterceptedRequestParams { + p.URL = url + return &p +} + +// WithMethod if set this allows the request method to be overridden. +func (p ContinueInterceptedRequestParams) WithMethod(method string) *ContinueInterceptedRequestParams { + p.Method = method + return &p +} + +// WithPostData if set this allows postData to be set. +func (p ContinueInterceptedRequestParams) WithPostData(postData string) *ContinueInterceptedRequestParams { + p.PostData = postData + return &p +} + +// WithHeaders if set this allows the request headers to be changed. +func (p ContinueInterceptedRequestParams) WithHeaders(headers *Headers) *ContinueInterceptedRequestParams { + p.Headers = headers + return &p +} + +// Do executes Network.continueInterceptedRequest against the provided context and +// target handler. +func (p *ContinueInterceptedRequestParams) Do(ctxt context.Context, h cdp.Handler) (err error) { + return h.Execute(ctxt, cdp.CommandNetworkContinueInterceptedRequest, p, nil) +} diff --git a/cdp/network/types.go b/cdp/network/types.go index d5fb46f..fe3cc38 100644 --- a/cdp/network/types.go +++ b/cdp/network/types.go @@ -22,6 +22,86 @@ func (t RequestID) String() string { return string(t) } +// InterceptionID unique intercepted request identifier. +type InterceptionID string + +// String returns the InterceptionID as string value. +func (t InterceptionID) String() string { + return string(t) +} + +// ErrorReason network level fetch failure reason. +type ErrorReason string + +// String returns the ErrorReason as string value. +func (t ErrorReason) String() string { + return string(t) +} + +// ErrorReason values. +const ( + ErrorReasonFailed ErrorReason = "Failed" + ErrorReasonAborted ErrorReason = "Aborted" + ErrorReasonTimedOut ErrorReason = "TimedOut" + ErrorReasonAccessDenied ErrorReason = "AccessDenied" + ErrorReasonConnectionClosed ErrorReason = "ConnectionClosed" + ErrorReasonConnectionReset ErrorReason = "ConnectionReset" + ErrorReasonConnectionRefused ErrorReason = "ConnectionRefused" + ErrorReasonConnectionAborted ErrorReason = "ConnectionAborted" + ErrorReasonConnectionFailed ErrorReason = "ConnectionFailed" + ErrorReasonNameNotResolved ErrorReason = "NameNotResolved" + ErrorReasonInternetDisconnected ErrorReason = "InternetDisconnected" + ErrorReasonAddressUnreachable ErrorReason = "AddressUnreachable" +) + +// MarshalEasyJSON satisfies easyjson.Marshaler. +func (t ErrorReason) MarshalEasyJSON(out *jwriter.Writer) { + out.String(string(t)) +} + +// MarshalJSON satisfies json.Marshaler. +func (t ErrorReason) MarshalJSON() ([]byte, error) { + return easyjson.Marshal(t) +} + +// UnmarshalEasyJSON satisfies easyjson.Unmarshaler. +func (t *ErrorReason) UnmarshalEasyJSON(in *jlexer.Lexer) { + switch ErrorReason(in.String()) { + case ErrorReasonFailed: + *t = ErrorReasonFailed + case ErrorReasonAborted: + *t = ErrorReasonAborted + case ErrorReasonTimedOut: + *t = ErrorReasonTimedOut + case ErrorReasonAccessDenied: + *t = ErrorReasonAccessDenied + case ErrorReasonConnectionClosed: + *t = ErrorReasonConnectionClosed + case ErrorReasonConnectionReset: + *t = ErrorReasonConnectionReset + case ErrorReasonConnectionRefused: + *t = ErrorReasonConnectionRefused + case ErrorReasonConnectionAborted: + *t = ErrorReasonConnectionAborted + case ErrorReasonConnectionFailed: + *t = ErrorReasonConnectionFailed + case ErrorReasonNameNotResolved: + *t = ErrorReasonNameNotResolved + case ErrorReasonInternetDisconnected: + *t = ErrorReasonInternetDisconnected + case ErrorReasonAddressUnreachable: + *t = ErrorReasonAddressUnreachable + + default: + in.AddError(errors.New("unknown ErrorReason value")) + } +} + +// UnmarshalJSON satisfies json.Unmarshaler. +func (t *ErrorReason) UnmarshalJSON(buf []byte) error { + return easyjson.Unmarshal(buf, t) +} + // Headers request / response headers as keys / values of JSON object. type Headers struct{} diff --git a/cmd/chromedp-gen/protocol.json b/cmd/chromedp-gen/protocol.json index 6e92886..9d0e0fc 100644 --- a/cmd/chromedp-gen/protocol.json +++ b/cmd/chromedp-gen/protocol.json @@ -2343,6 +2343,30 @@ "type": "string", "description": "Unique request identifier." }, + { + "id": "InterceptionId", + "type": "string", + "description": "Unique intercepted request identifier." + }, + { + "id": "ErrorReason", + "type": "string", + "enum": [ + "Failed", + "Aborted", + "TimedOut", + "AccessDenied", + "ConnectionClosed", + "ConnectionReset", + "ConnectionRefused", + "ConnectionAborted", + "ConnectionFailed", + "NameNotResolved", + "InternetDisconnected", + "AddressUnreachable" + ], + "description": "Network level fetch failure reason." + }, { "id": "Timestamp", "type": "number", @@ -3350,6 +3374,64 @@ } ], "experimental": true + }, + { + "name": "enableRequestInterception", + "parameters": [ + { + "name": "enabled", + "type": "boolean", + "description": "Whether or not HTTP requests should be intercepted and Network.requestIntercepted events sent." + } + ], + "experimental": true + }, + { + "name": "continueInterceptedRequest", + "description": "Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId.", + "parameters": [ + { + "name": "interceptionId", + "$ref": "InterceptionId" + }, + { + "name": "errorReason", + "$ref": "ErrorReason", + "optional": true, + "description": "If set this causes the request to fail with the given reason." + }, + { + "name": "rawResponse", + "type": "string", + "optional": true, + "description": "If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc..." + }, + { + "name": "url", + "type": "string", + "optional": true, + "description": "If set the request url will be modified in a way that's not observable by page." + }, + { + "name": "method", + "type": "string", + "optional": true, + "description": "If set this allows the request method to be overridden." + }, + { + "name": "postData", + "type": "string", + "optional": true, + "description": "If set this allows postData to be set." + }, + { + "name": "headers", + "$ref": "Headers", + "optional": true, + "description": "If set this allows the request headers to be changed." + } + ], + "experimental": true } ], "events": [ @@ -3757,6 +3839,40 @@ } ], "experimental": true + }, + { + "name": "requestIntercepted", + "description": "Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.", + "parameters": [ + { + "name": "InterceptionId", + "$ref": "InterceptionId", + "description": "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." + }, + { + "name": "request", + "$ref": "Request" + }, + { + "name": "redirectHeaders", + "$ref": "Headers", + "optional": true, + "description": "HTTP response headers, only sent if a redirect was intercepted." + }, + { + "name": "redirectStatusCode", + "type": "integer", + "optional": true, + "description": "HTTP response code, only sent if a redirect was intercepted." + }, + { + "name": "redirectUrl", + "optional": true, + "type": "string", + "description": "Redirect location, only sent if a redirect was intercepted." + } + ], + "experimental": true } ] }, diff --git a/cmd/chromedp-gen/templates/domain.qtpl.go b/cmd/chromedp-gen/templates/domain.qtpl.go index e633e80..5ab840b 100644 --- a/cmd/chromedp-gen/templates/domain.qtpl.go +++ b/cmd/chromedp-gen/templates/domain.qtpl.go @@ -4,13 +4,6 @@ //line templates/domain.qtpl:1 package templates -//line templates/domain.qtpl:1 -import ( - qtio422016 "io" - - qt422016 "github.com/valyala/quicktemplate" -) - //line templates/domain.qtpl:1 import ( "github.com/knq/chromedp/cmd/chromedp-gen/internal" @@ -18,6 +11,13 @@ import ( // DomainTemplate is the template for a single domain. +//line templates/domain.qtpl:6 +import ( + qtio422016 "io" + + qt422016 "github.com/valyala/quicktemplate" +) + //line templates/domain.qtpl:6 var ( _ = qtio422016.Copy diff --git a/cmd/chromedp-gen/templates/extra.qtpl.go b/cmd/chromedp-gen/templates/extra.qtpl.go index 3b1da59..eac5454 100644 --- a/cmd/chromedp-gen/templates/extra.qtpl.go +++ b/cmd/chromedp-gen/templates/extra.qtpl.go @@ -4,13 +4,6 @@ //line templates/extra.qtpl:1 package templates -//line templates/extra.qtpl:1 -import ( - qtio422016 "io" - - qt422016 "github.com/valyala/quicktemplate" -) - //line templates/extra.qtpl:1 import ( "github.com/knq/chromedp/cmd/chromedp-gen/internal" @@ -19,6 +12,13 @@ import ( // ExtraTimestampTemplate is a special template for the Timestamp type that // defines its JSON unmarshaling. +//line templates/extra.qtpl:7 +import ( + qtio422016 "io" + + qt422016 "github.com/valyala/quicktemplate" +) + //line templates/extra.qtpl:7 var ( _ = qtio422016.Copy diff --git a/cmd/chromedp-gen/templates/file.qtpl.go b/cmd/chromedp-gen/templates/file.qtpl.go index 8529940..7e84224 100644 --- a/cmd/chromedp-gen/templates/file.qtpl.go +++ b/cmd/chromedp-gen/templates/file.qtpl.go @@ -4,13 +4,6 @@ //line templates/file.qtpl:1 package templates -//line templates/file.qtpl:1 -import ( - qtio422016 "io" - - qt422016 "github.com/valyala/quicktemplate" -) - //line templates/file.qtpl:1 import ( "sort" @@ -20,6 +13,13 @@ import ( // FileHeader is the file header template. +//line templates/file.qtpl:8 +import ( + qtio422016 "io" + + qt422016 "github.com/valyala/quicktemplate" +) + //line templates/file.qtpl:8 var ( _ = qtio422016.Copy diff --git a/cmd/chromedp-gen/templates/type.qtpl.go b/cmd/chromedp-gen/templates/type.qtpl.go index 7509ee4..c600a89 100644 --- a/cmd/chromedp-gen/templates/type.qtpl.go +++ b/cmd/chromedp-gen/templates/type.qtpl.go @@ -4,13 +4,6 @@ //line templates/type.qtpl:1 package templates -//line templates/type.qtpl:1 -import ( - qtio422016 "io" - - qt422016 "github.com/valyala/quicktemplate" -) - //line templates/type.qtpl:1 import ( "strconv" @@ -21,6 +14,13 @@ import ( // TypeTemplate is a template for a Typable type. +//line templates/type.qtpl:9 +import ( + qtio422016 "io" + + qt422016 "github.com/valyala/quicktemplate" +) + //line templates/type.qtpl:9 var ( _ = qtio422016.Copy