io

package
v0.157.4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 5 Imported by: 23

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 pdlgen command.

Index

Constants

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

Command names.

Variables

Close close the stream, discard any temporary backing storage.

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

Read read a chunk of the stream.

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

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

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

Functions

This section is empty.

Types

type CloseParams

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

CloseParams are the parameters of the command IO.close.

type ReadParams

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

ReadParams are the parameters of the command IO.read.

type ReadResult added in v0.157.3

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

ReadResult is the result of the command IO.read.

func (*ReadResult) UnmarshalJSON added in v0.157.3

func (r *ReadResult) UnmarshalJSON(buf []byte) error

UnmarshalJSON decodes the value. The browser sends data as text, or as base64 when r.Base64encoded, and Data holds the decoded bytes.

type ResolveBlobParams

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

ResolveBlobParams are the parameters of the command IO.resolveBlob.

type ResolveBlobResult added in v0.157.3

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

ResolveBlobResult is the result of the command IO.resolveBlob.

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