db

package
v0.0.0-...-899cb79 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBHandler

type DBHandler struct {
	MongoClient mongo.Client
	// contains filtered or unexported fields
}

func NewDBHandler

func NewDBHandler(connectString string, dbname string) (DBHandler, error)

func (DBHandler) FindAllBooks

func (dbHandler DBHandler) FindAllBooks() ([]*domain.Book, error)

func (DBHandler) SaveAuthor

func (dbHandler DBHandler) SaveAuthor(author domain.Author) error

func (DBHandler) SaveBook

func (dbHandler DBHandler) SaveBook(book domain.Book) error

Jump to

Keyboard shortcuts

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