type Role …
type Permissions …
type rwPermission …
type PermissionType …
const ReadPermission …
const WritePermission …
const ReadWritePermission …
func NewAuthRoleAPI(c Client) AuthRoleAPI { … }
type AuthRoleAPI …
type httpAuthRoleAPI …
type authRoleAPIAction …
type authRoleAPIList …
func (list *authRoleAPIList) HTTPRequest(ep url.URL) *http.Request { … }
func (l *authRoleAPIAction) HTTPRequest(ep url.URL) *http.Request { … }
func (r *httpAuthRoleAPI) ListRoles(ctx context.Context) ([]string, error) { … }
func (r *httpAuthRoleAPI) AddRole(ctx context.Context, rolename string) error { … }
func (r *httpAuthRoleAPI) RemoveRole(ctx context.Context, rolename string) error { … }
func (r *httpAuthRoleAPI) addRemoveRole(ctx context.Context, req *authRoleAPIAction) error { … }
func (r *httpAuthRoleAPI) GetRole(ctx context.Context, rolename string) (*Role, error) { … }
func buildRWPermission(prefixes []string, permType PermissionType) rwPermission { … }
func (r *httpAuthRoleAPI) GrantRoleKV(ctx context.Context, rolename string, prefixes []string, permType PermissionType) (*Role, error) { … }
func (r *httpAuthRoleAPI) RevokeRoleKV(ctx context.Context, rolename string, prefixes []string, permType PermissionType) (*Role, error) { … }
func (r *httpAuthRoleAPI) modRole(ctx context.Context, req *authRoleAPIAction) (*Role, error) { … }