Skip to main content

Module gates

Module gates 

Source
Expand description

The gates of the setup wizard: what each step needs before the wizard may leave it.

The rule of the design is that the wizard never jumps to the step the config file remembers. Every gate is asked in the order of the steps, and the first one that does not hold is where the wizard opens. Gates is plain data and Gates::entry is a pure function of it, so a test hands in any answer it likes without a disk or a container engine anywhere near it. Only Gates::probe, check_engine and check_location touch the machine.

Structs§

Gates
What each step of the wizard needs, in the order the steps are walked.

Enums§

EngineCheck
What the machine answered when the chosen engine was asked whether it works.
EngineProblem
Why the chosen engine cannot be used.
LocationCheck
What the machine answered about the store folder.
LocationProblem
Why the store folder cannot be used.

Functions§

check_engine
Asks kind whether it is installed and working.
check_engine_for_setup
What the setup wizard’s engine step asks: check_engine, and for podman on Linux also whether the account has the id ranges podman needs to run QCode’s images without root.
check_engine_found
The same question as check_engine, with the engine that answered handed back beside the answer and detect put in place of the machine.
check_location
Makes sure the store at path is there and can be written in.