Documentation ¶
Index ¶
- func ApiClear[T any]() gin.HandlerFunc
- func ApiCount[T any]() gin.HandlerFunc
- func ApiCreate[T any]() gin.HandlerFunc
- func ApiCreateHook[T any](before, after func(m *T) error) gin.HandlerFunc
- func ApiDelete[T any]() gin.HandlerFunc
- func ApiDeleteHook[T any](before, after func(id any) error) gin.HandlerFunc
- func ApiDisable[T any](disable bool) gin.HandlerFunc
- func ApiDisableHook[T any](disable bool, before, after func(id any) error) gin.HandlerFunc
- func ApiExport(table, filename string) gin.HandlerFunc
- func ApiGet[T any](fields ...string) gin.HandlerFunc
- func ApiGetHook[T any](after func(m *T) error, fields ...string) gin.HandlerFunc
- func ApiGetMapHook[T any](after func(m map[string]any) error, fields ...string) gin.HandlerFunc
- func ApiImport(table string) gin.HandlerFunc
- func ApiList[T any](fields ...string) gin.HandlerFunc
- func ApiListHook[T any](after func(datum []*T) error, fields ...string) gin.HandlerFunc
- func ApiListMapHook[T any](after func(datum []map[string]any) error, fields ...string) gin.HandlerFunc
- func ApiListWithId[T any](field string, fields ...string) gin.HandlerFunc
- func ApiSearch[T any](fields ...string) gin.HandlerFunc
- func ApiSearchHook[T any](after func(datum []*T) error, fields ...string) gin.HandlerFunc
- func ApiSearchMapHook[T any](after func(datum []map[string]any) error, fields ...string) gin.HandlerFunc
- func ApiSearchWith[T any](join []*Join, fields ...string) gin.HandlerFunc
- func ApiSearchWithHook[T any](join []*Join, after func(datum []*T) error, fields ...string) gin.HandlerFunc
- func ApiUpdate[T any](fields ...string) gin.HandlerFunc
- func ApiUpdateHook[T any](before, after func(m *T) error, fields ...string) gin.HandlerFunc
- func Error(ctx *gin.Context, err error)
- func Fail(ctx *gin.Context, err string)
- func GenerateRandomId[T any](l int) func(data *T) error
- func GenerateRandomKey(l int) func(value interface{}) error
- func GenerateUuidKey(data interface{}) error
- func List(ctx *gin.Context, data interface{}, total int64)
- func Noop(ctx *gin.Context)
- func OK(ctx *gin.Context, data interface{})
- func ParseParamId(ctx *gin.Context)
- func ParseParamStringId(ctx *gin.Context)
- type Join
- type ParamId
- type ParamList
- type ParamSearch
- type ParamStringId
- type ReplyData
- type ReplyList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiClear ¶ added in v3.2.8
func ApiClear[T any]() gin.HandlerFunc
func ApiCount ¶ added in v3.0.1
func ApiCount[T any]() gin.HandlerFunc
func ApiCreate ¶
func ApiCreate[T any]() gin.HandlerFunc
func ApiCreateHook ¶ added in v3.0.10
func ApiCreateHook[T any](before, after func(m *T) error) gin.HandlerFunc
func ApiDelete ¶
func ApiDelete[T any]() gin.HandlerFunc
func ApiDeleteHook ¶ added in v3.0.10
func ApiDeleteHook[T any](before, after func(id any) error) gin.HandlerFunc
func ApiDisable ¶
func ApiDisable[T any](disable bool) gin.HandlerFunc
func ApiDisableHook ¶ added in v3.0.10
func ApiExport ¶ added in v3.0.3
func ApiExport(table, filename string) gin.HandlerFunc
func ApiGetHook ¶ added in v3.0.10
func ApiGetHook[T any](after func(m *T) error, fields ...string) gin.HandlerFunc
func ApiGetMapHook ¶ added in v3.0.10
func ApiImport ¶ added in v3.0.3
func ApiImport(table string) gin.HandlerFunc
func ApiListHook ¶ added in v3.0.10
func ApiListHook[T any](after func(datum []*T) error, fields ...string) gin.HandlerFunc
func ApiListMapHook ¶ added in v3.0.10
func ApiListWithId ¶
func ApiListWithId[T any](field string, fields ...string) gin.HandlerFunc
func ApiSearchHook ¶ added in v3.0.10
func ApiSearchHook[T any](after func(datum []*T) error, fields ...string) gin.HandlerFunc
func ApiSearchMapHook ¶ added in v3.0.10
func ApiSearchWith ¶ added in v3.0.10
func ApiSearchWith[T any](join []*Join, fields ...string) gin.HandlerFunc
func ApiSearchWithHook ¶ added in v3.0.10
func ApiUpdateHook ¶ added in v3.0.10
func ApiUpdateHook[T any](before, after func(m *T) error, fields ...string) gin.HandlerFunc
func GenerateRandomId ¶ added in v3.0.2
func GenerateRandomKey ¶
func GenerateUuidKey ¶
func GenerateUuidKey(data interface{}) error
func ParseParamId ¶
func ParseParamStringId ¶
Types ¶
type ParamSearch ¶
type ParamSearch struct { Skip int `form:"skip" json:"skip"` Limit int `form:"limit" json:"limit"` Sort map[string]int `form:"sort" json:"sort"` Filters map[string]interface{} `form:"filter" json:"filter"` Keywords map[string]string `form:"keyword" json:"keyword"` }
func (*ParamSearch) ToJoinQuery ¶ added in v3.0.10
func (body *ParamSearch) ToJoinQuery(table string) *xorm.Session
func (*ParamSearch) ToQuery ¶
func (body *ParamSearch) ToQuery() *xorm.Session
type ParamStringId ¶
type ParamStringId struct {
Id string `uri:"id"`
}
Click to show internal directories.
Click to hide internal directories.