buffer

package
v0.0.0-...-2d911fe Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTypesMismatch    = errors.New("provided buffers types are different")
	ErrDataSizeMismatch = errors.New("provided data size is different than buffer size")
)

Functions

This section is empty.

Types

type Const

type Const struct {
	// contains filtered or unexported fields
}

func NewConst

func NewConst(_type Type) *Const

func (*Const) Copy

func (b *Const) Copy(other *Const) (int, error)

func (*Const) IsNil

func (b *Const) IsNil() bool

func (*Const) MarshalJSONArray

func (b *Const) MarshalJSONArray(enc *gojay.Encoder)

func (*Const) Read

func (b *Const) Read(data []byte) (int, error)

func (*Const) Type

func (b *Const) Type() Type

func (*Const) UnmarshalJSONArray

func (b *Const) UnmarshalJSONArray(dec *gojay.Decoder) error

func (*Const) Write

func (b *Const) Write(data []byte) (int, error)

type Sync

type Sync struct {
	Const
	// contains filtered or unexported fields
}

func NewSync

func NewSync(_type Type) *Sync

func (*Sync) Copy

func (b *Sync) Copy(other *Sync) (int, error)

func (*Sync) Read

func (b *Sync) Read(data []byte) (int, error)

func (*Sync) Write

func (b *Sync) Write(data []byte) (int, error)

type Type

type Type int
const (
	Bool    Type = 1
	Int8    Type = 1
	Int16   Type = 2
	Int32   Type = 4
	Int64   Type = 8
	Uint8   Type = Int8
	Uint16  Type = Int16
	Uint32  Type = Int32
	Uint64  Type = Int64
	Float32 Type = 4
	Float64 Type = 8
	Byte    Type = Int8
)

type TypedReadWriter

type TypedReadWriter interface {
	io.ReadWriter
	Type() Type
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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