Documentation ¶
Overview ¶
Package network implements the Network domain. Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type AuthChallenge
- type AuthChallengeResponse
- type BlockedReason
- type CachedResource
- type CanClearBrowserCacheReply
- type CanClearBrowserCookiesReply
- type CanEmulateNetworkConditionsReply
- type ConnectionType
- type ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetAuthChallengeResponse(authChallengeResponse AuthChallengeResponse) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetErrorReason(errorReason ErrorReason) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetHeaders(headers Headers) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetMethod(method string) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetPostData(postData string) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetRawResponse(rawResponse string) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetURL(url string) *ContinueInterceptedRequestArgs
- type Cookie
- type CookieParam
- type CookieSameSite
- type DataReceivedClient
- type DataReceivedReply
- type DeleteCookiesArgs
- type EmulateNetworkConditionsArgs
- type EnableArgs
- type ErrorReason
- type EventSourceMessageReceivedClient
- type EventSourceMessageReceivedReply
- type GetAllCookiesReply
- type GetCertificateArgs
- type GetCertificateReply
- type GetCookiesArgs
- type GetCookiesReply
- type GetRequestPostDataArgs
- type GetRequestPostDataReply
- type GetResponseBodyArgs
- type GetResponseBodyForInterceptionArgs
- type GetResponseBodyForInterceptionReply
- type GetResponseBodyReply
- type Headers
- type Initiator
- type InterceptionID
- type InterceptionStage
- type LoaderID
- type LoadingFailedClient
- type LoadingFailedReply
- type LoadingFinishedClient
- type LoadingFinishedReply
- type MonotonicTime
- type ReplayXHRArgs
- type Request
- type RequestID
- type RequestInterceptedClient
- type RequestInterceptedReply
- type RequestPattern
- type RequestServedFromCacheClient
- type RequestServedFromCacheReply
- type RequestWillBeSentClient
- type RequestWillBeSentReply
- type ResourceChangedPriorityClient
- type ResourceChangedPriorityReply
- type ResourcePriority
- type ResourceTiming
- type Response
- type ResponseReceivedClient
- type ResponseReceivedReply
- type SearchInResponseBodyArgs
- type SearchInResponseBodyReply
- type SecurityDetails
- type SetBlockedURLsArgs
- type SetBypassServiceWorkerArgs
- type SetCacheDisabledArgs
- type SetCookieArgs
- func (a *SetCookieArgs) SetDomain(domain string) *SetCookieArgs
- func (a *SetCookieArgs) SetExpires(expires TimeSinceEpoch) *SetCookieArgs
- func (a *SetCookieArgs) SetHTTPOnly(httpOnly bool) *SetCookieArgs
- func (a *SetCookieArgs) SetPath(path string) *SetCookieArgs
- func (a *SetCookieArgs) SetSameSite(sameSite CookieSameSite) *SetCookieArgs
- func (a *SetCookieArgs) SetSecure(secure bool) *SetCookieArgs
- func (a *SetCookieArgs) SetURL(url string) *SetCookieArgs
- type SetCookieReply
- type SetCookiesArgs
- type SetDataSizeLimitsForTestArgs
- type SetExtraHTTPHeadersArgs
- type SetRequestInterceptionArgs
- type SetUserAgentOverrideArgs
- type SignedCertificateTimestamp
- type TimeSinceEpoch
- type WebSocketClosedClient
- type WebSocketClosedReply
- type WebSocketCreatedClient
- type WebSocketCreatedReply
- type WebSocketFrame
- type WebSocketFrameErrorClient
- type WebSocketFrameErrorReply
- type WebSocketFrameReceivedClient
- type WebSocketFrameReceivedReply
- type WebSocketFrameSentClient
- type WebSocketFrameSentReply
- type WebSocketHandshakeResponseReceivedClient
- type WebSocketHandshakeResponseReceivedReply
- type WebSocketRequest
- type WebSocketResponse
- type WebSocketWillSendHandshakeRequestClient
- type WebSocketWillSendHandshakeRequestReply
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthChallenge ¶
type AuthChallenge struct { // Source Source of the authentication challenge. // // Values: "Server", "Proxy". Source *string `json:"source,omitempty"` Origin string `json:"origin"` // Origin of the challenger. Scheme string `json:"scheme"` // The authentication scheme used, such as basic or digest Realm string `json:"realm"` // The realm of the challenge. May be empty. }
AuthChallenge Authorization challenge for HTTP status code 401 or 407.
Note: This type is experimental.
type AuthChallengeResponse ¶
type AuthChallengeResponse struct { // Response The decision on what to do in response to the // authorization challenge. Default means deferring to the default // behavior of the net stack, which will likely either the Cancel // authentication or display a popup dialog box. // // Values: "Default", "CancelAuth", "ProvideCredentials". Response string `json:"response"` Username *string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials. Password *string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials. }
AuthChallengeResponse Response to an AuthChallenge.
Note: This type is experimental.
type BlockedReason ¶
type BlockedReason string
BlockedReason The reason why request was blocked.
const ( BlockedReasonNotSet BlockedReason = "" BlockedReasonCsp BlockedReason = "csp" BlockedReasonMixedContent BlockedReason = "mixed-content" BlockedReasonOrigin BlockedReason = "origin" BlockedReasonInspector BlockedReason = "inspector" BlockedReasonSubresourceFilter BlockedReason = "subresource-filter" BlockedReasonOther BlockedReason = "other" )
BlockedReason as enums.
func (BlockedReason) String ¶
func (e BlockedReason) String() string
func (BlockedReason) Valid ¶
func (e BlockedReason) Valid() bool
type CachedResource ¶
type CachedResource struct { URL string `json:"url"` // Resource URL. This is the url of the original network request. Type internal.PageResourceType `json:"type"` // Type of this resource. Response *Response `json:"response,omitempty"` // Cached response data. BodySize float64 `json:"bodySize"` // Cached response body size. }
CachedResource Information about the cached resource.
type CanClearBrowserCacheReply ¶
type CanClearBrowserCacheReply struct {
Result bool `json:"result"` // True if browser cache can be cleared.
}
CanClearBrowserCacheReply represents the return values for CanClearBrowserCache in the Network domain.
type CanClearBrowserCookiesReply ¶
type CanClearBrowserCookiesReply struct {
Result bool `json:"result"` // True if browser cookies can be cleared.
}
CanClearBrowserCookiesReply represents the return values for CanClearBrowserCookies in the Network domain.
type CanEmulateNetworkConditionsReply ¶
type CanEmulateNetworkConditionsReply struct {
Result bool `json:"result"` // True if emulation of network conditions is supported.
}
CanEmulateNetworkConditionsReply represents the return values for CanEmulateNetworkConditions in the Network domain.
type ConnectionType ¶
type ConnectionType string
ConnectionType The underlying connection technology that the browser is supposedly using.
const ( ConnectionTypeNotSet ConnectionType = "" ConnectionTypeNone ConnectionType = "none" ConnectionTypeCellular2g ConnectionType = "cellular2g" ConnectionTypeCellular3g ConnectionType = "cellular3g" ConnectionTypeCellular4g ConnectionType = "cellular4g" ConnectionTypeBluetooth ConnectionType = "bluetooth" ConnectionTypeEthernet ConnectionType = "ethernet" ConnectionTypeWifi ConnectionType = "wifi" ConnectionTypeWimax ConnectionType = "wimax" ConnectionTypeOther ConnectionType = "other" )
ConnectionType as enums.
func (ConnectionType) String ¶
func (e ConnectionType) String() string
func (ConnectionType) Valid ¶
func (e ConnectionType) Valid() bool
type ContinueInterceptedRequestArgs ¶
type ContinueInterceptedRequestArgs struct { InterceptionID InterceptionID `json:"interceptionId"` // No description. ErrorReason ErrorReason `json:"errorReason,omitempty"` // 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. RawResponse *string `json:"rawResponse,omitempty"` // If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. URL *string `json:"url,omitempty"` // If 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. Method *string `json:"method,omitempty"` // If set this allows the request method to be overridden. Must not be set in response to an authChallenge. PostData *string `json:"postData,omitempty"` // If set this allows postData to be set. Must not be set in response to an authChallenge. Headers Headers `json:"headers,omitempty"` // If set this allows the request headers to be changed. Must not be set in response to an authChallenge. AuthChallengeResponse *AuthChallengeResponse `json:"authChallengeResponse,omitempty"` // Response to a requestIntercepted with an authChallenge. Must not be set otherwise. }
ContinueInterceptedRequestArgs represents the arguments for ContinueInterceptedRequest in the Network domain.
func NewContinueInterceptedRequestArgs ¶
func NewContinueInterceptedRequestArgs(interceptionID InterceptionID) *ContinueInterceptedRequestArgs
NewContinueInterceptedRequestArgs initializes ContinueInterceptedRequestArgs with the required arguments.
func (*ContinueInterceptedRequestArgs) SetAuthChallengeResponse ¶
func (a *ContinueInterceptedRequestArgs) SetAuthChallengeResponse(authChallengeResponse AuthChallengeResponse) *ContinueInterceptedRequestArgs
SetAuthChallengeResponse sets the AuthChallengeResponse optional argument. Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
func (*ContinueInterceptedRequestArgs) SetErrorReason ¶
func (a *ContinueInterceptedRequestArgs) SetErrorReason(errorReason ErrorReason) *ContinueInterceptedRequestArgs
SetErrorReason sets the ErrorReason optional argument. 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.
func (*ContinueInterceptedRequestArgs) SetHeaders ¶
func (a *ContinueInterceptedRequestArgs) SetHeaders(headers Headers) *ContinueInterceptedRequestArgs
SetHeaders sets the Headers optional argument. If set this allows the request headers to be changed. Must not be set in response to an authChallenge.
func (*ContinueInterceptedRequestArgs) SetMethod ¶
func (a *ContinueInterceptedRequestArgs) SetMethod(method string) *ContinueInterceptedRequestArgs
SetMethod sets the Method optional argument. If set this allows the request method to be overridden. Must not be set in response to an authChallenge.
func (*ContinueInterceptedRequestArgs) SetPostData ¶
func (a *ContinueInterceptedRequestArgs) SetPostData(postData string) *ContinueInterceptedRequestArgs
SetPostData sets the PostData optional argument. If set this allows postData to be set. Must not be set in response to an authChallenge.
func (*ContinueInterceptedRequestArgs) SetRawResponse ¶
func (a *ContinueInterceptedRequestArgs) SetRawResponse(rawResponse string) *ContinueInterceptedRequestArgs
SetRawResponse sets the RawResponse optional argument. 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.
func (*ContinueInterceptedRequestArgs) SetURL ¶
func (a *ContinueInterceptedRequestArgs) SetURL(url string) *ContinueInterceptedRequestArgs
SetURL sets the URL optional argument. If 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.
type Cookie ¶
type Cookie struct { Name string `json:"name"` // Cookie name. Value string `json:"value"` // Cookie value. Domain string `json:"domain"` // Cookie domain. Path string `json:"path"` // Cookie path. Expires float64 `json:"expires"` // Cookie expiration date as the number of seconds since the UNIX epoch. Size int `json:"size"` // Cookie size. HTTPOnly bool `json:"httpOnly"` // True if cookie is http-only. Secure bool `json:"secure"` // True if cookie is secure. Session bool `json:"session"` // True in case of session cookie. SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. }
Cookie Cookie object
type CookieParam ¶ added in v0.11.1
type CookieParam struct { Name string `json:"name"` // Cookie name. Value string `json:"value"` // Cookie value. URL *string `json:"url,omitempty"` // 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. Domain *string `json:"domain,omitempty"` // Cookie domain. Path *string `json:"path,omitempty"` // Cookie path. Secure *bool `json:"secure,omitempty"` // True if cookie is secure. HTTPOnly *bool `json:"httpOnly,omitempty"` // True if cookie is http-only. SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. Expires TimeSinceEpoch `json:"expires,omitempty"` // Cookie expiration date, session cookie if not set }
CookieParam Cookie parameter object
type CookieSameSite ¶
type CookieSameSite string
CookieSameSite Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies
const ( CookieSameSiteNotSet CookieSameSite = "" CookieSameSiteStrict CookieSameSite = "Strict" CookieSameSiteLax CookieSameSite = "Lax" )
CookieSameSite as enums.
func (CookieSameSite) String ¶
func (e CookieSameSite) String() string
func (CookieSameSite) Valid ¶
func (e CookieSameSite) Valid() bool
type DataReceivedClient ¶
type DataReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*DataReceivedReply, error) rpcc.Stream }
DataReceivedClient is a client for DataReceived events. Fired when data chunk was received over the network.
type DataReceivedReply ¶
type DataReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. DataLength int `json:"dataLength"` // Data chunk length. EncodedDataLength int `json:"encodedDataLength"` // Actual bytes received (might be less than dataLength for compressed encodings). }
DataReceivedReply is the reply for DataReceived events.
type DeleteCookiesArgs ¶ added in v0.11.4
type DeleteCookiesArgs struct { Name string `json:"name"` // Name of the cookies to remove. URL *string `json:"url,omitempty"` // If specified, deletes all the cookies with the given name where domain and path match provided URL. Domain *string `json:"domain,omitempty"` // If specified, deletes only cookies with the exact domain. Path *string `json:"path,omitempty"` // If specified, deletes only cookies with the exact path. }
DeleteCookiesArgs represents the arguments for DeleteCookies in the Network domain.
func NewDeleteCookiesArgs ¶ added in v0.11.4
func NewDeleteCookiesArgs(name string) *DeleteCookiesArgs
NewDeleteCookiesArgs initializes DeleteCookiesArgs with the required arguments.
func (*DeleteCookiesArgs) SetDomain ¶ added in v0.11.4
func (a *DeleteCookiesArgs) SetDomain(domain string) *DeleteCookiesArgs
SetDomain sets the Domain optional argument. If specified, deletes only cookies with the exact domain.
func (*DeleteCookiesArgs) SetPath ¶ added in v0.11.4
func (a *DeleteCookiesArgs) SetPath(path string) *DeleteCookiesArgs
SetPath sets the Path optional argument. If specified, deletes only cookies with the exact path.
func (*DeleteCookiesArgs) SetURL ¶ added in v0.11.4
func (a *DeleteCookiesArgs) SetURL(url string) *DeleteCookiesArgs
SetURL sets the URL optional argument. If specified, deletes all the cookies with the given name where domain and path match provided URL.
type EmulateNetworkConditionsArgs ¶
type EmulateNetworkConditionsArgs struct { Offline bool `json:"offline"` // True to emulate internet disconnection. Latency float64 `json:"latency"` // Minimum latency from request sent to response headers received (ms). DownloadThroughput float64 `json:"downloadThroughput"` // Maximal aggregated download throughput (bytes/sec). -1 disables download throttling. UploadThroughput float64 `json:"uploadThroughput"` // Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling. ConnectionType ConnectionType `json:"connectionType,omitempty"` // Connection type if known. }
EmulateNetworkConditionsArgs represents the arguments for EmulateNetworkConditions in the Network domain.
func NewEmulateNetworkConditionsArgs ¶
func NewEmulateNetworkConditionsArgs(offline bool, latency float64, downloadThroughput float64, uploadThroughput float64) *EmulateNetworkConditionsArgs
NewEmulateNetworkConditionsArgs initializes EmulateNetworkConditionsArgs with the required arguments.
func (*EmulateNetworkConditionsArgs) SetConnectionType ¶
func (a *EmulateNetworkConditionsArgs) SetConnectionType(connectionType ConnectionType) *EmulateNetworkConditionsArgs
SetConnectionType sets the ConnectionType optional argument. Connection type if known.
type EnableArgs ¶
type EnableArgs struct { // MaxTotalBufferSize Buffer size in bytes to use when preserving // network payloads (XHRs, etc). // // Note: This property is experimental. MaxTotalBufferSize *int `json:"maxTotalBufferSize,omitempty"` // MaxResourceBufferSize Per-resource buffer size in bytes to use when // preserving network payloads (XHRs, etc). // // Note: This property is experimental. MaxResourceBufferSize *int `json:"maxResourceBufferSize,omitempty"` MaxPostDataSize *int `json:"maxPostDataSize,omitempty"` // Longest post body size (in bytes) that would be included in requestWillBeSent notification }
EnableArgs represents the arguments for Enable in the Network domain.
func NewEnableArgs ¶
func NewEnableArgs() *EnableArgs
NewEnableArgs initializes EnableArgs with the required arguments.
func (*EnableArgs) SetMaxPostDataSize ¶ added in v0.15.6
func (a *EnableArgs) SetMaxPostDataSize(maxPostDataSize int) *EnableArgs
SetMaxPostDataSize sets the MaxPostDataSize optional argument. Longest post body size (in bytes) that would be included in requestWillBeSent notification
func (*EnableArgs) SetMaxResourceBufferSize ¶
func (a *EnableArgs) SetMaxResourceBufferSize(maxResourceBufferSize int) *EnableArgs
SetMaxResourceBufferSize sets the MaxResourceBufferSize optional argument. Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
Note: This property is experimental.
func (*EnableArgs) SetMaxTotalBufferSize ¶
func (a *EnableArgs) SetMaxTotalBufferSize(maxTotalBufferSize int) *EnableArgs
SetMaxTotalBufferSize sets the MaxTotalBufferSize optional argument. Buffer size in bytes to use when preserving network payloads (XHRs, etc).
Note: This property is experimental.
type ErrorReason ¶
type ErrorReason string
ErrorReason Network level fetch failure reason.
const ( ErrorReasonNotSet ErrorReason = "" ErrorReasonFailed ErrorReason = "Failed" ErrorReasonAborted ErrorReason = "Aborted" ErrorReasonTimedOut ErrorReason = "TimedOut" ErrorReasonAccessDenied ErrorReason = "AccessDenied" ErrorReasonConnectionClosed ErrorReason = "ConnectionClosed" ErrorReasonConnectionReset ErrorReason = "ConnectionReset" ErrorReasonConnectionRefused ErrorReason = "ConnectionRefused" ErrorReasonConnectionAborted ErrorReason = "ConnectionAborted" ErrorReasonConnectionFailed ErrorReason = "ConnectionFailed" ErrorReasonNameNotResolved ErrorReason = "NameNotResolved" ErrorReasonInternetDisconnected ErrorReason = "InternetDisconnected" ErrorReasonAddressUnreachable ErrorReason = "AddressUnreachable" )
ErrorReason as enums.
func (ErrorReason) String ¶
func (e ErrorReason) String() string
func (ErrorReason) Valid ¶
func (e ErrorReason) Valid() bool
type EventSourceMessageReceivedClient ¶
type EventSourceMessageReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*EventSourceMessageReceivedReply, error) rpcc.Stream }
EventSourceMessageReceivedClient is a client for EventSourceMessageReceived events. Fired when EventSource message is received.
type EventSourceMessageReceivedReply ¶
type EventSourceMessageReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. EventName string `json:"eventName"` // Message type. EventID string `json:"eventId"` // Message identifier. Data string `json:"data"` // Message content. }
EventSourceMessageReceivedReply is the reply for EventSourceMessageReceived events.
type GetAllCookiesReply ¶
type GetAllCookiesReply struct {
Cookies []Cookie `json:"cookies"` // Array of cookie objects.
}
GetAllCookiesReply represents the return values for GetAllCookies in the Network domain.
type GetCertificateArgs ¶
type GetCertificateArgs struct {
Origin string `json:"origin"` // Origin to get certificate for.
}
GetCertificateArgs represents the arguments for GetCertificate in the Network domain.
func NewGetCertificateArgs ¶
func NewGetCertificateArgs(origin string) *GetCertificateArgs
NewGetCertificateArgs initializes GetCertificateArgs with the required arguments.
type GetCertificateReply ¶
type GetCertificateReply struct {
TableNames []string `json:"tableNames"` // No description.
}
GetCertificateReply represents the return values for GetCertificate in the Network domain.
type GetCookiesArgs ¶
type GetCookiesArgs struct {
URLs []string `json:"urls,omitempty"` // The list of URLs for which applicable cookies will be fetched
}
GetCookiesArgs represents the arguments for GetCookies in the Network domain.
func NewGetCookiesArgs ¶
func NewGetCookiesArgs() *GetCookiesArgs
NewGetCookiesArgs initializes GetCookiesArgs with the required arguments.
func (*GetCookiesArgs) SetURLs ¶
func (a *GetCookiesArgs) SetURLs(urls []string) *GetCookiesArgs
SetURLs sets the URLs optional argument. The list of URLs for which applicable cookies will be fetched
type GetCookiesReply ¶
type GetCookiesReply struct {
Cookies []Cookie `json:"cookies"` // Array of cookie objects.
}
GetCookiesReply represents the return values for GetCookies in the Network domain.
type GetRequestPostDataArgs ¶ added in v0.15.6
type GetRequestPostDataArgs struct {
RequestID RequestID `json:"requestId"` // Identifier of the network request to get content for.
}
GetRequestPostDataArgs represents the arguments for GetRequestPostData in the Network domain.
func NewGetRequestPostDataArgs ¶ added in v0.15.6
func NewGetRequestPostDataArgs(requestID RequestID) *GetRequestPostDataArgs
NewGetRequestPostDataArgs initializes GetRequestPostDataArgs with the required arguments.
type GetRequestPostDataReply ¶ added in v0.15.6
type GetRequestPostDataReply struct {
PostData []byte `json:"postData"` // Base64-encoded request body.
}
GetRequestPostDataReply represents the return values for GetRequestPostData in the Network domain.
type GetResponseBodyArgs ¶
type GetResponseBodyArgs struct {
RequestID RequestID `json:"requestId"` // Identifier of the network request to get content for.
}
GetResponseBodyArgs represents the arguments for GetResponseBody in the Network domain.
func NewGetResponseBodyArgs ¶
func NewGetResponseBodyArgs(requestID RequestID) *GetResponseBodyArgs
NewGetResponseBodyArgs initializes GetResponseBodyArgs with the required arguments.
type GetResponseBodyForInterceptionArgs ¶ added in v0.14.2
type GetResponseBodyForInterceptionArgs struct {
InterceptionID InterceptionID `json:"interceptionId"` // Identifier for the intercepted request to get body for.
}
GetResponseBodyForInterceptionArgs represents the arguments for GetResponseBodyForInterception in the Network domain.
func NewGetResponseBodyForInterceptionArgs ¶ added in v0.14.2
func NewGetResponseBodyForInterceptionArgs(interceptionID InterceptionID) *GetResponseBodyForInterceptionArgs
NewGetResponseBodyForInterceptionArgs initializes GetResponseBodyForInterceptionArgs with the required arguments.
type GetResponseBodyForInterceptionReply ¶ added in v0.14.2
type GetResponseBodyForInterceptionReply struct { Body string `json:"body"` // Response body. Base64Encoded bool `json:"base64Encoded"` // True, if content was sent as base64. }
GetResponseBodyForInterceptionReply represents the return values for GetResponseBodyForInterception in the Network domain.
type GetResponseBodyReply ¶
type GetResponseBodyReply struct { Body string `json:"body"` // Response body. Base64Encoded bool `json:"base64Encoded"` // True, if content was sent as base64. }
GetResponseBodyReply represents the return values for GetResponseBody in the Network domain.
type Headers ¶
type Headers []byte
Headers Request / response headers as keys / values of JSON object.
func (Headers) MarshalJSON ¶
MarshalJSON copies behavior of json.RawMessage.
func (*Headers) UnmarshalJSON ¶
UnmarshalJSON copies behavior of json.RawMessage.
type Initiator ¶
type Initiator struct { // Type Type of this initiator. // // Values: "parser", "script", "preload", "other". Type string `json:"type"` Stack *runtime.StackTrace `json:"stack,omitempty"` // Initiator JavaScript stack trace, set for Script only. URL *string `json:"url,omitempty"` // Initiator URL, set for Parser type or for Script type (when script is importing module). LineNumber *float64 `json:"lineNumber,omitempty"` // Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based). }
Initiator Information about the request initiator.
type InterceptionID ¶
type InterceptionID string
InterceptionID Unique intercepted request identifier.
type InterceptionStage ¶ added in v0.14.2
type InterceptionStage string
InterceptionStage Stages of the interception to begin intercepting. Request will intercept before the request is sent. Response will intercept after the response is received.
Note: This type is experimental.
const ( InterceptionStageNotSet InterceptionStage = "" InterceptionStageRequest InterceptionStage = "Request" InterceptionStageHeadersReceived InterceptionStage = "HeadersReceived" )
InterceptionStage as enums.
func (InterceptionStage) String ¶ added in v0.14.2
func (e InterceptionStage) String() string
func (InterceptionStage) Valid ¶ added in v0.14.2
func (e InterceptionStage) Valid() bool
type LoadingFailedClient ¶
type LoadingFailedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*LoadingFailedReply, error) rpcc.Stream }
LoadingFailedClient is a client for LoadingFailed events. Fired when HTTP request has failed to load.
type LoadingFailedReply ¶
type LoadingFailedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Type internal.PageResourceType `json:"type"` // Resource type. ErrorText string `json:"errorText"` // User friendly error message. Canceled *bool `json:"canceled,omitempty"` // True if loading was canceled. BlockedReason BlockedReason `json:"blockedReason,omitempty"` // The reason why loading was blocked, if any. }
LoadingFailedReply is the reply for LoadingFailed events.
type LoadingFinishedClient ¶
type LoadingFinishedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*LoadingFinishedReply, error) rpcc.Stream }
LoadingFinishedClient is a client for LoadingFinished events. Fired when HTTP request has finished loading.
type LoadingFinishedReply ¶
type LoadingFinishedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request. BlockedCrossSiteDocument *bool `json:"blockedCrossSiteDocument,omitempty"` // Set when response was blocked due to being cross-site document response. }
LoadingFinishedReply is the reply for LoadingFinished events.
type MonotonicTime ¶
type MonotonicTime float64
MonotonicTime Monotonically increasing time in seconds since an arbitrary point in the past.
func (MonotonicTime) MarshalJSON ¶
func (t MonotonicTime) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. Encodes to null if t is zero.
func (MonotonicTime) String ¶
func (t MonotonicTime) String() string
String calls (time.Time).String().
func (MonotonicTime) Time ¶
func (t MonotonicTime) Time() time.Time
Time parses the Unix time with millisecond accuracy.
func (*MonotonicTime) UnmarshalJSON ¶
func (t *MonotonicTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ReplayXHRArgs ¶
type ReplayXHRArgs struct {
RequestID RequestID `json:"requestId"` // Identifier of XHR to replay.
}
ReplayXHRArgs represents the arguments for ReplayXHR in the Network domain.
func NewReplayXHRArgs ¶
func NewReplayXHRArgs(requestID RequestID) *ReplayXHRArgs
NewReplayXHRArgs initializes ReplayXHRArgs with the required arguments.
type Request ¶
type Request struct { URL string `json:"url"` // Request URL. Method string `json:"method"` // HTTP request method. Headers Headers `json:"headers"` // HTTP request headers. PostData *string `json:"postData,omitempty"` // HTTP POST request data. HasPostData *bool `json:"hasPostData,omitempty"` // True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long. MixedContentType *security.MixedContentType `json:"mixedContentType,omitempty"` // The mixed content type of the request. InitialPriority ResourcePriority `json:"initialPriority"` // Priority of the resource request at the time request is sent. // ReferrerPolicy The referrer policy of the request, as defined in // https://www.w3.org/TR/referrer-policy/ // // Values: "unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin". ReferrerPolicy string `json:"referrerPolicy"` IsLinkPreload *bool `json:"isLinkPreload,omitempty"` // Whether is loaded via link preload. }
Request HTTP request data.
type RequestInterceptedClient ¶
type RequestInterceptedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*RequestInterceptedReply, error) rpcc.Stream }
RequestInterceptedClient is a client for RequestIntercepted events. Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked.
type RequestInterceptedReply ¶
type RequestInterceptedReply struct { InterceptionID InterceptionID `json:"interceptionId"` // Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used. Request Request `json:"request"` // No description. FrameID internal.PageFrameID `json:"frameId"` // The id of the frame that initiated the request. ResourceType internal.PageResourceType `json:"resourceType"` // How the requested resource will be used. RedirectURL *string `json:"redirectUrl,omitempty"` // Redirect location, only sent if a redirect was intercepted. AuthChallenge *AuthChallenge `json:"authChallenge,omitempty"` // Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse. ResponseErrorReason ErrorReason `json:"responseErrorReason,omitempty"` // Response error if intercepted at response stage or if redirect occurred while intercepting request. ResponseStatusCode *int `json:"responseStatusCode,omitempty"` // Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred. ResponseHeaders Headers `json:"responseHeaders,omitempty"` // Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred. }
RequestInterceptedReply is the reply for RequestIntercepted events.
type RequestPattern ¶ added in v0.14.1
type RequestPattern struct { URLPattern *string `json:"urlPattern,omitempty"` // Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to "*". ResourceType *internal.PageResourceType `json:"resourceType,omitempty"` // If set, only requests for matching resource types will be intercepted. InterceptionStage InterceptionStage `json:"interceptionStage,omitempty"` // Stage at which to begin intercepting requests. Default is Request. }
RequestPattern Request pattern for interception.
Note: This type is experimental.
type RequestServedFromCacheClient ¶
type RequestServedFromCacheClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*RequestServedFromCacheReply, error) rpcc.Stream }
RequestServedFromCacheClient is a client for RequestServedFromCache events. Fired if request ended up loading from cache.
type RequestServedFromCacheReply ¶
type RequestServedFromCacheReply struct {
RequestID RequestID `json:"requestId"` // Request identifier.
}
RequestServedFromCacheReply is the reply for RequestServedFromCache events.
type RequestWillBeSentClient ¶
type RequestWillBeSentClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*RequestWillBeSentReply, error) rpcc.Stream }
RequestWillBeSentClient is a client for RequestWillBeSent events. Fired when page is about to send HTTP request.
type RequestWillBeSentReply ¶
type RequestWillBeSentReply struct { RequestID RequestID `json:"requestId"` // Request identifier. LoaderID LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker. DocumentURL string `json:"documentURL"` // URL of the document this request is loaded for. Request Request `json:"request"` // Request data. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. WallTime TimeSinceEpoch `json:"wallTime"` // Timestamp. Initiator Initiator `json:"initiator"` // Request initiator. RedirectResponse *Response `json:"redirectResponse,omitempty"` // Redirect response data. Type *internal.PageResourceType `json:"type,omitempty"` // Type of this resource. FrameID *internal.PageFrameID `json:"frameId,omitempty"` // Frame identifier. }
RequestWillBeSentReply is the reply for RequestWillBeSent events.
type ResourceChangedPriorityClient ¶
type ResourceChangedPriorityClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ResourceChangedPriorityReply, error) rpcc.Stream }
ResourceChangedPriorityClient is a client for ResourceChangedPriority events. Fired when resource loading priority is changed
type ResourceChangedPriorityReply ¶
type ResourceChangedPriorityReply struct { RequestID RequestID `json:"requestId"` // Request identifier. NewPriority ResourcePriority `json:"newPriority"` // New priority Timestamp MonotonicTime `json:"timestamp"` // Timestamp. }
ResourceChangedPriorityReply is the reply for ResourceChangedPriority events.
type ResourcePriority ¶
type ResourcePriority string
ResourcePriority Loading priority of a resource request.
const ( ResourcePriorityNotSet ResourcePriority = "" ResourcePriorityVeryLow ResourcePriority = "VeryLow" ResourcePriorityLow ResourcePriority = "Low" ResourcePriorityMedium ResourcePriority = "Medium" ResourcePriorityHigh ResourcePriority = "High" ResourcePriorityVeryHigh ResourcePriority = "VeryHigh" )
ResourcePriority as enums.
func (ResourcePriority) String ¶
func (e ResourcePriority) String() string
func (ResourcePriority) Valid ¶
func (e ResourcePriority) Valid() bool
type ResourceTiming ¶
type ResourceTiming struct { RequestTime float64 `json:"requestTime"` // Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime. ProxyStart float64 `json:"proxyStart"` // Started resolving proxy. ProxyEnd float64 `json:"proxyEnd"` // Finished resolving proxy. DNSStart float64 `json:"dnsStart"` // Started DNS address resolve. DNSEnd float64 `json:"dnsEnd"` // Finished DNS address resolve. ConnectStart float64 `json:"connectStart"` // Started connecting to the remote host. ConnectEnd float64 `json:"connectEnd"` // Connected to the remote host. SslStart float64 `json:"sslStart"` // Started SSL handshake. SslEnd float64 `json:"sslEnd"` // Finished SSL handshake. // WorkerStart Started running ServiceWorker. // // Note: This property is experimental. WorkerStart float64 `json:"workerStart"` // WorkerReady Finished Starting ServiceWorker. // // Note: This property is experimental. WorkerReady float64 `json:"workerReady"` SendStart float64 `json:"sendStart"` // Started sending request. SendEnd float64 `json:"sendEnd"` // Finished sending request. // PushStart Time the server started pushing request. // // Note: This property is experimental. PushStart float64 `json:"pushStart"` // PushEnd Time the server finished pushing request. // // Note: This property is experimental. PushEnd float64 `json:"pushEnd"` ReceiveHeadersEnd float64 `json:"receiveHeadersEnd"` // Finished receiving response headers. }
ResourceTiming Timing information for the request.
type Response ¶
type Response struct { URL string `json:"url"` // Response URL. This URL can be different from CachedResource.url in case of redirect. Status int `json:"status"` // HTTP response status code. StatusText string `json:"statusText"` // HTTP response status text. Headers Headers `json:"headers"` // HTTP response headers. HeadersText *string `json:"headersText,omitempty"` // HTTP response headers text. MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser. RequestHeaders Headers `json:"requestHeaders,omitempty"` // Refined HTTP request headers that were actually transmitted over the network. RequestHeadersText *string `json:"requestHeadersText,omitempty"` // HTTP request headers text. ConnectionReused bool `json:"connectionReused"` // Specifies whether physical connection was actually reused for this request. ConnectionID float64 `json:"connectionId"` // Physical connection id that was actually used for this request. RemoteIPAddress *string `json:"remoteIPAddress,omitempty"` // Remote IP address. RemotePort *int `json:"remotePort,omitempty"` // Remote port. FromDiskCache *bool `json:"fromDiskCache,omitempty"` // Specifies that the request was served from the disk cache. FromServiceWorker *bool `json:"fromServiceWorker,omitempty"` // Specifies that the request was served from the ServiceWorker. EncodedDataLength float64 `json:"encodedDataLength"` // Total number of bytes received for this request so far. Timing *ResourceTiming `json:"timing,omitempty"` // Timing information for the given request. Protocol *string `json:"protocol,omitempty"` // Protocol used to fetch this request. SecurityState security.State `json:"securityState"` // Security state of the request resource. SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the request. }
Response HTTP response data.
type ResponseReceivedClient ¶
type ResponseReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ResponseReceivedReply, error) rpcc.Stream }
ResponseReceivedClient is a client for ResponseReceived events. Fired when HTTP response is available.
type ResponseReceivedReply ¶
type ResponseReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. LoaderID LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Type internal.PageResourceType `json:"type"` // Resource type. Response Response `json:"response"` // Response data. FrameID *internal.PageFrameID `json:"frameId,omitempty"` // Frame identifier. }
ResponseReceivedReply is the reply for ResponseReceived events.
type SearchInResponseBodyArgs ¶ added in v0.14.2
type SearchInResponseBodyArgs struct { RequestID RequestID `json:"requestId"` // Identifier of the network response to search. Query string `json:"query"` // String to search for. CaseSensitive *bool `json:"caseSensitive,omitempty"` // If true, search is case sensitive. IsRegex *bool `json:"isRegex,omitempty"` // If true, treats string parameter as regex. }
SearchInResponseBodyArgs represents the arguments for SearchInResponseBody in the Network domain.
func NewSearchInResponseBodyArgs ¶ added in v0.14.2
func NewSearchInResponseBodyArgs(requestID RequestID, query string) *SearchInResponseBodyArgs
NewSearchInResponseBodyArgs initializes SearchInResponseBodyArgs with the required arguments.
func (*SearchInResponseBodyArgs) SetCaseSensitive ¶ added in v0.14.2
func (a *SearchInResponseBodyArgs) SetCaseSensitive(caseSensitive bool) *SearchInResponseBodyArgs
SetCaseSensitive sets the CaseSensitive optional argument. If true, search is case sensitive.
func (*SearchInResponseBodyArgs) SetIsRegex ¶ added in v0.14.2
func (a *SearchInResponseBodyArgs) SetIsRegex(isRegex bool) *SearchInResponseBodyArgs
SetIsRegex sets the IsRegex optional argument. If true, treats string parameter as regex.
type SearchInResponseBodyReply ¶ added in v0.14.2
type SearchInResponseBodyReply struct {
Result []debugger.SearchMatch `json:"result"` // List of search matches.
}
SearchInResponseBodyReply represents the return values for SearchInResponseBody in the Network domain.
type SecurityDetails ¶
type SecurityDetails struct { Protocol string `json:"protocol"` // Protocol name (e.g. "TLS 1.2" or "QUIC"). KeyExchange string `json:"keyExchange"` // Key Exchange used by the connection, or the empty string if not applicable. KeyExchangeGroup *string `json:"keyExchangeGroup,omitempty"` // (EC)DH group used by the connection, if applicable. Cipher string `json:"cipher"` // Cipher name. Mac *string `json:"mac,omitempty"` // TLS MAC. Note that AEAD ciphers do not have separate MACs. CertificateID security.CertificateID `json:"certificateId"` // Certificate ID value. SubjectName string `json:"subjectName"` // Certificate subject name. SanList []string `json:"sanList"` // Subject Alternative Name (SAN) DNS names and IP addresses. Issuer string `json:"issuer"` // Name of the issuing CA. ValidFrom TimeSinceEpoch `json:"validFrom"` // Certificate valid from date. ValidTo TimeSinceEpoch `json:"validTo"` // Certificate valid to (expiration) date SignedCertificateTimestampList []SignedCertificateTimestamp `json:"signedCertificateTimestampList"` // List of signed certificate timestamps (SCTs). }
SecurityDetails Security details about a request.
type SetBlockedURLsArgs ¶
type SetBlockedURLsArgs struct {
URLs []string `json:"urls"` // URL patterns to block. Wildcards ('*') are allowed.
}
SetBlockedURLsArgs represents the arguments for SetBlockedURLs in the Network domain.
func NewSetBlockedURLsArgs ¶
func NewSetBlockedURLsArgs(urls []string) *SetBlockedURLsArgs
NewSetBlockedURLsArgs initializes SetBlockedURLsArgs with the required arguments.
type SetBypassServiceWorkerArgs ¶
type SetBypassServiceWorkerArgs struct {
Bypass bool `json:"bypass"` // Bypass service worker and load from network.
}
SetBypassServiceWorkerArgs represents the arguments for SetBypassServiceWorker in the Network domain.
func NewSetBypassServiceWorkerArgs ¶
func NewSetBypassServiceWorkerArgs(bypass bool) *SetBypassServiceWorkerArgs
NewSetBypassServiceWorkerArgs initializes SetBypassServiceWorkerArgs with the required arguments.
type SetCacheDisabledArgs ¶
type SetCacheDisabledArgs struct {
CacheDisabled bool `json:"cacheDisabled"` // Cache disabled state.
}
SetCacheDisabledArgs represents the arguments for SetCacheDisabled in the Network domain.
func NewSetCacheDisabledArgs ¶
func NewSetCacheDisabledArgs(cacheDisabled bool) *SetCacheDisabledArgs
NewSetCacheDisabledArgs initializes SetCacheDisabledArgs with the required arguments.
type SetCookieArgs ¶
type SetCookieArgs struct { Name string `json:"name"` // Cookie name. Value string `json:"value"` // Cookie value. URL *string `json:"url,omitempty"` // 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. Domain *string `json:"domain,omitempty"` // Cookie domain. Path *string `json:"path,omitempty"` // Cookie path. Secure *bool `json:"secure,omitempty"` // True if cookie is secure. HTTPOnly *bool `json:"httpOnly,omitempty"` // True if cookie is http-only. SameSite CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type. Expires TimeSinceEpoch `json:"expires,omitempty"` // Cookie expiration date, session cookie if not set }
SetCookieArgs represents the arguments for SetCookie in the Network domain.
func NewSetCookieArgs ¶
func NewSetCookieArgs(name string, value string) *SetCookieArgs
NewSetCookieArgs initializes SetCookieArgs with the required arguments.
func (*SetCookieArgs) SetDomain ¶
func (a *SetCookieArgs) SetDomain(domain string) *SetCookieArgs
SetDomain sets the Domain optional argument. Cookie domain.
func (*SetCookieArgs) SetExpires ¶ added in v0.11.1
func (a *SetCookieArgs) SetExpires(expires TimeSinceEpoch) *SetCookieArgs
SetExpires sets the Expires optional argument. Cookie expiration date, session cookie if not set
func (*SetCookieArgs) SetHTTPOnly ¶
func (a *SetCookieArgs) SetHTTPOnly(httpOnly bool) *SetCookieArgs
SetHTTPOnly sets the HTTPOnly optional argument. True if cookie is http-only.
func (*SetCookieArgs) SetPath ¶
func (a *SetCookieArgs) SetPath(path string) *SetCookieArgs
SetPath sets the Path optional argument. Cookie path.
func (*SetCookieArgs) SetSameSite ¶
func (a *SetCookieArgs) SetSameSite(sameSite CookieSameSite) *SetCookieArgs
SetSameSite sets the SameSite optional argument. Cookie SameSite type.
func (*SetCookieArgs) SetSecure ¶
func (a *SetCookieArgs) SetSecure(secure bool) *SetCookieArgs
SetSecure sets the Secure optional argument. True if cookie is secure.
func (*SetCookieArgs) SetURL ¶ added in v0.11.1
func (a *SetCookieArgs) SetURL(url string) *SetCookieArgs
SetURL sets the URL optional argument. 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.
type SetCookieReply ¶
type SetCookieReply struct {
Success bool `json:"success"` // True if successfully set cookie.
}
SetCookieReply represents the return values for SetCookie in the Network domain.
type SetCookiesArgs ¶ added in v0.11.1
type SetCookiesArgs struct {
Cookies []CookieParam `json:"cookies"` // Cookies to be set.
}
SetCookiesArgs represents the arguments for SetCookies in the Network domain.
func NewSetCookiesArgs ¶ added in v0.11.1
func NewSetCookiesArgs(cookies []CookieParam) *SetCookiesArgs
NewSetCookiesArgs initializes SetCookiesArgs with the required arguments.
type SetDataSizeLimitsForTestArgs ¶
type SetDataSizeLimitsForTestArgs struct { MaxTotalSize int `json:"maxTotalSize"` // Maximum total buffer size. MaxResourceSize int `json:"maxResourceSize"` // Maximum per-resource size. }
SetDataSizeLimitsForTestArgs represents the arguments for SetDataSizeLimitsForTest in the Network domain.
func NewSetDataSizeLimitsForTestArgs ¶
func NewSetDataSizeLimitsForTestArgs(maxTotalSize int, maxResourceSize int) *SetDataSizeLimitsForTestArgs
NewSetDataSizeLimitsForTestArgs initializes SetDataSizeLimitsForTestArgs with the required arguments.
type SetExtraHTTPHeadersArgs ¶
type SetExtraHTTPHeadersArgs struct {
Headers Headers `json:"headers"` // Map with extra HTTP headers.
}
SetExtraHTTPHeadersArgs represents the arguments for SetExtraHTTPHeaders in the Network domain.
func NewSetExtraHTTPHeadersArgs ¶
func NewSetExtraHTTPHeadersArgs(headers Headers) *SetExtraHTTPHeadersArgs
NewSetExtraHTTPHeadersArgs initializes SetExtraHTTPHeadersArgs with the required arguments.
type SetRequestInterceptionArgs ¶ added in v0.14.1
type SetRequestInterceptionArgs struct {
Patterns []RequestPattern `json:"patterns"` // Requests matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call.
}
SetRequestInterceptionArgs represents the arguments for SetRequestInterception in the Network domain.
func NewSetRequestInterceptionArgs ¶ added in v0.14.1
func NewSetRequestInterceptionArgs(patterns []RequestPattern) *SetRequestInterceptionArgs
NewSetRequestInterceptionArgs initializes SetRequestInterceptionArgs with the required arguments.
type SetUserAgentOverrideArgs ¶
type SetUserAgentOverrideArgs struct {
UserAgent string `json:"userAgent"` // User agent to use.
}
SetUserAgentOverrideArgs represents the arguments for SetUserAgentOverride in the Network domain.
func NewSetUserAgentOverrideArgs ¶
func NewSetUserAgentOverrideArgs(userAgent string) *SetUserAgentOverrideArgs
NewSetUserAgentOverrideArgs initializes SetUserAgentOverrideArgs with the required arguments.
type SignedCertificateTimestamp ¶
type SignedCertificateTimestamp struct { Status string `json:"status"` // Validation status. Origin string `json:"origin"` // Origin. LogDescription string `json:"logDescription"` // Log name / description. LogID string `json:"logId"` // Log ID. Timestamp TimeSinceEpoch `json:"timestamp"` // Issuance date. HashAlgorithm string `json:"hashAlgorithm"` // Hash algorithm. SignatureAlgorithm string `json:"signatureAlgorithm"` // Signature algorithm. SignatureData string `json:"signatureData"` // Signature data. }
SignedCertificateTimestamp Details of a signed certificate timestamp (SCT).
type TimeSinceEpoch ¶
type TimeSinceEpoch float64
TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.
func (TimeSinceEpoch) MarshalJSON ¶
func (t TimeSinceEpoch) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. Encodes to null if t is zero.
func (TimeSinceEpoch) String ¶
func (t TimeSinceEpoch) String() string
String calls (time.Time).String().
func (TimeSinceEpoch) Time ¶
func (t TimeSinceEpoch) Time() time.Time
Time parses the Unix time with millisecond accuracy.
func (*TimeSinceEpoch) UnmarshalJSON ¶
func (t *TimeSinceEpoch) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.
type WebSocketClosedClient ¶
type WebSocketClosedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketClosedReply, error) rpcc.Stream }
WebSocketClosedClient is a client for WebSocketClosed events. Fired when WebSocket is closed.
type WebSocketClosedReply ¶
type WebSocketClosedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. }
WebSocketClosedReply is the reply for WebSocketClosed events.
type WebSocketCreatedClient ¶
type WebSocketCreatedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketCreatedReply, error) rpcc.Stream }
WebSocketCreatedClient is a client for WebSocketCreated events. Fired upon WebSocket creation.
type WebSocketCreatedReply ¶
type WebSocketCreatedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. URL string `json:"url"` // WebSocket request URL. Initiator *Initiator `json:"initiator,omitempty"` // Request initiator. }
WebSocketCreatedReply is the reply for WebSocketCreated events.
type WebSocketFrame ¶
type WebSocketFrame struct { Opcode float64 `json:"opcode"` // WebSocket frame opcode. Mask bool `json:"mask"` // WebSocke frame mask. PayloadData string `json:"payloadData"` // WebSocke frame payload data. }
WebSocketFrame WebSocket frame data.
type WebSocketFrameErrorClient ¶
type WebSocketFrameErrorClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketFrameErrorReply, error) rpcc.Stream }
WebSocketFrameErrorClient is a client for WebSocketFrameError events. Fired when WebSocket frame error occurs.
type WebSocketFrameErrorReply ¶
type WebSocketFrameErrorReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. ErrorMessage string `json:"errorMessage"` // WebSocket frame error message. }
WebSocketFrameErrorReply is the reply for WebSocketFrameError events.
type WebSocketFrameReceivedClient ¶
type WebSocketFrameReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketFrameReceivedReply, error) rpcc.Stream }
WebSocketFrameReceivedClient is a client for WebSocketFrameReceived events. Fired when WebSocket frame is received.
type WebSocketFrameReceivedReply ¶
type WebSocketFrameReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Response WebSocketFrame `json:"response"` // WebSocket response data. }
WebSocketFrameReceivedReply is the reply for WebSocketFrameReceived events.
type WebSocketFrameSentClient ¶
type WebSocketFrameSentClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketFrameSentReply, error) rpcc.Stream }
WebSocketFrameSentClient is a client for WebSocketFrameSent events. Fired when WebSocket frame is sent.
type WebSocketFrameSentReply ¶
type WebSocketFrameSentReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Response WebSocketFrame `json:"response"` // WebSocket response data. }
WebSocketFrameSentReply is the reply for WebSocketFrameSent events.
type WebSocketHandshakeResponseReceivedClient ¶
type WebSocketHandshakeResponseReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketHandshakeResponseReceivedReply, error) rpcc.Stream }
WebSocketHandshakeResponseReceivedClient is a client for WebSocketHandshakeResponseReceived events. Fired when WebSocket handshake response becomes available.
type WebSocketHandshakeResponseReceivedReply ¶
type WebSocketHandshakeResponseReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Response WebSocketResponse `json:"response"` // WebSocket response data. }
WebSocketHandshakeResponseReceivedReply is the reply for WebSocketHandshakeResponseReceived events.
type WebSocketRequest ¶
type WebSocketRequest struct {
Headers Headers `json:"headers"` // HTTP request headers.
}
WebSocketRequest WebSocket request data.
type WebSocketResponse ¶
type WebSocketResponse struct { Status int `json:"status"` // HTTP response status code. StatusText string `json:"statusText"` // HTTP response status text. Headers Headers `json:"headers"` // HTTP response headers. HeadersText *string `json:"headersText,omitempty"` // HTTP response headers text. RequestHeaders Headers `json:"requestHeaders,omitempty"` // HTTP request headers. RequestHeadersText *string `json:"requestHeadersText,omitempty"` // HTTP request headers text. }
WebSocketResponse WebSocket response data.
type WebSocketWillSendHandshakeRequestClient ¶
type WebSocketWillSendHandshakeRequestClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebSocketWillSendHandshakeRequestReply, error) rpcc.Stream }
WebSocketWillSendHandshakeRequestClient is a client for WebSocketWillSendHandshakeRequest events. Fired when WebSocket is about to initiate handshake.
type WebSocketWillSendHandshakeRequestReply ¶
type WebSocketWillSendHandshakeRequestReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. WallTime TimeSinceEpoch `json:"wallTime"` // UTC Timestamp. Request WebSocketRequest `json:"request"` // WebSocket request data. }
WebSocketWillSendHandshakeRequestReply is the reply for WebSocketWillSendHandshakeRequest events.