database

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func New

func New(address, password, collection string) (*Database, error)

func (*Database) AddWine

func (db *Database) AddWine(ctx context.Context, id string, w model.Wine) error

func (*Database) Close

func (db *Database) Close() error

func (*Database) GetWine

func (db *Database) GetWine(ctx context.Context, id string) (*model.Wine, error)

func (*Database) GetWineList

func (db *Database) GetWineList(ctx context.Context) (map[string]model.Wine, error)

Jump to

Keyboard shortcuts

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