Skip to main content

Module setup

Module setup 

Source
Expand description

The setup wizard: the three questions QCode asks before it can do anything.

Language, container engine and store, in that order, as the design document has them. The screen is the usual three pieces — Setup, update and view — and it is complete on its own, so it is driven end to end by a test without the rest of the application.

The screen speaks its own Msg and nothing here names the application’s messages; the application maps them on the way out. The wizard also runs one step on its own, which is what the repair strip on the settings screen asks for: Setup::for_step.

Where the wizard opens is not the step the config file remembers. Every gate is asked from the first step on and the first one that does not hold is the way in; gates holds that rule as a pure function of plain data. A missing engine is offered two ways out: QCode runs the install command on a terminal in the middle of the page, where the person watches it, or it shows them the line to run themselves. install works out that line and carries the one function that starts it.

Modules§

gates
The gates of the setup wizard: what each step needs before the wizard may leave it.
install
What the person has to run to get a container engine, on the system they are actually on.
languages
Which language stands where on the wizard’s first page, and which one is already chosen.

Structs§

Setup
The setup wizard’s state.

Enums§

Msg
What can happen on the setup screen.

Functions§

hints
The keys of the setup wizard that are not in the keymap, for the key list.
opened
The work the wizard needs the moment it is shown: asking whatever the step it opens on needs, and putting the keyboard on the question.
update
Applies a message to the wizard.
view
Draws the wizard in the middle of the screen.