navigation

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2020 License: Apache-2.0 Imports: 13 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

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

EntriesHelper generates navigation entries.

func (*EntriesHelper) Add

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

Add adds an entry.

func (*EntriesHelper) Generate

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

Generate generates navigation entries.

type Navigation struct {
	Module   string       `json:"module,omitempty"`
	Title    string       `json:"title,omitempty"`
	Path     string       `json:"path,omitempty"`
	Children []Navigation `json:"children,omitempty"`
	IconName string       `json:"iconName,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

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