network

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: BSD-2-Clause Imports: 6 Imported by: 18

Documentation

Overview

Package network provides type definitions for use with the Chrome Network protocol

https://chromedevtools.github.io/devtools-protocol/tot/Network/

Index

Constants

This section is empty.

Variables

View Source
var BlockedReason = blockedReasonEnum{
	Csp:               blockedReasonCsp,
	MixedContent:      blockedReasonMixedContent,
	Origin:            blockedReasonOrigin,
	Inspector:         blockedReasonInspector,
	SubresourceFilter: blockedReasonSubresourceFilter,
	Other:             blockedReasonOther,
}

BlockedReason provides named acces to the BlockedReasonEnum values.

View Source
var ChallengeResponse = challengeResponseEnum{
	Default:            challengeResponseDefault,
	CancelAuth:         challengeResponseCancelAuth,
	ProvideCredentials: challengeResponseProvideCredentials,
}

ChallengeResponse provides named acces to the ChallengeResponseEnum values.

View Source
var ConnectionType = connectionTypeEnum{
	None:       connectionTypeNone,
	Cellular2g: connectionTypeCellular2g,
	Cellular3g: connectionTypeCellular3g,
	Cellular4g: connectionTypeCellular4g,
	Bluetooth:  connectionTypeBluetooth,
	Ethernet:   connectionTypeEthernet,
	Wifi:       connectionTypeWifi,
	Wimax:      connectionTypeWimax,
	Other:      connectionTypeOther,
}

ConnectionType provides named acces to the ConnectionTypeEnum values.

View Source
var CookieSameSite = cookieSameSiteEnum{
	Strict: cookieSameSiteStrict,
	Lax:    cookieSameSiteLax,
}

CookieSameSite provides named acces to the CookieSameSiteEnum values.

View Source
var ErrorReason = errorReasonEnum{
	Failed:               errorReasonFailed,
	Aborted:              errorReasonAborted,
	TimedOut:             errorReasonTimedOut,
	AccessDenied:         errorReasonAccessDenied,
	ConnectionClosed:     errorReasonConnectionClosed,
	ConnectionReset:      errorReasonConnectionReset,
	ConnectionRefused:    errorReasonConnectionRefused,
	ConnectionAborted:    errorReasonConnectionAborted,
	ConnectionFailed:     errorReasonConnectionFailed,
	NameNotResolved:      errorReasonNameNotResolved,
	InternetDisconnected: errorReasonInternetDisconnected,
	AddressUnreachable:   errorReasonAddressUnreachable,
}

ErrorReason provides named acces to the ErrorReasonEnum values.

View Source
var InitiatorType = initiatorTypeEnum{
	Parser:  initiatorTypeParser,
	Script:  initiatorTypeScript,
	Preload: initiatorTypePreload,
	Other:   initiatorTypeOther,
}

InitiatorType provides named acces to the InitiatorTypeEnum values.

View Source
var InterceptionStage = interceptionStageEnum{
	Request:         interceptionStageRequest,
	HeadersReceived: interceptionStageHeadersReceived,
}

InterceptionStage provides named acces to the InterceptionStageEnum values.

View Source
var ReferrerPolicy = referrerPolicyEnum{
	UnsafeURL:                   referrerPolicyUnsafeURL,
	NoReferrerWhenDowngrade:     referrerPolicyNoReferrerWhenDowngrade,
	NoReferrer:                  referrerPolicyNoReferrer,
	Origin:                      referrerPolicyOrigin,
	OriginWhenCrossOrigin:       referrerPolicyOriginWhenCrossOrigin,
	SameOrigin:                  referrerPolicySameOrigin,
	StrictOrigin:                referrerPolicyStrictOrigin,
	StrictOriginWhenCrossOrigin: referrerPolicyStrictOriginWhenCrossOrigin,
}

ReferrerPolicy provides named acces to the ReferrerPolicyEnum values.

View Source
var ResourcePriority = resourcePriorityEnum{
	VeryLow:  resourcePriorityVeryLow,
	Low:      resourcePriorityLow,
	Medium:   resourcePriorityMedium,
	High:     resourcePriorityHigh,
	VeryHigh: resourcePriorityVeryHigh,
}

ResourcePriority provides named acces to the ResourcePriorityEnum values.

View Source
var Source = sourceEnum{
	Server: sourceServer,
	Proxy:  sourceProxy,
}

Source provides named acces to the SourceEnum values.

Functions

This section is empty.

Types

type AuthChallenge

type AuthChallenge struct {
	// Optional. Source of the authentication challenge. Allowed values:
	//	- Source.Server
	//	- Source.Proxy
	Source SourceEnum `json:"source,omitempty"`

	// Origin of the challenger.
	Origin string `json:"origin"`

	// The authentication scheme used, such as basic or digest.
	Scheme string `json:"scheme"`

	// The realm of the challenge. May be empty.
	Realm string `json:"realm"`
}

AuthChallenge is an authorization challenge for HTTP status code 401 or 407. EXPERIMENTAL

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-AuthChallenge

type AuthChallengeResponse

type AuthChallengeResponse struct {
	// The decision on what to do in response to the authorization challenge.
	// Default means deferring to the default behavior of the net stack, which
	// will likely either the Cancel authentication or display a popup dialog
	// box. Allowed values:
	//	- ChallengeResponse.Default
	//	- ChallengeResponse.CancelAuth
	//	- ChallengeResponse.ProvideCredentials
	Response ChallengeResponseEnum `json:"response"`

	// Optional. The username to provide, possibly empty. Should only be set if
	// response is ProvideCredentials.
	Username string `json:"username,omitempty"`

	// Optional. The password to provide, possibly empty. Should only be set if
	// response is ProvideCredentials.
	Password string `json:"password,omitempty"`
}

AuthChallengeResponse is the response to an AuthChallenge. EXPERIMENTAL

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-AuthChallengeResponse

type BlockedReasonEnum

type BlockedReasonEnum int

BlockedReasonEnum defines the reason why request was blocked. Allowed values:

  • BlockedReason.Csp "csp"
  • BlockedReason.MixedContent "mixed-content"
  • BlockedReason.Origin "origin"
  • BlockedReason.Inspector "inspector"
  • BlockedReason.SubresourceFilter "subresource-filter"
  • BlockedReason.Other "other"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-BlockedReason

