Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoDecoderBytes ¶
ProtoDecoderBytes 工具方法
Types ¶
type Decoder ¶
type Decoder interface { // DecoderBytes 收到客户端的数据 DecoderBytes(bytes []byte) messages.Message // EncodeBytes 封装编码 EncodeBytes(result interface{}) []byte }
Decoder 对数据的解码器
type JsonDecoder ¶
type JsonDecoder struct { }
func (JsonDecoder) DecoderBytes ¶
func (d JsonDecoder) DecoderBytes(bytes []byte) messages.Message
DecoderBytes 处理客户端返回的数据
func (JsonDecoder) EncodeBytes ¶
func (d JsonDecoder) EncodeBytes(result interface{}) []byte
EncodeBytes 编码为字节
func (JsonDecoder) Tool ¶ added in v0.0.24
func (d JsonDecoder) Tool(cmd, subCmd int64, body interface{}) []byte
Tool 工具方法
type ProtoDecoder ¶
type ProtoDecoder struct { }
func (ProtoDecoder) DecoderBytes ¶
func (p ProtoDecoder) DecoderBytes(bytes []byte) messages.Message
func (ProtoDecoder) EncodeBytes ¶
func (p ProtoDecoder) EncodeBytes(result interface{}) []byte
Click to show internal directories.
Click to hide internal directories.