import "github.com/chromedp/cdproto/io"
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.
const ( CommandClose = "IO.close" CommandRead = "IO.read" CommandResolveBlob = "IO.resolveBlob" )
Command names.
type CloseParams struct { Handle StreamHandle `json:"handle"` // Handle of the stream to close. }
CloseParams close the stream, discard any temporary backing storage.
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 (p *CloseParams) Do(ctx context.Context) (err error)
Do executes IO.close against the provided context.
func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v CloseParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CloseParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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(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.
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 (v ReadParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ReadParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ReadParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ReadParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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 (p ReadParams) WithSize(size int64) *ReadParams
WithSize maximum number of bytes to read (left upon the agent discretion if not specified).
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 (v ReadReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ReadReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ReadReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ReadReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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(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.
Do executes IO.resolveBlob against the provided context.
returns:
uuid - UUID of the specified Blob.
func (v ResolveBlobParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ResolveBlobParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ResolveBlobParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ResolveBlobParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ResolveBlobReturns struct { UUID string `json:"uuid,omitempty"` // UUID of the specified Blob. }
ResolveBlobReturns return values.
func (v ResolveBlobReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (v ResolveBlobReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (v *ResolveBlobReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *ResolveBlobReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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 (t StreamHandle) String() string
String returns the StreamHandle as string value.
Package io imports 7 packages (graph) and is imported by 9 packages. Updated 2021-01-07. Refresh now. Tools for package owners.