Versions in this module Expand all Collapse all v1 v1.0.1 Mar 6, 2024 Changes in this version + func Delete(c Container, config CrudConfig) fiber.Handler + func Get(c Container, config CrudConfig) fiber.Handler + func Post(c Container, config CrudConfig) fiber.Handler + func Put(c Container, config CrudConfig) fiber.Handler + func RegisterCrudRoutes(router fiber.Router, c Container) + type Container interface + GetCrudConfigs func() []CrudConfig + GetCrudRepo func() CrudRepository + GetDatabase func() Database + GetLogger func() logging.Logger + type CrudConfig interface + CreateDeleteFilter func(ctx *fiber.Ctx) DatabaseFilter + CreateGetFilter func(ctx *fiber.Ctx) DatabaseFilter + CreateUpdateFilter func(ctx *fiber.Ctx) DatabaseFilter + GetBasePath func() string + GetEntityEntry func() interface{} + MapPostEntry func(entry interface{}, ctx *fiber.Ctx, tx *storage.Transaction) (mapped Entry, err error) + MapPutEntry func(entry interface{}, ctx *fiber.Ctx, tx *storage.Transaction) (mapped Entry, err error) + SerializeList func(entries []interface{}, ctx *fiber.Ctx, tx *storage.Transaction) (serialized interface{}, err error) + UseContainer func(c Container) + type CrudContainer struct + func (c *CrudContainer) GetCrudConfigs() []CrudConfig + func (c *CrudContainer) UseCrudConfig(crud CrudConfig) + type CrudRepository interface + GetAllEntries func(tx *storage.Transaction, filter DatabaseFilter, t interface{}) (entries []interface{}, err error) + GetByID func(tx *storage.Transaction, id uint, filter DatabaseFilter, t interface{}) (entry interface{}, err error) + type Database interface + Begin func() (tx *storage.Transaction, err error) + Gorm func() *gorm.DB + UseTransaction func(fn storage.HandlerFunc) error + type DatabaseFilter func(db *gorm.DB) *gorm.DB + type Entry interface + GetID func() uint + type Error struct + func NewError(responseCode int, err error) Error + func (e Error) Error() string + func (e Error) Respond() Error + func (e Error) Unwrap() error + type Repo interface + Delete func(tx *storage.Transaction, entry interface{}) (err error) + Insert func(tx *storage.Transaction, entry interface{}) (err error) + Remove func(tx *storage.Transaction, entry interface{}) (err error) + Update func(tx *storage.Transaction, entry interface{}) (err error) + type Repository struct + func (r *Repository) GetAllEntries(tx *storage.Transaction, filter DatabaseFilter, t interface{}) (entries []interface{}, err error) + func (r *Repository) GetByID(tx *storage.Transaction, id uint, filter DatabaseFilter, t interface{}) (entry interface{}, err error) v1.0.0 Sep 21, 2021