resources

package
v0.0.0-...-ee9937f Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage application DB

func NewStorage

func NewStorage(cfg *configuration.Storage, timeout time.Duration) (*Storage, error)

NewStorage creates new storage

func (*Storage) GetBooks

func (s *Storage) GetBooks(ctx context.Context) ([]*models.Book, error)

GetBooks retrieve books from DB

func (*Storage) RemoveBook

func (s *Storage) RemoveBook(ctx context.Context, bookID string) error

RemoveBook removes book from DB

func (*Storage) RemoveBooks

func (s *Storage) RemoveBooks(ctx context.Context, bookIDs []string) error

RemoveBooks removes books from DB

func (*Storage) SaveBook

func (s *Storage) SaveBook(ctx context.Context, book *models.Book) error

SaveBook saves book to DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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