Documentation ¶
Overview ¶
Package audits provides the Chrome DevTools Protocol commands, types, and events for the Audits domain.
Audits domain allows investigation of page violations and possible improvements.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type GetEncodedResponseEncoding
- func (t GetEncodedResponseEncoding) MarshalEasyJSON(out *jwriter.Writer)
- func (t GetEncodedResponseEncoding) MarshalJSON() ([]byte, error)
- func (t GetEncodedResponseEncoding) String() string
- func (t *GetEncodedResponseEncoding) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (t *GetEncodedResponseEncoding) UnmarshalJSON(buf []byte) error
- type GetEncodedResponseParams
- func (p *GetEncodedResponseParams) Do(ctxt context.Context, h cdp.Executor) (body string, originalSize int64, encodedSize int64, err error)
- func (v GetEncodedResponseParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetEncodedResponseParams) MarshalJSON() ([]byte, error)
- func (v *GetEncodedResponseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetEncodedResponseParams) UnmarshalJSON(data []byte) error
- func (p GetEncodedResponseParams) WithQuality(quality float64) *GetEncodedResponseParams
- func (p GetEncodedResponseParams) WithSizeOnly(sizeOnly bool) *GetEncodedResponseParams
- type GetEncodedResponseReturns
Constants ¶
const (
CommandGetEncodedResponse = "Audits.getEncodedResponse"
)
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetEncodedResponseEncoding ¶
type GetEncodedResponseEncoding string
GetEncodedResponseEncoding the encoding to use.
const ( GetEncodedResponseEncodingWebp GetEncodedResponseEncoding = "webp" GetEncodedResponseEncodingJpeg GetEncodedResponseEncoding = "jpeg" GetEncodedResponseEncodingPng GetEncodedResponseEncoding = "png" )
GetEncodedResponseEncoding values.
func (GetEncodedResponseEncoding) MarshalEasyJSON ¶
func (t GetEncodedResponseEncoding) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (GetEncodedResponseEncoding) MarshalJSON ¶
func (t GetEncodedResponseEncoding) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (GetEncodedResponseEncoding) String ¶
func (t GetEncodedResponseEncoding) String() string
String returns the GetEncodedResponseEncoding as string value.
func (*GetEncodedResponseEncoding) UnmarshalEasyJSON ¶
func (t *GetEncodedResponseEncoding) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*GetEncodedResponseEncoding) UnmarshalJSON ¶
func (t *GetEncodedResponseEncoding) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type GetEncodedResponseParams ¶
type GetEncodedResponseParams struct { RequestID network.RequestID `json:"requestId"` // Identifier of the network request to get content for. Encoding GetEncodedResponseEncoding `json:"encoding"` // The encoding to use. Quality float64 `json:"quality,omitempty"` // The quality of the encoding (0-1). (defaults to 1) SizeOnly bool `json:"sizeOnly,omitempty"` // Whether to only return the size information (defaults to false). }
GetEncodedResponseParams returns the response body and size if it were re-encoded with the specified settings. Only applies to images.
func GetEncodedResponse ¶
func GetEncodedResponse(requestID network.RequestID, encoding GetEncodedResponseEncoding) *GetEncodedResponseParams
GetEncodedResponse returns the response body and size if it were re-encoded with the specified settings. Only applies to images.
parameters:
requestID - Identifier of the network request to get content for. encoding - The encoding to use.
func (*GetEncodedResponseParams) Do ¶
func (p *GetEncodedResponseParams) Do(ctxt context.Context, h cdp.Executor) (body string, originalSize int64, encodedSize int64, err error)
Do executes Audits.getEncodedResponse against the provided context.
returns:
body - The encoded body as a base64 string. Omitted if sizeOnly is true. originalSize - Size before re-encoding. encodedSize - Size after re-encoding.
func (GetEncodedResponseParams) MarshalEasyJSON ¶
func (v GetEncodedResponseParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetEncodedResponseParams) MarshalJSON ¶
func (v GetEncodedResponseParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetEncodedResponseParams) UnmarshalEasyJSON ¶
func (v *GetEncodedResponseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetEncodedResponseParams) UnmarshalJSON ¶
func (v *GetEncodedResponseParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (GetEncodedResponseParams) WithQuality ¶
func (p GetEncodedResponseParams) WithQuality(quality float64) *GetEncodedResponseParams
WithQuality the quality of the encoding (0-1). (defaults to 1).
func (GetEncodedResponseParams) WithSizeOnly ¶
func (p GetEncodedResponseParams) WithSizeOnly(sizeOnly bool) *GetEncodedResponseParams
WithSizeOnly whether to only return the size information (defaults to false).
type GetEncodedResponseReturns ¶
type GetEncodedResponseReturns struct { Body string `json:"body,omitempty"` // The encoded body as a base64 string. Omitted if sizeOnly is true. OriginalSize int64 `json:"originalSize,omitempty"` // Size before re-encoding. EncodedSize int64 `json:"encodedSize,omitempty"` // Size after re-encoding. }
GetEncodedResponseReturns return values.
func (GetEncodedResponseReturns) MarshalEasyJSON ¶
func (v GetEncodedResponseReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetEncodedResponseReturns) MarshalJSON ¶
func (v GetEncodedResponseReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetEncodedResponseReturns) UnmarshalEasyJSON ¶
func (v *GetEncodedResponseReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetEncodedResponseReturns) UnmarshalJSON ¶
func (v *GetEncodedResponseReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface