Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorTypeCode = errors.New("coding: code type error")
Functions ¶
func RegisterCode ¶
Types ¶
type Code ¶
type Code interface {
// Marshal 将v序列化为[]byte
Marshal(v interface{}) ([]byte, error)
// Unmarshal 将[]byte 反序列化为v
Unmarshal(data []byte, v interface{}) error
// Name 返回实际调用编码器的类型, 例如 json、xml、yaml、proto
Name() string
}
Code coding 接口
type CodeStorage ¶
CodeStorage 注册中心
Click to show internal directories.
Click to hide internal directories.