types

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BinaryType uint8 = iota + 1
	StringType
	MaxPayloadSize uint32 = 10 << 20 // 10MB
)

Variables

View Source
var ErrMaxPayloadSize = fmt.Errorf("MaxPayloadSize exceeded")

Functions

This section is empty.

Types

type Binary

type Binary []byte

func (Binary) Bytes

func (b Binary) Bytes() []byte

func (*Binary) ReadFrom

func (b *Binary) ReadFrom(r io.Reader) (int64, error)

func (Binary) String

func (b Binary) String() string

func (Binary) WriteTo

func (b Binary) WriteTo(w io.Writer) (int64, error)

type Payload

type Payload interface {
	fmt.Stringer
	io.ReaderFrom
	io.WriterTo
	Bytes() []byte
}

type String

type String string

func (String) Bytes

func (s String) Bytes() []byte

func (*String) ReadFrom

func (s *String) ReadFrom(r io.Reader) (int64, error)

func (String) String

func (s String) String() string

func (String) WriteTo

func (s String) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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