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 BlockedCookieWithReason
- type BlockedReason
- type BlockedSetCookieWithReason
- type CORSError
- type CORSErrorStatus
- type CachedResource
- type CanClearBrowserCacheReply
- type CanClearBrowserCookiesReply
- type CanEmulateNetworkConditionsReply
- type CertificateTransparencyCompliance
- type ClientSecurityState
- 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 []byte) *ContinueInterceptedRequestArgs
- func (a *ContinueInterceptedRequestArgs) SetURL(url string) *ContinueInterceptedRequestArgs
- type Cookie
- type CookieBlockedReason
- type CookieParam
- type CookiePriority
- type CookieSameSite
- type CookieSourceScheme
- type CrossOriginEmbedderPolicyStatus
- type CrossOriginEmbedderPolicyValue
- type CrossOriginOpenerPolicyStatus
- type CrossOriginOpenerPolicyValue
- 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 GetSecurityIsolationStatusArgs
- type GetSecurityIsolationStatusReply
- type Headers
- type IPAddressSpace
- type Initiator
- type InterceptionID
- type InterceptionStage
- type LoadNetworkResourceArgs
- type LoadNetworkResourceOptions
- type LoadNetworkResourcePageResult
- type LoadNetworkResourceReply
- type LoaderID
- type LoadingFailedClient
- type LoadingFailedReply
- type LoadingFinishedClient
- type LoadingFinishedReply
- type MonotonicTime
- type PostDataEntry
- type PrivateNetworkRequestPolicy
- type ReplayXHRArgs
- type Request
- type RequestID
- type RequestInterceptedClient
- type RequestInterceptedReply
- type RequestPattern
- type RequestServedFromCacheClient
- type RequestServedFromCacheReply
- type RequestWillBeSentClient
- type RequestWillBeSentExtraInfoClient
- type RequestWillBeSentExtraInfoReply
- type RequestWillBeSentReply
- type ResourceChangedPriorityClient
- type ResourceChangedPriorityReply
- type ResourcePriority
- type ResourceTiming
- type ResourceType
- type Response
- type ResponseReceivedClient
- type ResponseReceivedExtraInfoClient
- type ResponseReceivedExtraInfoReply
- type ResponseReceivedReply
- type SearchInResponseBodyArgs
- type SearchInResponseBodyReply
- type SecurityDetails
- type SecurityIsolationStatus
- type ServiceWorkerResponseSource
- type SetAttachDebugStackArgs
- 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) SetPriority(priority CookiePriority) *SetCookieArgs
- func (a *SetCookieArgs) SetSameParty(sameParty bool) *SetCookieArgs
- func (a *SetCookieArgs) SetSameSite(sameSite CookieSameSite) *SetCookieArgs
- func (a *SetCookieArgs) SetSecure(secure bool) *SetCookieArgs
- func (a *SetCookieArgs) SetSourcePort(sourcePort int) *SetCookieArgs
- func (a *SetCookieArgs) SetSourceScheme(sourceScheme CookieSourceScheme) *SetCookieArgs
- func (a *SetCookieArgs) SetURL(url string) *SetCookieArgs
- type SetCookieBlockedReason
- type SetCookieReply
- type SetCookiesArgs
- type SetDataSizeLimitsForTestArgs
- type SetExtraHTTPHeadersArgs
- type SetRequestInterceptionArgs
- type SignedCertificateTimestamp
- type SignedExchangeError
- type SignedExchangeErrorField
- type SignedExchangeHeader
- type SignedExchangeInfo
- type SignedExchangeReceivedClient
- type SignedExchangeReceivedReply
- type SignedExchangeSignature
- type TakeResponseBodyForInterceptionAsStreamArgs
- type TakeResponseBodyForInterceptionAsStreamReply
- type TimeSinceEpoch
- type TrustTokenOperationDoneClient
- type TrustTokenOperationDoneReply
- type TrustTokenOperationType
- type TrustTokenParams
- 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
- type WebTransportClosedClient
- type WebTransportClosedReply
- type WebTransportConnectionEstablishedClient
- type WebTransportConnectionEstablishedReply
- type WebTransportCreatedClient
- type WebTransportCreatedReply
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 BlockedCookieWithReason ¶ added in v0.25.0
type BlockedCookieWithReason struct { BlockedReasons []CookieBlockedReason `json:"blockedReasons"` // The reason(s) the cookie was blocked. Cookie Cookie `json:"cookie"` // The cookie object representing the cookie which was not sent. }
BlockedCookieWithReason A cookie with was not sent with a request with the corresponding reason.
Note: This type is experimental.
type BlockedReason ¶
type BlockedReason string
BlockedReason The reason why request was blocked.
const ( BlockedReasonNotSet BlockedReason = "" BlockedReasonOther BlockedReason = "other" BlockedReasonCsp BlockedReason = "csp" BlockedReasonMixedContent BlockedReason = "mixed-content" BlockedReasonOrigin BlockedReason = "origin" BlockedReasonInspector BlockedReason = "inspector" BlockedReasonSubresourceFilter BlockedReason = "subresource-filter" BlockedReasonContentType BlockedReason = "content-type" BlockedReasonCoepFrameResourceNeedsCoepHeader BlockedReason = "coep-frame-resource-needs-coep-header" BlockedReasonCorpNotSameOrigin BlockedReason = "corp-not-same-origin" BlockedReasonCorpNotSameOriginAfterDefaultedToSameOriginByCoep BlockedReason = "corp-not-same-origin-after-defaulted-to-same-origin-by-coep" BlockedReasonCorpNotSameSite BlockedReason = "corp-not-same-site" )
BlockedReason as enums.
func (BlockedReason) String ¶
func (e BlockedReason) String() string
func (BlockedReason) Valid ¶
func (e BlockedReason) Valid() bool
type BlockedSetCookieWithReason ¶ added in v0.25.0
type BlockedSetCookieWithReason struct { BlockedReasons []SetCookieBlockedReason `json:"blockedReasons"` // The reason(s) this cookie was blocked. CookieLine string `json:"cookieLine"` // The string representing this individual cookie as it would appear in the header. This is not the entire "cookie" or "set-cookie" header which could have multiple cookies. Cookie *Cookie `json:"cookie,omitempty"` // The cookie object which represents the cookie which was not stored. It is optional because sometimes complete cookie information is not available, such as in the case of parsing errors. }
BlockedSetCookieWithReason A cookie which was not stored from a response with the corresponding reason.
Note: This type is experimental.
type CORSError ¶ added in v0.31.0
type CORSError string
CORSError The reason why request was blocked.
const ( CORSErrorNotSet CORSError = "" CORSErrorDisallowedByMode CORSError = "DisallowedByMode" CORSErrorInvalidResponse CORSError = "InvalidResponse" CORSErrorWildcardOriginNotAllowed CORSError = "WildcardOriginNotAllowed" CORSErrorMissingAllowOriginHeader CORSError = "MissingAllowOriginHeader" CORSErrorMultipleAllowOriginValues CORSError = "MultipleAllowOriginValues" CORSErrorInvalidAllowOriginValue CORSError = "InvalidAllowOriginValue" CORSErrorAllowOriginMismatch CORSError = "AllowOriginMismatch" CORSErrorInvalidAllowCredentials CORSError = "InvalidAllowCredentials" CORSErrorCORSDisabledScheme CORSError = "CorsDisabledScheme" CORSErrorPreflightInvalidStatus CORSError = "PreflightInvalidStatus" CORSErrorPreflightDisallowedRedirect CORSError = "PreflightDisallowedRedirect" CORSErrorPreflightWildcardOriginNotAllowed CORSError = "PreflightWildcardOriginNotAllowed" CORSErrorPreflightMissingAllowOriginHeader CORSError = "PreflightMissingAllowOriginHeader" CORSErrorPreflightMultipleAllowOriginValues CORSError = "PreflightMultipleAllowOriginValues" CORSErrorPreflightInvalidAllowOriginValue CORSError = "PreflightInvalidAllowOriginValue" CORSErrorPreflightAllowOriginMismatch CORSError = "PreflightAllowOriginMismatch" CORSErrorPreflightInvalidAllowCredentials CORSError = "PreflightInvalidAllowCredentials" CORSErrorPreflightMissingAllowExternal CORSError = "PreflightMissingAllowExternal" CORSErrorPreflightInvalidAllowExternal CORSError = "PreflightInvalidAllowExternal" CORSErrorInvalidAllowMethodsPreflightResponse CORSError = "InvalidAllowMethodsPreflightResponse" CORSErrorInvalidAllowHeadersPreflightResponse CORSError = "InvalidAllowHeadersPreflightResponse" CORSErrorMethodDisallowedByPreflightResponse CORSError = "MethodDisallowedByPreflightResponse" CORSErrorHeaderDisallowedByPreflightResponse CORSError = "HeaderDisallowedByPreflightResponse" CORSErrorRedirectContainsCredentials CORSError = "RedirectContainsCredentials" CORSErrorInsecurePrivateNetwork CORSError = "InsecurePrivateNetwork" )
CORSError as enums.
type CORSErrorStatus ¶ added in v0.31.0
type CORSErrorStatus struct { CORSError CORSError `json:"corsError"` // No description. FailedParameter string `json:"failedParameter"` // No description. }
CORSErrorStatus
type CachedResource ¶
type CachedResource struct { URL string `json:"url"` // Resource URL. This is the url of the original network request. Type ResourceType `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 CertificateTransparencyCompliance ¶ added in v0.17.4
type CertificateTransparencyCompliance string
CertificateTransparencyCompliance Whether the request complied with Certificate Transparency policy.
const ( CertificateTransparencyComplianceNotSet CertificateTransparencyCompliance = "" CertificateTransparencyComplianceUnknown CertificateTransparencyCompliance = "unknown" CertificateTransparencyComplianceNotCompliant CertificateTransparencyCompliance = "not-compliant" CertificateTransparencyComplianceCompliant CertificateTransparencyCompliance = "compliant" )
CertificateTransparencyCompliance as enums.
func (CertificateTransparencyCompliance) String ¶ added in v0.17.4
func (e CertificateTransparencyCompliance) String() string
func (CertificateTransparencyCompliance) Valid ¶ added in v0.17.4
func (e CertificateTransparencyCompliance) Valid() bool
type ClientSecurityState ¶ added in v0.31.0
type ClientSecurityState struct { InitiatorIsSecureContext bool `json:"initiatorIsSecureContext"` // No description. InitiatorIPAddressSpace IPAddressSpace `json:"initiatorIPAddressSpace"` // No description. PrivateNetworkRequestPolicy PrivateNetworkRequestPolicy `json:"privateNetworkRequestPolicy"` // No description. }
ClientSecurityState
Note: This type is experimental.
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 []byte `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. (Encoded as a base64 string when passed over JSON) 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 []byte) *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. (Encoded as a base64 string when passed over JSON)
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. // Priority Cookie Priority // // Note: This property is experimental. Priority CookiePriority `json:"priority"` // SameParty True if cookie is SameParty. // // Note: This property is experimental. SameParty bool `json:"sameParty"` // SourceScheme Cookie source scheme type. // // Note: This property is experimental. SourceScheme CookieSourceScheme `json:"sourceScheme"` // SourcePort Cookie source port. Valid values are {-1, [1, 65535]}, // -1 indicates an unspecified port. An unspecified port value allows // protocol clients to emulate legacy cookie scope for the port. This // is a temporary ability and it will be removed in the future. // // Note: This property is experimental. SourcePort int `json:"sourcePort"` }
Cookie Cookie object
type CookieBlockedReason ¶ added in v0.25.0
type CookieBlockedReason string
CookieBlockedReason Types of reasons why a cookie may not be sent with a request.
Note: This type is experimental.
const ( CookieBlockedReasonNotSet CookieBlockedReason = "" CookieBlockedReasonSecureOnly CookieBlockedReason = "SecureOnly" CookieBlockedReasonNotOnPath CookieBlockedReason = "NotOnPath" CookieBlockedReasonDomainMismatch CookieBlockedReason = "DomainMismatch" CookieBlockedReasonSameSiteStrict CookieBlockedReason = "SameSiteStrict" CookieBlockedReasonSameSiteLax CookieBlockedReason = "SameSiteLax" CookieBlockedReasonSameSiteUnspecifiedTreatedAsLax CookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax" CookieBlockedReasonSameSiteNoneInsecure CookieBlockedReason = "SameSiteNoneInsecure" CookieBlockedReasonUserPreferences CookieBlockedReason = "UserPreferences" CookieBlockedReasonUnknownError CookieBlockedReason = "UnknownError" CookieBlockedReasonSchemefulSameSiteStrict CookieBlockedReason = "SchemefulSameSiteStrict" CookieBlockedReasonSchemefulSameSiteLax CookieBlockedReason = "SchemefulSameSiteLax" CookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax CookieBlockedReason = "SchemefulSameSiteUnspecifiedTreatedAsLax" CookieBlockedReasonSamePartyFromCrossPartyContext CookieBlockedReason = "SamePartyFromCrossPartyContext" )
CookieBlockedReason as enums.
func (CookieBlockedReason) String ¶ added in v0.25.0
func (e CookieBlockedReason) String() string
func (CookieBlockedReason) Valid ¶ added in v0.25.0
func (e CookieBlockedReason) Valid() bool
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, path, source port, and source scheme 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 // Priority Cookie Priority. // // Note: This property is experimental. Priority CookiePriority `json:"priority,omitempty"` // SameParty True if cookie is SameParty. // // Note: This property is experimental. SameParty *bool `json:"sameParty,omitempty"` // SourceScheme Cookie source scheme type. // // Note: This property is experimental. SourceScheme CookieSourceScheme `json:"sourceScheme,omitempty"` // SourcePort Cookie source port. Valid values are {-1, [1, 65535]}, // -1 indicates an unspecified port. An unspecified port value allows // protocol clients to emulate legacy cookie scope for the port. This // is a temporary ability and it will be removed in the future. // // Note: This property is experimental. SourcePort *int `json:"sourcePort,omitempty"` }
CookieParam Cookie parameter object
type CookiePriority ¶ added in v0.26.0
type CookiePriority string
CookiePriority Represents the cookie's 'Priority' status: https://tools.ietf.org/html/draft-west-cookie-priority-00
Note: This type is experimental.
const ( CookiePriorityNotSet CookiePriority = "" CookiePriorityLow CookiePriority = "Low" CookiePriorityMedium CookiePriority = "Medium" CookiePriorityHigh CookiePriority = "High" )
CookiePriority as enums.
func (CookiePriority) String ¶ added in v0.26.0
func (e CookiePriority) String() string
func (CookiePriority) Valid ¶ added in v0.26.0
func (e CookiePriority) Valid() bool
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" CookieSameSiteNone CookieSameSite = "None" )
CookieSameSite as enums.
func (CookieSameSite) String ¶
func (e CookieSameSite) String() string
func (CookieSameSite) Valid ¶
func (e CookieSameSite) Valid() bool
type CookieSourceScheme ¶ added in v0.31.0
type CookieSourceScheme string
CookieSourceScheme Represents the source scheme of the origin that originally set the cookie. A value of "Unset" allows protocol clients to emulate legacy cookie scope for the scheme. This is a temporary ability and it will be removed in the future.
Note: This type is experimental.
const ( CookieSourceSchemeNotSet CookieSourceScheme = "" CookieSourceSchemeUnset CookieSourceScheme = "Unset" CookieSourceSchemeNonSecure CookieSourceScheme = "NonSecure" CookieSourceSchemeSecure CookieSourceScheme = "Secure" )
CookieSourceScheme as enums.
func (CookieSourceScheme) String ¶ added in v0.31.0
func (e CookieSourceScheme) String() string
func (CookieSourceScheme) Valid ¶ added in v0.31.0
func (e CookieSourceScheme) Valid() bool
type CrossOriginEmbedderPolicyStatus ¶ added in v0.31.0
type CrossOriginEmbedderPolicyStatus struct { Value CrossOriginEmbedderPolicyValue `json:"value"` // No description. ReportOnlyValue CrossOriginEmbedderPolicyValue `json:"reportOnlyValue"` // No description. ReportingEndpoint *string `json:"reportingEndpoint,omitempty"` // No description. ReportOnlyReportingEndpoint *string `json:"reportOnlyReportingEndpoint,omitempty"` // No description. }
CrossOriginEmbedderPolicyStatus
Note: This type is experimental.
type CrossOriginEmbedderPolicyValue ¶ added in v0.31.0
type CrossOriginEmbedderPolicyValue string
CrossOriginEmbedderPolicyValue
Note: This type is experimental.
const ( CrossOriginEmbedderPolicyValueNotSet CrossOriginEmbedderPolicyValue = "" CrossOriginEmbedderPolicyValueNone CrossOriginEmbedderPolicyValue = "None" CrossOriginEmbedderPolicyValueCORSOrCredentialless CrossOriginEmbedderPolicyValue = "CorsOrCredentialless" CrossOriginEmbedderPolicyValueRequireCorp CrossOriginEmbedderPolicyValue = "RequireCorp" )
CrossOriginEmbedderPolicyValue as enums.
func (CrossOriginEmbedderPolicyValue) String ¶ added in v0.31.0
func (e CrossOriginEmbedderPolicyValue) String() string
func (CrossOriginEmbedderPolicyValue) Valid ¶ added in v0.31.0
func (e CrossOriginEmbedderPolicyValue) Valid() bool
type CrossOriginOpenerPolicyStatus ¶ added in v0.31.0
type CrossOriginOpenerPolicyStatus struct { Value CrossOriginOpenerPolicyValue `json:"value"` // No description. ReportOnlyValue CrossOriginOpenerPolicyValue `json:"reportOnlyValue"` // No description. ReportingEndpoint *string `json:"reportingEndpoint,omitempty"` // No description. ReportOnlyReportingEndpoint *string `json:"reportOnlyReportingEndpoint,omitempty"` // No description. }
CrossOriginOpenerPolicyStatus
Note: This type is experimental.
type CrossOriginOpenerPolicyValue ¶ added in v0.31.0
type CrossOriginOpenerPolicyValue string
CrossOriginOpenerPolicyValue
Note: This type is experimental.
const ( CrossOriginOpenerPolicyValueNotSet CrossOriginOpenerPolicyValue = "" CrossOriginOpenerPolicyValueSameOrigin CrossOriginOpenerPolicyValue = "SameOrigin" CrossOriginOpenerPolicyValueSameOriginAllowPopups CrossOriginOpenerPolicyValue = "SameOriginAllowPopups" CrossOriginOpenerPolicyValueUnsafeNone CrossOriginOpenerPolicyValue = "UnsafeNone" CrossOriginOpenerPolicyValueSameOriginPlusCoep CrossOriginOpenerPolicyValue = "SameOriginPlusCoep" )
CrossOriginOpenerPolicyValue as enums.
func (CrossOriginOpenerPolicyValue) String ¶ added in v0.31.0
func (e CrossOriginOpenerPolicyValue) String() string
func (CrossOriginOpenerPolicyValue) Valid ¶ added in v0.31.0
func (e CrossOriginOpenerPolicyValue) 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" ErrorReasonBlockedByClient ErrorReason = "BlockedByClient" ErrorReasonBlockedByResponse ErrorReason = "BlockedByResponse" )
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. If not specified, it's assumed to be set to the list containing the URLs of the page and all of its subframes.
}
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. If not specified, it's assumed to be set to the list containing the URLs of the page and all of its subframes.
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 string `json:"postData"` // Request body string, omitting files from multipart requests
}
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 GetSecurityIsolationStatusArgs ¶ added in v0.31.0
type GetSecurityIsolationStatusArgs struct {
FrameID *internal.PageFrameID `json:"frameId,omitempty"` // If no frameId is provided, the status of the target is provided.
}
GetSecurityIsolationStatusArgs represents the arguments for GetSecurityIsolationStatus in the Network domain.
func NewGetSecurityIsolationStatusArgs ¶ added in v0.31.0
func NewGetSecurityIsolationStatusArgs() *GetSecurityIsolationStatusArgs
NewGetSecurityIsolationStatusArgs initializes GetSecurityIsolationStatusArgs with the required arguments.
func (*GetSecurityIsolationStatusArgs) SetFrameID ¶ added in v0.31.0
func (a *GetSecurityIsolationStatusArgs) SetFrameID(frameID internal.PageFrameID) *GetSecurityIsolationStatusArgs
SetFrameID sets the FrameID optional argument. If no frameId is provided, the status of the target is provided.
type GetSecurityIsolationStatusReply ¶ added in v0.31.0
type GetSecurityIsolationStatusReply struct {
Status SecurityIsolationStatus `json:"status"` // No description.
}
GetSecurityIsolationStatusReply represents the return values for GetSecurityIsolationStatus 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 IPAddressSpace ¶ added in v0.31.0
type IPAddressSpace string
IPAddressSpace
Note: This type is experimental.
const ( IPAddressSpaceNotSet IPAddressSpace = "" IPAddressSpaceLocal IPAddressSpace = "Local" IPAddressSpacePrivate IPAddressSpace = "Private" IPAddressSpacePublic IPAddressSpace = "Public" IPAddressSpaceUnknown IPAddressSpace = "Unknown" )
IPAddressSpace as enums.
func (IPAddressSpace) String ¶ added in v0.31.0
func (e IPAddressSpace) String() string
func (IPAddressSpace) Valid ¶ added in v0.31.0
func (e IPAddressSpace) Valid() bool
type Initiator ¶
type Initiator struct { // Type Type of this initiator. // // Values: "parser", "script", "preload", "SignedExchange", "preflight", "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) or for SignedExchange type. LineNumber *float64 `json:"lineNumber,omitempty"` // Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based). ColumnNumber *float64 `json:"columnNumber,omitempty"` // Initiator column number, set for Parser type or for Script type (when script is importing module) (0-based). RequestID *RequestID `json:"requestId,omitempty"` // Set if another request triggered this request (e.g. preflight). }
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 LoadNetworkResourceArgs ¶ added in v0.31.0
type LoadNetworkResourceArgs struct { FrameID internal.PageFrameID `json:"frameId"` // Frame id to get the resource for. URL string `json:"url"` // URL of the resource to get content for. Options LoadNetworkResourceOptions `json:"options"` // Options for the request. }
LoadNetworkResourceArgs represents the arguments for LoadNetworkResource in the Network domain.
func NewLoadNetworkResourceArgs ¶ added in v0.31.0
func NewLoadNetworkResourceArgs(frameID internal.PageFrameID, url string, options LoadNetworkResourceOptions) *LoadNetworkResourceArgs
NewLoadNetworkResourceArgs initializes LoadNetworkResourceArgs with the required arguments.
type LoadNetworkResourceOptions ¶ added in v0.31.0
type LoadNetworkResourceOptions struct { DisableCache bool `json:"disableCache"` // No description. IncludeCredentials bool `json:"includeCredentials"` // No description. }
LoadNetworkResourceOptions An options object that may be extended later to better support CORS, CORB and streaming.
Note: This type is experimental.
type LoadNetworkResourcePageResult ¶ added in v0.31.0
type LoadNetworkResourcePageResult struct { Success bool `json:"success"` // No description. NetError *float64 `json:"netError,omitempty"` // Optional values used for error reporting. NetErrorName *string `json:"netErrorName,omitempty"` // No description. HTTPStatusCode *float64 `json:"httpStatusCode,omitempty"` // No description. Stream *io.StreamHandle `json:"stream,omitempty"` // If successful, one of the following two fields holds the result. Headers Headers `json:"headers,omitempty"` // Response headers. }
LoadNetworkResourcePageResult An object providing the result of a network resource load.
Note: This type is experimental.
type LoadNetworkResourceReply ¶ added in v0.31.0
type LoadNetworkResourceReply struct {
Resource LoadNetworkResourcePageResult `json:"resource"` // No description.
}
LoadNetworkResourceReply represents the return values for LoadNetworkResource in the Network domain.
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 ResourceType `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. CORSErrorStatus *CORSErrorStatus `json:"corsErrorStatus,omitempty"` // The reason why loading was blocked by CORS, 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. ShouldReportCorbBlocking *bool `json:"shouldReportCorbBlocking,omitempty"` // Set when 1) response was blocked by Cross-Origin Read Blocking and also 2) this needs to be reported to the DevTools console. }
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) UnmarshalJSON ¶
func (t *MonotonicTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements json.Unmarshaler.
type PostDataEntry ¶ added in v0.31.0
type PostDataEntry struct {
Bytes *string `json:"bytes,omitempty"` // No description.
}
PostDataEntry Post data entry for HTTP request
type PrivateNetworkRequestPolicy ¶ added in v0.31.0
type PrivateNetworkRequestPolicy string
PrivateNetworkRequestPolicy
Note: This type is experimental.
const ( PrivateNetworkRequestPolicyNotSet PrivateNetworkRequestPolicy = "" PrivateNetworkRequestPolicyAllow PrivateNetworkRequestPolicy = "Allow" PrivateNetworkRequestPolicyBlockFromInsecureToMorePrivate PrivateNetworkRequestPolicy = "BlockFromInsecureToMorePrivate" PrivateNetworkRequestPolicyWarnFromInsecureToMorePrivate PrivateNetworkRequestPolicy = "WarnFromInsecureToMorePrivate" )
PrivateNetworkRequestPolicy as enums.
func (PrivateNetworkRequestPolicy) String ¶ added in v0.31.0
func (e PrivateNetworkRequestPolicy) String() string
func (PrivateNetworkRequestPolicy) Valid ¶ added in v0.31.0
func (e PrivateNetworkRequestPolicy) Valid() bool
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 (without fragment). URLFragment *string `json:"urlFragment,omitempty"` // Fragment of the requested URL starting with hash, if present. 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. // PostDataEntries Request body elements. This will be converted from // base64 to binary // // Note: This property is experimental. PostDataEntries []PostDataEntry `json:"postDataEntries,omitempty"` 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. // TrustTokenParams Set for requests when the TrustToken API is used. // Contains the parameters passed by the developer (e.g. via "fetch") // as understood by the backend. // // Note: This property is experimental. TrustTokenParams *TrustTokenParams `json:"trustTokenParams,omitempty"` }
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. Deprecated, use Fetch.requestPaused instead.
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 ResourceType `json:"resourceType"` // How the requested resource will be used. IsDownload *bool `json:"isDownload,omitempty"` // Set if the request is a navigation that will result in a download. Only present after response is received from the server (i.e. HeadersReceived stage). 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. RequestID *RequestID `json:"requestId,omitempty"` // If the intercepted request had a corresponding requestWillBeSent event fired for it, then this requestId will be the same as the requestId present in the requestWillBeSent event. }
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 ResourceType `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 RequestWillBeSentExtraInfoClient ¶ added in v0.25.0
type RequestWillBeSentExtraInfoClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*RequestWillBeSentExtraInfoReply, error) rpcc.Stream }
RequestWillBeSentExtraInfoClient is a client for RequestWillBeSentExtraInfo events. Fired when additional information about a requestWillBeSent event is available from the network stack. Not every requestWillBeSent event will have an additional requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent or requestWillBeSentExtraInfo will be fired first for the same request.
type RequestWillBeSentExtraInfoReply ¶ added in v0.25.0
type RequestWillBeSentExtraInfoReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to an existing requestWillBeSent event. AssociatedCookies []BlockedCookieWithReason `json:"associatedCookies"` // A list of cookies potentially associated to the requested URL. This includes both cookies sent with the request and the ones not sent; the latter are distinguished by having blockedReason field set. Headers Headers `json:"headers"` // Raw request headers as they will be sent over the wire. ClientSecurityState *ClientSecurityState `json:"clientSecurityState,omitempty"` // The client security state set for the request. }
RequestWillBeSentExtraInfoReply is the reply for RequestWillBeSentExtraInfo events.
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 ResourceType `json:"type,omitempty"` // Type of this resource. FrameID *internal.PageFrameID `json:"frameId,omitempty"` // Frame identifier. HasUserGesture *bool `json:"hasUserGesture,omitempty"` // Whether the request is initiated by a user gesture. Defaults to false. }
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"` // WorkerFetchStart Started fetch event. // // Note: This property is experimental. WorkerFetchStart float64 `json:"workerFetchStart"` // WorkerRespondWithSettled Settled fetch event respondWith promise. // // Note: This property is experimental. WorkerRespondWithSettled float64 `json:"workerRespondWithSettled"` 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 ResourceType ¶
type ResourceType string
ResourceType Resource type as it was perceived by the rendering engine.
const ( ResourceTypeNotSet ResourceType = "" ResourceTypeDocument ResourceType = "Document" ResourceTypeStylesheet ResourceType = "Stylesheet" ResourceTypeImage ResourceType = "Image" ResourceTypeMedia ResourceType = "Media" ResourceTypeFont ResourceType = "Font" ResourceTypeScript ResourceType = "Script" ResourceTypeTextTrack ResourceType = "TextTrack" ResourceTypeXHR ResourceType = "XHR" ResourceTypeFetch ResourceType = "Fetch" ResourceTypeEventSource ResourceType = "EventSource" ResourceTypeWebSocket ResourceType = "WebSocket" ResourceTypeManifest ResourceType = "Manifest" ResourceTypeSignedExchange ResourceType = "SignedExchange" ResourceTypePing ResourceType = "Ping" ResourceTypeCSPViolationReport ResourceType = "CSPViolationReport" ResourceTypePreflight ResourceType = "Preflight" ResourceTypeOther ResourceType = "Other" )
ResourceType as enums.
func (ResourceType) String ¶ added in v0.19.0
func (e ResourceType) String() string
func (ResourceType) Valid ¶ added in v0.19.0
func (e ResourceType) Valid() bool
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. FromPrefetchCache *bool `json:"fromPrefetchCache,omitempty"` // Specifies that the request was served from the prefetch cache. 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. ServiceWorkerResponseSource ServiceWorkerResponseSource `json:"serviceWorkerResponseSource,omitempty"` // Response source of response from ServiceWorker. ResponseTime TimeSinceEpoch `json:"responseTime,omitempty"` // The time at which the returned response was generated. CacheStorageCacheName *string `json:"cacheStorageCacheName,omitempty"` // Cache Storage Cache Name. 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 ResponseReceivedExtraInfoClient ¶ added in v0.25.0
type ResponseReceivedExtraInfoClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ResponseReceivedExtraInfoReply, error) rpcc.Stream }
ResponseReceivedExtraInfoClient is a client for ResponseReceivedExtraInfo events. Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.
type ResponseReceivedExtraInfoReply ¶ added in v0.25.0
type ResponseReceivedExtraInfoReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to another responseReceived event. BlockedCookies []BlockedSetCookieWithReason `json:"blockedCookies"` // A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie. Headers Headers `json:"headers"` // Raw response headers as they were received over the wire. ResourceIPAddressSpace IPAddressSpace `json:"resourceIPAddressSpace"` // The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in `requestWillBeSentExtraInfo`. HeadersText *string `json:"headersText,omitempty"` // Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC. }
ResponseReceivedExtraInfoReply is the reply for ResponseReceivedExtraInfo events.
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 ResourceType `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). CertificateTransparencyCompliance CertificateTransparencyCompliance `json:"certificateTransparencyCompliance"` // Whether the request complied with Certificate Transparency policy }
SecurityDetails Security details about a request.
type SecurityIsolationStatus ¶ added in v0.31.0
type SecurityIsolationStatus struct { Coop *CrossOriginOpenerPolicyStatus `json:"coop,omitempty"` // No description. Coep *CrossOriginEmbedderPolicyStatus `json:"coep,omitempty"` // No description. }
SecurityIsolationStatus
Note: This type is experimental.
type ServiceWorkerResponseSource ¶ added in v0.29.0
type ServiceWorkerResponseSource string
ServiceWorkerResponseSource Source of serviceworker response.
const ( ServiceWorkerResponseSourceNotSet ServiceWorkerResponseSource = "" ServiceWorkerResponseSourceCacheStorage ServiceWorkerResponseSource = "cache-storage" ServiceWorkerResponseSourceHTTPCache ServiceWorkerResponseSource = "http-cache" ServiceWorkerResponseSourceFallbackCode ServiceWorkerResponseSource = "fallback-code" ServiceWorkerResponseSourceNetwork ServiceWorkerResponseSource = "network" )
ServiceWorkerResponseSource as enums.
func (ServiceWorkerResponseSource) String ¶ added in v0.29.0
func (e ServiceWorkerResponseSource) String() string
func (ServiceWorkerResponseSource) Valid ¶ added in v0.29.0
func (e ServiceWorkerResponseSource) Valid() bool
type SetAttachDebugStackArgs ¶ added in v0.31.0
type SetAttachDebugStackArgs struct {
Enabled bool `json:"enabled"` // Whether to attach a page script stack for debugging purpose.
}
SetAttachDebugStackArgs represents the arguments for SetAttachDebugStack in the Network domain.
func NewSetAttachDebugStackArgs ¶ added in v0.31.0
func NewSetAttachDebugStackArgs(enabled bool) *SetAttachDebugStackArgs
NewSetAttachDebugStackArgs initializes SetAttachDebugStackArgs with the required arguments.
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, path, source port, and source scheme 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 // Priority Cookie Priority type. // // Note: This property is experimental. Priority CookiePriority `json:"priority,omitempty"` // SameParty True if cookie is SameParty. // // Note: This property is experimental. SameParty *bool `json:"sameParty,omitempty"` // SourceScheme Cookie source scheme type. // // Note: This property is experimental. SourceScheme CookieSourceScheme `json:"sourceScheme,omitempty"` // SourcePort Cookie source port. Valid values are {-1, [1, 65535]}, // -1 indicates an unspecified port. An unspecified port value allows // protocol clients to emulate legacy cookie scope for the port. This // is a temporary ability and it will be removed in the future. // // Note: This property is experimental. SourcePort *int `json:"sourcePort,omitempty"` }
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) SetPriority ¶ added in v0.26.0
func (a *SetCookieArgs) SetPriority(priority CookiePriority) *SetCookieArgs
SetPriority sets the Priority optional argument. Cookie Priority type.
Note: This property is experimental.
func (*SetCookieArgs) SetSameParty ¶ added in v0.31.0
func (a *SetCookieArgs) SetSameParty(sameParty bool) *SetCookieArgs
SetSameParty sets the SameParty optional argument. True if cookie is SameParty.
Note: This property is experimental.
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) SetSourcePort ¶ added in v0.31.0
func (a *SetCookieArgs) SetSourcePort(sourcePort int) *SetCookieArgs
SetSourcePort sets the SourcePort optional argument. Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
Note: This property is experimental.
func (*SetCookieArgs) SetSourceScheme ¶ added in v0.31.0
func (a *SetCookieArgs) SetSourceScheme(sourceScheme CookieSourceScheme) *SetCookieArgs
SetSourceScheme sets the SourceScheme optional argument. Cookie source scheme type.
Note: This property is experimental.
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, path, source port, and source scheme values of the created cookie.
type SetCookieBlockedReason ¶ added in v0.25.0
type SetCookieBlockedReason string
SetCookieBlockedReason Types of reasons why a cookie may not be stored from a response.
Note: This type is experimental.
const ( SetCookieBlockedReasonNotSet SetCookieBlockedReason = "" SetCookieBlockedReasonSecureOnly SetCookieBlockedReason = "SecureOnly" SetCookieBlockedReasonSameSiteStrict SetCookieBlockedReason = "SameSiteStrict" SetCookieBlockedReasonSameSiteLax SetCookieBlockedReason = "SameSiteLax" SetCookieBlockedReasonSameSiteUnspecifiedTreatedAsLax SetCookieBlockedReason = "SameSiteUnspecifiedTreatedAsLax" SetCookieBlockedReasonSameSiteNoneInsecure SetCookieBlockedReason = "SameSiteNoneInsecure" SetCookieBlockedReasonUserPreferences SetCookieBlockedReason = "UserPreferences" SetCookieBlockedReasonSyntaxError SetCookieBlockedReason = "SyntaxError" SetCookieBlockedReasonSchemeNotSupported SetCookieBlockedReason = "SchemeNotSupported" SetCookieBlockedReasonOverwriteSecure SetCookieBlockedReason = "OverwriteSecure" SetCookieBlockedReasonInvalidDomain SetCookieBlockedReason = "InvalidDomain" SetCookieBlockedReasonInvalidPrefix SetCookieBlockedReason = "InvalidPrefix" SetCookieBlockedReasonUnknownError SetCookieBlockedReason = "UnknownError" SetCookieBlockedReasonSchemefulSameSiteStrict SetCookieBlockedReason = "SchemefulSameSiteStrict" SetCookieBlockedReasonSchemefulSameSiteLax SetCookieBlockedReason = "SchemefulSameSiteLax" SetCookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax SetCookieBlockedReason = "SchemefulSameSiteUnspecifiedTreatedAsLax" SetCookieBlockedReasonSamePartyFromCrossPartyContext SetCookieBlockedReason = "SamePartyFromCrossPartyContext" SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes SetCookieBlockedReason = "SamePartyConflictsWithOtherAttributes" )
SetCookieBlockedReason as enums.
func (SetCookieBlockedReason) String ¶ added in v0.25.0
func (e SetCookieBlockedReason) String() string
func (SetCookieBlockedReason) Valid ¶ added in v0.25.0
func (e SetCookieBlockedReason) Valid() bool
type SetCookieReply ¶
type SetCookieReply struct { // Success is deprecated. // // Deprecated: Always set to true. If an error occurs, the response // indicates protocol error. Success bool `json:"success"` }
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 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 SignedExchangeError ¶ added in v0.18.3
type SignedExchangeError struct { Message string `json:"message"` // Error message. SignatureIndex *int `json:"signatureIndex,omitempty"` // The index of the signature which caused the error. ErrorField SignedExchangeErrorField `json:"errorField,omitempty"` // The field which caused the error. }
SignedExchangeError Information about a signed exchange response.
Note: This type is experimental.
type SignedExchangeErrorField ¶ added in v0.18.3
type SignedExchangeErrorField string
SignedExchangeErrorField Field type for a signed exchange related error.
Note: This type is experimental.
const ( SignedExchangeErrorFieldNotSet SignedExchangeErrorField = "" SignedExchangeErrorFieldSignatureSig SignedExchangeErrorField = "signatureSig" SignedExchangeErrorFieldSignatureIntegrity SignedExchangeErrorField = "signatureIntegrity" SignedExchangeErrorFieldSignatureCertURL SignedExchangeErrorField = "signatureCertUrl" SignedExchangeErrorFieldSignatureCertSha256 SignedExchangeErrorField = "signatureCertSha256" SignedExchangeErrorFieldSignatureValidityURL SignedExchangeErrorField = "signatureValidityUrl" SignedExchangeErrorFieldSignatureTimestamps SignedExchangeErrorField = "signatureTimestamps" )
SignedExchangeErrorField as enums.
func (SignedExchangeErrorField) String ¶ added in v0.18.3
func (e SignedExchangeErrorField) String() string
func (SignedExchangeErrorField) Valid ¶ added in v0.18.3
func (e SignedExchangeErrorField) Valid() bool
type SignedExchangeHeader ¶ added in v0.18.2
type SignedExchangeHeader struct { RequestURL string `json:"requestUrl"` // Signed exchange request URL. ResponseCode int `json:"responseCode"` // Signed exchange response code. ResponseHeaders Headers `json:"responseHeaders"` // Signed exchange response headers. Signatures []SignedExchangeSignature `json:"signatures"` // Signed exchange response signature. HeaderIntegrity string `json:"headerIntegrity"` // Signed exchange header integrity hash in the form of "sha256-<base64-hash-value>". }
SignedExchangeHeader Information about a signed exchange header. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation
Note: This type is experimental.
type SignedExchangeInfo ¶ added in v0.18.2
type SignedExchangeInfo struct { OuterResponse Response `json:"outerResponse"` // The outer response of signed HTTP exchange which was received from network. Header *SignedExchangeHeader `json:"header,omitempty"` // Information about the signed exchange header. SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the signed exchange header. Errors []SignedExchangeError `json:"errors,omitempty"` // Errors occurred while handling the signed exchagne. }
SignedExchangeInfo Information about a signed exchange response.
Note: This type is experimental.
type SignedExchangeReceivedClient ¶ added in v0.18.2
type SignedExchangeReceivedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*SignedExchangeReceivedReply, error) rpcc.Stream }
SignedExchangeReceivedClient is a client for SignedExchangeReceived events. Fired when a signed exchange was received over the network
type SignedExchangeReceivedReply ¶ added in v0.18.2
type SignedExchangeReceivedReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Info SignedExchangeInfo `json:"info"` // Information about the signed exchange response. }
SignedExchangeReceivedReply is the reply for SignedExchangeReceived events.
type SignedExchangeSignature ¶ added in v0.18.2
type SignedExchangeSignature struct { Label string `json:"label"` // Signed exchange signature label. Signature string `json:"signature"` // The hex string of signed exchange signature. Integrity string `json:"integrity"` // Signed exchange signature integrity. CertURL *string `json:"certUrl,omitempty"` // Signed exchange signature cert Url. CertSha256 *string `json:"certSha256,omitempty"` // The hex string of signed exchange signature cert sha256. ValidityURL string `json:"validityUrl"` // Signed exchange signature validity Url. Date int `json:"date"` // Signed exchange signature date. Expires int `json:"expires"` // Signed exchange signature expires. Certificates []string `json:"certificates,omitempty"` // The encoded certificates. }
SignedExchangeSignature Information about a signed exchange signature. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1
Note: This type is experimental.
type TakeResponseBodyForInterceptionAsStreamArgs ¶ added in v0.18.1
type TakeResponseBodyForInterceptionAsStreamArgs struct {
InterceptionID InterceptionID `json:"interceptionId"` // No description.
}
TakeResponseBodyForInterceptionAsStreamArgs represents the arguments for TakeResponseBodyForInterceptionAsStream in the Network domain.
func NewTakeResponseBodyForInterceptionAsStreamArgs ¶ added in v0.18.1
func NewTakeResponseBodyForInterceptionAsStreamArgs(interceptionID InterceptionID) *TakeResponseBodyForInterceptionAsStreamArgs
NewTakeResponseBodyForInterceptionAsStreamArgs initializes TakeResponseBodyForInterceptionAsStreamArgs with the required arguments.
type TakeResponseBodyForInterceptionAsStreamReply ¶ added in v0.18.1
type TakeResponseBodyForInterceptionAsStreamReply struct {
Stream io.StreamHandle `json:"stream"` // No description.
}
TakeResponseBodyForInterceptionAsStreamReply represents the return values for TakeResponseBodyForInterceptionAsStream in the Network domain.
type TimeSinceEpoch ¶
type TimeSinceEpoch = internal.NetworkTimeSinceEpoch
TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.
type TrustTokenOperationDoneClient ¶ added in v0.31.0
type TrustTokenOperationDoneClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*TrustTokenOperationDoneReply, error) rpcc.Stream }
TrustTokenOperationDoneClient is a client for TrustTokenOperationDone events. Fired exactly once for each Trust Token operation. Depending on the type of the operation and whether the operation succeeded or failed, the event is fired before the corresponding request was sent or after the response was received.
type TrustTokenOperationDoneReply ¶ added in v0.31.0
type TrustTokenOperationDoneReply struct { // Status Detailed success or error status of the operation. // 'AlreadyExists' also signifies a successful operation, as the result // of the operation already exists und thus, the operation was abort // preemptively (e.g. a cache hit). // // Values: "Ok", "InvalidArgument", "FailedPrecondition", "ResourceExhausted", "AlreadyExists", "Unavailable", "BadResponse", "InternalError", "UnknownError", "FulfilledLocally". Status string `json:"status"` Type TrustTokenOperationType `json:"type"` // No description. RequestID RequestID `json:"requestId"` // No description. TopLevelOrigin *string `json:"topLevelOrigin,omitempty"` // Top level origin. The context in which the operation was attempted. IssuerOrigin *string `json:"issuerOrigin,omitempty"` // Origin of the issuer in case of a "Issuance" or "Redemption" operation. IssuedTokenCount *int `json:"issuedTokenCount,omitempty"` // The number of obtained Trust Tokens on a successful "Issuance" operation. }
TrustTokenOperationDoneReply is the reply for TrustTokenOperationDone events.
type TrustTokenOperationType ¶ added in v0.31.0
type TrustTokenOperationType string
TrustTokenOperationType
Note: This type is experimental.
const ( TrustTokenOperationTypeNotSet TrustTokenOperationType = "" TrustTokenOperationTypeIssuance TrustTokenOperationType = "Issuance" TrustTokenOperationTypeRedemption TrustTokenOperationType = "Redemption" TrustTokenOperationTypeSigning TrustTokenOperationType = "Signing" )
TrustTokenOperationType as enums.
func (TrustTokenOperationType) String ¶ added in v0.31.0
func (e TrustTokenOperationType) String() string
func (TrustTokenOperationType) Valid ¶ added in v0.31.0
func (e TrustTokenOperationType) Valid() bool
type TrustTokenParams ¶ added in v0.31.0
type TrustTokenParams struct { Type TrustTokenOperationType `json:"type"` // No description. // RefreshPolicy Only set for "token-redemption" type and determine // whether to request a fresh SRR or use a still valid cached SRR. // // Values: "UseCached", "Refresh". RefreshPolicy string `json:"refreshPolicy"` Issuers []string `json:"issuers,omitempty"` // Origins of issuers from whom to request tokens or redemption records. }
TrustTokenParams Determines what type of Trust Token operation is executed and depending on the type, some additional parameters. The values are specified in third_party/blink/renderer/core/fetch/trust_token.idl.
Note: This type is experimental.
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 message opcode. Mask bool `json:"mask"` // WebSocket message mask. PayloadData string `json:"payloadData"` // WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data. }
WebSocketFrame WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.
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 message error occurs.
type WebSocketFrameErrorReply ¶
type WebSocketFrameErrorReply struct { RequestID RequestID `json:"requestId"` // Request identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. ErrorMessage string `json:"errorMessage"` // WebSocket 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 message 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 message 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.
type WebTransportClosedClient ¶ added in v0.31.0
type WebTransportClosedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebTransportClosedReply, error) rpcc.Stream }
WebTransportClosedClient is a client for WebTransportClosed events. Fired when WebTransport is disposed.
type WebTransportClosedReply ¶ added in v0.31.0
type WebTransportClosedReply struct { TransportID RequestID `json:"transportId"` // WebTransport identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. }
WebTransportClosedReply is the reply for WebTransportClosed events.
type WebTransportConnectionEstablishedClient ¶ added in v0.31.0
type WebTransportConnectionEstablishedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebTransportConnectionEstablishedReply, error) rpcc.Stream }
WebTransportConnectionEstablishedClient is a client for WebTransportConnectionEstablished events. Fired when WebTransport handshake is finished.
type WebTransportConnectionEstablishedReply ¶ added in v0.31.0
type WebTransportConnectionEstablishedReply struct { TransportID RequestID `json:"transportId"` // WebTransport identifier. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. }
WebTransportConnectionEstablishedReply is the reply for WebTransportConnectionEstablished events.
type WebTransportCreatedClient ¶ added in v0.31.0
type WebTransportCreatedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*WebTransportCreatedReply, error) rpcc.Stream }
WebTransportCreatedClient is a client for WebTransportCreated events. Fired upon WebTransport creation.
type WebTransportCreatedReply ¶ added in v0.31.0
type WebTransportCreatedReply struct { TransportID RequestID `json:"transportId"` // WebTransport identifier. URL string `json:"url"` // WebTransport request URL. Timestamp MonotonicTime `json:"timestamp"` // Timestamp. Initiator *Initiator `json:"initiator,omitempty"` // Request initiator. }
WebTransportCreatedReply is the reply for WebTransportCreated events.