# Packages
No description provided by the author
No description provided by the author
Package elements holds the logic to encode and decode the BSON element types from native Go to BSON binary and vice versa.
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
ArrayFromDocument creates an array from a *Document.
Marshal converts a BSON type to bytes.
NewArray creates a new array with the specified value.
NewDecoder constructs a new Decoder from the given io.Reader.
NewDocument creates an empty Document.
NewDocumentEncoder creates an encoder that encodes into a *Document.
NewEncoder creates an encoder that writes to w.
NewErrTooSmall creates a new ErrTooSmall with the given message and the current stack.
NewFromIOReader reads in a document from the given io.Reader and constructs a bson.Reader from it.
NewReaderIterator constructors a new ReaderIterator over a given Reader.
ReadDocument will create a Document using the provided slice of bytes.
Unmarshal converts bytes into a BSON type.
UnmarshalDocument converts bytes into a *bson.Document.
# Constants
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
These constants uniquely refer to each BSON type.
# Variables
EC is a convenience variable provided for access to the ElementConstructor methods.
ErrElementNotFound indicates that an Element matching a certain condition does not exist.
ErrEmptyKey indicates that no key was provided to a Lookup method.
ErrEncoderNilWriter indicates that encoder.Encode was called with a nil argument.
ErrInvalidArrayKey indicates that a key that isn't a positive integer was used to lookup an element in an array.
ErrInvalidBinarySubtype indicates that a BSON binary value had an undefined subtype.
ErrInvalidBooleanType indicates that a BSON boolean value had an incorrect byte.
ErrInvalidDepthTraversal indicates that a provided path of keys to a nested value in a document does not exist.
ErrInvalidDocumentType indicates that a type which doesn't represent a BSON document was was provided when a document was expected.
ErrInvalidElement indicates that a bson.Element had invalid underlying BSON.
ErrInvalidKey indicates that the BSON representation of a key is missing a null terminator.
ErrInvalidLength indicates that a length in a binary representation of a BSON document is invalid.
ErrInvalidReadOnlyDocument indicates that the underlying bytes of a bson.Reader are invalid.
ErrInvalidString indicates that a BSON string value had an incorrect length.
ErrInvalidWriter indicates that a type that can't be written into was passed to a writer method.
ErrNilDocument indicates that an operation was attempted on a nil *bson.Document.
ErrNilElement indicates that a nil element was provided when none was expected.
ErrNilReader indicates that an operation was attempted on a nil bson.Reader.
ErrOutOfBounds indicates that an index provided to access something was invalid.
ErrStringLargerThanContainer indicates that the code portion of a BSON JavaScript code with scope value is larger than the specified length of the entire value.
ErrUninitializedElement is returned whenever any method is invoked on an uninitialized Element.
MaxKey represents the BSON minkey value.
MinKey represents the BSON maxkey value.
Null represents the BSON null value.
Undefined represents the BSON undefined value.
VC is a convenience variable provided for access to the ValueConstructor methods.
# Structs
Array represents an array in BSON.
Binary represents a BSON binary value.
CodeWithScope represents a BSON JavaScript code with scope value.
DBPointer represents a BSON dbpointer value.
Decoder facilitates decoding a value from an io.Reader yielding a BSON document as bytes.
Document is a mutable ordered map that compactly represents a BSON document.
Element represents a BSON element, i.e.
ElementConstructor is used as a namespace for document element constructor functions.
ElementTypeError specifies that a method to obtain a BSON value an incorrect type was called on a bson.Value.
ErrTooSmall indicates that a slice provided to write into is not large enough to fit the data.
Iterator facilitates iterating over a bson.Document.
Key represents an individual key of a BSON document.
ReaderIterator facilitates iterating over a bson.Reader.
Regex represents a BSON regex value.
Timestamp represents a BSON timestamp value.
Value represents a BSON value.
ValueConstructor is used as a namespace for document element constructor functions.
# Interfaces
DocumentEncoder describes a type that can marshal itself into a value and return the bson.Document it represents.
DocumentMarshaler describes a type that can marshal itself into a bson.Document.
DocumentUnmarshaler describes a type that can unmarshal itself from a bson.Document.
ElementMarshaler describes a type that can marshal itself into a bson.Element.
Encoder describes a type that can encode itself into a value.
Marshaler describes a type that can marshal a BSON representation of itself into bytes.
Unmarshaler describes a type that can unmarshal itself from BSON bytes.
ValueMarshaler describes a type that can marshal itself into a bson.Value.
# Type aliases
JavaScriptCode represents a BSON JavaScript code value.
Keys represents the keys of a BSON document.
Reader is a wrapper around a byte slice.
Symbol represents a BSON symbol value.
Type represents a BSON type.