cotrollers

package
v0.0.0-...-9dfc967 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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) Delete

func (bc *BookController) Delete(bookModel *models.BookModel) error

func (*BookController) GetBook

func (bc *BookController) GetBook(bookKey string) (*models.BookModel, error)

func (*BookController) GetBooks

func (bc *BookController) GetBooks(nameLike string, page, pageSize int) ([]*models.BookModel, int, error)

func (*BookController) Update

func (bc *BookController) Update(bookModel *models.BookModel, name, mask, status string) 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

Jump to

Keyboard shortcuts

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