Documentation ¶
Index ¶
- func CanVerbResource(cli dynamic.Interface, gvr schema.GroupVersionResource, verb string, ...) (bool, error)
- func DeduplicateList(objs []runtime.Object) ([]runtime.Object, error)
- func DefaultOpts(config *rest.Config, opts cache.Options) (cache.Options, error)
- func HashObject(obj interface{}) string
- func IsAPINamespaced(obj runtime.Object, scheme *runtime.Scheme, restmapper apimeta.RESTMapper) (bool, error)
- func IsAPINamespacedWithGVK(gk schema.GroupVersionKind, scheme *runtime.Scheme, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanVerbResource ¶
func CanVerbResource(cli dynamic.Interface, gvr schema.GroupVersionResource, verb string, namespace string) (bool, error)
CanVerbResource will create a SelfSubjectAccessReview for a given resource, verb, and namespace and return whether or not a user/ServiceAccount has the permissions to "verb" (get, list, watch, etc.) the given resource in the given namespace. A namespace value of ""(empty) will result in checking permissions in all namespaces (cluster-scoped)
func DeduplicateList ¶
DeduplicateList is meant to remove duplicate objects from a list of objects
func HashObject ¶
func HashObject(obj interface{}) string
HashObject calculates a hash from an object
func IsAPINamespaced ¶
func IsAPINamespaced(obj runtime.Object, scheme *runtime.Scheme, restmapper apimeta.RESTMapper) (bool, error)
IsAPINamespaced returns true if the object is namespace scoped. For unstructured objects the gvk is found from the object itself.
func IsAPINamespacedWithGVK ¶
func IsAPINamespacedWithGVK(gk schema.GroupVersionKind, scheme *runtime.Scheme, restmapper apimeta.RESTMapper) (bool, error)
IsAPINamespacedWithGVK returns true if the object having the provided GVK is namespace scoped.
Types ¶
This section is empty.