db

package
v0.0.0-...-80ac902 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Options(
	fx.Provide(NewDb),
)

Functions

This section is empty.

Types

type DataStorer

type DataStorer interface {
	PutBook(*models.Book) error
	IsBookExist(book *models.Book) (bool, error)
	FindBooks(models.Search) ([]models.Book, error)
	FindBooksSeries(models.Search) ([]models.Book, error)
	FindBooksByLibID(libID string) ([]models.Book, error)
	FindAuthors(author string, limit int) ([]models.Author, error)
	GetAuthor(authorID uint) (*models.Author, error)
	ListAuthorBooks(authorID uint, noDetails bool, params models.Search) ([]models.Book, error)
	GetBook(bookID uint) (*models.Book, error)
	GetLangs() ([]string, error)
	IsContainerExist(fileName string) bool
}

DataStorer interface for data layer

func NewDBStore

func NewDBStore(dbType, connect, logLevel string) (DataStorer, error)

NewDBStore creates new instance of datastorer

func NewDb

func NewDb(p Params) (DataStorer, error)

NewCli instantiates the main app

type Params

type Params struct {
	fx.In

	AppConfig *config.App
}

Params represents the module input params

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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