namespace

package
v0.0.0-...-2f5b9ad Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReloadedExtensions

func GetReloadedExtensions(extensions []api.INamespaceExtension, res []Item) map[string][]Property

func NamespaceFilter

func NamespaceFilter(term string, targets []string) []list.Rank

func New

func New() list.Model

func Refresh

func Refresh() tea.Cmd

func Route

func Route(cmds []tea.Cmd) []tea.Cmd

Types

type AddedMsg

type AddedMsg struct {
	Namespace Item
}

type ErrorMsg

type ErrorMsg struct {
	Err error
}

type Item

type Item struct {
	K8sNamespace       v1.Namespace
	ExtendedProperties []Property
}

func LoadExtensions

func LoadExtensions(extensions []api.INamespaceExtension, res []v1.Namespace) []Item

func (Item) FilterValue

func (n Item) FilterValue() string

func (*Item) LoadCustomProperties

func (n *Item) LoadCustomProperties(extensions ...api.INamespaceExtension)

type ItemDelegate

type ItemDelegate struct {
	Pinned []string
}

func (ItemDelegate) Height

func (n ItemDelegate) Height() int

func (ItemDelegate) Render

func (n ItemDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)

func (ItemDelegate) Spacing

func (n ItemDelegate) Spacing() int

func (ItemDelegate) Update

func (n ItemDelegate) Update(tea.Msg, *list.Model) tea.Cmd

type ListMsg

type ListMsg struct {
	Namespaces []Item
}

type Message

type Message interface {
	// contains filtered or unexported methods
}

type MessageHandler

type MessageHandler struct {
	Extensions []api.INamespaceExtension
	// contains filtered or unexported fields
}

func (*MessageHandler) GetNamespaces

func (nh *MessageHandler) GetNamespaces() tea.Cmd

func (MessageHandler) NextEvent

func (nh MessageHandler) NextEvent() tea.Msg

func (*MessageHandler) ReloadExtensions

func (nh *MessageHandler) ReloadExtensions(namespaces []Item) tea.Cmd

func (*MessageHandler) WatchNamespaces

func (nh *MessageHandler) WatchNamespaces(resourceVersion string) tea.Cmd

type ModifiedMsg

type ModifiedMsg struct {
	Namespace Item
}

type NextEventMsg

type NextEventMsg struct{}

type Property

type Property struct {
	Key   string
	Value string
	Order int
}

type ReloadExtensionsMsg

type ReloadExtensionsMsg struct {
	Properties map[string][]Property
}

type ReloadTick

type ReloadTick struct{}

type RemovedMsg

type RemovedMsg struct {
	Namespace Item
}

type RoutedMsg

type RoutedMsg struct {
	Embedded tea.Msg
}

type WatchingMsg

type WatchingMsg struct{}

Jump to

Keyboard shortcuts

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