mongopb

package module
v0.0.0-...-cb195cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2022 License: BSD-3-Clause Imports: 11 Imported by: 0

README

mongopb

Package mongopb provides protobuf utilities for MongoDB.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_goinsane_pbutil_mongo_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

DecodeValue decodes BSON value to protobuf type Duration.

func (*DurationCodec) EncodeValue

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) Descriptor() ([]byte, []int)

Deprecated: Use ObjectID.ProtoReflect.Descriptor instead.

func (*ObjectID) GetValue

func (x *ObjectID) GetValue() string

func (*ObjectID) ProtoMessage

func (*ObjectID) ProtoMessage()

func (*ObjectID) ProtoReflect

func (x *ObjectID) ProtoReflect() protoreflect.Message

func (*ObjectID) Reset

func (x *ObjectID) Reset()

func (*ObjectID) String

func (x *ObjectID) String() string

type ObjectIDCodec

type ObjectIDCodec struct {
}

ObjectIDCodec is codec for protobuf type ObjectID.

func (*ObjectIDCodec) DecodeValue

DecodeValue decodes BSON value to protobuf type ObjectID.

func (*ObjectIDCodec) EncodeValue

EncodeValue encodes protobuf type ObjectID to BSON value.

type TimestampCodec

type TimestampCodec struct {
}

TimestampCodec is codec for protobuf type Timestamp.

func (*TimestampCodec) DecodeValue

DecodeValue decodes BSON value to protobuf type Timestamp.

func (*TimestampCodec) EncodeValue

EncodeValue encodes protobuf type Timestamp to BSON value.

type WrappersCodec

type WrappersCodec struct {
}

WrappersCodec is codec for protobuf wrappers.

func (*WrappersCodec) DecodeValue

DecodeValue decodes BSON value to protobuf wrappers value.

func (*WrappersCodec) EncodeValue

EncodeValue encodes protobuf wrappers value to BSON value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL