tui

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomKeyMap

func CustomKeyMap() list.KeyMap

CustomKeyMap returns a default set of keybindings.

func GenerateItemList

func GenerateItemList(pitems []ListItem) []list.Item

func GenerateListItemList

func GenerateListItemList(client *vault.Client, mount, current string) ([]list.Item, error)

GenerateListItemList filter paths and format them to ListItem

func InitList

func InitList(items []list.Item, current string) (tea.Model, tea.Cmd)

func StartUI

func StartUI(client *vault.Client, mount string) error

Types

type ListItem

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

func (ListItem) Description

func (p ListItem) Description() string

func (ListItem) FilterValue

func (p ListItem) FilterValue() string

func (ListItem) Title

func (p ListItem) Title() string

implement list item interface for UI

type SecretDisplay

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

func (SecretDisplay) Init

func (s SecretDisplay) Init() tea.Cmd

func (SecretDisplay) Update

func (s SecretDisplay) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (SecretDisplay) View

func (s SecretDisplay) View() string

type State

type State struct {
	// list of item from list view
	List []list.Item
	// current index from the list for
	// viewport view
	DisplayCurrentIndex int

	// Mount path for kv2
	// secret engine
	Mount string

	// curent secret dir
	Current string

	Client *vault.Client
}
var (
	UIState *State

	// WindowSize store the size of the terminal window
	WindowSize tea.WindowSizeMsg
)

Jump to

Keyboard shortcuts

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