view

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 9 Imported by: 0

README

view

module for view data in terminal

Documentation

Index

Constants

View Source
const (
	WidthTable   = 70
	TopPadding   = 0
	RightPadding = 1
	CellWidth    = 1
)
View Source
const ResultChoiceName = "alias"
View Source
const ResultTemplateSelect = `
{{- print .Prompt " " (Foreground "206"  (alias .FinalChoice)) "\n" -}}
`
View Source
const ResultTemplateTextInput = `
{{- print .Prompt " " (Foreground "206"  (Mask .FinalValue)) "\n" -}}
`

Variables

This section is empty.

Functions

This section is empty.

Types

type Select

type Select struct {
	FilterPlaceholder string
	SelectionPrompt   string
	FilterPrompt      string
	Template          string
	PageSize          string
}

func (Select) SelectedValue

func (s Select) SelectedValue(aliases []string) (string, error)

type Table

type Table struct {
	HeaderStyle  lipgloss.Color
	OddCellStyle lipgloss.Color
	EvenRowStyle lipgloss.Color
	BorderStyle  lipgloss.Color
}

func (*Table) ViewTable

func (t *Table) ViewTable(value [][]string, headers []string) *table.Table

type TextInput

type TextInput struct {
	Arguments   [][]*string
	HiddenArgs  []*string
	Placeholder string
}

func (TextInput) DrawInput

func (t TextInput) DrawInput() error

Jump to

Keyboard shortcuts

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