navigation

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomResourceDefinitions added in v0.5.0

func CustomResourceDefinitions(ctx context.Context, o store.Store) ([]*apiextv1beta1.CustomResourceDefinition, bool, error)

func ListCustomResources

func ListCustomResources(
	ctx context.Context,
	crd *apiextv1beta1.CustomResourceDefinition,
	namespace string,
	o store.Store,
	selector *labels.Set) (*unstructured.UnstructuredList, bool, error)

ListCustomResources lists all custom resources given a CRD.

Types

type EntriesHelper added in v0.6.0

type EntriesHelper struct {
	// contains filtered or unexported fields
}

EntriesHelper generates navigation entries.

func (*EntriesHelper) Add added in v0.6.0

func (neh *EntriesHelper) Add(title, suffix, iconName string, isLoading bool)

Add adds an entry.

func (*EntriesHelper) Generate added in v0.6.0

func (neh *EntriesHelper) Generate(prefix string) ([]Navigation, error)

Generate generates navigation entries.

type Navigation struct {
	Title      string       `json:"title,omitempty"`
	Path       string       `json:"path,omitempty"`
	Children   []Navigation `json:"children,omitempty"`
	IconName   string       `json:"iconName,omitempty"`
	IconSource string       `json:"iconSource,omitempty"`
	Loading    bool         `json:"isLoading"`
}

Navigation is a set of navigation entries.

func CRDEntries

func CRDEntries(ctx context.Context, prefix, namespace string, objectStore store.Store, wantsClusterScoped bool) ([]Navigation, bool, error)

CRDEntries generates navigation entries for CRDs.

func New

func New(title, navigationPath string, options ...Option) (*Navigation, error)

New creates a Navigation.

type Option

type Option func(*Navigation) error

Option is an option for configuring navigation.

func SetLoading added in v0.6.0

func SetLoading(isLoading bool) Option

SetLoading sets the loading status for the navigation entry.

func SetNavigationIcon

func SetNavigationIcon(name string) Option

SetNavigationIcon sets the icon for the navigation entry.

Jump to

Keyboard shortcuts

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