Documentation ¶
Index ¶
- Variables
- func RegisterAllCodecs(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
- func RegisterDurationCodec(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
- func RegisterObjectIDCodec(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
- func RegisterTimestampCodec(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
- func RegisterWrappersCodec(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
- type DurationCodec
- type ObjectID
- type ObjectIDCodec
- type TimestampCodec
- type WrappersCodec
Constants ¶
This section is empty.
Variables ¶
var File_goinsane_pbutil_pbutilmongo_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAllCodecs ¶
func RegisterAllCodecs(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
RegisterAllCodecs registers all of implemented codecs.
func RegisterDurationCodec ¶
func RegisterDurationCodec(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
RegisterDurationCodec registers DurationCodec.
func RegisterObjectIDCodec ¶
func RegisterObjectIDCodec(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
RegisterObjectIDCodec registers ObjectIDCodec.
func RegisterTimestampCodec ¶
func RegisterTimestampCodec(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
RegisterTimestampCodec registers TimestampCodec.
func RegisterWrappersCodec ¶
func RegisterWrappersCodec(rb *bsoncodec.RegistryBuilder) *bsoncodec.RegistryBuilder
RegisterWrappersCodec registers WrappersCodec.
Types ¶
type DurationCodec ¶
type DurationCodec struct { }
DurationCodec is codec for protobuf type Duration.
func (*DurationCodec) DecodeValue ¶
func (c *DurationCodec) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error
DecodeValue decodes BSON value to protobuf type Duration.
func (*DurationCodec) EncodeValue ¶
func (c *DurationCodec) EncodeValue(ec bsoncodec.EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error
EncodeValue encodes protobuf type Duration to BSON value.
type ObjectID ¶
type ObjectID struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*ObjectID) Descriptor
deprecated
func (*ObjectID) ProtoMessage ¶
func (*ObjectID) ProtoMessage()
func (*ObjectID) ProtoReflect ¶
func (x *ObjectID) ProtoReflect() protoreflect.Message
type ObjectIDCodec ¶
type ObjectIDCodec struct { }
ObjectIDCodec is codec for protobuf type ObjectID.
func (*ObjectIDCodec) DecodeValue ¶
func (c *ObjectIDCodec) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error
DecodeValue decodes BSON value to protobuf type ObjectID.
func (*ObjectIDCodec) EncodeValue ¶
func (c *ObjectIDCodec) EncodeValue(ec bsoncodec.EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error
EncodeValue encodes protobuf type ObjectID to BSON value.
type TimestampCodec ¶
type TimestampCodec struct { }
TimestampCodec is codec for protobuf type Timestamp.
func (*TimestampCodec) DecodeValue ¶
func (c *TimestampCodec) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error
DecodeValue decodes BSON value to protobuf type Timestamp.
func (*TimestampCodec) EncodeValue ¶
func (c *TimestampCodec) EncodeValue(ec bsoncodec.EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error
EncodeValue encodes protobuf type Timestamp to BSON value.
type WrappersCodec ¶
type WrappersCodec struct { }
WrappersCodec is codec for protobuf wrappers.
func (*WrappersCodec) DecodeValue ¶
func (c *WrappersCodec) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error
DecodeValue decodes BSON value to protobuf wrappers value.
func (*WrappersCodec) EncodeValue ¶
func (c *WrappersCodec) EncodeValue(ec bsoncodec.EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error
EncodeValue encodes protobuf wrappers value to BSON value.