Documentation ¶
Index ¶
- type Client
- func (c Client) DeleteResource(resID int64) error
- func (c Client) DeleteResourceRole(resID, roleID int64) error
- func (c Client) DeleteRole(id int64, name string) error
- func (c Client) DeleteRoleUser(roleID int64, email string) error
- func (c Client) DeleteUser(userID int64) error
- func (c Client) GetResource(resID int64) (meta.Resource, error)
- func (c Client) GetResourceRoles(resID int64) ([]meta.RoleResource, error)
- func (c Client) GetResourceRolesUnrelated(resID int64, email string) ([]meta.Role, error)
- func (c Client) GetRole(roleID int64) (meta.Role, error)
- func (c Client) GetRoleUsers(roleID int64) ([]meta.RoleUser, error)
- func (c Client) GetUser(email string) (meta.User, error)
- func (c Client) GetUserResourceIDs(email string) ([]int64, error)
- func (c Client) GetUserResources(email string) ([]meta.Resource, error)
- func (c Client) GetUserRoles(email string) ([]meta.RoleUser, error)
- func (c Client) PostResource(name, comments string) (int64, error)
- func (c Client) PostRole(name, comments, user, email string) (int64, error)
- func (c Client) PostRoleResource(roleID, resID int64) (int64, error)
- func (c Client) PostRoleUser(roleID int64, user, email string) (int64, error)
- func (c Client) PostUser(user, email string) (int64, error)
- func (c Client) PutRole(roleID int64, name, comments string) error
- func (c Client) PutUser(userID int64, user, email string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client rbac 客户端.
func (Client) DeleteResource ¶
DeleteResource 删除资源.
func (Client) DeleteResourceRole ¶
DeleteResourceRole 删除资源与角色对应关系.
func (Client) DeleteRole ¶
DeleteRole 删除角色,根据名称或者ID.
func (Client) DeleteRoleUser ¶
DeleteRoleUser 删除角色中用户.
func (Client) GetResource ¶
GetResource 获取资源.
func (Client) GetResourceRoles ¶
func (c Client) GetResourceRoles(resID int64) ([]meta.RoleResource, error)
GetResourceRoles 获取资源对应角色.
func (Client) GetResourceRolesUnrelated ¶
GetResourceRolesUnrelated 获取未资源对应的所有角色列表.
func (Client) GetRoleUsers ¶
GetRoleUsers 根据角色ID邮件获取相关用户.
func (Client) GetUserResourceIDs ¶
GetUserResourceIDs 根据用户邮箱,获取关联的资源ID.
func (Client) GetUserResources ¶
GetUserResources 根据用户邮箱,获取关联的资源.
func (Client) GetUserRoles ¶
GetUserRoles 根据邮件获取关联角色信息.
func (Client) PostResource ¶
PostResource 添加资源.
func (Client) PostRoleResource ¶
PostRoleResource 关联角色与资源.
func (Client) PostRoleUser ¶
PostRoleUser 给角色添加用户.
Click to show internal directories.
Click to hide internal directories.