v1

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AggregationRuleBlank = (&AggregationRuleDie{}).DieFeed(rbacv1.AggregationRule{})
View Source
var ClusterRoleBindingBlank = (&ClusterRoleBindingDie{}).DieFeed(rbacv1.ClusterRoleBinding{})
View Source
var ClusterRoleBlank = (&ClusterRoleDie{}).DieFeed(rbacv1.ClusterRole{})
View Source
var PolicyRuleBlank = (&PolicyRuleDie{}).DieFeed(rbacv1.PolicyRule{})
View Source
var RoleBindingBlank = (&RoleBindingDie{}).DieFeed(rbacv1.RoleBinding{})
View Source
var RoleBlank = (&RoleDie{}).DieFeed(rbacv1.Role{})
View Source
var RoleRefBlank = (&RoleRefDie{}).DieFeed(rbacv1.RoleRef{})
View Source
var SubjectBlank = (&SubjectDie{}).DieFeed(rbacv1.Subject{})

Functions

This section is empty.

Types

type AggregationRuleDie

type AggregationRuleDie struct {
	// contains filtered or unexported fields
}

func (*AggregationRuleDie) ClusterRoleSelectors

func (d *AggregationRuleDie) ClusterRoleSelectors(v ...apismetav1.LabelSelector) *AggregationRuleDie

ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added

func (*AggregationRuleDie) ClusterRoleSelectorsDie

func (d *AggregationRuleDie) ClusterRoleSelectorsDie(selectors ...*diemetav1.LabelSelectorDie) *AggregationRuleDie

func (*AggregationRuleDie) DeepCopy

func (d *AggregationRuleDie) DeepCopy() *AggregationRuleDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*AggregationRuleDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*AggregationRuleDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*AggregationRuleDie) DieImmutable

func (d *AggregationRuleDie) DieImmutable(immutable bool) *AggregationRuleDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*AggregationRuleDie) DieRelease

func (d *AggregationRuleDie) DieRelease() rbacv1.AggregationRule

DieRelease returns the resource managed by the die.

func (*AggregationRuleDie) DieReleasePtr

func (d *AggregationRuleDie) DieReleasePtr() *rbacv1.AggregationRule

DieReleasePtr returns a pointer to the resource managed by the die.

func (*AggregationRuleDie) DieStamp

func (d *AggregationRuleDie) DieStamp(fn func(r *rbacv1.AggregationRule)) *AggregationRuleDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

type ClusterRoleBindingDie

type ClusterRoleBindingDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*ClusterRoleBindingDie) DeepCopy

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ClusterRoleBindingDie) DeepCopyObject

func (d *ClusterRoleBindingDie) DeepCopyObject() runtime.Object

func (*ClusterRoleBindingDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*ClusterRoleBindingDie) DieFeedPtr

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ClusterRoleBindingDie) DieImmutable

func (d *ClusterRoleBindingDie) DieImmutable(immutable bool) *ClusterRoleBindingDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ClusterRoleBindingDie) DieRelease

DieRelease returns the resource managed by the die.

func (*ClusterRoleBindingDie) DieReleasePtr

func (d *ClusterRoleBindingDie) DieReleasePtr() *rbacv1.ClusterRoleBinding

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ClusterRoleBindingDie) DieReleaseUnstructured

func (d *ClusterRoleBindingDie) DieReleaseUnstructured() runtime.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object.

func (*ClusterRoleBindingDie) DieStamp

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ClusterRoleBindingDie) GetObjectKind

func (d *ClusterRoleBindingDie) GetObjectKind() schema.ObjectKind

func (*ClusterRoleBindingDie) MarshalJSON

func (d *ClusterRoleBindingDie) MarshalJSON() ([]byte, error)

func (*ClusterRoleBindingDie) MetadataDie

func (d *ClusterRoleBindingDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *ClusterRoleBindingDie

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*ClusterRoleBindingDie) RoleRef

RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.

func (*ClusterRoleBindingDie) RoleRefDie

func (d *ClusterRoleBindingDie) RoleRefDie(fn func(d *RoleRefDie)) *ClusterRoleBindingDie

func (*ClusterRoleBindingDie) Subjects

Subjects holds references to the objects the role applies to.

func (*ClusterRoleBindingDie) SubjectsDie

func (d *ClusterRoleBindingDie) SubjectsDie(subjects ...*SubjectDie) *ClusterRoleBindingDie

func (*ClusterRoleBindingDie) UnmarshalJSON

func (d *ClusterRoleBindingDie) UnmarshalJSON(b []byte) error

type ClusterRoleDie

type ClusterRoleDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*ClusterRoleDie) AddRuleDie

