linkgen

package
v0.12.6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleLinkRequest

func HandleLinkRequest(m Model) []tea.Cmd

HandleLinkRequest returns a bunch of blocking commands that resolve on link request states. As a Tea command, this should be treated as batch:

tea.Batch(HandleLinkRequest(model)...)

func InitLinkGen

func InitLinkGen(m Model) tea.Cmd

InitLinkGen runs the necessary commands for starting the link generation process.

func NewProgram

func NewProgram(cfg *client.Config, parentName string) *tea.Program

NewProgram is a simple wrapper for tea.NewProgram for use in standalone mode. Pass the Charm configuration and the name of the parent command upon which this TUI is implemented.

Types

type Model

type Model struct {
	Quit bool // the user wants to exit the whole program
	Exit bool // the user wants to exit this mini-app
	// contains filtered or unexported fields
}

Model is the tea model for the link initiator program.

func NewModel

func NewModel(cfg *client.Config) Model

NewModel returns a new Model in its initial state.

func (Model) Init added in v0.8.5

func (m Model) Init() tea.Cmd

Init is the Bubble Tea program's initialization function. This is used in standalone mode.

func (*Model) SetCharmClient

func (m *Model) SetCharmClient(cc *client.Client)

SetCharmClient sets the charm client on the Model.

func (Model) Update added in v0.8.5

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

Update is the Tea update loop.

func (Model) View added in v0.8.5

func (m Model) View() string

View renders the UI.

Jump to

Keyboard shortcuts

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