Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookService ¶
type BookService struct {
// contains filtered or unexported fields
}
BookService defines a book service
func NewBookService ¶
func NewBookService(gi goisbn.Queryer) *BookService
NewBookService creates a new instance of BookService
type DBService ¶
type DBService struct {
// contains filtered or unexported fields
}
DBService defines dbService
func NewDbService ¶
NewDbService creates a new instance of DBService
func (*DBService) List ¶
func (svc *DBService) List(ctx context.Context, limit, offset int64, userId string) ([]*entities.Book, error)
List lists all database records matching search criteria
func (*DBService) Upsert ¶
func (svc *DBService) Upsert(ctx context.Context, isbn, title, authors, imageURL, smallImageURL, publisher, userId, description, categories, language, source string, publicationYear, status, pageCount int64) (*entities.Book, error)
Upsert updates the database record if a record is found, creates a record if none is found
type IdbService ¶
type IdbService interface { Upsert(context.Context, string, string, string, string, string, string, string, string, string, string, string, int64, int64, int64) (*entities.Book, error) Get(context.Context, string, string) (*entities.Book, error) List(context.Context, int64, int64, string) ([]*entities.Book, error) }
IdbService defines the interface for dbService
Click to show internal directories.
Click to hide internal directories.