categories

package
v1.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL