serialization

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Proto   = "proto"
	Msgpack = "msgpack"
	Json    = "json"
	Gencode = "gencode"
)

Variables

View Source
var ErrorMissingGencodeMethod = errors.New("missing gencode generate code")
View Source
var ErrorMissingProtoMessage = errors.New("missing proto message")

Functions

func Register

func Register(name string, serialization Serialization)

Types

type Serialization

type Serialization interface {
	Marshal(interface{}) ([]byte, error)
	Unmarshal([]byte, interface{}) error
}

func Get

func Get(name string) Serialization

Jump to

Keyboard shortcuts

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