Source File
types.go
Belonging Package
github.com/chromedp/cdproto/headlessexperimental
package headlessexperimental// Code generated by cdproto-gen. DO NOT EDIT.import ()// ScreenshotParams encoding options for a screenshot.//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#type-ScreenshotParamstype ScreenshotParams struct {Format ScreenshotParamsFormat `json:"format,omitempty"` // Image compression format (defaults to png).Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg and webp only).OptimizeForSpeed bool `json:"optimizeForSpeed,omitempty"` // Optimize image encoding for speed, not for resulting size (defaults to false)}// ScreenshotParamsFormat image compression format (defaults to png).//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#type-ScreenshotParamstype ScreenshotParamsFormat string// String returns the ScreenshotParamsFormat as string value.func ( ScreenshotParamsFormat) () string {return string()}// ScreenshotParamsFormat values.const (ScreenshotParamsFormatJpeg ScreenshotParamsFormat = "jpeg"ScreenshotParamsFormatPng ScreenshotParamsFormat = "png"ScreenshotParamsFormatWebp ScreenshotParamsFormat = "webp")// MarshalEasyJSON satisfies easyjson.Marshaler.func ( ScreenshotParamsFormat) ( *jwriter.Writer) {.String(string())}// MarshalJSON satisfies json.Marshaler.func ( ScreenshotParamsFormat) () ([]byte, error) {return easyjson.Marshal()}// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.func ( *ScreenshotParamsFormat) ( *jlexer.Lexer) {:= .String()switch ScreenshotParamsFormat() {case ScreenshotParamsFormatJpeg:* = ScreenshotParamsFormatJpegcase ScreenshotParamsFormatPng:* = ScreenshotParamsFormatPngcase ScreenshotParamsFormatWebp:* = ScreenshotParamsFormatWebpdefault:.AddError(fmt.Errorf("unknown ScreenshotParamsFormat value: %v", ))}}// UnmarshalJSON satisfies json.Unmarshaler.func ( *ScreenshotParamsFormat) ( []byte) error {return easyjson.Unmarshal(, )}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |