Documentation ¶
Overview ¶
Package encodingx Created by xuzhuoxi on 2019-02-11. @author xuzhuoxi
Package encodingx Created by xuzhuoxi on 2019-03-20. @author xuzhuoxi
Package encodingx Created by xuzhuoxi on 2019-02-11. @author xuzhuoxi
Package encodingx Created by xuzhuoxi on 2019-03-20. @author xuzhuoxi
Package encodingx Created by xuzhuoxi on 2019-03-25. @author xuzhuoxi
Package encodingx Created by xuzhuoxi on 2019-02-13. @author xuzhuoxi
Index ¶
- Variables
- func ByteArrayToString(b []byte) string
- func StringToByteArray(s string) []byte
- type CodingMap
- func (v CodingMap) Check(key string) bool
- func (v CodingMap) DecodeFromBytes(bs []byte) bool
- func (v CodingMap) Delete(key string) (interface{}, bool)
- func (v CodingMap) EncodeToBytes() []byte
- func (v CodingMap) ForEach(handler func(key string, value interface{}))
- func (v CodingMap) Get(key string) (interface{}, bool)
- func (v CodingMap) Len() int
- func (v CodingMap) Merge(vs IKeyValue) IKeyValue
- func (v CodingMap) Set(key string, value interface{}) (IKeyValue, bool)
- type IBuffCodecs
- type IBuffDecoder
- type IBuffEncoder
- type ICodingData
- type ICodingHandler
- type IDecodeHandler
- type IDecodingData
- type IEncodeHandler
- type IEncodingData
- type IKeyValue
- type IPoolBuffCodecs
- type IPoolBuffDecoder
- type IPoolBuffEncoder
- type IPoolCodingHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultOrder binary.ByteOrder = bytex.DefaultOrder DefaultDataBlockHandler = bytex.NewDefaultDataBlockHandler() )
Functions ¶
func ByteArrayToString ¶
func StringToByteArray ¶
Types ¶
type CodingMap ¶
type CodingMap map[string]interface{}
func NewCodingMap ¶
func NewCodingMap() CodingMap
func (CodingMap) DecodeFromBytes ¶
func (CodingMap) EncodeToBytes ¶
EncodeToBytes 序列化 格式:
Key + Value Key : string(uint16+[]byte) Value: Kind [+ Len] + Other Other: []byte... 或 string(uint16+[]byte)...
type IBuffCodecs ¶
type IBuffCodecs interface { bytex.IBuffReset bytex.IBuffLen // contains filtered or unexported methods }
func NewBuffCodecs ¶
func NewBuffCodecs(handler bytex.IDataBlockHandler, codingHandler ICodingHandler) IBuffCodecs
func NewDefaultBuffCodecs ¶
func NewDefaultBuffCodecs(codingHandler ICodingHandler) IBuffCodecs
type IBuffDecoder ¶
type IBuffDecoder interface { bytex.IBuffReset bytex.IBuffLen // contains filtered or unexported methods }
func NewBuffDecoder ¶
func NewBuffDecoder(handler bytex.IDataBlockHandler, decodeHandler IDecodeHandler) IBuffDecoder
func NewDefaultBuffDecoder ¶
func NewDefaultBuffDecoder(decodeHandler IDecodeHandler) IBuffDecoder
type IBuffEncoder ¶
type IBuffEncoder interface { bytex.IBuffReset bytex.IBuffLen // contains filtered or unexported methods }
func NewBuffEncoder ¶
func NewBuffEncoder(handler bytex.IDataBlockHandler, encodeHandler IEncodeHandler) IBuffEncoder
func NewDefaultBuffEncoder ¶
func NewDefaultBuffEncoder(encodeHandler IEncodeHandler) IBuffEncoder
type ICodingData ¶
type ICodingData interface { IEncodingData IDecodingData }
type ICodingHandler ¶
type ICodingHandler interface { IEncodeHandler IDecodeHandler }
func NewUtf8StringCodingHandle ¶
func NewUtf8StringCodingHandle() ICodingHandler
type IDecodeHandler ¶
type IDecodingData ¶
type IEncodeHandler ¶
type IEncodeHandler interface {
HandleEncode(data interface{}) []byte
}
type IEncodingData ¶
type IEncodingData interface { // EncodeToBytes 序列化 EncodeToBytes() []byte }
type IKeyValue ¶
type IKeyValue interface { // ICodingData // 序列化接口 ICodingData // Len 键值对数量 Len() int // Set 设置键值 Set(key string, value interface{}) (IKeyValue, bool) // Get 取值 Get(key string) (interface{}, bool) // Delete 删除键值 Delete(key string) (interface{}, bool) // Check 检查键值是否存在 Check(key string) bool // Merge 合并 Merge(vs IKeyValue) IKeyValue // ForEach 遍历 ForEach(handler func(key string, value interface{})) }
type IPoolBuffCodecs ¶
type IPoolBuffCodecs interface { Register(newFunc func() IBuffCodecs) GetInstance() IBuffCodecs Recycle(instance IBuffCodecs) bool }
func NewPoolBuffCodecs ¶
func NewPoolBuffCodecs() IPoolBuffCodecs
type IPoolBuffDecoder ¶
type IPoolBuffDecoder interface { Register(newFunc func() IBuffDecoder) GetInstance() IBuffDecoder Recycle(instance IBuffDecoder) bool }
func NewPoolBuffDecoder ¶
func NewPoolBuffDecoder() IPoolBuffDecoder
type IPoolBuffEncoder ¶
type IPoolBuffEncoder interface { Register(newFunc func() IBuffEncoder) GetInstance() IBuffEncoder Recycle(instance IBuffEncoder) bool }
func NewPoolBuffEncoder ¶
func NewPoolBuffEncoder() IPoolBuffEncoder
type IPoolCodingHandler ¶
type IPoolCodingHandler interface { Register(newFunc func() ICodingHandler) GetInstance() ICodingHandler Recycle(instance ICodingHandler) bool }
func NewPoolCodingHandler ¶
func NewPoolCodingHandler() IPoolCodingHandler
Directories ¶
Path | Synopsis |
---|---|
Package gobx Created by xuzhuoxi on 2019-03-25.
|
Package gobx Created by xuzhuoxi on 2019-03-25. |
Package jsonx Created by xuzhuoxi on 2019-02-24.
|
Package jsonx Created by xuzhuoxi on 2019-02-24. |
Package yamlx Created by xuzhuoxi on 2019-02-24.
|
Package yamlx Created by xuzhuoxi on 2019-02-24. |
Click to show internal directories.
Click to hide internal directories.