Documentation ¶
Index ¶
- Variables
- func GetNewFormList(old []types.Form) []types.Form
- func InitTableList()
- func RefreshTableList()
- func SetGenerators(generators map[string]Generator)
- type Columns
- type Config
- type DefaultTable
- func (tb DefaultTable) DeleteDataFromDatabase(id string)
- func (tb DefaultTable) GetCanAdd() bool
- func (tb DefaultTable) GetDataFromDatabase(path string, params parameter.Parameters) PanelInfo
- func (tb DefaultTable) GetDataFromDatabaseWithId(id string) ([]types.Form, string, string)
- func (tb DefaultTable) GetDataFromDatabaseWithIds(path string, params parameter.Parameters, ids []string) PanelInfo
- func (tb DefaultTable) GetDeletable() bool
- func (tb DefaultTable) GetEditable() bool
- func (tb DefaultTable) GetExportable() bool
- func (tb DefaultTable) GetFiltersMap() []map[string]string
- func (tb DefaultTable) GetForm() *types.FormPanel
- func (tb DefaultTable) GetInfo() *types.InfoPanel
- func (tb DefaultTable) InsertDataFromDatabase(dataList form.FormValue)
- func (tb DefaultTable) UpdateDataFromDatabase(dataList form.FormValue)
- type Generator
- type GeneratorList
- type PanelInfo
- type Table
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Generators = make(GeneratorList, 0) List = map[string]Table{} )
Functions ¶
func InitTableList ¶
func InitTableList()
func RefreshTableList ¶
func RefreshTableList()
RefreshTableList refresh the table list when the table relationship changed.
func SetGenerators ¶
SetGenerators update Generators.
Types ¶
type Config ¶
type Config struct { Driver string Connection string CanAdd bool Editable bool Deletable bool Exportable bool }
func DefaultConfigWithDriver ¶
type DefaultTable ¶
type DefaultTable struct {
// contains filtered or unexported fields
}
func (DefaultTable) DeleteDataFromDatabase ¶
func (tb DefaultTable) DeleteDataFromDatabase(id string)
DeleteDataFromDatabase delete data.
func (DefaultTable) GetCanAdd ¶
func (tb DefaultTable) GetCanAdd() bool
func (DefaultTable) GetDataFromDatabase ¶
func (tb DefaultTable) GetDataFromDatabase(path string, params parameter.Parameters) PanelInfo
GetDataFromDatabase query the data set.
func (DefaultTable) GetDataFromDatabaseWithId ¶
GetDataFromDatabaseWithId query the single row of data.
func (DefaultTable) GetDataFromDatabaseWithIds ¶ added in v0.0.11
func (tb DefaultTable) GetDataFromDatabaseWithIds(path string, params parameter.Parameters, ids []string) PanelInfo
GetDataFromDatabase query the data set.
func (DefaultTable) GetDeletable ¶
func (tb DefaultTable) GetDeletable() bool
func (DefaultTable) GetEditable ¶
func (tb DefaultTable) GetEditable() bool
func (DefaultTable) GetExportable ¶ added in v0.0.11
func (tb DefaultTable) GetExportable() bool
func (DefaultTable) GetFiltersMap ¶
func (tb DefaultTable) GetFiltersMap() []map[string]string
func (DefaultTable) GetForm ¶
func (tb DefaultTable) GetForm() *types.FormPanel
func (DefaultTable) GetInfo ¶
func (tb DefaultTable) GetInfo() *types.InfoPanel
func (DefaultTable) InsertDataFromDatabase ¶
func (tb DefaultTable) InsertDataFromDatabase(dataList form.FormValue)
InsertDataFromDatabase insert data.
func (DefaultTable) UpdateDataFromDatabase ¶
func (tb DefaultTable) UpdateDataFromDatabase(dataList form.FormValue)
UpdateDataFromDatabase update data.
type GeneratorList ¶
func (GeneratorList) Add ¶
func (g GeneratorList) Add(key string, gen Generator)
type Table ¶
type Table interface { GetInfo() *types.InfoPanel GetForm() *types.FormPanel GetCanAdd() bool GetEditable() bool GetDeletable() bool GetExportable() bool GetFiltersMap() []map[string]string GetDataFromDatabase(path string, params parameter.Parameters) PanelInfo GetDataFromDatabaseWithIds(path string, params parameter.Parameters, ids []string) PanelInfo GetDataFromDatabaseWithId(id string) ([]types.Form, string, string) UpdateDataFromDatabase(dataList form.FormValue) InsertDataFromDatabase(dataList form.FormValue) DeleteDataFromDatabase(id string) }
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 NewDefaultTable ¶
Click to show internal directories.
Click to hide internal directories.