io

package
v0.0.0-...-8ed5860 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package io provides the Chrome DevTools Protocol commands, types, and events for the IO domain.

Input/Output operations for streams produced by DevTools.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandClose       = "IO.close"
	CommandRead        = "IO.read"
	CommandResolveBlob = "IO.resolveBlob"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseParams

type CloseParams struct {
	Handle StreamHandle `json:"handle"` // Handle of the stream to close.
}

CloseParams close the stream, discard any temporary backing storage.

func Close

func Close(handle StreamHandle) *CloseParams

Close close the stream, discard any temporary backing storage.

See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-close

parameters:

handle - Handle of the stream to close.

func (*CloseParams) Do

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

Do executes IO.close against the provided context.

func (CloseParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (CloseParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*CloseParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CloseParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ReadParams

type ReadParams struct {
	Handle StreamHandle `json:"handle"`           // Handle of the stream to read.
	Offset int64        `json:"offset,omitempty"` // Seek to the specified offset before reading (if not specificed, proceed with offset following the last read). Some types of streams may only support sequential reads.
	Size   int64        `json:"size,omitempty"`   // Maximum number of bytes to read (left upon the agent discretion if not specified).
}

ReadParams read a chunk of the stream.

func Read

func Read(handle StreamHandle) *ReadParams

Read read a chunk of the stream.

See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-read

parameters:

handle - Handle of the stream to read.

func (*ReadParams) Do

func (p *ReadParams) Do(ctx context.Context) (data string, eof bool, err error)

Do executes IO.read against the provided context.

returns:

data - Data that were read.
eof - Set if the end-of-file condition occurred while reading.

func (ReadParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ReadParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ReadParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ReadParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

func (ReadParams) WithOffset

func (p ReadParams) WithOffset(offset int64) *ReadParams

WithOffset seek to the specified offset before reading (if not specificed, proceed with offset following the last read). Some types of streams may only support sequential reads.

func (ReadParams) WithSize

func (p ReadParams) WithSize(size int64) *ReadParams

WithSize maximum number of bytes to read (left upon the agent discretion if not specified).

type ReadReturns

type ReadReturns struct {
	Base64encoded bool   `json:"base64Encoded,omitempty"` // Set if the data is base64-encoded
	Data          string `json:"data,omitempty"`          // Data that were read.
	EOF           bool   `json:"eof,omitempty"`           // Set if the end-of-file condition occurred while reading.
}

ReadReturns return values.

func (ReadReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ReadReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ReadReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ReadReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ResolveBlobParams

type ResolveBlobParams struct {
	ObjectID runtime.RemoteObjectID `json:"objectId"` // Object id of a Blob object wrapper.
}

ResolveBlobParams return UUID of Blob object specified by a remote object id.

func ResolveBlob

func ResolveBlob(objectID runtime.RemoteObjectID) *ResolveBlobParams

ResolveBlob return UUID of Blob object specified by a remote object id.

See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-resolveBlob

parameters:

objectID - Object id of a Blob object wrapper.

func (*ResolveBlobParams) Do

func (p *ResolveBlobParams) Do(ctx context.Context) (uuid string, err error)

Do executes IO.resolveBlob against the provided context.

returns:

uuid - UUID of the specified Blob.

func (ResolveBlobParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ResolveBlobParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ResolveBlobParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ResolveBlobParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ResolveBlobReturns

type ResolveBlobReturns struct {
	UUID string `json:"uuid,omitempty"` // UUID of the specified Blob.
}

ResolveBlobReturns return values.

func (ResolveBlobReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ResolveBlobReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ResolveBlobReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ResolveBlobReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StreamHandle

type StreamHandle string

StreamHandle this is either obtained from another method or specified as blob:<uuid> where <uuid> is an UUID of a Blob.

See: https://chromedevtools.github.io/devtools-protocol/tot/IO#type-StreamHandle

func (StreamHandle) String

func (t StreamHandle) String() string

String returns the StreamHandle as string value.

Jump to

Keyboard shortcuts

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