mongo

package
v0.0.0-...-dad94d2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	DB      *mongo.Database
	Client  *mongo.Client
	Context context.Context
}
var Cfg DB

func Run

func Run() (*DB, error)

func (*DB) Add

func (db *DB) Add(fsm modelFSM.Item) (*primitive.ObjectID, error)

func (*DB) Close

func (db *DB) Close()

func (*DB) Delete

func (db *DB) Delete(idFSM string) error

func (*DB) Get

func (db *DB) Get(id string) (*modelFSM.Item, error)

func (DB) List

func (db DB) List() ([]*modelFSM.Item, error)

func (*DB) Update

func (db *DB) Update(fsm modelFSM.Item) (modelFSM.Item, error)

Jump to

Keyboard shortcuts

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