types

package
v0.0.38 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnInfo added in v0.0.36

type ColumnInfo struct {
	Field      string   `json:"field"`
	Name       string   `json:"name"`
	IsEdit     bool     `json:"is_edit" json:"isEdit"`
	Md5Encrypt bool     `json:"md5_encrypt" json:"md5Encrypt"`
	Type       string   `json:"type"`
	Require    bool     `json:"require"`
	Disabled   bool     `json:"disabled"`
	DictQuery  DictInfo `json:"dict_query" json:"dictQuery"`
}

type ColumnInfos added in v0.0.36

type ColumnInfos []ColumnInfo

func (ColumnInfos) HasField added in v0.0.36

func (columns ColumnInfos) HasField(field string) bool

type DictInfo added in v0.0.37

type DictInfo struct {
	Table         string                  `json:"table"`
	IdField       string                  `json:"id_field" bson:"idField"`
	NameField     string                  `json:"name_edit" json:"nameEdit"`
	Conditions    []express.ConditionInfo `json:"conditions"`
	GroupByFields []string                `json:"group_by_fields" json:"groupByFields"`
}

type DictInfos added in v0.0.37

type DictInfos []DictInfo

type HandleFunc

type HandleFunc func(ctx *gin.Context, params map[string]interface{}, db *gorm.DB, opts *Options)

HandleFunc defines the handler used by gin middleware as return value.

type HandleMap

type HandleMap map[string]HandleFunc

type Options added in v0.0.12

type Options struct {
	Handles        HandleMap
	ModelMapper    map[string]interface{}
	OnBeforeStart  func(eng *gin.Engine, config *config.AppConfig)
	OnUpload       func(ctx *gin.Context, filename string, bytes []byte, config *config.AppConfig) (bool, string)
	OnDownload     func(ctx *gin.Context, filename string, file interface{}, config *config.AppConfig) bool
	OnCreate       func(ctx *gin.Context, params *map[string]interface{}, config *config.AppConfig) bool
	OnUpdate       func(ctx *gin.Context, params *map[string]interface{}, config *config.AppConfig) bool
	OnRead         func(ctx *gin.Context, data *entity.Result, config *config.AppConfig) bool
	OnDelete       func(ctx *gin.Context, params *map[string]interface{}, config *config.AppConfig) bool
	DisableFastApi bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL