mongo

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MongoPrefix    = "mongodb://"
	MongoSRVPrefix = "mongodb+srv://"
)

Variables

This section is empty.

Functions

func NewMongoDriver

func NewMongoDriver(opts *types.ClientOpts) (*mongoDriver, error)

NewMongoDriver returns an instance of the driver official mongo connected to the database.

func ObjectIDDecodeValue added in v1.0.1

func ObjectIDDecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error

ObjectIDDecodeValue decode Hex value of primitive.ObjectID into model.ObjectID

func ObjectIDEncodeValue added in v1.0.1

func ObjectIDEncodeValue(ec bsoncodec.EncodeContext, vw bsonrw.ValueWriter, val reflect.Value) error

ObjectIDDecodeValue encode Hex value of model.ObjectID into primitive.ObjectID

Types

This section is empty.

Jump to

Keyboard shortcuts

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