MCPcopy
hub / github.com/davyxu/cellnet / Codec

Interface Codec

codec.go:4–16  ·  view source on GitHub ↗

编码包

Source from the content-addressed store, hash-verified

2
3// 编码包
4type Codec interface {
5 // 将数据转换为字节数组
6 Encode(msgObj interface{}, ctx ContextSet) (data interface{}, err error)
7
8 // 将字节数组转换为数据
9 Decode(data interface{}, msgObj interface{}) error
10
11 // 编码器的名字
12 Name() string
13
14 // 兼容http类型
15 MimeType() string
16}

Callers 19

MessageSizeFunction · 0.65
RequestMethod · 0.65
WriteRespondMethod · 0.65
EncodeMessageFunction · 0.65
EncodeMethod · 0.65
MessageMethod · 0.65
RequestMethod · 0.65
DecodeMessageFunction · 0.65
DecodeMessageByTypeFunction · 0.65
TypeNameMethod · 0.65
FullNameMethod · 0.65
RegisterMessageMetaFunction · 0.65

Implementers 6

httpFormCodeccodec/httpform/form.go
httpjsonCodeccodec/httpjson/json.go
protopluscodec/protoplus/protoplus.go
jsonCodeccodec/json/json.go
binaryCodeccodec/binary/binary.go
gogopbCodeccodec/gogopb/gogopb.go

Calls

no outgoing calls

Tested by

no test coverage detected