Documentation ¶
Index ¶
- type AccountService
- type BookService
- func (b *BookService) CreateBook(dto *dto.BookDto) (*model.Book, map[string]string)
- func (b *BookService) DeleteBook(id string) (*model.Book, map[string]string)
- func (b *BookService) FindAllBooks() (*[]model.Book, error)
- func (b *BookService) FindAllBooksByPage(page string, size string) (*model.Page, error)
- func (b *BookService) FindBooksByTitle(title string, page string, size string) (*model.Page, error)
- func (b *BookService) FindByID(id string) (*model.Book, error)
- func (b *BookService) UpdateBook(dto *dto.BookDto, id string) (*model.Book, map[string]string)
- type CategoryService
- type FormatService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountService ¶ added in v1.5.0
type AccountService struct {
// contains filtered or unexported fields
}
AccountService is a service for managing user account.
func NewAccountService ¶ added in v1.5.0
func NewAccountService(container container.Container) *AccountService
NewAccountService is constructor.
func (*AccountService) AuthenticateByUsernameAndPassword ¶ added in v1.5.0
func (a *AccountService) AuthenticateByUsernameAndPassword(username string, password string) (bool, *model.Account)
AuthenticateByUsernameAndPassword authenticates by using username and plain text password.
type BookService ¶ added in v1.5.0
type BookService struct {
// contains filtered or unexported fields
}
BookService is a service for managing books.
func NewBookService ¶ added in v1.5.0
func NewBookService(container container.Container) *BookService
NewBookService is constructor.
func (*BookService) CreateBook ¶ added in v1.5.2
CreateBook register the given book data.
func (*BookService) DeleteBook ¶ added in v1.5.0
DeleteBook deletes the given book data.
func (*BookService) FindAllBooks ¶ added in v1.5.0
func (b *BookService) FindAllBooks() (*[]model.Book, error)
FindAllBooks returns the list of all books.
func (*BookService) FindAllBooksByPage ¶ added in v1.5.0
FindAllBooksByPage returns the page object of all books.
func (*BookService) FindBooksByTitle ¶ added in v1.5.0
FindBooksByTitle returns the page object of books matched given book title.
func (*BookService) FindByID ¶ added in v1.5.0
func (b *BookService) FindByID(id string) (*model.Book, error)
FindByID returns one record matched book's id.
func (*BookService) UpdateBook ¶ added in v1.5.2
UpdateBook updates the given book data.
type CategoryService ¶ added in v1.5.2
type CategoryService struct {
// contains filtered or unexported fields
}
CategoryService is a service for managing master data such as format and category.
func NewCategoryService ¶ added in v1.5.2
func NewCategoryService(container container.Container) *CategoryService
NewCategoryService is constructor.
func (*CategoryService) FindAllCategories ¶ added in v1.5.2
func (m *CategoryService) FindAllCategories() *[]model.Category
FindAllCategories returns the list of all categories.
type FormatService ¶ added in v1.5.2
type FormatService struct {
// contains filtered or unexported fields
}
FormatService is a service for managing master data such as format and category.
func NewFormatService ¶ added in v1.5.2
func NewFormatService(container container.Container) *FormatService
NewFormatService is constructor.
func (*FormatService) FindAllFormats ¶ added in v1.5.2
func (m *FormatService) FindAllFormats() *[]model.Format
FindAllFormats returns the list of all formats.