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 DisableParams
- type EnableParams
- type EventIssueAdded
- 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(ctx context.Context) (body []byte, 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
- type Issue
Constants ¶
const ( CommandGetEncodedResponse = "Audits.getEncodedResponse" CommandDisable = "Audits.disable" CommandEnable = "Audits.enable" )
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisableParams ¶
type DisableParams struct{}
DisableParams disables issues domain, prevents further issues from being reported to the client.
func Disable ¶
func Disable() *DisableParams
Disable disables issues domain, prevents further issues from being reported to the client.
See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-disable
func (*DisableParams) Do ¶
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes Audits.disable against the provided context.
func (DisableParams) MarshalEasyJSON ¶
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DisableParams) MarshalJSON ¶
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DisableParams) UnmarshalEasyJSON ¶
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DisableParams) UnmarshalJSON ¶
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams ¶
type EnableParams struct{}
EnableParams enables issues domain, sends the issues collected so far to the client by means of the issueAdded event.
func Enable ¶
func Enable() *EnableParams
Enable enables issues domain, sends the issues collected so far to the client by means of the issueAdded event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-enable
func (*EnableParams) Do ¶
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Audits.enable against the provided context.
func (EnableParams) MarshalEasyJSON ¶
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EnableParams) MarshalJSON ¶
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EnableParams) UnmarshalEasyJSON ¶
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EnableParams) UnmarshalJSON ¶
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventIssueAdded ¶
type EventIssueAdded struct {
Issue *Issue `json:"issue"`
}
EventIssueAdded [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#event-issueAdded
func (EventIssueAdded) MarshalEasyJSON ¶
func (v EventIssueAdded) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventIssueAdded) MarshalJSON ¶
func (v EventIssueAdded) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventIssueAdded) UnmarshalEasyJSON ¶
func (v *EventIssueAdded) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventIssueAdded) UnmarshalJSON ¶
func (v *EventIssueAdded) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type GetEncodedResponseEncoding ¶
type GetEncodedResponseEncoding string
GetEncodedResponseEncoding the encoding to use.
See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-getEncodedResponse
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.
See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-getEncodedResponse
parameters:
requestID - Identifier of the network request to get content for. encoding - The encoding to use.
func (*GetEncodedResponseParams) Do ¶
func (p *GetEncodedResponseParams) Do(ctx context.Context) (body []byte, 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
type Issue ¶
type Issue struct {
Code string `json:"code"`
}
Issue [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#type-Issue
func (Issue) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Issue) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Issue) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Issue) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface