Documentation ¶
Index ¶
- func AccountToSelectableFields(account *config.Account) fields.Set
- func CreateRoleBinding(ctx context.Context, client client.Client, namespace string, ...) error
- func FilterList(items []runtime.Object, m storage.SelectionPredicate, d DecoratorFunc) ([]runtime.Object, error)
- func GetAccountAttrs(obj runtime.Object) (labels.Set, fields.Set, error)
- func GetClusterRoleFor(account *configv1alpha1.Account) string
- func GetNamespaceAttrs(obj runtime.Object) (labels.Set, fields.Set, error)
- func ListOptionsToSelectors(options *metainternalversion.ListOptions) (labels.Selector, fields.Selector)
- func MatchAccount(label labels.Selector, field fields.Selector) storage.SelectionPredicate
- func MatchNamespace(label labels.Selector, field fields.Selector) storage.SelectionPredicate
- func NamespaceToSelectableFields(namespace *corev1.Namespace) fields.Set
- type DecoratorFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountToSelectableFields ¶
AccountToSelectableFields returns a field set that represents the object
func CreateRoleBinding ¶
func CreateRoleBinding(ctx context.Context, client client.Client, namespace string, owner *configv1alpha1.Account, scheme *runtime.Scheme) error
CreateRoleBinding creates a new role binding for the target account with the given name and namespace
func FilterList ¶
func FilterList(items []runtime.Object, m storage.SelectionPredicate, d DecoratorFunc) ([]runtime.Object, error)
FilterList filters any list object that conforms to the api conventions, provided that 'm' works with the concrete type of list. d is an optional decorator for the returned functions. Only matching items are decorated.
func GetAccountAttrs ¶
GetAccountAttrs returns labels and fields of a given object for filtering purposes.
func GetClusterRoleFor ¶
func GetClusterRoleFor(account *configv1alpha1.Account) string
GetClusterRoleFor returns the cluster role for the given account if there is any
func GetNamespaceAttrs ¶
GetNamespaceAttrs returns labels and fields of a given object for filtering purposes.
func ListOptionsToSelectors ¶
func ListOptionsToSelectors(options *metainternalversion.ListOptions) (labels.Selector, fields.Selector)
ListOptionsToSelectors converts the given list options to selectors
func MatchAccount ¶
MatchAccount returns a generic matcher for a given label and field selector.
func MatchNamespace ¶
MatchNamespace returns a generic matcher for a given label and field selector.
Types ¶
type DecoratorFunc ¶
DecoratorFunc can mutate the provided object prior to being returned.