Documentation ¶
Index ¶
- Constants
- type BookController
- func (bc *BookController) Create(name, mask, status string) (*models.BookModel, error)
- func (bc *BookController) Delete(bookModel *models.BookModel) error
- func (bc *BookController) GetBook(bookKey string) (*models.BookModel, error)
- func (bc *BookController) GetBooks(nameLike string, page, pageSize int) ([]*models.BookModel, int, error)
- func (bc *BookController) Update(bookModel *models.BookModel, name, mask, status string) error
- type BookStatusController
- type ControllerErr
Constants ¶
View Source
const ( ErrNotFound = ControllerErr("record nof found") ErrGeneric = ControllerErr("generic error") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookController ¶
type BookController baseController
func NewBookController ¶
func NewBookController(transaction *gorm.DB) BookController
func (*BookController) Create ¶
func (bc *BookController) Create(name, mask, status string) (*models.BookModel, error)
func (*BookController) GetBook ¶
func (bc *BookController) GetBook(bookKey string) (*models.BookModel, error)
type BookStatusController ¶
type BookStatusController baseController
func NewBookStatusController ¶
func NewBookStatusController(transaction *gorm.DB) BookStatusController
func (*BookStatusController) GetAllStatus ¶
func (s *BookStatusController) GetAllStatus() ([]*models.BookStatusModel, error)
func (*BookStatusController) GetStatus ¶
func (s *BookStatusController) GetStatus(enumerator string) (*models.BookStatusModel, error)
type ControllerErr ¶
type ControllerErr string
func (ControllerErr) Error ¶
func (e ControllerErr) Error() string
Click to show internal directories.
Click to hide internal directories.