Documentation ¶
Index ¶
- func NewDiscoveryCategoryExpander(fallbackExpander CategoryExpander, client discovery.DiscoveryInterface) (discoveryCategoryExpander, error)
- func NewDiscoveryFilteredExpander(delegate CategoryExpander, client discovery.DiscoveryInterface) (discoveryFilteredExpander, error)
- type CategoryExpander
- type SimpleCategoryExpander
- type UnionCategoryExpander
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDiscoveryCategoryExpander ¶
func NewDiscoveryCategoryExpander(fallbackExpander CategoryExpander, client discovery.DiscoveryInterface) (discoveryCategoryExpander, error)
NewDiscoveryCategoryExpander returns a category expander that makes use of the "categories" fields from the API, found through the discovery client. In case of any error or no category found (which likely means we're at a cluster prior to categories support, fallback to the expander provided.
func NewDiscoveryFilteredExpander ¶
func NewDiscoveryFilteredExpander(delegate CategoryExpander, client discovery.DiscoveryInterface) (discoveryFilteredExpander, error)
NewDiscoveryFilteredExpander returns a category expander that filters the returned groupresources by what the server has available
Types ¶
type CategoryExpander ¶
type CategoryExpander interface {
Expand(category string) ([]schema.GroupResource, bool)
}
var LegacyCategoryExpander CategoryExpander = SimpleCategoryExpander{ Expansions: map[string][]schema.GroupResource{ "all": legacyUserResources, }, }
LegacyCategoryExpander is the old hardcoded expansion
type SimpleCategoryExpander ¶
type SimpleCategoryExpander struct {
Expansions map[string][]schema.GroupResource
}
func (SimpleCategoryExpander) Expand ¶
func (e SimpleCategoryExpander) Expand(category string) ([]schema.GroupResource, bool)
type UnionCategoryExpander ¶
type UnionCategoryExpander []CategoryExpander
func (UnionCategoryExpander) Expand ¶
func (u UnionCategoryExpander) Expand(category string) ([]schema.GroupResource, bool)
Click to show internal directories.
Click to hide internal directories.