nav

package
v0.0.10-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCHEMA_CURSOR_TOP  = 0
	SCHEMA_SCROLL_STEP = 1

	SCHEMA_WIDTH_RATIO          = 0.3
	SCHEMA_HEIGHT_BOTTOM_MARGIN = 4 // (topbar 1 + border top, down 2) + root status bar 1
	SCHEMA_EXPAND_MULTI_MARGIN  = 3 // render above 3 lines when cursor moved by fold/expand a lot
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Line

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

TODO: function args node(s) under ui should be line and get the node from getter

type Model

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

func NewModel

func NewModel(gvk schema.GroupVersionKind, objs []*unstructured.Unstructured) *Model

func (*Model) Blur

func (m *Model) Blur()

func (*Model) Focus

func (m *Model) Focus() tea.Cmd

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Keys

func (m *Model) Keys() keyMap

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Model) View

func (m *Model) View() string

type SetGVKMsg

type SetGVKMsg struct {
	GVK  schema.GroupVersionKind
	Objs []*unstructured.Unstructured
}

type SetNodesMsg

type SetNodesMsg struct {
	Nodes []*kube.Node
}

type UpdateObjsMsg

type UpdateObjsMsg struct {
	Objs []*unstructured.Unstructured
}

Jump to

Keyboard shortcuts

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