Documentation
¶
Index ¶
- type BooksDatabaseImpl
- func (dbImpl BooksDatabaseImpl) CreateBook(book model.Book) error
- func (dbImpl BooksDatabaseImpl) DeleteBook(id string) error
- func (dbImpl BooksDatabaseImpl) GetBook(id string) (*model.Book, error)
- func (dbImpl BooksDatabaseImpl) GetBooks() ([]*model.Book, error)
- func (dbImpl BooksDatabaseImpl) PutBook(book model.Book) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BooksDatabaseImpl ¶
BooksDatabaseImpl contain direct access to the DB
func (BooksDatabaseImpl) CreateBook ¶
func (dbImpl BooksDatabaseImpl) CreateBook(book model.Book) error
CreateBook create book using book parameter
func (BooksDatabaseImpl) DeleteBook ¶
func (dbImpl BooksDatabaseImpl) DeleteBook(id string) error
DeleteBook delete the book corresponding to the giving ID parameter
func (BooksDatabaseImpl) GetBook ¶
func (dbImpl BooksDatabaseImpl) GetBook(id string) (*model.Book, error)
GetBook return book with the parameter id, error otherwise
Click to show internal directories.
Click to hide internal directories.