Documentation ¶
Index ¶
- type Base
- type MenuModel
- func (t MenuModel) AddRole(roleId string)
- func (t MenuModel) CheckRole(roleId string) bool
- func (t MenuModel) Delete()
- func (t MenuModel) Find(id interface{}) MenuModel
- func (t MenuModel) MapToModel(m map[string]interface{}) MenuModel
- func (t MenuModel) New(title, parentId, icon, uri string, order int64) MenuModel
- func (t MenuModel) ResetOrder(data []map[string]interface{})
- func (t MenuModel) Update(title, parentId, icon, uri string) MenuModel
- type OperationLogModel
- type PermissionModel
- type RoleModel
- func (t RoleModel) AddPermission(permissionId string)
- func (t RoleModel) CheckPermission(permissionId string) bool
- func (t RoleModel) Find(id interface{}) RoleModel
- func (t RoleModel) MapToModel(m map[string]interface{}) RoleModel
- func (t RoleModel) New(name, slug string) RoleModel
- func (t RoleModel) Update(name, slug string) RoleModel
- type UserModel
- func (t UserModel) AddPermission(permissionId string)
- func (t UserModel) AddRole(roleId string)
- func (t UserModel) CheckPermission(permissionId string) bool
- func (t UserModel) CheckRole(roleId string) bool
- func (t UserModel) Find(id interface{}) UserModel
- func (t UserModel) FindByUserName(username interface{}) UserModel
- 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) 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MenuModel ¶ added in v0.0.5
type MenuModel struct { Base Id int64 Title string ParentId string Icon string Uri string CreatedAt string UpdatedAt string }
func MenuWithId ¶ added in v0.0.5
func (MenuModel) MapToModel ¶ added in v0.0.5
func (MenuModel) ResetOrder ¶ added in v0.0.5
type OperationLogModel ¶ added in v0.0.5
type OperationLogModel struct { Base Id int64 UserId int64 Path string Method string Ip string Input string CreatedAt string UpdatedAt string }
func OperationLog ¶ added in v0.0.5
func OperationLog() OperationLogModel
func (OperationLogModel) Find ¶ added in v0.0.5
func (t OperationLogModel) Find(id interface{}) OperationLogModel
func (OperationLogModel) MapToModel ¶ added in v0.0.5
func (t OperationLogModel) MapToModel(m map[string]interface{}) OperationLogModel
func (OperationLogModel) New ¶ added in v0.0.5
func (t OperationLogModel) New(userId int64, path, method, ip, input string) OperationLogModel
type PermissionModel ¶ added in v0.0.5
type PermissionModel struct { Base Id int64 Name string Slug string HttpMethod []string HttpPath []string CreatedAt string UpdatedAt string }
func Permission ¶ added in v0.0.5
func Permission() PermissionModel
func PermissionWithId ¶ added in v0.0.5
func PermissionWithId(id string) PermissionModel
func (PermissionModel) Find ¶ added in v0.0.5
func (t PermissionModel) Find(id interface{}) PermissionModel
func (PermissionModel) MapToModel ¶ added in v0.0.5
func (t PermissionModel) MapToModel(m map[string]interface{}) PermissionModel
type RoleModel ¶ added in v0.0.5
func RoleWithId ¶ added in v0.0.5
func (RoleModel) AddPermission ¶ added in v0.0.5
func (RoleModel) CheckPermission ¶ added in v0.0.5
func (RoleModel) MapToModel ¶ added in v0.0.5
type UserModel ¶ added in v0.0.5
type UserModel struct { Base Id int64 Name string UserName string Password string Avatar string RememberToken string Permissions []PermissionModel MenuIds []int64 Role RoleModel Level string LevelName string CreatedAt string UpdatedAt string }
func UserWithId ¶ added in v0.0.5
func (UserModel) AddPermission ¶ added in v0.0.5
func (UserModel) CheckPermission ¶ added in v0.0.5
func (UserModel) FindByUserName ¶ added in v0.0.5
func (UserModel) IsSuperAdmin ¶ added in v0.0.5
func (UserModel) MapToModel ¶ added in v0.0.5
func (UserModel) UpdateAvatar ¶ added in v0.0.5
func (UserModel) WithPermissions ¶ added in v0.0.5
Click to show internal directories.
Click to hide internal directories.