Documentation ¶
Index ¶
- func DeleteAdmin(aid int) (err error)
- func DeleteRole(rid int) (err error)
- func I18n() (en map[string]string, zh map[string]string)
- func Migrate() (err error)
- func NewAdmin(ad Admin, rids []int) (err error)
- func NewRole(name string) (err error)
- func UpdateAdmin(ad Admin, rids []int) (err error)
- func UpdateRoleApis(roleId int, aids []int) (err error)
- func UpdateRoleFeatures(roleId int, fids []int) (err error)
- type Admin
- type AdminRole
- type Api
- type Feature
- type FrontI18N
- type LoginParam
- type LoginSucc
- type Menu
- type Role
- type RoleApi
- type RoleFeature
- type RoleMenu
- type SimpleAdmin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteAdmin ¶
func DeleteRole ¶
func UpdateAdmin ¶
func UpdateRoleApis ¶
func UpdateRoleFeatures ¶
Types ¶
type Admin ¶
type Admin struct { Id int `json:"id"` Username string `json:"username"` Password string `json:"password"` Nickname string `json:"nickname"` Roles []Role `gorm:"-" json:"roles"` // 是否启用 Enabled bool `json:"enabled"` }
Admin 管理员
func (Admin) ToSimple ¶
func (r Admin) ToSimple() SimpleAdmin
type Api ¶
type Feature ¶
type Feature struct { Id int `json:"id"` Name string `json:"name"` Menu int `json:"menu_id"` MenuEntity Menu `json:"menu" gorm:"-"` }
func FeatureList ¶
func SetMenuEntity ¶
type LoginParam ¶
type LoginSucc ¶
type Menu ¶
type RoleFeature ¶
func (RoleFeature) TableName ¶
func (RoleFeature) TableName() string
Click to show internal directories.
Click to hide internal directories.