package
1.17.3
Repository: https://github.com/mongodb/mongo-go-driver.git
Documentation: pkg.go.dev

# Functions

NewArrayCodec returns an ArrayCodec.
NewByteSliceCodec returns a ByteSliceCodec with options opts.
NewEmptyInterfaceCodec returns a EmptyInterfaceCodec with options opts.
NewMapCodec returns a MapCodec with options opts.
NewPointerCodec returns a PointerCodec that has been initialized.
NewRegistry creates a new empty Registry.
NewRegistryBuilder creates a new empty RegistryBuilder.
NewSliceCodec returns a MapCodec with options opts.
NewStringCodec returns a StringCodec with options opts.
NewStructCodec returns a StructCodec that uses p for struct tag parsing.
NewTimeCodec returns a TimeCodec with options opts.
NewUIntCodec returns a UIntCodec with options opts.

# Variables

DefaultStructTagParser is the StructTagParser used by the StructCodec by default.
ErrNilType is returned when nil is passed to either LookupEncoder or LookupDecoder.
ErrNotInterface is returned when the provided type is not an interface.
ErrNotPointer is returned when a non-pointer type is provided to LookupDecoder.
JSONFallbackStructTagParser has the same behavior as DefaultStructTagParser but will also fallback to parsing the json tag instead on a field where the bson tag isn't available.

# Structs

ArrayCodec is the Codec used for bsoncore.Array values.
ByteSliceCodec is the Codec used for []byte values.
DecodeContext is the contextual information required for a Codec to decode a value.
DecodeError represents an error that occurs when unmarshalling BSON bytes into a native Go type.
DefaultValueDecoders is a namespace type for the default ValueDecoders used when creating a registry.
DefaultValueEncoders is a namespace type for the default ValueEncoders used when creating a registry.
EmptyInterfaceCodec is the Codec used for interface{} values.
EncodeContext is the contextual information required for a Codec to encode a value.
ErrNoDecoder is returned when there wasn't a decoder available for a type.
ErrNoEncoder is returned when there wasn't an encoder available for a type.
ErrNoTypeMapEntry is returned when there wasn't a type available for the provided BSON type.
MapCodec is the Codec used for map values.
PointerCodec is the Codec used for pointers.
A Registry is used to store and retrieve codecs for types and interfaces.
A RegistryBuilder is used to build a Registry.
SliceCodec is the Codec used for slice values.
StringCodec is the Codec used for string values.
StructCodec is the Codec used for struct values.
StructTags represents the struct tag fields that the StructCodec uses during the encoding and decoding process.
TimeCodec is the Codec used for time.Time values.
TransitionError is an error returned when an invalid progressing a ValueReader or ValueWriter state machine occurs.
UIntCodec is the Codec used for uint values.
ValueDecoderError is an error returned from a ValueDecoder when the provided value can't be decoded by the ValueDecoder.
ValueEncoderError is an error returned from a ValueEncoder when the provided value can't be encoded by the ValueEncoder.

# Interfaces

CodecZeroer is the interface implemented by Codecs that can also determine if a value of the type that would be encoded is zero.
KeyMarshaler is the interface implemented by an object that can marshal itself into a string key.
KeyUnmarshaler is the interface implemented by an object that can unmarshal a string representation of itself.
Marshaler is an interface implemented by types that can marshal themselves into a BSON document represented as bytes.
Proxy is an interface implemented by types that cannot themselves be directly encoded.
StructTagParser returns the struct tags for a given struct field.
Unmarshaler is an interface implemented by types that can unmarshal a BSON document representation of themselves.
ValueCodec is an interface for encoding and decoding a reflect.Value.
ValueDecoder is the interface implemented by types that can handle the decoding of a value.
ValueEncoder is the interface implemented by types that can handle the encoding of a value.
ValueMarshaler is an interface implemented by types that can marshal themselves into a BSON value as bytes.
ValueUnmarshaler is an interface implemented by types that can unmarshal a BSON value representation of themselves.
Zeroer allows custom struct types to implement a report of zero state.

# Type aliases

StructTagParserFunc is an adapter that allows a generic function to be used as a StructTagParser.
ValueDecoderFunc is an adapter function that allows a function with the correct signature to be used as a ValueDecoder.
ValueEncoderFunc is an adapter function that allows a function with the correct signature to be used as a ValueEncoder.