encoding

package
v0.0.0-...-d841f61 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2021 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	// Decode the given byte in to the given out type.
	// Example:
	//
	// var out MyType
	// err := decoder.Decode(data, &out)
	Decode(in []byte, out interface{}) error
}

Decoder interface ease the use of decoders like encoding/gob...

type DecodingError

type DecodingError interface {
	errt.ErrT
	IsDecoding()
}

func NewDecodingError

func NewDecodingError(err error) DecodingError

type Encoder

type Encoder interface {
	// Encode in to []byte.
	// Example:
	//
	// var in MyTime
	// bytes, err := encoder.Encode(in)
	Encode(in interface{}) ([]byte, error)
}

Encoder interface ease the use of encoders like encoding/gob...

type EncodingError

type EncodingError interface {
	errt.ErrT
	IsEncoding()
}

func NewEncodingError

func NewEncodingError(err error) EncodingError

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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