security

package
v0.0.0-...-b47709e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package security provides the Chrome Debugging Protocol commands, types, and events for the Security domain.

Security.

Generated by the chromedp-gen command.

Index

Constants

This section is empty.

Variables

EventTypes all event types in the domain.

Functions

This section is empty.

Types

type CertificateErrorAction

type CertificateErrorAction string

CertificateErrorAction the action to take when a certificate error occurs. continue will continue processing the request and cancel will cancel the request.

const (
	CertificateErrorActionContinue CertificateErrorAction = "continue"
	CertificateErrorActionCancel   CertificateErrorAction = "cancel"
)

CertificateErrorAction values.

func (CertificateErrorAction) MarshalEasyJSON

func (t CertificateErrorAction) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (CertificateErrorAction) MarshalJSON

func (t CertificateErrorAction) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (CertificateErrorAction) String

func (t CertificateErrorAction) String() string

String returns the CertificateErrorAction as string value.

func (*CertificateErrorAction) UnmarshalEasyJSON

func (t *CertificateErrorAction) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*CertificateErrorAction) UnmarshalJSON

func (t *CertificateErrorAction) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type CertificateID

type CertificateID int64

CertificateID an internal certificate ID value.

func (CertificateID) Int64

func (t CertificateID) Int64() int64

Int64 returns the CertificateID as int64 value.

type DisableParams

type DisableParams struct{}

DisableParams disables tracking security state changes.

func Disable

func Disable() *DisableParams

Disable disables tracking security state changes.

func (*DisableParams) Do

func (p *DisableParams) Do(ctxt context.Context, h cdp.Handler) (err error)

Do executes Security.disable against the provided context and target handler.

func (DisableParams) MarshalEasyJSON

func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON

func (v DisableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON

func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON

func (v *DisableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams

type EnableParams struct{}

EnableParams enables tracking security state changes.

func Enable

func Enable() *EnableParams

Enable enables tracking security state changes.

func (*EnableParams) Do

func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error)

Do executes Security.enable against the provided context and target handler.

func (EnableParams) MarshalEasyJSON

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventCertificateError

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.
}

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.

func (EventCertificateError) MarshalEasyJSON

func (v EventCertificateError) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventCertificateError) MarshalJSON

func (v EventCertificateError) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventCertificateError) UnmarshalEasyJSON

func (v *EventCertificateError) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventCertificateError) UnmarshalJSON

func (v *EventCertificateError) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventSecurityStateChanged

type EventSecurityStateChanged struct {
	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.
}

EventSecurityStateChanged the security state of the page changed.

func (EventSecurityStateChanged) MarshalEasyJSON

func (v EventSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventSecurityStateChanged) MarshalJSON

func (v EventSecurityStateChanged) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventSecurityStateChanged) UnmarshalEasyJSON

func (v *EventSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventSecurityStateChanged) UnmarshalJSON

func (v *EventSecurityStateChanged) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type HandleCertificateErrorParams

type HandleCertificateErrorParams struct {
	EventID int64                  `json:"eventId"` // The ID of the event.
	Action  CertificateErrorAction `json:"action"`  // The action to take on the certificate error.
}

HandleCertificateErrorParams handles a certificate error that fired a certificateError event.

func HandleCertificateError

func HandleCertificateError(eventID int64, action CertificateErrorAction) *HandleCertificateErrorParams

HandleCertificateError handles a certificate error that fired a certificateError event.

parameters:

eventID - The ID of the event.
action - The action to take on the certificate error.

func (*HandleCertificateErrorParams) Do

Do executes Security.handleCertificateError against the provided context and target handler.

func (HandleCertificateErrorParams) MarshalEasyJSON

func (v HandleCertificateErrorParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (HandleCertificateErrorParams) MarshalJSON

func (v HandleCertificateErrorParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*HandleCertificateErrorParams) UnmarshalEasyJSON

func (v *HandleCertificateErrorParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*HandleCertificateErrorParams) UnmarshalJSON

func (v *HandleCertificateErrorParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type InsecureContentStatus

type InsecureContentStatus struct {
	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.
}

InsecureContentStatus information about insecure content on the page.

func (InsecureContentStatus) MarshalEasyJSON

func (v InsecureContentStatus) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (InsecureContentStatus) MarshalJSON

func (v InsecureContentStatus) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*InsecureContentStatus) UnmarshalEasyJSON

func (v *InsecureContentStatus) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*InsecureContentStatus) UnmarshalJSON

func (v *InsecureContentStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MixedContentType

type MixedContentType string

MixedContentType a description of mixed content (HTTP resources on HTTPS pages), as defined by https://www.w3.org/TR/mixed-content/#categories.

const (
	MixedContentTypeBlockable           MixedContentType = "blockable"
	MixedContentTypeOptionallyBlockable MixedContentType = "optionally-blockable"
	MixedContentTypeNone                MixedContentType = "none"
)

MixedContentType values.

func (MixedContentType) MarshalEasyJSON

func (t MixedContentType) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (MixedContentType) MarshalJSON

func (t MixedContentType) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (MixedContentType) String

func (t MixedContentType) String() string

String returns the MixedContentType as string value.

func (*MixedContentType) UnmarshalEasyJSON

func (t *MixedContentType) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*MixedContentType) UnmarshalJSON

func (t *MixedContentType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type SetOverrideCertificateErrorsParams

type SetOverrideCertificateErrorsParams struct {
	Override bool `json:"override"` // If true, certificate errors will be overridden.
}

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.

func SetOverrideCertificateErrors

func SetOverrideCertificateErrors(override bool) *SetOverrideCertificateErrorsParams

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 (*SetOverrideCertificateErrorsParams) Do

Do executes Security.setOverrideCertificateErrors against the provided context and target handler.

func (SetOverrideCertificateErrorsParams) MarshalEasyJSON

func (v SetOverrideCertificateErrorsParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetOverrideCertificateErrorsParams) MarshalJSON

func (v SetOverrideCertificateErrorsParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SetOverrideCertificateErrorsParams) UnmarshalEasyJSON

func (v *SetOverrideCertificateErrorsParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetOverrideCertificateErrorsParams) UnmarshalJSON

func (v *SetOverrideCertificateErrorsParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type State

type State string

State the security level of a page or resource.

const (
	StateUnknown  State = "unknown"
	StateNeutral  State = "neutral"
	StateInsecure State = "insecure"
	StateSecure   State = "secure"
	StateInfo     State = "info"
)

State values.

func (State) MarshalEasyJSON

func (t State) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (State) MarshalJSON

func (t State) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (State) String

func (t State) String() string

String returns the State as string value.

func (*State) UnmarshalEasyJSON

func (t *State) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*State) UnmarshalJSON

func (t *State) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type StateExplanation

type StateExplanation struct {
	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.
	MixedContentType MixedContentType `json:"mixedContentType"` // The type of mixed content described by the explanation.
	Certificate      []string         `json:"certificate"`      // Page certificate.
}

StateExplanation an explanation of an factor contributing to the security state.

func (StateExplanation) MarshalEasyJSON

func (v StateExplanation) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (StateExplanation) MarshalJSON

func (v StateExplanation) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*StateExplanation) UnmarshalEasyJSON

func (v *StateExplanation) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StateExplanation) UnmarshalJSON

func (v *StateExplanation) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL