Documentation ¶
Overview ¶
Package bsonenc support encoding and decoding instance by bson.
Index ¶
- Variables
- func Marshal(v interface{}) ([]byte, error)
- func MergeBSONM(a bson.M, b ...bson.M) bson.M
- func NewHintedDoc(h hint.Hint) bson.M
- func Unmarshal(b []byte, v interface{}) error
- type Encoder
- func (enc *Encoder) Add(ht hint.Hinter) error
- func (enc *Encoder) Decode(b []byte) (hint.Hinter, error)
- func (enc *Encoder) DecodeMap(b []byte) (map[string]hint.Hinter, error)
- func (enc *Encoder) DecodeSlice(b []byte) ([]hint.Hinter, error)
- func (enc *Encoder) DecodeWithHint(b []byte, ht hint.Hint) (hint.Hinter, error)
- func (*Encoder) Hint() hint.Hint
- func (*Encoder) Marshal(v interface{}) ([]byte, error)
- func (*Encoder) Unmarshal(b []byte, v interface{}) error
- type HintedHead
- type Unpackable
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BSONEncoderType = hint.Type("bson-encoder") BSONEncoderHint = hint.NewHint(BSONEncoderType, "v0.0.1") )
Functions ¶
Types ¶
type HintedHead ¶
type Unpackable ¶
Click to show internal directories.
Click to hide internal directories.