Versions in this module Expand all Collapse all v1 v1.2.13 May 18, 2020 v1.2.12 May 18, 2020 Changes in this version + type Base struct + Conn db.Connection + TableName string + func (b Base) SetConn(con db.Connection) Base + func (b Base) Table(table string) *db.SQL + type MenuModel struct + CreatedAt string + Header string + Icon string + Id int64 + ParentId int64 + Title string + UpdatedAt string + Uri string + func Menu() MenuModel + func MenuWithId(id string) MenuModel + func (t MenuModel) AddRole(roleId string) + func (t MenuModel) CheckRole(roleId string) bool + func (t MenuModel) Delete() + func (t MenuModel) DeleteRoles() + func (t MenuModel) Find(id interface{}) MenuModel + func (t MenuModel) MapToModel(m map[string]interface{}) MenuModel + func (t MenuModel) New(title, icon, uri, header string, parentId, order int64) MenuModel + func (t MenuModel) ResetOrder(data []map[string]interface{}) + func (t MenuModel) SetConn(con db.Connection) MenuModel + func (t MenuModel) Update(title, icon, uri, header string, parentId int64) MenuModel + type OperationLogModel struct + CreatedAt string + Id int64 + Input string + Ip string + Method string + Path string + UpdatedAt string + UserId int64 + func OperationLog() OperationLogModel + func (t OperationLogModel) Find(id interface{}) OperationLogModel + func (t OperationLogModel) MapToModel(m map[string]interface{}) OperationLogModel + func (t OperationLogModel) New(userId int64, path, method, ip, input string) OperationLogModel + func (t OperationLogModel) SetConn(con db.Connection) OperationLogModel + type PermissionModel struct + CreatedAt string + HttpMethod []string + HttpPath []string + Id int64 + Name string + Slug string + UpdatedAt string + func Permission() PermissionModel + func PermissionWithId(id string) PermissionModel + func (t PermissionModel) Find(id interface{}) PermissionModel + func (t PermissionModel) FindByName(name string) PermissionModel + func (t PermissionModel) FindBySlug(slug string) PermissionModel + func (t PermissionModel) IsEmpty() bool + func (t PermissionModel) IsSlugExist(slug string, id string) bool + func (t PermissionModel) MapToModel(m map[string]interface{}) PermissionModel + func (t PermissionModel) SetConn(con db.Connection) PermissionModel + type RoleModel struct + CreatedAt string + Id int64 + Name string + Slug string + UpdatedAt string + func Role() RoleModel + func RoleWithId(id string) RoleModel + func (t RoleModel) AddPermission(permissionId string) + func (t RoleModel) CheckPermission(permissionId string) bool + func (t RoleModel) DeletePermissions() + func (t RoleModel) Find(id interface{}) RoleModel + func (t RoleModel) IsSlugExist(slug string, id string) bool + func (t RoleModel) MapToModel(m map[string]interface{}) RoleModel + func (t RoleModel) New(name, slug string) RoleModel + func (t RoleModel) SetConn(con db.Connection) RoleModel + func (t RoleModel) Update(name, slug string) RoleModel + type UserModel struct + Avatar string + CreatedAt string + Id int64 + Level string + LevelName string + MenuIds []int64 + Name string + Password string + Permissions []PermissionModel + RememberToken string + Roles []RoleModel + UpdatedAt string + UserName string + func User() UserModel + func UserWithId(id string) UserModel + func (t UserModel) AddPermission(permissionId string) + func (t UserModel) AddRole(roleId string) + func (t UserModel) CheckPermission(permission string) bool + func (t UserModel) CheckPermissionById(permissionId string) bool + func (t UserModel) CheckPermissionByUrlMethod(path, method string, formParams url.Values) bool + func (t UserModel) CheckRole(slug string) bool + func (t UserModel) CheckRoleId(roleId string) bool + func (t UserModel) DeletePermissions() + func (t UserModel) DeleteRoles() + func (t UserModel) Find(id interface{}) UserModel + func (t UserModel) FindByUserName(username interface{}) UserModel + func (t UserModel) GetAllRoleId() []interface{} + func (t UserModel) GetCheckPermissionByUrlMethod(path, method string) string + func (t UserModel) HasMenu() bool + func (t UserModel) IsEmpty() bool + func (t UserModel) IsSuperAdmin() bool + func (t UserModel) MapToModel(m map[string]interface{}) UserModel + func (t UserModel) New(username, password, name, avatar string) UserModel + func (t UserModel) ReleaseConn() UserModel + func (t UserModel) SetConn(con db.Connection) UserModel + func (t UserModel) Update(username, password, name, avatar string) UserModel + func (t UserModel) UpdateAvatar(avatar string) + func (t UserModel) UpdatePwd(password string) UserModel + func (t UserModel) WithMenus() UserModel + func (t UserModel) WithPermissions() UserModel + func (t UserModel) WithRoles() UserModel v0 v0.0.2 Sep 19, 2018 Changes in this version + var Generators = map[string]TableGenerator + var TableList = map[string]Table + func CheckInTable(columns []string, find string) bool + func GetNewFormList(old []types.FormStruct) []types.FormStruct + func GetPaginator(path string, pageInt int, page, pageSize, sortField, sortType string, size int) types.PaginatorAttribute + func GetStringFromType(typeName string, value interface{}) string + func InitTableList() + func RefreshTableList() + func SetGenerators(generators map[string]TableGenerator) + type Columns []string + func GetColumns(columnsModel []map[string]interface{}, driver string) Columns + type Table struct + ConnectionDriver string + Form types.FormPanel + Info types.InfoPanel + func GetManagerTable() (ManagerTable Table) + func GetMenuTable() (MenuTable Table) + func GetOpTable() (OpTable Table) + func GetPermissionTable() (PermissionTable Table) + func GetRolesTable() (RolesTable Table) + func (tableModel Table) DeleteDataFromDatabase(prefix string, id string) + func (tableModel Table) GetDataFromDatabase(queryParam map[string]string) ([]map[string]string, []map[string]template.HTML, types.PaginatorAttribute, ...) + func (tableModel Table) GetDataFromDatabaseWithId(prefix string, id string) ([]types.FormStruct, string, string) + func (tableModel Table) InsertDataFromDatabase(prefix string, dataList map[string][]string) + func (tableModel Table) UpdateDataFromDatabase(prefix string, dataList map[string][]string) + type TableGenerator func() Table