cui

package
v0.179.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package cui implements the Console User Interface for wunderctl

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Quit()
	ClearCache()
	RebuildAndRestartApp()
	Restart(debugMode bool)
}

type Options

type Options struct {
	// Debug indicates whether debug mode is enabled
	// (it causes changes in the menu)
	Debug bool
}

type UI

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

func New

func New(handler Handler, opts Options) *UI

func (*UI) Close

func (u *UI) Close()

Close closes the keyboard handle

func (*UI) Open

func (u *UI) Open() error

Open grabs the keyboard but doesn't start monitoring it. Call Close to properly dispose of it. To start listening for keyboard events, see Run()

func (*UI) PrintShortHelp

func (u *UI) PrintShortHelp()

PrintShortHelp prints a short help menu with the actions for help and quit

func (*UI) Run

func (u *UI) Run()

Run listens for keypresses and runs each respective actions, indefinitely

Jump to

Keyboard shortcuts

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