func (d *ClusterRoleDie) AddRuleDie(rule *PolicyRuleDie) *ClusterRoleDie

func (*ClusterRoleDie) AggregationRule

func (d *ClusterRoleDie) AggregationRule(v *rbacv1.AggregationRule) *ClusterRoleDie

AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.

func (*ClusterRoleDie) AggregationRuleDie

func (d *ClusterRoleDie) AggregationRuleDie(fn func(d *AggregationRuleDie)) *ClusterRoleDie

func (*ClusterRoleDie) DeepCopy

func (d *ClusterRoleDie) DeepCopy() *ClusterRoleDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*ClusterRoleDie) DeepCopyObject

func (d *ClusterRoleDie) DeepCopyObject() runtime.Object

func (*ClusterRoleDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*ClusterRoleDie) DieFeedPtr

func (d *ClusterRoleDie) DieFeedPtr(r *rbacv1.ClusterRole) *ClusterRoleDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*ClusterRoleDie) DieImmutable

func (d *ClusterRoleDie) DieImmutable(immutable bool) *ClusterRoleDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*ClusterRoleDie) DieRelease

func (d *ClusterRoleDie) DieRelease() rbacv1.ClusterRole

DieRelease returns the resource managed by the die.

func (*ClusterRoleDie) DieReleasePtr

func (d *ClusterRoleDie) DieReleasePtr() *rbacv1.ClusterRole

DieReleasePtr returns a pointer to the resource managed by the die.

func (*ClusterRoleDie) DieReleaseUnstructured

func (d *ClusterRoleDie) DieReleaseUnstructured() runtime.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object.

func (*ClusterRoleDie) DieStamp

func (d *ClusterRoleDie) DieStamp(fn func(r *rbacv1.ClusterRole)) *ClusterRoleDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*ClusterRoleDie) GetObjectKind

func (d *ClusterRoleDie) GetObjectKind() schema.ObjectKind

func (*ClusterRoleDie) MarshalJSON

func (d *ClusterRoleDie) MarshalJSON() ([]byte, error)

func (*ClusterRoleDie) MetadataDie

func (d *ClusterRoleDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *ClusterRoleDie

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*ClusterRoleDie) Rules

Rules holds all the PolicyRules for this ClusterRole

func (*ClusterRoleDie) RulesDie

func (d *ClusterRoleDie) RulesDie(rules ...*PolicyRuleDie) *ClusterRoleDie

func (*ClusterRoleDie) UnmarshalJSON

func (d *ClusterRoleDie) UnmarshalJSON(b []byte) error

type PolicyRuleDie

type PolicyRuleDie struct {
	// contains filtered or unexported fields
}

func (*PolicyRuleDie) APIGroups

func (d *PolicyRuleDie) APIGroups(v ...string) *PolicyRuleDie

APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed.

func (*PolicyRuleDie) AddAPIGroups

func (d *PolicyRuleDie) AddAPIGroups(apiGroups ...string) *PolicyRuleDie

func (*PolicyRuleDie) AddAResources

func (d *PolicyRuleDie) AddAResources(resources ...string) *PolicyRuleDie

func (*PolicyRuleDie) AddNonResourceURLs

func (d *PolicyRuleDie) AddNonResourceURLs(nonResourceURLs ...string) *PolicyRuleDie

func (*PolicyRuleDie) AddResourceNames

func (d *PolicyRuleDie) AddResourceNames(resourceNames ...string) *PolicyRuleDie

func (*PolicyRuleDie) AddVerbs

func (d *PolicyRuleDie) AddVerbs(verbs ...string) *PolicyRuleDie

func (*PolicyRuleDie) DeepCopy

func (d *PolicyRuleDie) DeepCopy() *PolicyRuleDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*PolicyRuleDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*PolicyRuleDie) DieFeedPtr

func (d *PolicyRuleDie) DieFeedPtr(r *rbacv1.PolicyRule) *PolicyRuleDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*PolicyRuleDie) DieImmutable

func (d *PolicyRuleDie) DieImmutable(immutable bool) *PolicyRuleDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*PolicyRuleDie) DieRelease

func (d *PolicyRuleDie) DieRelease() rbacv1.PolicyRule

DieRelease returns the resource managed by the die.

func (*PolicyRuleDie) DieReleasePtr

func (d *PolicyRuleDie) DieReleasePtr() *rbacv1.PolicyRule

DieReleasePtr returns a pointer to the resource managed by the die.

func (*PolicyRuleDie) DieStamp

func (d *PolicyRuleDie) DieStamp(fn func(r *rbacv1.PolicyRule)) *PolicyRuleDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*PolicyRuleDie) NonResourceURLs

func (d *PolicyRuleDie) NonResourceURLs(v ...string) *PolicyRuleDie

NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.

func (*PolicyRuleDie) ResourceNames

func (d *PolicyRuleDie) ResourceNames(v ...string) *PolicyRuleDie

ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.

func (*PolicyRuleDie) Resources

func (d *PolicyRuleDie) Resources(v ...string) *PolicyRuleDie

Resources is a list of resources this rule applies to. '*' represents all resources.

func (*PolicyRuleDie) Verbs

func (d *PolicyRuleDie) Verbs(v ...string) *PolicyRuleDie

Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.

type RoleBindingDie

type RoleBindingDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*RoleBindingDie) DeepCopy

func (d *RoleBindingDie) DeepCopy() *RoleBindingDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*RoleBindingDie) DeepCopyObject

func (d *RoleBindingDie) DeepCopyObject() runtime.Object

func (*RoleBindingDie) DieFeed

DieFeed returns a new die with the provided resource.

func (*RoleBindingDie) DieFeedPtr

func (d *RoleBindingDie) DieFeedPtr(r *rbacv1.RoleBinding) *RoleBindingDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*RoleBindingDie) DieImmutable

func (d *RoleBindingDie) DieImmutable(immutable bool) *RoleBindingDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*RoleBindingDie) DieRelease

func (d *RoleBindingDie) DieRelease() rbacv1.RoleBinding

DieRelease returns the resource managed by the die.

func (*RoleBindingDie) DieReleasePtr

func (d *RoleBindingDie) DieReleasePtr() *rbacv1.RoleBinding

DieReleasePtr returns a pointer to the resource managed by the die.

func (*RoleBindingDie) DieReleaseUnstructured

func (d *RoleBindingDie) DieReleaseUnstructured() runtime.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object.

func (*RoleBindingDie) DieStamp

func (d *RoleBindingDie) DieStamp(fn func(r *rbacv1.RoleBinding)) *RoleBindingDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*RoleBindingDie) GetObjectKind

func (d *RoleBindingDie) GetObjectKind() schema.ObjectKind

func (*RoleBindingDie) MarshalJSON

func (d *RoleBindingDie) MarshalJSON() ([]byte, error)

func (*RoleBindingDie) MetadataDie

func (d *RoleBindingDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *RoleBindingDie

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*RoleBindingDie) RoleRef

RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error.

func (*RoleBindingDie) RoleRefDie

func (d *RoleBindingDie) RoleRefDie(fn func(d *RoleRefDie)) *RoleBindingDie

func (*RoleBindingDie) Subjects

func (d *RoleBindingDie) Subjects(v ...rbacv1.Subject) *RoleBindingDie

Subjects holds references to the objects the role applies to.

func (*RoleBindingDie) SubjectsDie

func (d *RoleBindingDie) SubjectsDie(subjects ...*SubjectDie) *RoleBindingDie

func (*RoleBindingDie) UnmarshalJSON

func (d *RoleBindingDie) UnmarshalJSON(b []byte) error

type RoleDie

type RoleDie struct {
	metav1.FrozenObjectMeta
	// contains filtered or unexported fields
}

func (*RoleDie) AddRuleDie

func (d *RoleDie) AddRuleDie(rule *PolicyRuleDie) *RoleDie

func (*RoleDie) DeepCopy

func (d *RoleDie) DeepCopy() *RoleDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*RoleDie) DeepCopyObject

func (d *RoleDie) DeepCopyObject() runtime.Object

func (*RoleDie) DieFeed

func (d *RoleDie) DieFeed(r rbacv1.Role) *RoleDie

DieFeed returns a new die with the provided resource.

func (*RoleDie) DieFeedPtr

func (d *RoleDie) DieFeedPtr(r *rbacv1.Role) *RoleDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*RoleDie) DieImmutable

func (d *RoleDie) DieImmutable(immutable bool) *RoleDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*RoleDie) DieRelease

func (d *RoleDie) DieRelease() rbacv1.Role

DieRelease returns the resource managed by the die.

func (*RoleDie) DieReleasePtr

func (d *RoleDie) DieReleasePtr() *rbacv1.Role

DieReleasePtr returns a pointer to the resource managed by the die.

func (*RoleDie) DieReleaseUnstructured

func (d *RoleDie) DieReleaseUnstructured() runtime.Unstructured

DieReleaseUnstructured returns the resource managed by the die as an unstructured object.

func (*RoleDie) DieStamp

func (d *RoleDie) DieStamp(fn func(r *rbacv1.Role)) *RoleDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*RoleDie) GetObjectKind

func (d *RoleDie) GetObjectKind() schema.ObjectKind

func (*RoleDie) MarshalJSON

func (d *RoleDie) MarshalJSON() ([]byte, error)

