db

package
v0.0.0-...-44c3be1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase(logger *logging.Logger, config *config.Config) storages.Storage

Types

type Database

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

func (*Database) Bind

func (db *Database) Bind(result *mongo.SingleResult, instance interface{}) error

func (*Database) Delete

func (db *Database) Delete(id string, collectionName string) (*mongo.DeleteResult, error)

func (*Database) Get

func (db *Database) Get(id string, collectionName string) (*mongo.SingleResult, error)

func (*Database) Healthcheck

func (db *Database) Healthcheck() error

func (*Database) Save

func (db *Database) Save(document interface{}, collectionName string) (string, error)

Jump to

Keyboard shortcuts

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