Documentation ¶
Index ¶
- type AllowedFields
- type ByFieldIds
- type ById
- type ByQuery
- type CreateByPost
- type DbApplyFunc
- type DeleteById
- type Factory
- type FieldsMap
- func (f FieldsMap) AddOrderFunc(alias string, f1 OrderFuncFactory) FieldsMap
- func (f FieldsMap) AddPair(alias, field string) FieldsMap
- func (f FieldsMap) AddSimple(field string) FieldsMap
- func (f FieldsMap) AddWhereFunc(alias string, f1 WhereFuncFactory) FieldsMap
- func (f FieldsMap) AddWhereILike(alias string, field string) FieldsMap
- func (f FieldsMap) AddWhereLike(alias string, field string) FieldsMap
- type OrderFuncFactory
- type UpdateByPut
- type WhereFuncFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedFields ¶
func NewAllowedFields ¶
func NewAllowedFields() AllowedFields
func (AllowedFields) Add ¶
func (a AllowedFields) Add(from string, to ...string) AllowedFields
func (AllowedFields) AddId ¶
func (a AllowedFields) AddId(field string) AllowedFields
func (AllowedFields) Map ¶
func (a AllowedFields) Map(fields []string) []string
type ByFieldIds ¶
type ByFieldIds[T any] struct { // contains filtered or unexported fields }
func GetByFieldIds ¶
func GetByFieldIds[T any](f *Factory, field string) *ByFieldIds[T]
func (*ByFieldIds[T]) ByFieldIds ¶
func (h *ByFieldIds[T]) ByFieldIds(c *gin.Context)
func (*ByFieldIds[T]) ByFieldStringIds ¶
func (h *ByFieldIds[T]) ByFieldStringIds(c *gin.Context)
type CreateByPost ¶
type CreateByPost[T any] struct { // contains filtered or unexported fields }
func FactoryCreateByPost ¶
func FactoryCreateByPost[T any](h *Factory, allowedFields AllowedFields) *CreateByPost[T]
func NewCreateByPost ¶
func NewCreateByPost[T any](db *gorm.DB, allowedFields AllowedFields) *CreateByPost[T]
func (*CreateByPost[T]) Create ¶
func (u *CreateByPost[T]) Create(c *gin.Context)
type DeleteById ¶
type DeleteById[T any] struct { // contains filtered or unexported fields }
func FactoryDeleteById ¶
func FactoryDeleteById[T any](f *Factory, unscoped bool) *DeleteById[T]
func (*DeleteById[T]) Delete ¶
func (d *DeleteById[T]) Delete(c *gin.Context)
type FieldsMap ¶
type FieldsMap struct {
// contains filtered or unexported fields
}
func NewFieldMap ¶
func NewFieldMap() FieldsMap
func (FieldsMap) AddOrderFunc ¶
func (f FieldsMap) AddOrderFunc(alias string, f1 OrderFuncFactory) FieldsMap
func (FieldsMap) AddWhereFunc ¶
func (f FieldsMap) AddWhereFunc(alias string, f1 WhereFuncFactory) FieldsMap
func (FieldsMap) AddWhereILike ¶
type OrderFuncFactory ¶
type OrderFuncFactory func(bool) DbApplyFunc
type UpdateByPut ¶
type UpdateByPut[T any] struct { // contains filtered or unexported fields }
func FactoryUpdateByPut ¶
func FactoryUpdateByPut[T any](h *Factory, allowedFields AllowedFields) *UpdateByPut[T]
func NewUpdateByPut ¶
func NewUpdateByPut[T any](db *gorm.DB, allowedFields AllowedFields) *UpdateByPut[T]
func (*UpdateByPut[T]) Update ¶
func (u *UpdateByPut[T]) Update(c *gin.Context)
func (*UpdateByPut[T]) UpdateByStrField ¶
func (u *UpdateByPut[T]) UpdateByStrField(param string, search func(*gorm.DB, string, *T) error) gin.HandlerFunc
type WhereFuncFactory ¶
type WhereFuncFactory func(value string) DbApplyFunc
Click to show internal directories.
Click to hide internal directories.