codec

package
v0.0.0-...-214a605 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCoder

func RegisterCoder(name string, c Coder)

Types

type Coder

type Coder interface {
	//encode v to []byte, err != nil if not succeed
	Encode(v interface{}) (data []byte, err error)

	// decode []byte to Msg, err != nil if not succeed
	// v must be a pointer
	Decode(data []byte, v interface{}) (err error)

	// name of the coder
	String() string
}

the coder

func MustGetCoder

func MustGetCoder(name string) Coder

Directories

Path Synopsis
plugins
codec_protobuf/test
Package test is a generated protocol buffer package.
Package test is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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