deviceaccess

package
v0.0.0-...-ab91719 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package deviceaccess provides the Chrome DevTools Protocol commands, types, and events for the DeviceAccess domain.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandEnable       = "DeviceAccess.enable"
	CommandDisable      = "DeviceAccess.disable"
	CommandSelectPrompt = "DeviceAccess.selectPrompt"
	CommandCancelPrompt = "DeviceAccess.cancelPrompt"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelPromptParams

type CancelPromptParams struct {
	ID RequestID `json:"id"`
}

CancelPromptParams cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.

func CancelPrompt

func CancelPrompt(id RequestID) *CancelPromptParams

CancelPrompt cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.

See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#method-cancelPrompt

parameters:

id

func (*CancelPromptParams) Do

func (p *CancelPromptParams) Do(ctx context.Context) (err error)

Do executes DeviceAccess.cancelPrompt against the provided context.

func (CancelPromptParams) MarshalEasyJSON

func (v CancelPromptParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CancelPromptParams) MarshalJSON

func (v CancelPromptParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CancelPromptParams) UnmarshalEasyJSON

func (v *CancelPromptParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CancelPromptParams) UnmarshalJSON

func (v *CancelPromptParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DeviceID

type DeviceID string

DeviceID a device id.

See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#type-DeviceId

func (DeviceID) String

func (t DeviceID) String() string

String returns the DeviceID as string value.

type DisableParams

type DisableParams struct{}

DisableParams disable events in this domain.

func Disable

func Disable() *DisableParams

Disable disable events in this domain.

See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#method-disable

func (*DisableParams) Do

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes DeviceAccess.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 enable events in this domain.

func (*EnableParams) Do

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes DeviceAccess.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 EventDeviceRequestPrompted

type EventDeviceRequestPrompted struct {
	ID      RequestID       `json:"id"`
	Devices []*PromptDevice `json:"devices"`
}

EventDeviceRequestPrompted a device request opened a user prompt to select a device. Respond with the selectPrompt or cancelPrompt command.

See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#event-deviceRequestPrompted

func (EventDeviceRequestPrompted) MarshalEasyJSON

func (v EventDeviceRequestPrompted) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventDeviceRequestPrompted) MarshalJSON

func (v EventDeviceRequestPrompted) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventDeviceRequestPrompted) UnmarshalEasyJSON

func (v *EventDeviceRequestPrompted) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventDeviceRequestPrompted) UnmarshalJSON

func (v *EventDeviceRequestPrompted) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type PromptDevice

type PromptDevice struct {
	ID   DeviceID `json:"id"`
	Name string   `json:"name"` // Display name as it appears in a device request user prompt.
}

PromptDevice device information displayed in a user prompt to select a device.

See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#type-PromptDevice

func (PromptDevice) MarshalEasyJSON

func (v PromptDevice) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (PromptDevice) MarshalJSON

func (v PromptDevice) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*PromptDevice) UnmarshalEasyJSON

func (v *PromptDevice) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PromptDevice) UnmarshalJSON

func (v *PromptDevice) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RequestID

type RequestID string

RequestID device request id.

See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#type-RequestId

func (RequestID) String

func (t RequestID) String() string

String returns the RequestID as string value.

type SelectPromptParams

type SelectPromptParams struct {
	ID       RequestID `json:"id"`
	DeviceID DeviceID  `json:"deviceId"`
}

SelectPromptParams select a device in response to a DeviceAccess.deviceRequestPrompted event.

func SelectPrompt

func SelectPrompt(id RequestID, deviceID DeviceID) *SelectPromptParams

SelectPrompt select a device in response to a DeviceAccess.deviceRequestPrompted event.

See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceAccess#method-selectPrompt

parameters:

id
deviceID

func (*SelectPromptParams) Do

func (p *SelectPromptParams) Do(ctx context.Context) (err error)

Do executes DeviceAccess.selectPrompt against the provided context.

func (SelectPromptParams) MarshalEasyJSON

func (v SelectPromptParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (SelectPromptParams) MarshalJSON

func (v SelectPromptParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*SelectPromptParams) UnmarshalEasyJSON

func (v *SelectPromptParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SelectPromptParams) UnmarshalJSON

func (v *SelectPromptParams) 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