Documentation ¶
Index ¶
- Variables
- func CheckInTable(colums []map[string]interface{}, find string) bool
- func GetPaginator(path string, pageInt int, page string, pageSize string, size int, ...) map[string]interface{}
- func GetStringFromType(typeName string, value interface{}) string
- func RefreshGlobalTableList()
- type FieldStruct
- type FieldValueFun
- type FormPanel
- type FormStruct
- type GlobalTable
- func (tableModel GlobalTable) DeleteDataFromDatabase(prefix string, id string)
- func (tableModel GlobalTable) GetDataFromDatabase(queryParam map[string]string) ([]string, []map[string]string, map[string]interface{}, string, string)
- func (tableModel GlobalTable) GetDataFromDatabaseWithId(prefix string, id string) ([]FormStruct, string, string)
- func (tableModel GlobalTable) InsertDataFromDatabase(prefix string, dataList map[string][]string)
- func (tableModel GlobalTable) UpdateDataFromDatabase(prefix string, dataList map[string][]string)
- type InfoPanel
- type RowModel
Constants ¶
This section is empty.
Variables ¶
View Source
var GlobalTableList = map[string]GlobalTable{ "manager": GetManagerTable(), "permission": GetPermissionTable(), "roles": GetRolesTable(), "op": GetOpTable(), "user": GetUserTable(), }
map下标是路由前缀,对应的值是GlobalTable类型,为表单与表格的数据抽象表示
Functions ¶
func CheckInTable ¶
检查字段是否在数据表中
func GetPaginator ¶
func GetStringFromType ¶
func RefreshGlobalTableList ¶
func RefreshGlobalTableList()
Types ¶
type FieldStruct ¶
type FieldStruct struct { ExcuFun FieldValueFun Field string TypeName string Head string }
展示列
func (*FieldStruct) SetField ¶
func (field *FieldStruct) SetField(fieldName string) *FieldStruct
func (*FieldStruct) SetHead ¶
func (field *FieldStruct) SetHead(head string) *FieldStruct
func (*FieldStruct) SetTypeName ¶
func (field *FieldStruct) SetTypeName(typeName string) *FieldStruct
type FormPanel ¶
type FormPanel struct { FormList []FormStruct Table string Title string Description string }
表单面板
type FormStruct ¶
type FormStruct struct { Field string TypeName string Head string Default string Editable bool FormType string Value string Options []map[string]string ExcuFun FieldValueFun }
表单列
type GlobalTable ¶
一个管理数据模块的抽象表示
func GetManagerTable ¶
func GetManagerTable() (userTable GlobalTable)
func GetOpTable ¶
func GetOpTable() (userTable GlobalTable)
func GetPermissionTable ¶
func GetPermissionTable() (userTable GlobalTable)
func GetRolesTable ¶
func GetRolesTable() (userTable GlobalTable)
func GetUserTable ¶
func GetUserTable() (userTable GlobalTable)
func (GlobalTable) DeleteDataFromDatabase ¶
func (tableModel GlobalTable) DeleteDataFromDatabase(prefix string, id string)
删数据
func (GlobalTable) GetDataFromDatabase ¶
func (tableModel GlobalTable) GetDataFromDatabase(queryParam map[string]string) ([]string, []map[string]string, map[string]interface{}, string, string)
查数据
func (GlobalTable) GetDataFromDatabaseWithId ¶
func (tableModel GlobalTable) GetDataFromDatabaseWithId(prefix string, id string) ([]FormStruct, string, string)
查单个数据
func (GlobalTable) InsertDataFromDatabase ¶
func (tableModel GlobalTable) InsertDataFromDatabase(prefix string, dataList map[string][]string)
增数据
func (GlobalTable) UpdateDataFromDatabase ¶
func (tableModel GlobalTable) UpdateDataFromDatabase(prefix string, dataList map[string][]string)
改数据
Click to show internal directories.
Click to hide internal directories.