Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdWhoCan ¶
func NewCmdWhoCan(streams clioptions.IOStreams) (*cobra.Command, error)
func NewWhoCanOptions ¶
func NewWhoCanOptions(configFlags *clioptions.ConfigFlags, clientConfig clientcmd.ClientConfig, clientNamespace clientcore.NamespaceInterface, clientRBAC clientrbac.RbacV1Interface, namespaceValidator NamespaceValidator, resourceResolver ResourceResolver, accessChecker AccessChecker, streams clioptions.IOStreams) *whoCan
Types ¶
type AccessChecker ¶
AccessChecker wraps the IsAllowedTo method.
IsAllowedTo checks whether the current user is allowed to perform the given action in the specified namespace. Specifying "" as namespace performs check in all namespaces.
func NewAccessChecker ¶
func NewAccessChecker(client clientauthz.SelfSubjectAccessReviewInterface) AccessChecker
type NamespaceValidator ¶
func NewNamespaceValidator ¶
func NewNamespaceValidator(client clientcore.NamespaceInterface) NamespaceValidator
type ResourceResolver ¶
ResourceResolver wraps the Resolve method.
Resolve attempts to resolve an APIResource's Name by `resource` and `subResource`. It then validates that the specified `verb` is supported. The returned APIResource's Name may represent a resource (e.g. `pods`) or a sub-resource (e.g. `pods/log`).
func NewResourceResolver ¶
func NewResourceResolver(client discovery.DiscoveryInterface, mapper meta.RESTMapper) ResourceResolver
Click to show internal directories.
Click to hide internal directories.