Versions in this module Expand all Collapse all v0 v0.0.7 Feb 4, 2025 v0.0.6 Feb 4, 2025 v0.0.5 Feb 4, 2025 v0.0.4 Feb 3, 2025 v0.0.3 Jan 20, 2025 v0.0.2 Jan 20, 2025 v0.0.1 Jan 20, 2025 Changes in this version + const SiteItemOffState + const SiteItemOpenState + type Base struct + Conn db.Connection + TableName string + Tx *sql.Tx + 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) (int64, error) + func (t MenuModel) CheckRole(roleId string) bool + func (t MenuModel) Delete() + func (t MenuModel) DeleteRoles() error + func (t MenuModel) Find(id interface{}) MenuModel + func (t MenuModel) MapToModel(m map[string]interface{}) MenuModel + func (t MenuModel) New(title, icon, uri, header, pluginName string, parentId, order int64) (MenuModel, error) + func (t MenuModel) ResetOrder(data []byte) + func (t MenuModel) SetConn(con db.Connection) MenuModel + func (t MenuModel) Update(title, icon, uri, header, pluginName string, parentId int64) (int64, error) + 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 OrderItem struct + Children OrderItems + ID uint + type OrderItems []OrderItem + 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) (int64, error) + func (t RoleModel) CheckPermission(permissionId string) bool + func (t RoleModel) DeletePermissions() error + 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, error) + func (t RoleModel) SetConn(con db.Connection) RoleModel + func (t RoleModel) Update(name, slug string) (int64, error) + func (t RoleModel) WithTx(tx *sql.Tx) RoleModel + type SiteModel struct + CreatedAt string + Desc string + Id int64 + Key string + State int64 + UpdatedAt string + Value string + func Site() SiteModel + func (t SiteModel) AllToMap() map[string]string + func (t SiteModel) AllToMapInterface() map[string]interface{} + func (t SiteModel) Init(cfg map[string]string) SiteModel + func (t SiteModel) SetConn(con db.Connection) SiteModel + func (t SiteModel) Update(v form.Values) error + func (t SiteModel) WithTx(tx *sql.Tx) SiteModel + 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) (int64, error) + func (t UserModel) AddRole(roleId string) (int64, error) + 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() error + func (t UserModel) DeleteRoles() error + 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) HideUserCenterEntrance() bool + func (t UserModel) IsEmpty() bool + func (t UserModel) IsSuperAdmin() bool + func (t UserModel) IsVisitor() bool + func (t UserModel) MapToModel(m map[string]interface{}) UserModel + func (t UserModel) New(username, password, name, avatar string) (UserModel, error) + func (t UserModel) ReleaseConn() UserModel + func (t UserModel) SetConn(con db.Connection) UserModel + func (t UserModel) Template(str string) string + func (t UserModel) Update(username, password, name, avatar string, isUpdateAvatar bool) (int64, error) + 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 + func (t UserModel) WithTx(tx *sql.Tx) UserModel