db

package
v0.0.0-...-9f3f5e4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertHexStringToObjectID

func ConvertHexStringToObjectID(id string) (_id primitive.ObjectID, err error)

func ConvertObjectIDToHexString

func ConvertObjectIDToHexString(id *primitive.ObjectID) string

Types

type Mongo

type Mongo struct {
	Env    *utl.Env
	Client *mongo.Client
	DB     *mongo.Database
	Ctx    context.Context
}

func NewMongo

func NewMongo(env *utl.Env) *Mongo

func (*Mongo) Disconnect

func (m *Mongo) Disconnect()

func (*Mongo) GetCollection

func (m *Mongo) GetCollection(name string) *mongo.Collection

Jump to

Keyboard shortcuts

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