Documentation ¶
Index ¶
- type FakeCommandGuard
- func (f *FakeCommandGuard) FilterSupportedVerbs(allVerbs []string) []string
- func (f *FakeCommandGuard) GetAllowedResourcesForVerb(selectedVerb string, allConfiguredResources []string) ([]command.Resource, error)
- func (f *FakeCommandGuard) GetResourceDetails(verb, resourceType string) (command.Resource, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeCommandGuard ¶ added in v1.0.0
type FakeCommandGuard struct{}
FakeCommandGuard provides functionality to resolve correlations between kubectl verbs and resource types. It's used for test purposes.
func NewFakeCommandGuard ¶ added in v1.0.0
func NewFakeCommandGuard() *FakeCommandGuard
func (*FakeCommandGuard) FilterSupportedVerbs ¶ added in v1.0.0
func (f *FakeCommandGuard) FilterSupportedVerbs(allVerbs []string) []string
FilterSupportedVerbs filters out unsupported verbs by the interactive commands.
func (*FakeCommandGuard) GetAllowedResourcesForVerb ¶ added in v1.0.0
func (f *FakeCommandGuard) GetAllowedResourcesForVerb(selectedVerb string, allConfiguredResources []string) ([]command.Resource, error)
GetAllowedResourcesForVerb returns allowed resources types for a given verb.
func (*FakeCommandGuard) GetResourceDetails ¶ added in v1.0.0
func (f *FakeCommandGuard) GetResourceDetails(verb, resourceType string) (command.Resource, error)
GetResourceDetails returns resource details.
Click to show internal directories.
Click to hide internal directories.