Documentation ¶
Index ¶
- func DeleteBookHandler(c *fiber.Ctx, s Service) error
- func GetBookHandler(c *fiber.Ctx, s Service) error
- func GetBooksHandler(c *fiber.Ctx, s Service) error
- func NewBookHandler(c *fiber.Ctx, s Service) error
- func SetupBookRoutes(app *fiber.App, s Service)
- type Book
- type BookService
- type Service
- type ServiceStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteBookHandler ¶
func GetBookHandler ¶
func GetBooksHandler ¶
func NewBookHandler ¶
func SetupBookRoutes ¶
func SetupBookRoutes(app *fiber.App, s Service)
Types ¶
type Book ¶
type Book struct { ID uint `json:"id" gorm:"primarykey"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index"` Title string `json:"title" gorm:"uniqueIndex:books_title;not null;default:null"` AuthorID uint `json:"author_id" gorm:"uniqueIndex:books_title;not null;default:null;TYPE:integer REFERENCES users"` Rating int `json:"rating" gorm:"default=0"` }
type BookService ¶
type BookService interface { }
type ServiceStruct ¶
type ServiceStruct struct{}
Click to show internal directories.
Click to hide internal directories.