audits

package
v0.0.0-...-b47709e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package audits provides the Chrome Debugging Protocol commands, types, and events for the Audits domain.

Audits domain allows investigation of page violations and possible improvements.

Generated by the chromedp-gen command.

Index

Constants

This section is empty.

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

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.Handler) (body string, originalSize int64, encodedSize int64, err error)

Do executes Audits.getEncodedResponse against the provided context and target handler.

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL