Documentation ¶
Index ¶
- func ApiCount[T any]() gin.HandlerFunc
- func ApiCreate[T any](before, after func(m *T) error) gin.HandlerFunc
- func ApiDelete[T any](before, after func(id any) error) gin.HandlerFunc
- func ApiDisable[T any](disable bool, before, after func(id any) error) gin.HandlerFunc
- func ApiExport[T any](filename string) gin.HandlerFunc
- func ApiGet[T any](fields ...string) gin.HandlerFunc
- func ApiImport[T any]() gin.HandlerFunc
- func ApiList[T any](fields ...string) gin.HandlerFunc
- func ApiListWithId[T any](field string, fields ...string) gin.HandlerFunc
- func ApiModify[T any](before, after func(m *T) error, fields ...string) gin.HandlerFunc
- func ApiSearch[T any](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 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 Hook
- type ParamId
- type ParamList
- type ParamSearch
- type ParamStringId
- type ReplyData
- type ReplyList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiCount ¶ added in v3.0.1
func ApiCount[T any]() gin.HandlerFunc
func ApiDisable ¶
func ApiImport ¶ added in v3.0.3
func ApiImport[T any]() gin.HandlerFunc
func ApiListWithId ¶
func ApiListWithId[T any](field string, fields ...string) gin.HandlerFunc
func ApiModify ¶
func ApiModify[T any](before, after func(m *T) error, fields ...string) gin.HandlerFunc
func GenerateRandomId ¶ added in v3.0.2
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) 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.