Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBookNotFound = errors.New("ErrBookNotFound")
View Source
var ErrUnexpected = errors.New("Unexpected internal error")
Functions ¶
This section is empty.
Types ¶
type SearchSortType ¶
type SearchSortType string
const ( SearchSortNoSort SearchSortType = "-" SearchSortYear SearchSortType = "year" SearchSortName SearchSortType = "title" SearchSortRating SearchSortType = "rating" )
type UseCase ¶
type UseCase interface { Get(id int) (*entity.Book, error) Search(keyword string, sortBy SearchSortType, sortAsc bool) ([]*entity.Book, error) }
func NewUseCase ¶
func NewUseCase(book_repo repository.BookRepository) UseCase
Click to show internal directories.
Click to hide internal directories.