package
0.0.0-20180604090527-bdc77568d726
Repository: https://github.com/siddontang/go.git
Documentation: pkg.go.dev
# Functions
IsObjectIdHex returns whether s is a valid hex representation of an ObjectId.
Marshal serializes the in value, which may be a map or a struct value.
NewObjectId returns a new unique ObjectId.
NewObjectIdWithTime returns a dummy ObjectId with the timestamp part filled with the provided number of seconds from epoch UTC, and all other parts filled with zeroes.
Now returns the current time with millisecond precision.
ObjectIdHex returns an ObjectId from the provided hex representation.
Unmarshal deserializes data from in into the out value.
# Variables
MaxKey is a special value that compares higher than all other possible BSON values in a MongoDB database.
MinKey is a special value that compares lower than all other possible BSON values in a MongoDB database.
SetZero may be returned from a SetBSON method to have the value set to its respective zero value.
Undefined represents the undefined BSON value.
# Structs
Binary is a representation for non-standard binary values.
See the D type.
JavaScript is a type that holds JavaScript code.
The Raw type represents raw unprocessed BSON documents and elements.
See the RawD type.
RegEx represents a regular expression.
No description provided by the author
# Interfaces
A value implementing the bson.Getter interface will have its GetBSON method called when the given value has to be marshalled, and the result of this method will be marshaled in place of the actual object.
A value implementing the bson.Setter interface will receive the BSON value via the SetBSON method during unmarshaling, and the object itself will not be changed as usual.
# Type aliases
D represents a BSON document containing ordered elements.
M is a convenient alias for a map[string]interface{} map, useful for dealing with BSON in a native way.
MongoTimestamp is a special internal type used by MongoDB that for some strange reason has its own datatype defined in BSON.
ObjectId is a unique ID identifying a BSON value.
RawD represents a BSON document containing raw unprocessed elements.
The Symbol type is similar to a string and is used in languages with a distinct symbol type.