Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint interface { Find(c fiber.Ctx) error FindByID(c fiber.Ctx) error Create(c fiber.Ctx) error Update(c fiber.Ctx) error Delete(c fiber.Ctx) error }
endpoint interface
func NewEndpoint ¶
func NewEndpoint() Endpoint
type Repository ¶
type Repository interface { Find(db *gorm.DB, req *Request) (*models.Book, error) FindByID(db *gorm.DB, id uint, i interface{}) error Create(db *gorm.DB, i interface{}) error Update(db *gorm.DB, m, i interface{}) error Delete(db *gorm.DB, i interface{}) error }
repository interface
func NewRepository ¶
func NewRepository() Repository
type RequestCreate ¶
type RequestID ¶
type RequestID struct {
ID uint `json:"-" path:"id" form:"id" query:"id" validate:"required"`
}
type RequestUpdate ¶
type Service ¶
type Service interface { Find(c *cctx.Context, req *Request) (interface{}, error) FindByID(c *cctx.Context, req *RequestID) (interface{}, error) Create(c *cctx.Context, req *RequestCreate) (interface{}, error) Update(c *cctx.Context, req *RequestUpdate) (interface{}, error) Delete(c *cctx.Context, req *RequestID) error }
service interface
func NewService ¶
func NewService() Service
Click to show internal directories.
Click to hide internal directories.