func (BlockedReasonEnum) MarshalJSON

func (enum BlockedReasonEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (BlockedReasonEnum) String

func (enum BlockedReasonEnum) String() string

String implements Stringer

func (*BlockedReasonEnum) UnmarshalJSON

func (enum *BlockedReasonEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type CachedResource

type CachedResource struct {
	// Resource URL. This is the url of the original network request.
	URL string `json:"url"`

	// Type of this resource.
	Type page.ResourceTypeEnum `json:"type"`

	// Optional. Cached response data.
	Response *Response `json:"response,omitempty"`

	// Cached response body size.
	BodySize int `json:"bodySize"`
}

CachedResource contains information about the cached resource.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-CachedResource

type CanClearBrowserCacheResult

type CanClearBrowserCacheResult struct {
	// True if browser cache can be cleared.
	Result bool `json:"result"`

	// Error information related to executing this method
	Err error `json:"-"`
}

CanClearBrowserCacheResult represents the result of calls to Network.canClearBrowserCache.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-canClearBrowserCache

type CanClearBrowserCookiesResult

type CanClearBrowserCookiesResult struct {
	// True if browser cookies can be cleared.
	Result bool `json:"result"`

	// Error information related to executing this method
	Err error `json:"-"`
}

CanClearBrowserCookiesResult represents the result of calls to Network.canClearBrowserCookies.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-canClearBrowserCookies

type CanEmulateConditionsResult

type CanEmulateConditionsResult struct {
	// True if emulation of network conditions is supported.
	Result bool `json:"result"`

	// Error information related to executing this method
	Err error `json:"-"`
}

CanEmulateConditionsResult represents the result of calls to Network.canEmulateNetworkConditions.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-canEmulateNetworkConditions

type ChallengeResponseEnum

type ChallengeResponseEnum int

ChallengeResponseEnum represents the decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box. Allowed values:

  • ChallengeResponse.Default "Default"
  • ChallengeResponse.CancelAuth "CancelAuth"
  • ChallengeResponse.ProvideCredentials "ProvideCredentials"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-AuthChallenge

func (ChallengeResponseEnum) MarshalJSON

func (enum ChallengeResponseEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (ChallengeResponseEnum) String

func (enum ChallengeResponseEnum) String() string

String implements Stringer

func (*ChallengeResponseEnum) UnmarshalJSON

func (enum *ChallengeResponseEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type ClearBrowserCacheResult

type ClearBrowserCacheResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

ClearBrowserCacheResult represents the result of calls to Network.clearBrowserCache.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-clearBrowserCache

type ClearBrowserCookiesResult

type ClearBrowserCookiesResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

ClearBrowserCookiesResult represents the result of calls to Network.clearBrowserCookies.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-clearBrowserCookies

type ConnectionTypeEnum

type ConnectionTypeEnum int

ConnectionTypeEnum is the underlying connection technology that the browser is supposedly using. Allowed values:

  • ConnectionType.None "none"
  • ConnectionType.Cellular2g "cellular2g"
  • ConnectionType.Cellular3g "cellular3g"
  • ConnectionType.Cellular4g "cellular4g"
  • ConnectionType.Bluetooth "bluetooth"
  • ConnectionType.Ethernet "ethernet"
  • ConnectionType.Wifi "wifi"
  • ConnectionType.Wimax "wimax"
  • ConnectionType.Other "other"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-ConnectionType

func (ConnectionTypeEnum) MarshalJSON

func (enum ConnectionTypeEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (ConnectionTypeEnum) String

func (enum ConnectionTypeEnum) String() string

String implements Stringer

func (*ConnectionTypeEnum) UnmarshalJSON

func (enum *ConnectionTypeEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type ContinueInterceptedRequestParams

type ContinueInterceptedRequestParams struct {
	// The interception ID.
	InterceptionID InterceptionID `json:"interceptionId"`

	// Optional. If set this causes the request to fail with the given reason.
	// Passing `Aborted` for requests marked with `isNavigationRequest` also
	// cancels the navigation. Must not be set in response to an AuthChallenge.
	// Allowed values:
	//	- ErrorReason.Failed
	//	- ErrorReason.Aborted
	//	- ErrorReason.TimedOut
	//	- ErrorReason.AccessDenied
	//	- ErrorReason.ConnectionClosed
	//	- ErrorReason.ConnectionReset
	//	- ErrorReason.ConnectionRefused
	//	- ErrorReason.ConnectionAborted
	//	- ErrorReason.ConnectionFailed
	//	- ErrorReason.NameNotResolved
	//	- ErrorReason.InternetDisconnected
	//	- ErrorReason.AddressUnreachable
	ErrorReason ErrorReasonEnum `json:"errorReason,omitempty"`

	// Optional. If set the requests completes using with the provided base64
	// encoded raw response, including HTTP status line and headers etc... Must
	// not be set in response to an AuthChallenge.
	RawResponse string `json:"rawResponse,omitempty"`

	// Optional. f set the request url will be modified in a way that's not
	// observable by page. Must not be set in response to an AuthChallenge.
	URL string `json:"url,omitempty"`

	// Optional. If set this allows the request method to be overridden. Must
	// not be set in response to an AuthChallenge.
	Method string `json:"method,omitempty"`

	// Optional. If set this allows postData to be set. Must not be set in
	// response to an AuthChallenge.
	PostData string `json:"postData,omitempty"`

	// Optional. If set this allows the request headers to be changed. Must not
	// be set in response to an AuthChallenge.
	Headers Headers `json:"headers,omitempty"`

	// Optional. Response to a requestIntercepted with an AuthChallenge. Must
	// not be set otherwise.
	AuthChallengeResponse *AuthChallengeResponse `json:"authChallengeResponse,omitempty"`
}

ContinueInterceptedRequestParams represents Network.continueInterceptedRequest parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-continueInterceptedRequest

type ContinueInterceptedRequestResult

type ContinueInterceptedRequestResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

ContinueInterceptedRequestResult represents the result of calls to Network.continueInterceptedRequest.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-continueInterceptedRequest

type Cookie struct {
	// Cookie name.
	Name string `json:"name"`

	// Cookie value.
	Value string `json:"value"`

	// Cookie domain.
	Domain string `json:"domain"`

	// Cookie path.
	Path string `json:"path"`

	// Cookie expiration date as the number of seconds since the UNIX epoch.
	Expires int64 `json:"expires"`

	// Cookie size.
	Size int `json:"size"`

	// True if cookie is http-only.
	HTTPOnly bool `json:"httpOnly"`

	// True if cookie is secure.
	Secure bool `json:"secure"`

	// True in case of session cookie.
	Session bool `json:"session"`

	// Optional. Cookie SameSite type. Allowed values:
	//	- CookieSameSite.Strict
	//	- CookieSameSite.Lax
	SameSite CookieSameSiteEnum `json:"sameSite,omitempty"`
}

Cookie object

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-Cookie

type CookieSameSiteEnum

type CookieSameSiteEnum int

CookieSameSiteEnum represents the cookie's 'SameSite' status. Allowed values:

  • CookieSameSite.Strict "Strict"
  • CookieSameSite.Lax "Lax"

https://tools.ietf.org/html/draft-west-first-party-cookies

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-CookieSameSite

func (CookieSameSiteEnum) MarshalJSON

func (enum CookieSameSiteEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (CookieSameSiteEnum) String

func (enum CookieSameSiteEnum) String() string

String implements Stringer

func (*CookieSameSiteEnum) UnmarshalJSON

func (enum *CookieSameSiteEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type DataReceivedEvent

type DataReceivedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Data chunk length.
	DataLength int `json:"dataLength"`

	// Actual bytes received (might be less than dataLength for compressed
	// encodings).
	EncodedDataLength int `json:"encodedDataLength"`

	// Error information related to this event
	Err error `json:"-"`
}

DataReceivedEvent represents Network.dataReceived event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-dataReceived

type DeleteCookiesParams

type DeleteCookiesParams struct {
	// Name of the cookies to remove.
	Name string `json:"name"`

	// Optional. If specified, deletes all the cookies with the given name where
	// domain and path match provided URL.
	URL string `json:"url,omitempty"`

	// Optional. If specified, deletes only cookies with the exact domain.
	Domain string `json:"domain,omitempty"`

	// Optional. If specified, deletes only cookies with the exact path.
	Path string `json:"path,omitempty"`
}

DeleteCookiesParams represents Network.deleteCookies parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-deleteCookies

type DeleteCookiesResult

type DeleteCookiesResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

DeleteCookiesResult represents the result of calls to Network.deleteCookies.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-deleteCookies

type DisableResult

type DisableResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

DisableResult represents the result of calls to Network.disable.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-disable

type EmulateConditionsParams

type EmulateConditionsParams struct {
	// True to emulate internet disconnection.
	Offline bool `json:"offline"`

	// Minimum latency from request sent to response headers received (ms).
	Latency float64 `json:"latency"`

	// Maximal aggregated download throughput (bytes/sec). -1 disables download
	// throttling.
	DownloadThroughput float64 `json:"downloadThroughput"`

	// Maximal aggregated upload throughput (bytes/sec). -1 disables upload
	// throttling.
	UploadThroughput float64 `json:"uploadThroughput"`

	// Optional. Connection type if known. Allowed values:
	//	- ConnectionType.None
	//	- ConnectionType.Cellular2g
	//	- ConnectionType.Cellular3g
	//	- ConnectionType.Cellular4g
	//	- ConnectionType.Bluetooth
	//	- ConnectionType.Ethernet
	//	- ConnectionType.Wifi
	//	- ConnectionType.Wimax
	//	- ConnectionType.Other
	ConnectionType ConnectionTypeEnum `json:"connectionType,omitempty"`
}

EmulateConditionsParams represents Network.emulateNetworkConditions parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-emulateNetworkConditions

type EmulateConditionsResult

type EmulateConditionsResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

EmulateConditionsResult represents the result of calls to Network.emulateConditions.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-emulateConditions

type EnableParams

type EnableParams struct {
	// Optional. Buffer size in bytes to use when preserving network payloads
	// (XHRs, etc). EXPERIMENTAL.
	MaxTotalBufferSize int `json:"maxTotalBufferSize,omitempty"`

	// Optional. Per-resource buffer size in bytes to use when preserving
	// network payloads (XHRs, etc). EXPERIMENTAL.
	MaxResourceBufferSize int `json:"maxResourceBufferSize,omitempty"`
}

EnableParams represents Network.enable parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-enable

type EnableResult

type EnableResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

EnableResult represents the result of calls to Network.enable.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-enable

type ErrorReasonEnum

type ErrorReasonEnum int

ErrorReasonEnum is the network level fetch failure reason. Allowed values:

  • ErrorReason.Failed "Failed"
  • ErrorReason.Aborted "Aborted"
  • ErrorReason.TimedOut "TimedOut"
  • ErrorReason.AccessDenied "AccessDenied"
  • ErrorReason.ConnectionClosed "ConnectionClosed"
  • ErrorReason.ConnectionReset "ConnectionReset"
  • ErrorReason.ConnectionRefused "ConnectionRefused"
  • ErrorReason.ConnectionAborted "ConnectionAborted"
  • ErrorReason.ConnectionFailed "ConnectionFailed"
  • ErrorReason.NameNotResolved "NameNotResolved"
  • ErrorReason.InternetDisconnected "InternetDisconnected"
  • ErrorReason.AddressUnreachable "AddressUnreachable"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-ErrorReason

func (ErrorReasonEnum) MarshalJSON

func (enum ErrorReasonEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (ErrorReasonEnum) String

func (enum ErrorReasonEnum) String() string

String implements Stringer

func (*ErrorReasonEnum) UnmarshalJSON

func (enum *ErrorReasonEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type EventSourceMessageReceivedEvent

type EventSourceMessageReceivedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Message type.
	EventName string `json:"eventName"`

	// Message identifier.
	EventID string `json:"eventId"`

	// Message content.
	Data string `json:"data"`

	// Error information related to this event
	Err error `json:"-"`
}

EventSourceMessageReceivedEvent represents Network.eventSourceMessageReceived event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-eventSourceMessageReceived

type GetAllCookiesResult

type GetAllCookiesResult struct {
	// Array of cookie objects.
	Cookies []*Cookie `json:"cookies"`

	// Error information related to executing this method
	Err error `json:"-"`
}

GetAllCookiesResult represents the result of calls to Network.getAllCookies.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getAllCookies

type GetCertificateParams

type GetCertificateParams struct {
	// Origin to get certificate for.
	Origin string `json:"origin"`
}

GetCertificateParams represents Network.getCertificate parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getCertificate

type GetCertificateResult

type GetCertificateResult struct {
	// The list of table names
	TableNames []string `json:"tableNames"`

	// Error information related to executing this method
	Err error `json:"-"`
}

GetCertificateResult represents the result of calls to Network.getCertificate.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getCertificate

type GetCookiesParams

type GetCookiesParams struct {
	// Optional. The list of URLs for which applicable cookies will be fetched.
	URLs []string `json:"urls,omitempty"`
}

GetCookiesParams represents Network.getCookies parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getCookies

type GetCookiesResult

type GetCookiesResult struct {
	// Array of cookie objects.
	Cookies []*Cookie `json:"cookies"`

	// Error information related to executing this method
	Err error `json:"-"`
}

GetCookiesResult represents the result of calls to Network.getCookies.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getCookies

type GetResponseBodyForInterceptionParams

type GetResponseBodyForInterceptionParams struct {
	// Identifier for the intercepted request to get body for.
	InterceptionID InterceptionID `json:"interceptionId"`
}

GetResponseBodyForInterceptionParams represents Network.getResponseBodyForInterception parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBodyForInterception

type GetResponseBodyForInterceptionResult

type GetResponseBodyForInterceptionResult struct {
	// Response body.
	Body string `json:"body"`

	// True, if content was sent as base64.
	Base64Encoded bool `json:"base64Encoded"`

	// Error information related to executing this method
	Err error `json:"-"`
}

GetResponseBodyForInterceptionResult represents the result of calls to Network.getResponseBodyForInterception.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBodyForInterception

type GetResponseBodyParams

type GetResponseBodyParams struct {
	// Identifier of the network request to get content for.
	RequestID RequestID `json:"requestId"`
}

GetResponseBodyParams represents Network.getResponseBody parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBody

type GetResponseBodyResult

type GetResponseBodyResult struct {
	// Response body.
	Body string `json:"body"`

	// True, if content was sent as base64.
	Base64Encoded bool `json:"base64Encoded"`

	// Error information related to executing this method
	Err error `json:"-"`
}

GetResponseBodyResult represents the result of calls to Network.getResponseBody.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-getResponseBody

type Headers

type Headers map[string]string

Headers contains request / response headers as keys / values of JSON object.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-Headers

type Initiator

type Initiator struct {
	// Type of this initiator. Allowed values:
	//	- InitiatorType.Parser
	//	- InitiatorType.Script
	//	- InitiatorType.Preload
	//	- InitiatorType.Other
	Type InitiatorTypeEnum `json:"type"`

	// Optional. Initiator JavaScript stack trace, set for Script only.
	Stack *runtime.StackTrace `json:"stack,omitempty"`

	// Optional. Initiator URL, set for Parser type or for Script type (when
	// script is importing module).
	URL string `json:"url,omitempty"`

	// Optional. Initiator line number, set for Parser type or for Script type
	// (when script is importing module) (0-based).
	LineNumber int `json:"lineNumber,omitempty"`
}

Initiator contains information about the request initiator.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-Initiator

type InitiatorTypeEnum

type InitiatorTypeEnum int

InitiatorTypeEnum is the type of this initiator. Allowed values:

  • InitiatorType.Parser "parser"
  • InitiatorType.Script "script"
  • InitiatorType.Preload "preload"
  • InitiatorType.Other "other"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-InitiatorType

func (InitiatorTypeEnum) MarshalJSON

func (enum InitiatorTypeEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (InitiatorTypeEnum) String

func (enum InitiatorTypeEnum) String() string

String implements Stringer

func (*InitiatorTypeEnum) UnmarshalJSON

func (enum *InitiatorTypeEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type InterceptionID

type InterceptionID string

InterceptionID is the unique intercepted request identifier.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-InterceptionId

type InterceptionStageEnum

type InterceptionStageEnum int

InterceptionStageEnum represents stages of the interception to begin intercepting. Request will intercept before the request is sent. Response will intercept after the response is received. EXPERIMENTAL. Allowed values:

  • InterceptionStage.Request "Request"
  • InterceptionStage.HeadersReceived "HeadersReceived"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-InterceptionStage

func (InterceptionStageEnum) MarshalJSON

func (enum InterceptionStageEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (InterceptionStageEnum) String

func (enum InterceptionStageEnum) String() string

String implements Stringer

func (*InterceptionStageEnum) UnmarshalJSON

func (enum *InterceptionStageEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type LoaderID

type LoaderID string

LoaderID is the Unique loader identifier.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-LoaderId

type LoadingFailedEvent

type LoadingFailedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Resource type.
	Type page.ResourceTypeEnum `json:"type"`

	// User friendly error message.
	ErrorText string `json:"errorText"`

	// Optional. True if loading was canceled.
	Canceled bool `json:"canceled,omitempty"`

	// Optional. The reason why loading was blocked, if any. Allowed values:
	//	- BlockedReason.Csp
	//	- BlockedReason.MixedContent
	//	- BlockedReason.Origin
	//	- BlockedReason.Inspector
	//	- BlockedReason.SubresourceFilter
	//	- BlockedReason.Other
	BlockedReason BlockedReasonEnum `json:"blockedReason,omitempty"`

	// Error information related to this event
	Err error `json:"-"`
}

LoadingFailedEvent represents Network.loadingFailed event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-loadingFailed

type LoadingFinishedEvent

type LoadingFinishedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Total number of bytes received for this request.
	EncodedDataLength float64 `json:"encodedDataLength"`

	// Error information related to this event
	Err error `json:"-"`
}

LoadingFinishedEvent represents Network.loadingFinished event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-loadingFinished

type MonotonicTime

type MonotonicTime int

MonotonicTime is the monotonically increasing time in seconds since an arbitrary point in the past.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-MonotonicTime

type ReferrerPolicyEnum

type ReferrerPolicyEnum int

ReferrerPolicyEnum represents the referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/. Allowed values:

  • ReferrerPolicy.UnsafeURL "unsafe-url"
  • ReferrerPolicy.NoReferrerWhenDowngrade "no-referrer-when-downgrade"
  • ReferrerPolicy.NoReferrer "no-referrer"
  • ReferrerPolicy.Origin "origin"
  • ReferrerPolicy.OriginWhenCrossOrigin "origin-when-cross-origin"
  • ReferrerPolicy.SameOrigin "same-origin"
  • ReferrerPolicy.StrictOrigin "strict-origin"
  • ReferrerPolicy.StrictOriginWhenCrossOrigin "strict-origin-when-cross-origin"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-ResourcePriority

func (ReferrerPolicyEnum) MarshalJSON

func (enum ReferrerPolicyEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (ReferrerPolicyEnum) String

func (enum ReferrerPolicyEnum) String() string

String implements Stringer

func (*ReferrerPolicyEnum) UnmarshalJSON

func (enum *ReferrerPolicyEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type ReplayXHRParams

type ReplayXHRParams struct {
	// Identifier of XHR to replay.
	RequestID RequestID `json:"requestId"`
}

ReplayXHRParams represents Network.replayXHR parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-replayXHR

type ReplayXHRResult

type ReplayXHRResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

ReplayXHRResult represents the result of calls to Network.replayXHR.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-replayXHR

type Request

type Request struct {
	// Request URL.
	URL string `json:"url"`

	// HTTP request method.
	Method string `json:"method"`

	// HTTP request headers.
	Headers Headers `json:"headers"`

	// Optional. HTTP POST request data.
	PostData string `json:"postData,omitempty"`

	// Optional. The mixed content type of the request.
	MixedContentType security.MixedContentTypeEnum `json:"mixedContentType,omitempty"`

	// Priority of the resource request at the time request is sent. Allowed
	// values:
	//	- ResourcePriority.VeryLow
	//	- ResourcePriority.Low
	//	- ResourcePriority.Medium
	//	- ResourcePriority.High
	//	- ResourcePriority.VeryHigh
	InitialPriority ResourcePriorityEnum `json:"initialPriority"`

	// The referrer policy of the request, as defined in
	// https://www.w3.org/TR/referrer-policy/ Allowed values:
	//	- ReferrerPolicy.UnsafeUrl
	//	- ReferrerPolicy.NoReferrerWhenDowngrade
	//	- ReferrerPolicy.NoReferrer
	//	- ReferrerPolicy.Origin
	//	- ReferrerPolicy.OriginWhenCrossOrigin
	//	- ReferrerPolicy.SameOrigin
	//	- ReferrerPolicy.StrictOrigin
	//	- ReferrerPolicy.StrictOriginWhenCrossOrigin
	ReferrerPolicy ReferrerPolicyEnum `json:"referrerPolicy"`

	// Optional. Whether is loaded via link preload.
	IsLinkPreload bool `json:"isLinkPreload,omitempty"`
}

Request represents the HTTP request data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-Request

type RequestID

type RequestID string

RequestID is the unique request identifier.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-RequestId

type RequestInterceptedEvent

type RequestInterceptedEvent struct {
	// Each request the page makes will have a unique id, however if any
	// redirects are encountered while processing that fetch, they will be
	// reported with the same id as the original fetch. Likewise if HTTP
	// authentication is needed then the same fetch id will be used.
	InterceptionID InterceptionID `json:"interceptionId"`

	// desc.
	Request *Request `json:"request"`

	// The ID of the frame that initiated the request.
	FrameID page.FrameID `json:"frameId"`

	// How the requested resource will be used.
	ResourceType page.ResourceTypeEnum `json:"resourceType"`

	// Whether this is a navigation request, which can abort the navigation
	// completely.
	IsNavigationRequest bool `json:"isNavigationRequest"`

	// Optional. Redirect location, only sent if a redirect was intercepted.
	RedirectURL string `json:"redirectUrl,omitempty"`

	// Optional. Details of the Authorization Challenge encountered. If this is
	// set then continueInterceptedRequest must contain an authChallengeResponse.
	AuthChallenge *AuthChallenge `json:"authChallenge,omitempty"`

	// Optional. Response error if intercepted at response stage or if redirect
	// occurred while intercepting request. Allowed values:
	//	- ErrorReason.Failed
	//	- ErrorReason.Aborted
	//	- ErrorReason.TimedOut
	//	- ErrorReason.AccessDenied
	//	- ErrorReason.ConnectionClosed
	//	- ErrorReason.ConnectionReset
	//	- ErrorReason.ConnectionRefused
	//	- ErrorReason.ConnectionAborted
	//	- ErrorReason.ConnectionFailed
	//	- ErrorReason.NameNotResolved
	//	- ErrorReason.InternetDisconnected
	//	- ErrorReason.AddressUnreachable
	ResponseErrorReason ErrorReasonEnum `json:"responseErrorReason,omitempty"`

	// Optional. Response code if intercepted at response stage or if redirect
	// occurred while intercepting request or auth retry occurred.
	ResponseStatusCode int `json:"responseStatusCode,omitempty"`

	// Optional. Response headers if intercepted at the response stage or if
	// redirect occurred while intercepting request or auth retry occurred.
	ResponseHeaders Headers `json:"responseHeaders,omitempty"`

	// Error information related to this event
	Err error `json:"-"`
}

RequestInterceptedEvent represents Network.requestIntercepted event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestIntercepted

type RequestPattern

type RequestPattern struct {
	// Optional. Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed.
	// Escape character is backslash. Omitting is equivalent to "*".
	URLPattern string `json:"urlPattern,omitempty"`

	// Optional. If set, only requests for matching resource types will be
	// intercepted.
	ResourceType page.ResourceTypeEnum `json:"resourceType,omitempty"`

	// Optional. Stage at which to begin intercepting requests. Default is
	// Request. Allowed values:
	//	- InterceptionStage.Request
	//	- InterceptionStage.HeadersReceived
	InterceptionStage InterceptionStageEnum `json:"interceptionStage,omitempty"`
}

RequestPattern is the request pattern for interception. EXPERIMENTAL

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-RequestPattern

type RequestServedFromCacheEvent

type RequestServedFromCacheEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Error information related to this event
	Err error `json:"-"`
}

RequestServedFromCacheEvent represents Network.requestServedFromCache event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestServedFromCache

type RequestWillBeSentEvent

type RequestWillBeSentEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Loader identifier. Empty string if the request is fetched from worker.
	LoaderID LoaderID `json:"loaderId"`

	// URL of the document this request is loaded for.
	DocumentURL string `json:"documentURL"`

	// Request data.
	Request *Request `json:"request"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Timestamp.
	WallTime TimeSinceEpoch `json:"wallTime"`

	// Request initiator.
	Initiator *Initiator `json:"initiator"`

	// Redirect response data.
	RedirectResponse *Response `json:"redirectResponse"`

	// Optional. Type of this resource.
	Type page.ResourceTypeEnum `json:"type,omitempty"`

	// Optional. Frame identifier.
	FrameID page.FrameID `json:"frameId,omitempty"`

	// Error information related to this event
	Err error `json:"-"`
}

RequestWillBeSentEvent represents Network.requestWillBeSent event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-requestWillBeSent

type ResourceChangedPriorityEvent

type ResourceChangedPriorityEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// New priority. Allowed values:
	//	- ResourcePriority.VeryLow
	//	- ResourcePriority.Low
	//	- ResourcePriority.Medium
	//	- ResourcePriority.High
	//	- ResourcePriority.VeryHigh
	NewPriority ResourcePriorityEnum `json:"newPriority"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Error information related to this event
	Err error `json:"-"`
}

ResourceChangedPriorityEvent represents Network.resourceChangedPriority event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-resourceChangedPriority

type ResourcePriorityEnum

type ResourcePriorityEnum int

ResourcePriorityEnum represents the loading priority of a resource request. Allowed values:

  • ResourcePriority.VeryLow "VeryLow"
  • ResourcePriority.Low "Low"
  • ResourcePriority.Medium "Medium"
  • ResourcePriority.High "High"
  • ResourcePriority.VeryHigh "VeryHigh"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-ResourcePriority

func (ResourcePriorityEnum) MarshalJSON

func (enum ResourcePriorityEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (ResourcePriorityEnum) String

func (enum ResourcePriorityEnum) String() string

String implements Stringer

func (*ResourcePriorityEnum) UnmarshalJSON

func (enum *ResourcePriorityEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type ResourceTiming

type ResourceTiming struct {
	// Timing's requestTime is a baseline in seconds, while the other numbers
	// are ticks in milliseconds relatively to this requestTime.
	RequestTime int `json:"requestTime"`

	// Started resolving proxy.
	ProxyStart int `json:"proxyStart"`

	// Finished resolving proxy.
	ProxyEnd int `json:"proxyEnd"`

	// Started DNS address resolve.
	DNSStart int `json:"dnsStart"`

	// Finished DNS address resolve.
	DNSEnd int `json:"dnsEnd"`

	// Started connecting to the remote host.
	ConnectStart int `json:"connectStart"`

	// Connected to the remote host.
	ConnectEnd int `json:"connectEnd"`

	// Started SSL handshake.
	SSLStart int `json:"sslStart"`

	// Finished SSL handshake.
	SSLEnd int `json:"sslEnd"`

	// Started running ServiceWorker. EXPERIMENTAL.
	WorkerStart int `json:"workerStart"`

	// Finished Starting ServiceWorker. EXPERIMENTAL.
	WorkerReady int `json:"workerReady"`

	// Started sending request.
	SendStart int `json:"sendStart"`

	// Finished sending request.
	SendEnd int `json:"sendEnd"`

	// Time the server started pushing request. EXPERIMENTAL.
	PushStart int `json:"pushStart"`

	// Time the server finished pushing request. EXPERIMENTAL.
	PushEnd int `json:"pushEnd"`

	// Finished receiving response headers.
	ReceiveHeadersEnd int `json:"receiveHeadersEnd"`
}

ResourceTiming defines the timing information for the request

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-ResourceTiming

type Response

type Response struct {

	// Response URL. This URL can be different from CachedResource.url in case
	// of redirect.
	URL string `json:"url"`

	// HTTP response status code.
	Status int `json:"status"`

	// HTTP response status text.
	StatusText string `json:"statusText"`

	// HTTP response headers.
	Headers Headers `json:"headers"`

	// Optional. HTTP response headers text.
	HeadersText string `json:"headersText,omitempty"`

	// Resource mimeType as determined by the browser.
	MimeType string `json:"mimeType"`

	// Optional. Refined HTTP request headers that were actually transmitted
	// over the network.
	RequestHeaders Headers `json:"requestHeaders,omitempty"`

	// Optional. HTTP request headers text.
	RequestHeadersText string `json:"requestHeadersText,omitempty"`

	// Specifies whether physical connection was actually reused for this request.
	ConnectionReused bool `json:"connectionReused"`

	// Physical connection id that was actually used for this request.
	ConnectionID int `json:"connectionId"`

	// Optional. Remote IP address.
	RemoteIPAddress string `json:"remoteIPAddress,omitempty"`

	// Optional. Remote port.
	RemotePort int `json:"remotePort,omitempty"`

	// Optional. Specifies that the request was served from the disk cache.
	FromDiskCache bool `json:"fromDiskCache,omitempty"`

	// Optional. Specifies that the request was served from the ServiceWorker.
	FromServiceWorker bool `json:"fromServiceWorker,omitempty"`

	// Total number of bytes received for this request so far.
	EncodedDataLength int `json:"encodedDataLength"`

	// Optional. Timing information for the given request.
	Timing *ResourceTiming `json:"timing,omitempty"`

	// Optional. Protocol used to fetch this request.
	Protocol string `json:"protocol,omitempty"`

	// Security state of the request resource.
	SecurityState security.StateEnum `json:"securityState"`

	// Optional. Security details for the request.
	SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"`
}

Response contains HTTP response data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-Response

type ResponseReceivedEvent

type ResponseReceivedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Loader identifier. Empty string if the request is fetched from worker.
	LoaderID LoaderID `json:"loaderId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Resource type.
	Type page.ResourceTypeEnum `json:"type"`

	// Response data.
	Response *Response `json:"response"`

	// Optional. Frame identifier.
	FrameID page.FrameID `json:"frameId,omitempty"`

	// Error information related to this event
	Err error `json:"-"`
}

ResponseReceivedEvent represents Network.responseReceived event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-responseReceived

type SearchInResponseBodyParams

type SearchInResponseBodyParams struct {
	// Identifier of the network response to search.
	RequestID RequestID `json:"requestId"`

	// String to search for.
	Query string `json:"query"`

	// Optional. If true, search is case sensitive.
	CaseSensitive bool `json:"caseSensitive,omitempty"`

	// Optional. If true, treats string parameter as regex.
	IsRegex bool `json:"isRegex,omitempty"`
}

SearchInResponseBodyParams represents Network.searchInResponseBody parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-searchInResponseBody

type SearchInResponseBodyResult

type SearchInResponseBodyResult struct {
	// List of search matches.
	Result []*debugger.SearchMatch `json:"result"`

	// Error information related to executing this method
	Err error `json:"-"`
}

SearchInResponseBodyResult represents the result of calls to Network.searchInResponseBody.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-searchInResponseBody

type SecurityDetails

type SecurityDetails struct {
	// Protocol name (e.g. "TLS 1.2" or "QUIC").
	Protocol string `json:"protocol"`

	// Key Exchange used by the connection, or the empty string if not
	// applicable.
	KeyExchange string `json:"keyExchange"`

	// Optional. (EC)DH group used by the connection, if applicable.
	KeyExchangeGroup string `json:"keyExchangeGroup,omitempty"`

	// Cipher name.
	Cipher string `json:"cipher"`

	// Optional. TLS MAC. Note that AEAD ciphers do not have separate MACs.
	Mac string `json:"mac,omitempty"`

	// Certificate ID value.
	CertificateID security.CertificateID `json:"certificateId"`

	// Certificate subject name.
	SubjectName string `json:"subjectName"`

	// Subject Alternative Name (SAN) DNS names and IP addresses.
	SanList []string `json:"sanList"`

	// Name of the issuing CA.
	Issuer string `json:"issuer"`

	// Certificate valid from date.
	ValidFrom TimeSinceEpoch `json:"validFrom"`

	// Certificate valid to (expiration) date
	ValidTo TimeSinceEpoch `json:"validTo"`

	// List of signed certificate timestamps (SCTs).
	SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList"`
}

SecurityDetails defines security details about a request.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-SecurityDetails

type SetBlockedURLsParams

type SetBlockedURLsParams struct {
	// URL patterns to block. Wildcards ('*') are allowed.
	URLs []string `json:"urls"`
}

SetBlockedURLsParams represents Network.setBlockedURLs parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setBlockedURLs

type SetBlockedURLsResult

type SetBlockedURLsResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetBlockedURLsResult represents the result of calls to Network.setBlockedURLs.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setBlockedURLs

type SetBypassServiceWorkerParams

type SetBypassServiceWorkerParams struct {
	// Bypass service worker and load from network.
	Bypass bool `json:"bypass"`
}

SetBypassServiceWorkerParams represents Network.setBypassServiceWorker parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setBypassServiceWorker

type SetBypassServiceWorkerResult

type SetBypassServiceWorkerResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetBypassServiceWorkerResult represents the result of calls to Network.setBypassServiceWorker.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setBypassServiceWorker

type SetCacheDisabledParams

type SetCacheDisabledParams struct {
	// Cache disabled state.
	CacheDisabled bool `json:"cacheDisabled"`
}

SetCacheDisabledParams represents Network.setCacheDisabled parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setCacheDisabled

type SetCacheDisabledResult

type SetCacheDisabledResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetCacheDisabledResult represents the result of calls to Network.setCacheDisabled.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setCacheDisabled

type SetCookieParams

type SetCookieParams struct {
	// Cookie name.
	Name string `json:"name"`

	// Cookie value.
	Value string `json:"value"`

	// Optional. The request-URI to associate with the setting of the cookie.
	// This value can affect the default domain and path values of the created
	// cookie.
	URL string `json:"url,omitempty"`

	// Optional. Cookie domain.
	Domain string `json:"domain,omitempty"`

	// Optional. Cookie path.
	Path string `json:"path,omitempty"`

	// Optional. True if cookie is secure.
	Secure bool `json:"secure,omitempty"`

	// Optional. True if cookie is http-only.
	HTTPOnly bool `json:"httpOnly,omitempty"`

	// Optional. Cookie SameSite type. Allowed values:
	//	- CookieSameSite.Strict
	//	- CookieSameSite.Lax
	SameSite CookieSameSiteEnum `json:"sameSite,omitempty"`

	// Optional. Cookie expiration date, session cookie if not set.
	Expires TimeSinceEpoch `json:"expires,omitempty"`
}

SetCookieParams represents Network.setCookie parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setCookie

type SetCookieResult

type SetCookieResult struct {
	// True if successfully set cookie.
	Success bool `json:"success"`

	// Error information related to executing this method
	Err error `json:"-"`
}

SetCookieResult represents the result of calls to Network.setCookie.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setCookie

type SetCookiesParams

type SetCookiesParams struct {
	// Cookies to be set.
	Cookies []*SetCookieParams `json:"cookies"`
}

SetCookiesParams represents Network.setCookies parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setCookies

type SetCookiesResult

type SetCookiesResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetCookiesResult represents the result of calls to Network.setCookies.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setCookies

type SetDataSizeLimitsForTestParams

type SetDataSizeLimitsForTestParams struct {
	// Maximum total buffer size.
	MaxTotalSize int `json:"maxTotalSize"`

	// Maximum per-resource size.
	MaxResourceSize int `json:"maxResourceSize"`
}

SetDataSizeLimitsForTestParams represents Network.setDataSizeLimitsForTest parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setDataSizeLimitsForTest

type SetDataSizeLimitsForTestResult

type SetDataSizeLimitsForTestResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetDataSizeLimitsForTestResult represents the result of calls to Network.setDataSizeLimitsForTest.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setDataSizeLimitsForTest

type SetExtraHTTPHeadersParams

type SetExtraHTTPHeadersParams struct {
	// Map with extra HTTP headers.
	Headers Headers `json:"headers"`
}

SetExtraHTTPHeadersParams represents Network.setExtraHTTPHeaders parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setExtraHTTPHeaders

type SetExtraHTTPHeadersResult

type SetExtraHTTPHeadersResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetExtraHTTPHeadersResult represents the result of calls to Network.setExtraHTTPHeaders.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setExtraHTTPHeaders

type SetRequestInterceptionParams

type SetRequestInterceptionParams struct {
	// Requests matching any of these patterns will be forwarded and wait for
	// the corresponding continueInterceptedRequest call.
	Patterns []*RequestPattern `json:"patterns"`
}

SetRequestInterceptionParams represents Network.setRequestInterception parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setRequestInterception

type SetRequestInterceptionResult

type SetRequestInterceptionResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetRequestInterceptionResult represents the result of calls to Network.setRequestInterception.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setRequestInterception

type SetUserAgentOverrideParams

type SetUserAgentOverrideParams struct {
	// User agent to use.
	UserAgent string `json:"userAgent"`
}

SetUserAgentOverrideParams represents Network.setUserAgentOverride parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setUserAgentOverride

type SetUserAgentOverrideResult

type SetUserAgentOverrideResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetUserAgentOverrideResult represents the result of calls to Network.setUserAgentOverride.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-setUserAgentOverride

type SignedCertificateTimestamp

type SignedCertificateTimestamp struct {

	// Validation status.
	Status string `json:"status"`

	// Origin.
	Origin string `json:"origin"`

	// Log name / description.
	LogDescription string `json:"logDescription"`

	// Log ID.
	LogID string `json:"logId"`

	// Issuance date.
	Timestamp TimeSinceEpoch `json:"timestamp"`

	// Hash algorithm.
	HashAlgorithm string `json:"hashAlgorithm"`

	// Signature algorithm.
	SignatureAlgorithm string `json:"signatureAlgorithm"`

	// Signature data.
	SignatureData string `json:"signatureData"`
}

SignedCertificateTimestamp contains details of a signed certificate timestamp (SCT).

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-SignedCertificateTimestamp

type SourceEnum

type SourceEnum int

SourceEnum is optional. Source of the authentication challenge. Allowed values:

  • Source.Server "Server"
  • Source.Proxy "Proxy"

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-AuthChallenge

func (SourceEnum) MarshalJSON

func (enum SourceEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (SourceEnum) String

func (enum SourceEnum) String() string

String implements Stringer

func (*SourceEnum) UnmarshalJSON

func (enum *SourceEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type TimeSinceEpoch

type TimeSinceEpoch int64

TimeSinceEpoch represents UTC time in seconds, counted from January 1, 1970.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-TimeSinceEpoch

type WebSocketClosedEvent

type WebSocketClosedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Error information related to this event
	Err error `json:"-"`
}

WebSocketClosedEvent represents Network.webSocketClosed event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketClosed

type WebSocketCreatedEvent

type WebSocketCreatedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Optional. WebSocket frame error message.
	ErrorMessage string `json:"errorMessage,omitempty"`

	// Error information related to this event
	Err error `json:"-"`
}

WebSocketCreatedEvent represents Network.webSocketCreated event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketCreated

type WebSocketFrame

type WebSocketFrame struct {
	// WebSocket frame opcode.
	Opcode int `json:"opcode"`

	// WebSocket frame mask.
	Mask bool `json:"mask"`

	// WebSocket frame payload data.
	PayloadData string `json:"payloadData"`
}

WebSocketFrame contains WebSocket frame data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-WebSocketFrame

type WebSocketFrameErrorEvent

type WebSocketFrameErrorEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// Optional. WebSocket frame error message.
	ErrorMessage string `json:"errorMessage,omitempty"`

	// Error information related to this event
	Err error `json:"-"`
}

WebSocketFrameErrorEvent represents Network.webSocketFrameError event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameError

type WebSocketFrameReceivedEvent

type WebSocketFrameReceivedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// WebSocket response data.
	Response *WebSocketFrame `json:"response"`

	// Error information related to this event
	Err error `json:"-"`
}

WebSocketFrameReceivedEvent represents Network.webSocketFrameReceived event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameReceived

type WebSocketFrameSentEvent

type WebSocketFrameSentEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// WebSocket response data.
	Response *WebSocketFrame `json:"response"`

	// Error information related to this event
	Err error `json:"-"`
}

WebSocketFrameSentEvent represents Network.webSocketFrameSent event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketFrameSent

type WebSocketHandshakeResponseReceivedEvent

type WebSocketHandshakeResponseReceivedEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// WebSocket response data.
	Response *WebSocketFrame `json:"response"`

	// Error information related to this event
	Err error `json:"-"`
}

WebSocketHandshakeResponseReceivedEvent represents Network.webSocketHandshakeResponseReceived event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketHandshakeResponseReceived

type WebSocketRequest

type WebSocketRequest struct {
	Headers Headers `json:"headers"`
}

WebSocketRequest contains WebSocket request data

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-WebSocketRequest

type WebSocketResponse

type WebSocketResponse struct {
	// HTTP response status code.
	Status int `json:"status"`

	// HTTP response status text.
	StatusText string `json:"statusText"`

	// HTTP response headers.
	Headers Headers `json:"headers"`

	// Optional. HTTP response headers text.
	HeadersText string `json:"headersText,omitempty"`

	// Optional. HTTP request headers.
	RequestHeaders Headers `json:"requestHeaders,omitempty"`

	// Optional. HTTP request headers text.
	RequestHeadersText string `json:"requestHeadersText,omitempty"`
}

WebSocketResponse contains WebSocket response data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#type-WebSocketResponse

type WebSocketWillSendHandshakeRequestEvent

type WebSocketWillSendHandshakeRequestEvent struct {
	// Request identifier.
	RequestID RequestID `json:"requestId"`

	// Timestamp.
	Timestamp MonotonicTime `json:"timestamp"`

	// UTC Timestamp.
	WallTime TimeSinceEpoch `json:"wallTime"`

	// WebSocket request data.
	Request *WebSocketRequest `json:"request"`

	// Error information related to this event
	Err error `json:"-"`
}

WebSocketWillSendHandshakeRequestEvent represents Network.webSocketWillSendHandshakeRequest event data.

https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketWillSendHandshakeRequest

Jump to

Keyboard shortcuts

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