app

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 40 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Drawn

func Drawn() map[string]Graphics

What each terminal of this computer was last found to draw, by the name its record is kept under; none where no window told it or the file does not read

func On

func On(value string) bool

Whether a value as YAML that Used read is on: a toggle, or text that reads as one, as the server reads a toggle whose text names a variable whose value is that text

func Shown

func Shown(value string) bool

Whether a value as YAML that the settings service shows of a setting is not the value in use: text that names a variable as ${NAME}, which it shows as it is written, or a secret it masks. A change told with such a value is read again with Used

func Used

func Used(ctx context.Context, settings configv1connect.ConfigServiceClient, key, profile string) (string, error)

Value as YAML of the setting under the key as it is read for use, every reference in its text standing for the variable it names: JSON, which reads as YAML, and null for a key that holds nothing. What the app and its screens act on, where the settings service shows the value as it is written. The profile is the window's for none

Types

type App

type App struct {
	Registry
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Config) *App

func (*App) Console

func (a *App) Console() func()

Switches nothing: the terminals of the other systems take UTF-8 text as they are

func (*App) Getenv

func (a *App) Getenv(profile, name string) string

Variable of the environment a profile has on this computer, the window's profile for an empty name, empty when it has none: what work the window does here itself reads for the profile, such as the proxy of a sign-in a page of that profile runs. A window of icebath's own server reads the profile's .env and secret stores, one of a server elsewhere what this computer keeps of a profile of that name

func (*App) Owns

func (a *App) Owns(own bool)

Tells the app whether the server the window runs on is this process's own, so what it says as it quits says what ends with it, and what it says as it is suspended to the shell what waits with it

func (*App) RequestWait

func (a *App) RequestWait() time.Duration

How long the window waits for its server to answer a request, as Answer wait says; none for no limit

func (*App) Run

func (a *App) Run(ctx context.Context, conn *connect.Client) (err error)

Runs the screens until the person quits, then lets the registrants let go of what they hold

func (*App) Shed

func (a *App) Shed(all bool)

Has every card of the window let go of what it drew and keeps to draw again, what it drew for another size or with all everything, as the memory of the process nears what it may use; nothing before the window runs

func (*App) Speak

func (a *App) Speak(id string)

Has the window's requests answered in the language of the id from their next one on

func (*App) StartupWait

func (a *App) StartupWait() time.Duration

How long the window waits for the server it is set to use as it opens, as Server wait says

func (*App) Unanswered

func (a *App) Unanswered(timed *calls.TimedOut) bool

Asks the person whether a call its server did not answer in time goes again: a warning names the call, the wait and the key that asks again, and the call is given up when the key is not pressed while the warning stands, or the window closes. A call made before the window runs, or with no window at all, is given up at once

func (*App) Window

func (a *App) Window(w *client.Window)

Has the window's requests follow the profile the window runs on as /profiles switches it, and wait for their answers as Answer wait says, the person asked whether one the server did not answer in time goes again

type Graphics

type Graphics struct {
	gfx.Report
	At time.Time `json:"at"`
}

What a terminal was found to draw as a window of it last told, and when

func (Graphics) Key

func (g Graphics) Key() string

Name a terminal's record is kept under: its name, and what stands between it and icebath, which changes what it draws

type Parter

type Parter interface {
	// Lines to print below the app in the terminal, none for nothing to say; own is whether the server the window ran on was this process's
	// own, which ends with it. Honour ctx, which ends at the wait
	Parting(ctx context.Context, own bool) []string
}

Registrant with something to say once the window is gone, such as how to come back to the sessions written to and the work left running

type Refused

type Refused struct {
	Action string
	Chords []string
	Why    string
}

A saved shortcut the keys of this app refuse, and why in a sentence a person reads

func Shortcuts

func Shortcuts(cfg *config.Config) (*keys.Map, []Refused, int, error)

The keys of this app as the settings leave them: the kit's actions at their default keys with the saved shortcuts over them, the saved shortcuts the keys refuse, and how many saved ones differ from their defaults. A saved shortcut of an action only a screen brings is not judged here, as the screens are the window's; one that can't be read at all is the error

type Registrant

type Registrant interface {
	Screens(conn *connect.Client) []tui.Screen
}

type Registry

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

func (*Registry) Close

func (r *Registry) Close() error

Lets every registrant that holds something past the screens, such as a microphone, let go of it as the app exits, the last registered first

func (*Registry) Parting

func (r *Registry) Parting(ctx context.Context, own bool) []string

What the registrants that part say, in the order they were registered, a blank line between two of them

func (*Registry) Register

func (r *Registry) Register(registrant Registrant)

func (*Registry) Screens

func (r *Registry) Screens(conn *connect.Client) []tui.Screen

func (*Registry) Steps

func (r *Registry) Steps(kit *tui.Kit) []firstrun.Step

Steps of the first run every registrant offers of the window's own computer, in the order they registered; called off the UI loop

type Stepper

type Stepper interface {
	// The steps, each with what was found of it on this computer; called off the UI loop
	Steps(kit *tui.Kit) []firstrun.Step
}

A registrant that also offers steps of the first run about the computer the window runs on, which the window alone can look at, such as the keys the terminal it runs in sends

Directories

Path Synopsis
Package server serves what the terminal app reads of the server beside the settings, such as the styles a profile keeps
Package server serves what the terminal app reads of the server beside the settings, such as the styles a profile keeps

Jump to

Keyboard shortcuts

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