tui

package
v0.0.0-...-8a51bff Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DocStyle = lipgloss.NewStyle().Margin(2, 3, 0, 1)

	WindowSize tea.WindowSizeMsg
)
View Source
var Keymap = keymap{
	Request: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "edit request body"),
	),
	Url: key.NewBinding(
		key.WithKeys("ctrl+b"),
		key.WithHelp("ctrl+b", "edit url bar"),
	),
	HttpMethod: key.NewBinding(
		key.WithKeys("ctrl+u"),
		key.WithHelp("ctrl+u", "edit http method"),
	),
	Send: key.NewBinding(
		key.WithKeys("ctrl+s"),
		key.WithHelp("ctrl+s", "send request"),
	),
	Quit: key.NewBinding(
		key.WithKeys("ctrl+c"),
		key.WithHelp("ctrl+c", "quit"),
	),
}

Functions

func InitialRequest

func InitialRequest() model

func StartTea

func StartTea() error

StartTea the entry point for the UI. Initializes the model.

Types

type Component

type Component interface {
	// tea.Model
	// Init() tea.Cmd
	View() string
	Update(msg tea.Msg) tea.Cmd
	Value() string
}

consider just wrapping everything into a bubble tea Model in a "components package"

Jump to

Keyboard shortcuts

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