Documentation
¶
Index ¶
- func GetActionLabel(c echo.Context, name string) string
- type ActionCallFun
- type ActionCallParamsFun
- type FormatFun
- type InitFun
- type ManyCallFun
- type MetaManyFun
- type MetaOneFun
- type OneCallFun
- type Pagination
- type QueryFun
- type QueryRequestFun
- type Resources
- func (t *Resources[T]) Create(ctx echo.Context) error
- func (t *Resources[T]) CreateAfter(call ActionCallParamsFun[T])
- func (t *Resources[T]) CreateBefore(call ActionCallParamsFun[T])
- func (t *Resources[T]) Delete(ctx echo.Context) error
- func (t *Resources[T]) DeleteAfter(call ActionCallFun[T])
- func (t *Resources[T]) DeleteBefore(call ActionCallFun[T])
- func (t *Resources[T]) DeleteMany(ctx echo.Context) error
- func (t *Resources[T]) Edit(ctx echo.Context) error
- func (t *Resources[T]) EditAfter(call ActionCallParamsFun[T])
- func (t *Resources[T]) EditBefore(call ActionCallParamsFun[T])
- func (t *Resources[T]) Format(call FormatFun[T])
- func (t *Resources[T]) Init(call InitFun[T])
- func (t *Resources[T]) List(ctx echo.Context) error
- func (t *Resources[T]) ManyAfter(call ManyCallFun[T])
- func (t *Resources[T]) MetaMany(call MetaManyFun[T])
- func (t *Resources[T]) MetaOne(call MetaManyFun[T])
- func (t *Resources[T]) OneAfter(call OneCallFun[T])
- func (t *Resources[T]) Preload(data ...string)
- func (t *Resources[T]) Query(call QueryFun)
- func (t *Resources[T]) QueryMany(call QueryRequestFun)
- func (t *Resources[T]) QueryOne(call QueryRequestFun)
- func (t *Resources[T]) QueryParams(data any)
- func (t *Resources[T]) Restore(ctx echo.Context) error
- func (t *Resources[T]) RestoreAfter(call ActionCallFun[T])
- func (t *Resources[T]) RestoreBefore(call ActionCallFun[T])
- func (t *Resources[T]) RestoreMany(ctx echo.Context) error
- func (t *Resources[T]) Result() Result
- func (t *Resources[T]) SaveAfter(call ActionCallParamsFun[T])
- func (t *Resources[T]) SaveBefore(call ActionCallParamsFun[T])
- func (t *Resources[T]) Show(ctx echo.Context) error
- func (t *Resources[T]) Store(ctx echo.Context) error
- func (t *Resources[T]) StoreAfter(call ActionCallParamsFun[T])
- func (t *Resources[T]) StoreBefore(call ActionCallParamsFun[T])
- func (t *Resources[T]) Transform(call TransformFun[T])
- func (t *Resources[T]) Trash(ctx echo.Context) error
- func (t *Resources[T]) TrashAfter(call ActionCallFun[T])
- func (t *Resources[T]) TrashBefore(call ActionCallFun[T])
- func (t *Resources[T]) TrashMany(ctx echo.Context) error
- func (t *Resources[T]) Validator(call ValidatorFun)
- type Result
- type TransformFun
- type ValidatorFun
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActionLabel ¶
Types ¶
type ActionCallParamsFun ¶
type ManyCallFun ¶
type MetaManyFun ¶
type MetaOneFun ¶
type OneCallFun ¶
type Pagination ¶
type QueryRequestFun ¶
type Resources ¶
type Resources[T any] struct { Model T Key string Tree bool TreeSort string Pagination Pagination IncludesMany []string ExcludesMany []string IncludesOne []string ExcludesOne []string TransformFun TransformFun[T] ActionList bool ActionShow bool ActionCreate bool ActionEdit bool ActionDelete bool ActionStore bool ActionSoftDelete bool Extend map[string]any // contains filtered or unexported fields }
func (*Resources[T]) CreateAfter ¶
func (t *Resources[T]) CreateAfter(call ActionCallParamsFun[T])
func (*Resources[T]) CreateBefore ¶
func (t *Resources[T]) CreateBefore(call ActionCallParamsFun[T])
func (*Resources[T]) DeleteAfter ¶
func (t *Resources[T]) DeleteAfter(call ActionCallFun[T])
func (*Resources[T]) DeleteBefore ¶
func (t *Resources[T]) DeleteBefore(call ActionCallFun[T])
func (*Resources[T]) DeleteMany ¶
func (*Resources[T]) EditAfter ¶
func (t *Resources[T]) EditAfter(call ActionCallParamsFun[T])
func (*Resources[T]) EditBefore ¶
func (t *Resources[T]) EditBefore(call ActionCallParamsFun[T])
func (*Resources[T]) ManyAfter ¶
func (t *Resources[T]) ManyAfter(call ManyCallFun[T])
func (*Resources[T]) OneAfter ¶
func (t *Resources[T]) OneAfter(call OneCallFun[T])
func (*Resources[T]) QueryMany ¶
func (t *Resources[T]) QueryMany(call QueryRequestFun)
QueryMany 多条数据查询
func (*Resources[T]) QueryOne ¶
func (t *Resources[T]) QueryOne(call QueryRequestFun)
QueryOne 单条数据查询
func (*Resources[T]) QueryParams ¶
func (*Resources[T]) RestoreAfter ¶
func (t *Resources[T]) RestoreAfter(call ActionCallFun[T])
func (*Resources[T]) RestoreBefore ¶
func (t *Resources[T]) RestoreBefore(call ActionCallFun[T])
func (*Resources[T]) RestoreMany ¶
func (*Resources[T]) SaveAfter ¶
func (t *Resources[T]) SaveAfter(call ActionCallParamsFun[T])
func (*Resources[T]) SaveBefore ¶
func (t *Resources[T]) SaveBefore(call ActionCallParamsFun[T])
func (*Resources[T]) StoreAfter ¶
func (t *Resources[T]) StoreAfter(call ActionCallParamsFun[T])
func (*Resources[T]) StoreBefore ¶
func (t *Resources[T]) StoreBefore(call ActionCallParamsFun[T])
func (*Resources[T]) Transform ¶
func (t *Resources[T]) Transform(call TransformFun[T])
Transform 字段转换
func (*Resources[T]) TrashAfter ¶
func (t *Resources[T]) TrashAfter(call ActionCallFun[T])
func (*Resources[T]) TrashBefore ¶
func (t *Resources[T]) TrashBefore(call ActionCallFun[T])
func (*Resources[T]) Validator ¶
func (t *Resources[T]) Validator(call ValidatorFun)
Validator 数据验证 Docs github.com/go-playground/validator/v10
type ValidatorFun ¶
type ValidatorFun func(data *gjson.Result, e echo.Context) (validator.ValidatorRule, error)
Click to show internal directories.
Click to hide internal directories.