book_page

package
v0.0.0-...-bee458a Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

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