Documentation
¶
Overview ¶
Package audits provides type definitions for use with the Chrome Audits protocol
https://chromedevtools.github.io/devtools-protocol/tot/Audits/
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Encoding = encodingEnum{
Webp: encodingWebp,
Jpeg: encodingJpeg,
Png: encodingPng,
}
Encoding provides named acces to the EncodingEnum values.
Functions ¶
This section is empty.
Types ¶
type EncodingEnum ¶
type EncodingEnum int
EncodingEnum represents the encoding to use. Allowed values:
- Encoding.Webp "webp"
- Encoding.Jpeg "jpeg"
- Encoding.Png "png"
https://chromedevtools.github.io/devtools-protocol/tot/Audits/#method-getEncodedResponse
func (EncodingEnum) MarshalJSON ¶
func (enum EncodingEnum) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*EncodingEnum) UnmarshalJSON ¶
func (enum *EncodingEnum) UnmarshalJSON(bytes []byte) error
UnmarshalJSON implements json.Unmarshaler
type GetEncodedResponseParams ¶
type GetEncodedResponseParams struct { // Identifier of the network request to get content for. RequestID network.RequestID `json:"requestId"` // The encoding to use. Allowed values: // - Encoding.Webp // - Encoding.Jpeg // - Encoding.Png Encoding EncodingEnum `json:"encoding"` // Optional. The quality of the encoding (0-1). (defaults to 1). Quality float64 `json:"quality,omitempty"` // Optional Whether to only return the size information (defaults to false). SizeOnly bool `json:"sizeOnly,omitempty"` }
GetEncodedResponseParams represents Audits.getEncodedResponse parameters
https://chromedevtools.github.io/devtools-protocol/tot/Audits/#method-getEncodedResponse
type GetEncodedResponseResult ¶
type GetEncodedResponseResult struct { // Optional. The encoded body as a base64 string. Omitted if sizeOnly is // true. Body string `json:"body,omitempty"` // Size before re-encoding. OriginalSize int64 `json:"originalSize"` // Size after re-encoding. EncodedSize int64 `json:"encodedSize"` // Error information related to executing this method Err error `json:"-"` }
GetEncodedResponseResult represents the result of calls to Audits.getEncodedResponse.
https://chromedevtools.github.io/devtools-protocol/tot/Audits/#method-getEncodedResponse