mongo

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

type Mongo struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, log lgr.L, uri, db string) (*Mongo, error)

func (*Mongo) Disconnect

func (m *Mongo) Disconnect(ctx context.Context)

func (*Mongo) Operation

func (m *Mongo) Operation(fn func(db *mongo.Database) error) error

func (*Mongo) Session

func (m *Mongo) Session(ctx context.Context, actions ...func(sessionCtx mongo.SessionContext, db *mongo.Database) error) error

func (*Mongo) Transaction

func (m *Mongo) Transaction(ctx context.Context, actions ...func(ctx context.Context, db *mongo.Database) error) error

Jump to

Keyboard shortcuts

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