audits

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: BSD-2-Clause Imports: 3 Imported by: 6

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

View Source
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) String

func (enum EncodingEnum) String() string

String implements Stringer

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