Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BsonEncoder ¶
type BsonEncoder struct{}
func (*BsonEncoder) Decode ¶
func (*BsonEncoder) Decode(data []byte, vPtr interface{}) error
func (*BsonEncoder) Encode ¶
func (*BsonEncoder) Encode(vPtr interface{}) ([]byte, error)
type Encode ¶
type Encode struct {
// contains filtered or unexported fields
}
func (*Encode) GetBsonEncoder ¶
func (*Encode) GetGobEncoder ¶
func (*Encode) GetJsonEncoder ¶
func (*Encode) GetProtoEncoder ¶
func (*Encode) RegisterEncoder ¶
func (e *Encode) RegisterEncoder(encoderType EncodeType, encoder Encoder)
RegisterEncoder register encode base on EncodeType and Encoder interface
type EncodeType ¶
type EncodeType int
const ( JSON EncodeType = iota // JSON is encoder and decoder for json GOB // GOB is encoder and decoder for gob BSON // BSON is encoder and decoder for mongodb bson PROTO // PROTO is encoder and decoder for proto reflect )
type GobEncoder ¶
type GobEncoder struct{}
func (*GobEncoder) Decode ¶
func (*GobEncoder) Decode(data []byte, vPtr interface{}) error
func (*GobEncoder) Encode ¶
func (*GobEncoder) Encode(vPtr interface{}) ([]byte, error)
type JsonEncoder ¶
type JsonEncoder struct{}
func (*JsonEncoder) Decode ¶
func (*JsonEncoder) Decode(data []byte, vPtr interface{}) error
func (*JsonEncoder) Encode ¶
func (*JsonEncoder) Encode(vPtr interface{}) ([]byte, error)
type ProtoEncoder ¶
type ProtoEncoder struct{}
func (*ProtoEncoder) Decode ¶
func (*ProtoEncoder) Decode(data []byte, vPtr interface{}) error
func (*ProtoEncoder) Encode ¶
func (*ProtoEncoder) Encode(vPtr interface{}) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.