Versions in this module Expand all Collapse all v0 v0.0.7 Aug 6, 2024 v0.0.6 Aug 6, 2024 v0.0.5 Jul 30, 2024 v0.0.4 Jul 30, 2024 v0.0.3 Jul 25, 2024 Changes in this version + const BinaryEncrypted + const BinaryFunction + const BinaryGeneric + const BinaryGenericOld + const BinaryMD5 + const BinaryUUID + const BinaryUUIDOld + const BinaryUser + const SizeBool + const SizeDecimal128 + const SizeFloat64 + const SizeInt32 + const SizeInt64 + const SizeObjectID + const SizeTime + const SizeTimestamp + var ErrDecodeInvalidInput = errors.New("bsonproto: invalid input") + var ErrDecodeShortInput = errors.New("bsonproto: short input") + var Null = NullType + func DecodeAny(b []byte, v any) error + func DecodeBool(b []byte) (bool, error) + func DecodeCString(b []byte) (string, error) + func DecodeFloat64(b []byte) (float64, error) + func DecodeInt32(b []byte) (int32, error) + func DecodeInt64(b []byte) (int64, error) + func DecodeString(b []byte) (string, error) + func DecodeTime(b []byte) (time.Time, error) + func Decode[T ScalarType](b []byte, v *T) error + func EncodeAny(b []byte, v any) + func EncodeBinary(b []byte, v Binary) + func EncodeBool(b []byte, v bool) + func EncodeCString(b []byte, v string) + func EncodeDecimal128(b []byte, v Decimal128) + func EncodeFloat64(b []byte, v float64) + func EncodeInt32(b []byte, v int32) + func EncodeInt64(b []byte, v int64) + func EncodeObjectID(b []byte, v ObjectID) + func EncodeRegex(b []byte, v Regex) + func EncodeString(b []byte, v string) + func EncodeTime(b []byte, v time.Time) + func EncodeTimestamp(b []byte, v Timestamp) + func Encode[T ScalarType](b []byte, v T) + func SizeAny(v any) int + func SizeBinary(v Binary) int + func SizeCString(v string) int + func SizeRegex(v Regex) int + func SizeString(v string) int + func Size[T ScalarType](v T) int + type Binary struct + B []byte + Subtype BinarySubtype + func DecodeBinary(b []byte) (Binary, error) + type BinarySubtype byte + func (i BinarySubtype) String() string + type Decimal128 struct + H uint64 + L uint64 + func DecodeDecimal128(b []byte) (Decimal128, error) + type NullType struct + type ObjectID [12]byte + func DecodeObjectID(b []byte) (ObjectID, error) + type Regex struct + Options string + Pattern string + func DecodeRegex(b []byte) (Regex, error) + type ScalarType interface + type Timestamp uint64 + func DecodeTimestamp(b []byte) (Timestamp, error)