Documentation
¶
Index ¶
- Constants
- func CreateOrUpdatePolicyRegistration(p *Policy, _ *zap.SugaredLogger) error
- func CreateOrUpdateSystemRoleBinding(ns string, rb *RoleBinding, logger *zap.SugaredLogger) error
- func CreateRole(ns string, role *Role, _ *zap.SugaredLogger) error
- func CreateRoleBindings(ns string, rbs []*RoleBinding, logger *zap.SugaredLogger) error
- func DeleteRole(name string, projectName string, logger *zap.SugaredLogger) error
- func DeleteRoleBinding(name string, projectName string, _ *zap.SugaredLogger) error
- func DeleteRoleBindings(names []string, projectName string, _ *zap.SugaredLogger) error
- func DeleteRoles(names []string, projectName string, logger *zap.SugaredLogger) error
- func UpdateOrCreateRole(ns string, role *Role, _ *zap.SugaredLogger) error
- func UpdateOrCreateRoleBinding(ns string, rb *RoleBinding, logger *zap.SugaredLogger) error
- func UpdateRole(ns string, role *Role, _ *zap.SugaredLogger) error
- type ActionRule
- type Policy
- type PolicyDefinition
- type PolicyRule
- type PolicyRuleDefinition
- type Role
- type RoleBinding
- type Rule
Constants ¶
View Source
const SystemScope = "*"
Variables ¶
This section is empty.
Functions ¶
func CreateOrUpdatePolicyRegistration ¶ added in v1.7.0
func CreateOrUpdatePolicyRegistration(p *Policy, _ *zap.SugaredLogger) error
func CreateOrUpdateSystemRoleBinding ¶ added in v1.7.0
func CreateOrUpdateSystemRoleBinding(ns string, rb *RoleBinding, logger *zap.SugaredLogger) error
func CreateRole ¶
func CreateRole(ns string, role *Role, _ *zap.SugaredLogger) error
func CreateRoleBindings ¶ added in v1.7.0
func CreateRoleBindings(ns string, rbs []*RoleBinding, logger *zap.SugaredLogger) error
func DeleteRole ¶ added in v1.7.0
func DeleteRole(name string, projectName string, logger *zap.SugaredLogger) error
func DeleteRoleBinding ¶ added in v1.7.0
func DeleteRoleBinding(name string, projectName string, _ *zap.SugaredLogger) error
func DeleteRoleBindings ¶ added in v1.7.0
func DeleteRoleBindings(names []string, projectName string, _ *zap.SugaredLogger) error
func DeleteRoles ¶ added in v1.7.0
func DeleteRoles(names []string, projectName string, logger *zap.SugaredLogger) error
func UpdateOrCreateRole ¶ added in v1.7.0
func UpdateOrCreateRole(ns string, role *Role, _ *zap.SugaredLogger) error
func UpdateOrCreateRoleBinding ¶ added in v1.7.0
func UpdateOrCreateRoleBinding(ns string, rb *RoleBinding, logger *zap.SugaredLogger) error
func UpdateRole ¶ added in v1.7.0
func UpdateRole(ns string, role *Role, _ *zap.SugaredLogger) error
Types ¶
type ActionRule ¶ added in v1.7.0
type Policy ¶ added in v1.7.0
type Policy struct { Resource string `json:"resource"` Alias string `json:"alias"` Description string `json:"description"` Rules []*PolicyRule `json:"rules"` }
type PolicyDefinition ¶ added in v1.7.0
type PolicyDefinition struct { Resource string `json:"resource"` Alias string `json:"alias"` Description string `json:"description"` Rules []*PolicyRuleDefinition `json:"rules"` }
func GetPolicyRegistrationDefinitions ¶ added in v1.7.0
func GetPolicyRegistrationDefinitions(_ *zap.SugaredLogger) ([]*PolicyDefinition, error)
type PolicyRule ¶
type PolicyRule struct { Action string `json:"action"` Alias string `json:"alias"` Description string `json:"description"` Rules []*ActionRule `json:"rules"` }
type PolicyRuleDefinition ¶ added in v1.7.0
type RoleBinding ¶
type RoleBinding struct { Name string `json:"name"` UID string `json:"uid"` Role string `json:"role"` Public bool `json:"public"` }
func ListRoleBindings ¶ added in v1.7.0
func ListRoleBindings(ns, uid string, _ *zap.SugaredLogger) ([]*RoleBinding, error)
func ListRoleBindingsByRole ¶ added in v1.7.0
func ListRoleBindingsByRole(ns, roleName string, publicRole bool, _ *zap.SugaredLogger) ([]*RoleBinding, error)
Click to show internal directories.
Click to hide internal directories.