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

Method Encode

codec.go:6–6  ·  view source on GitHub ↗

将数据转换为字节数组

(msgObj interface{}, ctx ContextSet)

Source from the content-addressed store, hash-verified

4type Codec interface {
5 // 将数据转换为字节数组
6 Encode(msgObj interface{}, ctx ContextSet) (data interface{}, err error)
7
8 // 将字节数组转换为数据
9 Decode(data interface{}, msgObj interface{}) error

Callers 5

MessageSizeFunction · 0.65
RequestMethod · 0.65
WriteRespondMethod · 0.65
EncodeMessageFunction · 0.65
EncodeMethod · 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