Documentation ¶
Index ¶
- func AddPermission(upd Permissions) error
- func AddRole(upd Roles) error
- func AddRolePermission(upd RolePermission) error
- func AddRolesUser(upd RolesUser) error
- func CountPermission(condArr map[string]string) int64
- func CountRole(condArr map[string]string) int64
- func DeletePermission(ids string) error
- func DeleteRole(ids string) error
- func DeleteRolePermission(id int64) error
- func DeleteRolePermissionForRoleid(roleid int64) error
- func DeleteRolesUser(id int64) error
- func GetPermissiontName(id int64) string
- func UpdatePermission(id int64, upd Permissions) error
- func UpdateRole(id int64, upd Roles) error
- func UpdateRolesUser(upd RolesUser) error
- type Permissions
- func GetAuthList(page, pageSize int, filters ...interface{}) ([]*Permissions, int64)
- func GetPermission(id int64) (Permissions, error)
- func ListParentPermission() (num int64, err error, ops []Permissions)
- func ListPermission(condArr map[string]string, page int, offset int) (num int64, err error, ops []Permissions)
- func ListRoleUserPermission(roleid string) (num int64, err error, ops []Permissions)
- type RolePermission
- type Roles
- type RolesUser
- type RolesUserName
- type Urls
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPermission ¶
func AddPermission(upd Permissions) error
func AddRolePermission ¶
func AddRolePermission(upd RolePermission) error
func AddRolesUser ¶
func CountPermission ¶
func DeletePermission ¶
func DeleteRole ¶
func DeleteRolePermission ¶
func DeleteRolesUser ¶
func GetPermissiontName ¶
func UpdatePermission ¶
func UpdatePermission(id int64, upd Permissions) error
func UpdateRole ¶
func UpdateRolesUser ¶
Types ¶
type Permissions ¶
type Permissions struct { Id int64 `orm:"pk;column(id);"` Parentid int64 `orm:"column(parent_id)"` Name string `orm:"column(name)"` EName string `orm:"column(ename)"` Url string `orm:"column(url)"` Icon string `orm:"column(icon)"` IsShow int `orm:"column(is_show)"` Sort int `orm:"column(sort)"` }
func GetAuthList ¶
func GetAuthList(page, pageSize int, filters ...interface{}) ([]*Permissions, int64)
func GetPermission ¶
func GetPermission(id int64) (Permissions, error)
func ListParentPermission ¶
func ListParentPermission() (num int64, err error, ops []Permissions)
func ListPermission ¶
func ListRoleUserPermission ¶
func ListRoleUserPermission(roleid string) (num int64, err error, ops []Permissions)
func (*Permissions) TableName ¶
func (this *Permissions) TableName() string
type RolePermission ¶
type RolePermission struct { Id int64 `orm:"pk;"` Roleid int64 `orm:"column(role_id)"` Permissionid int64 `orm:"column(permission_id)"` }
func ListRolePermission ¶
func ListRolePermission(roleid int64) (ops []RolePermission)
func (*RolePermission) TableName ¶
func (this *RolePermission) TableName() string
type Roles ¶
type Roles struct { Id int64 `orm:"pk;column(id);"` Name string Summary string Created int64 Changed int64 }
func ListRoleAll ¶
type RolesUser ¶
type RolesUser struct { Id int64 `orm:"pk;auto"` Roleid int64 `orm:"column(role_id)"` Userid int64 `orm:"column(user_id)"` }
func GetRoleIdByUserId ¶
func ListRolesUser ¶
type RolesUserName ¶
func ListRolesUserAndName ¶
func ListRolesUserAndName(roleid int64) (num int64, err error, user []RolesUserName)
Click to show internal directories.
Click to hide internal directories.