io

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandIOClose       = "IO.close"
	CommandIORead        = "IO.read"
	CommandIOResolveBlob = "IO.resolveBlob"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CloseArgs

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

CloseArgs represents the arguments for Close in the IO domain.

func (*CloseArgs) MarshalJSON

func (a *CloseArgs) MarshalJSON() ([]byte, error)

Marshall the byte array into a return value for Close in the IO domain.

func (*CloseArgs) UnmarshalJSON

func (a *CloseArgs) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for Close in the IO domain.

type CloseReply

type CloseReply struct {
}

CloseReply represents the return values for Close in the IO domain.

func (*CloseReply) GetFrameID

func (a *CloseReply) GetFrameID() string

CloseReply returns the FrameID value for Close in the IO domain.

func (*CloseReply) MatchFrameID

func (a *CloseReply) MatchFrameID(frameID string, m []byte) (bool, error)

CloseReply returns whether or not the FrameID matches the reply value for Close in the IO domain.

func (*CloseReply) UnmarshalJSON

func (a *CloseReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for Close in the IO domain.

type ReadArgs

type ReadArgs struct {
	Handle StreamHandle `json:"handle"`           // Handle of the stream to read.
	Offset int          `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   int          `json:"size,omitempty"`   // Maximum number of bytes to read (left upon the agent discretion if not specified).
}

ReadArgs represents the arguments for Read in the IO domain.

func (*ReadArgs) MarshalJSON

func (a *ReadArgs) MarshalJSON() ([]byte, error)

Marshall the byte array into a return value for Read in the IO domain.

func (*ReadArgs) UnmarshalJSON

func (a *ReadArgs) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for Read in the IO domain.

type ReadReply

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

ReadReply represents the return values for Read in the IO domain.

func (*ReadReply) GetFrameID

func (a *ReadReply) GetFrameID() string

ReadReply returns the FrameID value for Read in the IO domain.

func (*ReadReply) MatchFrameID

func (a *ReadReply) MatchFrameID(frameID string, m []byte) (bool, error)

ReadReply returns whether or not the FrameID matches the reply value for Read in the IO domain.

func (*ReadReply) UnmarshalJSON

func (a *ReadReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for Read in the IO domain.

type ResolveBlobArgs

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

ResolveBlobArgs represents the arguments for ResolveBlob in the IO domain.

func (*ResolveBlobArgs) MarshalJSON

func (a *ResolveBlobArgs) MarshalJSON() ([]byte, error)

Marshall the byte array into a return value for ResolveBlob in the IO domain.

func (*ResolveBlobArgs) UnmarshalJSON

func (a *ResolveBlobArgs) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for ResolveBlob in the IO domain.

type ResolveBlobReply

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

ResolveBlobReply represents the return values for ResolveBlob in the IO domain.

func (*ResolveBlobReply) GetFrameID

func (a *ResolveBlobReply) GetFrameID() string

ResolveBlobReply returns the FrameID value for ResolveBlob in the IO domain.

func (*ResolveBlobReply) MatchFrameID

func (a *ResolveBlobReply) MatchFrameID(frameID string, m []byte) (bool, error)

ResolveBlobReply returns whether or not the FrameID matches the reply value for ResolveBlob in the IO domain.

func (*ResolveBlobReply) UnmarshalJSON

func (a *ResolveBlobReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for ResolveBlob in the IO domain.

type StreamHandle

type StreamHandle string

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

Jump to

Keyboard shortcuts

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