func (*RoleDie) MetadataDie

func (d *RoleDie) MetadataDie(fn func(d *metav1.ObjectMetaDie)) *RoleDie

MetadataDie stamps the resource's ObjectMeta field with a mutable die.

func (*RoleDie) Rules

func (d *RoleDie) Rules(v ...rbacv1.PolicyRule) *RoleDie

Rules holds all the PolicyRules for this Role

func (*RoleDie) RulesDie

func (d *RoleDie) RulesDie(rules ...*PolicyRuleDie) *RoleDie

func (*RoleDie) UnmarshalJSON

func (d *RoleDie) UnmarshalJSON(b []byte) error

type RoleRefDie

type RoleRefDie struct {
	// contains filtered or unexported fields
}

func (*RoleRefDie) APIGroup

func (d *RoleRefDie) APIGroup(v string) *RoleRefDie

APIGroup is the group for the resource being referenced

func (*RoleRefDie) DeepCopy

func (d *RoleRefDie) DeepCopy() *RoleRefDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*RoleRefDie) DieFeed

func (d *RoleRefDie) DieFeed(r rbacv1.RoleRef) *RoleRefDie

DieFeed returns a new die with the provided resource.

func (*RoleRefDie) DieFeedPtr

func (d *RoleRefDie) DieFeedPtr(r *rbacv1.RoleRef) *RoleRefDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*RoleRefDie) DieImmutable

func (d *RoleRefDie) DieImmutable(immutable bool) *RoleRefDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*RoleRefDie) DieRelease

func (d *RoleRefDie) DieRelease() rbacv1.RoleRef

DieRelease returns the resource managed by the die.

func (*RoleRefDie) DieReleasePtr

func (d *RoleRefDie) DieReleasePtr() *rbacv1.RoleRef

DieReleasePtr returns a pointer to the resource managed by the die.

func (*RoleRefDie) DieStamp

func (d *RoleRefDie) DieStamp(fn func(r *rbacv1.RoleRef)) *RoleRefDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*RoleRefDie) Kind

func (d *RoleRefDie) Kind(v string) *RoleRefDie

Kind is the type of resource being referenced

func (*RoleRefDie) Name

func (d *RoleRefDie) Name(v string) *RoleRefDie

Name is the name of resource being referenced

type SubjectDie

type SubjectDie struct {
	// contains filtered or unexported fields
}

func (*SubjectDie) APIGroup

func (d *SubjectDie) APIGroup(v string) *SubjectDie

APIGroup holds the API group of the referenced subject. Defaults to "" for ServiceAccount subjects. Defaults to "rbac.authorization.k8s.io" for User and Group subjects.

func (*SubjectDie) DeepCopy

func (d *SubjectDie) DeepCopy() *SubjectDie

DeepCopy returns a new die with equivalent state. Useful for snapshotting a mutable die.

func (*SubjectDie) DieFeed

func (d *SubjectDie) DieFeed(r rbacv1.Subject) *SubjectDie

DieFeed returns a new die with the provided resource.

func (*SubjectDie) DieFeedPtr

func (d *SubjectDie) DieFeedPtr(r *rbacv1.Subject) *SubjectDie

DieFeedPtr returns a new die with the provided resource pointer. If the resource is nil, the empty value is used instead.

func (*SubjectDie) DieImmutable

func (d *SubjectDie) DieImmutable(immutable bool) *SubjectDie

DieImmutable returns a new die for the current die's state that is either mutable (`false`) or immutable (`true`).

func (*SubjectDie) DieRelease

func (d *SubjectDie) DieRelease() rbacv1.Subject

DieRelease returns the resource managed by the die.

func (*SubjectDie) DieReleasePtr

func (d *SubjectDie) DieReleasePtr() *rbacv1.Subject

DieReleasePtr returns a pointer to the resource managed by the die.

func (*SubjectDie) DieStamp

func (d *SubjectDie) DieStamp(fn func(r *rbacv1.Subject)) *SubjectDie

DieStamp returns a new die with the resource passed to the callback function. The resource is mutable.

func (*SubjectDie) Kind

func (d *SubjectDie) Kind(v string) *SubjectDie

Kind of object being referenced. Values defined by this API group are "User", "Group", and "ServiceAccount". If the Authorizer does not recognized the kind value, the Authorizer should report an error.

func (*SubjectDie) Name

func (d *SubjectDie) Name(v string) *SubjectDie

Name of the object being referenced.

func (*SubjectDie) Namespace

func (d *SubjectDie) Namespace(v string) *SubjectDie

Namespace of the referenced object. If the object kind is non-namespace, such as "User" or "Group", and this value is not empty the Authorizer should report an error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL