Documentation ¶
Index ¶
- func FromParam[T any](ctx *fiber.Ctx, param string) (*T, error)
- func FromQuery[T any](ctx *fiber.Ctx, param string) (*T, error)
- func SetEndpoints[T any](group string, router fiber.Router, database *gorm.DB, ...) (IStore[T], IService[T], IHandler[T])
- type Handler
- type IHandler
- type IService
- type IStore
- type Service
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IHandler ¶
type IHandler[T any] interface { Get(c *fiber.Ctx) error Create(c *fiber.Ctx) error Delete(c *fiber.Ctx) error List(c *fiber.Ctx) error }
func NewHandler ¶
func NewHandler[T any](service IService[T], logger *zap.SugaredLogger) IHandler[T]
type IService ¶
type IService[T any] interface { Get(id any) (*T, error) Create(obj *T) error Delete(id any) error List(start, limit int) ([]T, error) }
func NewService ¶
func NewService[T any](store IStore[T], logger *zap.SugaredLogger) IService[T]
type IStore ¶
Click to show internal directories.
Click to hide internal directories.