Documentation
¶
Index ¶
- Variables
- func CheckInTable(columns []string, find string) bool
- func GetDefault(values url.Values, key, def string) string
- func GetNewFormList(old []types.Form) []types.Form
- func GetPaginator(path string, params *Parameters, size int) types.PaginatorAttribute
- func GetStringFromType(typeName string, value interface{}) string
- func InitTableList()
- func RefreshTableList()
- func SetGenerators(generators map[string]TableGenerator)
- type Columns
- type PanelInfo
- type Parameters
- func (param *Parameters) GetFixedParamStr() string
- func (param *Parameters) GetFixedParamStrWithoutPageSize() string
- func (param *Parameters) GetLastPageRouteParamStr() string
- func (param *Parameters) GetNextPageRouteParamStr() string
- func (param *Parameters) GetRouteParamStr() string
- func (param *Parameters) GetRouteParamStrWithoutPageSize() string
- func (param *Parameters) SetPage(page string) *Parameters
- type Table
- func (tb Table) DeleteDataFromDatabase(id string)
- func (tb Table) GetDataFromDatabase(path string, params *Parameters) PanelInfo
- func (tb Table) GetDataFromDatabaseWithId(id string) ([]types.Form, string, string)
- func (tb Table) GetFiltersMap() []map[string]string
- func (tb Table) InsertDataFromDatabase(dataList map[string][]string)
- func (tb Table) UpdateDataFromDatabase(dataList map[string][]string)
- type TableGenerator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Generators = map[string]TableGenerator{} TableList = map[string]Table{} )
Functions ¶
func CheckInTable ¶
CheckInTable checks the find string is in the columns or not.
func GetPaginator ¶
func GetPaginator(path string, params *Parameters, size int) types.PaginatorAttribute
func GetStringFromType ¶
func InitTableList ¶
func InitTableList()
func RefreshTableList ¶
func RefreshTableList()
RefreshTableList refresh the table list when the table relationship changed.
func SetGenerators ¶
func SetGenerators(generators map[string]TableGenerator)
Types ¶
type Parameters ¶ added in v0.0.4
type Parameters struct {
Page string
PageSize string
SortField string
SortType string
Fields map[string]string
}
func GetParam ¶ added in v0.0.4
func GetParam(values url.Values) *Parameters
func GetParamFromUrl ¶ added in v0.0.4
func GetParamFromUrl(value string) *Parameters
func (*Parameters) GetFixedParamStr ¶ added in v0.0.4
func (param *Parameters) GetFixedParamStr() string
func (*Parameters) GetFixedParamStrWithoutPageSize ¶ added in v0.0.4
func (param *Parameters) GetFixedParamStrWithoutPageSize() string
func (*Parameters) GetLastPageRouteParamStr ¶ added in v0.0.4
func (param *Parameters) GetLastPageRouteParamStr() string
func (*Parameters) GetNextPageRouteParamStr ¶ added in v0.0.4
func (param *Parameters) GetNextPageRouteParamStr() string
func (*Parameters) GetRouteParamStr ¶ added in v0.0.4
func (param *Parameters) GetRouteParamStr() string
func (*Parameters) GetRouteParamStrWithoutPageSize ¶ added in v0.0.4
func (param *Parameters) GetRouteParamStrWithoutPageSize() string
func (*Parameters) SetPage ¶ added in v0.0.4
func (param *Parameters) SetPage(page string) *Parameters
type Table ¶
func GetManagerTable ¶
func GetManagerTable() (ManagerTable Table)
func GetMenuTable ¶
func GetMenuTable() (MenuTable Table)
func GetOpTable ¶
func GetOpTable() (OpTable Table)
func GetPermissionTable ¶
func GetPermissionTable() (PermissionTable Table)
func GetRolesTable ¶
func GetRolesTable() (RolesTable Table)
func (Table) DeleteDataFromDatabase ¶
DeleteDataFromDatabase delete data.
func (Table) GetDataFromDatabase ¶
func (tb Table) GetDataFromDatabase(path string, params *Parameters) PanelInfo
GetDataFromDatabase query the data set.
func (Table) GetDataFromDatabaseWithId ¶
GetDataFromDatabaseWithId query the single row of data.
func (Table) GetFiltersMap ¶ added in v0.0.4
func (Table) InsertDataFromDatabase ¶
InsertDataFromDatabase insert data.
func (Table) UpdateDataFromDatabase ¶
UpdateDataFromDatabase update data.
type TableGenerator ¶
type TableGenerator func() Table
Click to show internal directories.
Click to hide internal directories.