Documentation ¶
Index ¶
- type TBody
- func (self *TBody) AsBuffer() *bytes.Buffer
- func (self *TBody) AsBytes() (res []byte)
- func (self *TBody) AsMap(c ...codec.SerializeType) (map[string]interface{}, error)
- func (self *TBody) AsRecordset(c ...codec.SerializeType) (rec *dataset.TRecordSet, err error)
- func (self *TBody) Decode(out interface{}) (err error)
- func (self *TBody) Encode(in interface{}) (int, error)
- func (self *TBody) Reset() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TBody ¶
type TBody struct { Data *bytes.Buffer // 存储已经编码的数据 Codec codec.ICodec // contains filtered or unexported fields }
NOTED 不提供IO Reader/Writer/Closer
func (*TBody) AsMap ¶
func (self *TBody) AsMap(c ...codec.SerializeType) (map[string]interface{}, error)
TODO 优化 根据序列强制转换为Map
func (*TBody) AsRecordset ¶
func (self *TBody) AsRecordset(c ...codec.SerializeType) (rec *dataset.TRecordSet, err error)
根据序列强制转换为TRecordSet 默认为codec.JSON
Click to show internal directories.
Click to hide internal directories.