Documentation ¶
Overview ¶
权限控制 存储落地默认mysql web 控制页面 权限 群组 用户
Index ¶
- type Galaxy
- func (this *Galaxy) AddLog(user_id int64, role_id int, logContent, tag, ipv4 string) error
- func (this *Galaxy) AddUser(id int64, name, info, pass string) (err error)
- func (this *Galaxy) DelUser(id int64) (err error)
- func (this *Galaxy) EditUser(id int64, name, info string, status int, pass string) (err error)
- func (this *Galaxy) GetPermissionByUserId(userId int64) (mp []*model.Permission, err error)
- func (this *Galaxy) GetUserInfo(name, password string) (*model.User, error)
- func (this *Galaxy) GetUserRole(userId int64) *model.Role
- func (this *Galaxy) Run() (err error)
- func (this *Galaxy) ValidatePermission(userId int64, path string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Galaxy ¶
type Galaxy struct { AdminPort int //管理界面端口 MysqlDsn string //user:pass@tcp(127.0.0.1:3306)/galaxy?timeout=3s&parseTime=true&loc=Local&charset=utf8mb4,utf8 MysqlNum int TemplatePath string Debug bool DbName string AdminList map[string]string }
func (*Galaxy) GetPermissionByUserId ¶
func (this *Galaxy) GetPermissionByUserId(userId int64) (mp []*model.Permission, err error)
根据角色ID获取权限列表
func (*Galaxy) GetUserInfo ¶
获取用户详情 pass为加密之后的字符串
Click to show internal directories.
Click to hide internal directories.