BackupRBAC()
This operation backs up your RBAC settings.
func (c *Client) BackupRBAC(ctx context.Context, option BackupRBACOption, callOptions ...grpc.CallOption) (*entity.RBACMeta, error)
Request Parameters
Parameter | Description | Type |
---|---|---|
| Context for the current call to work. |
|
| Optional parameters of the methods. |
|
| Optional parameters for calling the methods. |
|
BackupRBACOption
This is an interface type. The NewBackupRBACOption()
function implements this interface type.
NewBackupRBACOption()
The signature of the NewBackupRBACOption()
is as follows:
func NewBackupRBACOption() BackupRBACOption
This method has no parameters.
entity.RBACMeta
The entity.RBACMeta
struct type is as follows:
type RBACMeta struct {
Users []*entity.UserInfo
Roles []*entity.Role
RoleGrants []*entity.RoleGrants
PrivilegeGroups []*entity.PrivilegeGroup
}
The struct types that appear in the RBACMeta
struct are as follows:
entity.UserInfo
The entity.UserInfo
struct type is as follows:
type UserInfo struct {
Name string
Roles []string
Password string
}
entity.RoleGrants
The RoleGrants
struct type is as follows:
type RoleGrants struct {
Object string
ObjectName string
RoleName string
GrantorName string
PrivilegeName string
DbName string
}
entity.PrivilegeGroup
The PrivilegeGroup
struct type is as follows:
type PrivilegeGroup struct {
GroupName string
Privileges []string
}
Return
*entity.RBACMeta
Example