coder

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Coders = map[CoderType]Coder{
	JSON:     new_json_coder(),
	MsgPack:  new_msg_pack(),
	FilePack: new_file_pack(),
	Protobuf: new_protobuf_pack(),
}

Functions

This section is empty.

Types

type Coder

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

body体的序列化

type CoderType

type CoderType uint16
const (
	JSON CoderType = iota
	MsgPack
	FilePack
	Protobuf
)

Jump to

Keyboard shortcuts

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