kubernetes/pkg/apis/rbac/v1/helpers.go

type PolicyRuleBuilder

func NewRule(verbs ...string) *PolicyRuleBuilder {}

func (r *PolicyRuleBuilder) Groups(groups ...string) *PolicyRuleBuilder {}

func (r *PolicyRuleBuilder) Resources(resources ...string) *PolicyRuleBuilder {}

func (r *PolicyRuleBuilder) Names(names ...string) *PolicyRuleBuilder {}

func (r *PolicyRuleBuilder) URLs(urls ...string) *PolicyRuleBuilder {}

func (r *PolicyRuleBuilder) RuleOrDie() rbacv1.PolicyRule {}

func (r *PolicyRuleBuilder) Rule() (rbacv1.PolicyRule, error) {}

type ClusterRoleBindingBuilder

func NewClusterBinding(clusterRoleName string) *ClusterRoleBindingBuilder {}

func (r *ClusterRoleBindingBuilder) Groups(groups ...string) *ClusterRoleBindingBuilder {}

func (r *ClusterRoleBindingBuilder) Users(users ...string) *ClusterRoleBindingBuilder {}

func (r *ClusterRoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *ClusterRoleBindingBuilder {}

func (r *ClusterRoleBindingBuilder) BindingOrDie() rbacv1.ClusterRoleBinding {}

func (r *ClusterRoleBindingBuilder) Binding() (rbacv1.ClusterRoleBinding, error) {}

type RoleBindingBuilder

// NewRoleBinding creates a RoleBinding builder that can be used
// to define the subjects of a role binding. At least one of
// the `Groups`, `Users` or `SAs` method must be called before
// calling the `Binding*` methods.
func NewRoleBinding(roleName, namespace string) *RoleBindingBuilder {}

// Groups adds the specified groups as the subjects of the RoleBinding.
func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder {}

// Users adds the specified users as the subjects of the RoleBinding.
func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder {}

// SAs adds the specified service accounts as the subjects of the
// RoleBinding.
func (r *RoleBindingBuilder) SAs(namespace string, serviceAccountNames ...string) *RoleBindingBuilder {}

// BindingOrDie calls the binding method and panics if there is an error.
func (r *RoleBindingBuilder) BindingOrDie() rbacv1.RoleBinding {}

// Binding builds and returns the RoleBinding API object from the builder
// object.
func (r *RoleBindingBuilder) Binding() (rbacv1.RoleBinding, error) {}