Versions in this module Expand all Collapse all v0 v0.3.2 Nov 9, 2018 Changes in this version + const BinaryBinaryOld + const BinaryFunction + const BinaryGeneric + const BinaryMD5 + const BinaryUUID + const BinaryUUIDOld + const BinaryUserDefined + const Element06 + const ElementArray + const ElementBinary + const ElementBool + const ElementDBPointer + const ElementDatetime + const ElementDecimal128 + const ElementDocument + const ElementFloat64 + const ElementInt32 + const ElementInt64 + const ElementJavaScriptWithScope + const ElementJavaScriptWithoutScope + const ElementMaxKey + const ElementMinKey + const ElementNil + const ElementObjectId + const ElementRegEx + const ElementString + const ElementSymbol + const ElementTimestamp + const MaxDocumentSize + const MinDocumentSize + var ErrSetZero = errors.New("set to zero") + var MaxKey = orderKey(1<<63 - 1) + var MinKey = orderKey(-1 << 63) + var Undefined undefined + func BSONElementSize(kind byte, offset int, buffer []byte) (int, error) + func IsObjectIdHex(s string) bool + func JSONTagFallbackState() bool + func Marshal(in interface{}) (out []byte, err error) + func MarshalBuffer(in interface{}, buf []byte) (out []byte, err error) + func MarshalJSON(value interface{}) ([]byte, error) + func Now() time.Time + func RespectNilValuesState() bool + func SetJSONTagFallback(state bool) + func SetRespectNilValues(state bool) + func Unmarshal(in []byte, out interface{}) (err error) + func UnmarshalJSON(data []byte, value interface{}) error + type Binary struct + Data []byte + Kind byte + type D []DocElem + func (d D) Map() (m M) + type DBPointer struct + Id ObjectId + Namespace string + type Decimal128 struct + func ParseDecimal128(s string) (Decimal128, error) + func (d Decimal128) String() string + type Decoder struct + func NewDecoder(source io.Reader) *Decoder + func (dec *Decoder) Decode(v interface{}) (err error) + type DocElem struct + Name string + Value interface{} + type Encoder struct + func NewEncoder(target io.Writer) *Encoder + func (enc *Encoder) Encode(v interface{}) error + type ErrInvalidDocumentSize struct + DocumentSize int32 + func (e ErrInvalidDocumentSize) Error() string + type Getter interface + GetBSON func() (interface{}, error) + type JavaScript struct + Code string + Scope interface{} + type M map[string]interface + type MongoTimestamp int64 + func NewMongoTimestamp(t time.Time, c uint32) (MongoTimestamp, error) + func (ts MongoTimestamp) Counter() uint32 + func (ts MongoTimestamp) Time() time.Time + type ObjectId string + func NewObjectId() ObjectId + func NewObjectIdWithTime(t time.Time) ObjectId + func ObjectIdHex(s string) ObjectId + func (id *ObjectId) UnmarshalJSON(data []byte) error + func (id *ObjectId) UnmarshalText(data []byte) error + func (id ObjectId) Counter() int32 + func (id ObjectId) Hex() string + func (id ObjectId) Machine() []byte + func (id ObjectId) MarshalJSON() ([]byte, error) + func (id ObjectId) MarshalText() ([]byte, error) + func (id ObjectId) Pid() uint16 + func (id ObjectId) String() string + func (id ObjectId) Time() time.Time + func (id ObjectId) Valid() bool + type Raw struct + Data []byte + Kind byte + func (raw Raw) Unmarshal(out interface{}) (err error) + type RawD []RawDocElem + type RawDocElem struct + Name string + Value Raw + type RegEx struct + Options string + Pattern string + type Setter interface + SetBSON func(raw Raw) error + type Symbol string + type TypeError struct + Kind byte + Type reflect.Type + func (e *TypeError) Error() string