io

package
v0.0.0-...-9e9a0cf Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

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

Input/Output operations for streams produced by DevTools.

Generated by the chromedp-gen command.

Index

Constants

This section is empty.

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.

parameters:

handle - Handle of the stream to close.

func (*CloseParams) Do

func (p *CloseParams) Do(ctxt context.Context, h cdp.Handler) (err error)

Do executes IO.close against the provided context and target handler.

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).
	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.

parameters:

handle - Handle of the stream to read.

func (*ReadParams) Do

func (p *ReadParams) Do(ctxt context.Context, h cdp.Handler) (data string, eof bool, err error)

Do executes IO.read against the provided context and target handler.

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).

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 {
	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 StreamHandle

type StreamHandle string

StreamHandle [no description].

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