Updating to latest protocol.json
This commit is contained in:
parent
69e069d131
commit
0faecc62db
12
cdp/cdp.go
12
cdp/cdp.go
|
@ -813,12 +813,10 @@ const (
|
|||
CommandPerformanceDisable MethodType = "Performance.disable"
|
||||
CommandPerformanceEnable MethodType = "Performance.enable"
|
||||
CommandPerformanceGetMetrics MethodType = "Performance.getMetrics"
|
||||
EventSecurityCertificateError MethodType = "Security.certificateError"
|
||||
EventSecuritySecurityStateChanged MethodType = "Security.securityStateChanged"
|
||||
CommandSecurityDisable MethodType = "Security.disable"
|
||||
CommandSecurityEnable MethodType = "Security.enable"
|
||||
CommandSecurityHandleCertificateError MethodType = "Security.handleCertificateError"
|
||||
CommandSecuritySetOverrideCertificateErrors MethodType = "Security.setOverrideCertificateErrors"
|
||||
CommandSecuritySetIgnoreCertificateErrors MethodType = "Security.setIgnoreCertificateErrors"
|
||||
EventServiceWorkerWorkerErrorReported MethodType = "ServiceWorker.workerErrorReported"
|
||||
EventServiceWorkerWorkerRegistrationUpdated MethodType = "ServiceWorker.workerRegistrationUpdated"
|
||||
EventServiceWorkerWorkerVersionUpdated MethodType = "ServiceWorker.workerVersionUpdated"
|
||||
|
@ -1599,18 +1597,14 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
|||
*t = CommandPerformanceEnable
|
||||
case CommandPerformanceGetMetrics:
|
||||
*t = CommandPerformanceGetMetrics
|
||||
case EventSecurityCertificateError:
|
||||
*t = EventSecurityCertificateError
|
||||
case EventSecuritySecurityStateChanged:
|
||||
*t = EventSecuritySecurityStateChanged
|
||||
case CommandSecurityDisable:
|
||||
*t = CommandSecurityDisable
|
||||
case CommandSecurityEnable:
|
||||
*t = CommandSecurityEnable
|
||||
case CommandSecurityHandleCertificateError:
|
||||
*t = CommandSecurityHandleCertificateError
|
||||
case CommandSecuritySetOverrideCertificateErrors:
|
||||
*t = CommandSecuritySetOverrideCertificateErrors
|
||||
case CommandSecuritySetIgnoreCertificateErrors:
|
||||
*t = CommandSecuritySetIgnoreCertificateErrors
|
||||
case EventServiceWorkerWorkerErrorReported:
|
||||
*t = EventServiceWorkerWorkerErrorReported
|
||||
case EventServiceWorkerWorkerRegistrationUpdated:
|
||||
|
|
|
@ -991,15 +991,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
|
|||
case cdp.CommandSecurityEnable:
|
||||
return emptyVal, nil
|
||||
|
||||
case cdp.CommandSecurityHandleCertificateError:
|
||||
case cdp.CommandSecuritySetIgnoreCertificateErrors:
|
||||
return emptyVal, nil
|
||||
|
||||
case cdp.CommandSecuritySetOverrideCertificateErrors:
|
||||
return emptyVal, nil
|
||||
|
||||
case cdp.EventSecurityCertificateError:
|
||||
v = new(security.EventCertificateError)
|
||||
|
||||
case cdp.EventSecuritySecurityStateChanged:
|
||||
v = new(security.EventSecurityStateChanged)
|
||||
|
||||
|
|
|
@ -180,7 +180,7 @@ func (v *StateExplanation) UnmarshalJSON(data []byte) error {
|
|||
func (v *StateExplanation) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(in *jlexer.Lexer, out *SetOverrideCertificateErrorsParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(in *jlexer.Lexer, out *SetIgnoreCertificateErrorsParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
|
@ -199,8 +199,8 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(in *jlexer.Lexer, ou
|
|||
continue
|
||||
}
|
||||
switch key {
|
||||
case "override":
|
||||
out.Override = bool(in.Bool())
|
||||
case "ignore":
|
||||
out.Ignore = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
|
@ -211,44 +211,44 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(in *jlexer.Lexer, ou
|
|||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(out *jwriter.Writer, in SetOverrideCertificateErrorsParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(out *jwriter.Writer, in SetIgnoreCertificateErrorsParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"override\":"
|
||||
const prefix string = ",\"ignore\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.Override))
|
||||
out.Bool(bool(in.Ignore))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetOverrideCertificateErrorsParams) MarshalJSON() ([]byte, error) {
|
||||
func (v SetIgnoreCertificateErrorsParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetOverrideCertificateErrorsParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
func (v SetIgnoreCertificateErrorsParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetOverrideCertificateErrorsParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *SetIgnoreCertificateErrorsParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetOverrideCertificateErrorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
func (v *SetIgnoreCertificateErrorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(in *jlexer.Lexer, out *InsecureContentStatus) {
|
||||
|
@ -394,90 +394,7 @@ func (v *InsecureContentStatus) UnmarshalJSON(data []byte) error {
|
|||
func (v *InsecureContentStatus) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(in *jlexer.Lexer, out *HandleCertificateErrorParams) {
|
||||
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 "eventId":
|
||||
out.EventID = int64(in.Int64())
|
||||
case "action":
|
||||
(out.Action).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer, in HandleCertificateErrorParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"eventId\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Int64(int64(in.EventID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"action\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(in.Action).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v HandleCertificateErrorParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v HandleCertificateErrorParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *HandleCertificateErrorParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *HandleCertificateErrorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(in *jlexer.Lexer, out *EventSecurityStateChanged) {
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(in *jlexer.Lexer, out *EventSecurityStateChanged) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
|
@ -553,7 +470,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(in *jlexer.Lexer, ou
|
|||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(out *jwriter.Writer, in EventSecurityStateChanged) {
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(out *jwriter.Writer, in EventSecurityStateChanged) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
|
@ -632,122 +549,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(out *jwriter.Writer,
|
|||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventSecurityStateChanged) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventSecurityStateChanged) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(in *jlexer.Lexer, out *EventCertificateError) {
|
||||
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 "eventId":
|
||||
out.EventID = int64(in.Int64())
|
||||
case "errorType":
|
||||
out.ErrorType = string(in.String())
|
||||
case "requestURL":
|
||||
out.RequestURL = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(out *jwriter.Writer, in EventCertificateError) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"eventId\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Int64(int64(in.EventID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"errorType\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.ErrorType))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"requestURL\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.RequestURL))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventCertificateError) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventCertificateError) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventCertificateError) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventCertificateError) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity6(in *jlexer.Lexer, out *EnableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
|
@ -776,7 +598,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity6(in *jlexer.Lexer, ou
|
|||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity6(out *jwriter.Writer, in EnableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
|
@ -786,27 +608,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity6(out *jwriter.Writer,
|
|||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity6(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity6(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity6(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity6(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity7(in *jlexer.Lexer, out *DisableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(in *jlexer.Lexer, out *DisableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
|
@ -835,7 +657,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity7(in *jlexer.Lexer, ou
|
|||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity7(out *jwriter.Writer, in DisableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(out *jwriter.Writer, in DisableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
|
@ -845,23 +667,23 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity7(out *jwriter.Writer,
|
|||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DisableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity7(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity7(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSecurity5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity7(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity7(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSecurity5(l, v)
|
||||
}
|
||||
|
|
|
@ -6,16 +6,6 @@ import (
|
|||
cdp "github.com/knq/chromedp/cdp"
|
||||
)
|
||||
|
||||
// EventCertificateError there is a certificate error. If overriding
|
||||
// certificate errors is enabled, then it should be handled with the
|
||||
// handleCertificateError command. Note: this event does not fire if the
|
||||
// certificate error has been allowed internally.
|
||||
type EventCertificateError struct {
|
||||
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.
|
||||
}
|
||||
|
||||
// EventSecurityStateChanged the security state of the page changed.
|
||||
type EventSecurityStateChanged struct {
|
||||
SecurityState State `json:"securityState"` // Security state.
|
||||
|
@ -27,6 +17,5 @@ type EventSecurityStateChanged struct {
|
|||
|
||||
// EventTypes all event types in the domain.
|
||||
var EventTypes = []cdp.MethodType{
|
||||
cdp.EventSecurityCertificateError,
|
||||
cdp.EventSecuritySecurityStateChanged,
|
||||
}
|
||||
|
|
|
@ -42,53 +42,25 @@ func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
|||
return h.Execute(ctxt, cdp.CommandSecurityEnable, nil, nil)
|
||||
}
|
||||
|
||||
// HandleCertificateErrorParams handles a certificate error that fired a
|
||||
// certificateError event.
|
||||
type HandleCertificateErrorParams struct {
|
||||
EventID int64 `json:"eventId"` // The ID of the event.
|
||||
Action CertificateErrorAction `json:"action"` // The action to take on the certificate error.
|
||||
// SetIgnoreCertificateErrorsParams enable/disable whether all certificate
|
||||
// errors should be ignored.
|
||||
type SetIgnoreCertificateErrorsParams struct {
|
||||
Ignore bool `json:"ignore"` // If true, all certificate errors will be ignored.
|
||||
}
|
||||
|
||||
// HandleCertificateError handles a certificate error that fired a
|
||||
// certificateError event.
|
||||
// SetIgnoreCertificateErrors enable/disable whether all certificate errors
|
||||
// should be ignored.
|
||||
//
|
||||
// parameters:
|
||||
// eventID - The ID of the event.
|
||||
// action - The action to take on the certificate error.
|
||||
func HandleCertificateError(eventID int64, action CertificateErrorAction) *HandleCertificateErrorParams {
|
||||
return &HandleCertificateErrorParams{
|
||||
EventID: eventID,
|
||||
Action: action,
|
||||
// ignore - If true, all certificate errors will be ignored.
|
||||
func SetIgnoreCertificateErrors(ignore bool) *SetIgnoreCertificateErrorsParams {
|
||||
return &SetIgnoreCertificateErrorsParams{
|
||||
Ignore: ignore,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Security.handleCertificateError against the provided context and
|
||||
// Do executes Security.setIgnoreCertificateErrors against the provided context and
|
||||
// target handler.
|
||||
func (p *HandleCertificateErrorParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
||||
return h.Execute(ctxt, cdp.CommandSecurityHandleCertificateError, p, nil)
|
||||
}
|
||||
|
||||
// SetOverrideCertificateErrorsParams enable/disable overriding certificate
|
||||
// errors. If enabled, all certificate error events need to be handled by the
|
||||
// DevTools client and should be answered with handleCertificateError commands.
|
||||
type SetOverrideCertificateErrorsParams struct {
|
||||
Override bool `json:"override"` // If true, certificate errors will be overridden.
|
||||
}
|
||||
|
||||
// SetOverrideCertificateErrors enable/disable overriding certificate errors.
|
||||
// If enabled, all certificate error events need to be handled by the DevTools
|
||||
// client and should be answered with handleCertificateError commands.
|
||||
//
|
||||
// parameters:
|
||||
// override - If true, certificate errors will be overridden.
|
||||
func SetOverrideCertificateErrors(override bool) *SetOverrideCertificateErrorsParams {
|
||||
return &SetOverrideCertificateErrorsParams{
|
||||
Override: override,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Security.setOverrideCertificateErrors against the provided context and
|
||||
// target handler.
|
||||
func (p *SetOverrideCertificateErrorsParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
||||
return h.Execute(ctxt, cdp.CommandSecuritySetOverrideCertificateErrors, p, nil)
|
||||
func (p *SetIgnoreCertificateErrorsParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
|
||||
return h.Execute(ctxt, cdp.CommandSecuritySetIgnoreCertificateErrors, p, nil)
|
||||
}
|
||||
|
|
|
@ -10718,9 +10718,22 @@
|
|||
"name": "enable",
|
||||
"description": "Enables tracking security state changes."
|
||||
},
|
||||
{
|
||||
"name": "setIgnoreCertificateErrors",
|
||||
"description": "Enable/disable whether all certificate errors should be ignored.",
|
||||
"experimental": true,
|
||||
"parameters": [
|
||||
{
|
||||
"name": "ignore",
|
||||
"description": "If true, all certificate errors will be ignored.",
|
||||
"type": "boolean"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "handleCertificateError",
|
||||
"description": "Handles a certificate error that fired a certificateError event.",
|
||||
"deprecated": true,
|
||||
"parameters": [
|
||||
{
|
||||
"name": "eventId",
|
||||
|
@ -10737,6 +10750,7 @@
|
|||
{
|
||||
"name": "setOverrideCertificateErrors",
|
||||
"description": "Enable/disable overriding certificate errors. If enabled, all certificate error events need to\nbe handled by the DevTools client and should be answered with handleCertificateError commands.",
|
||||
"deprecated": true,
|
||||
"parameters": [
|
||||
{
|
||||
"name": "override",
|
||||
|
@ -10749,7 +10763,8 @@
|
|||
"events": [
|
||||
{
|
||||
"name": "certificateError",
|
||||
"description": "There is a certificate error. If overriding certificate errors is enabled, then it should be\nhandled with the handleCertificateError command. Note: this event does not fire if the\ncertificate error has been allowed internally.",
|
||||
"description": "There is a certificate error. If overriding certificate errors is enabled, then it should be\nhandled with the handleCertificateError command. Note: this event does not fire if the\ncertificate error has been allowed internally. Only one client per target should override\ncertificate errors at the same time.",
|
||||
"deprecated": true,
|
||||
"parameters": [
|
||||
{
|
||||
"name": "eventId",
|
||||
|
|
Loading…
Reference in New Issue
Block a user