Documentation
¶
Overview ¶
Package setup is the first run of icebath: the steps of setting it up that the features offer, what this computer and profile have of each, read without sending anything anywhere, and the progress the person made, kept for the profile so a first run interrupted comes back where it was and one finished never comes back by itself. A step that proves itself is tried once the person asks, and the blank slate turns off what each feature says is not the basics. The host names no feature
Index ¶
- Constants
- type Blank
- type Blanker
- type Proof
- type Registrant
- type Registry
- type Setup
- func (s *Setup) Blankout(ctx context.Context, cfg *config.Config) (string, error)
- func (s *Setup) Blanks(cfg *config.Config) []Blank
- func (s *Setup) Look(ctx context.Context, cfg *config.Config) []firstrun.Step
- func (s *Setup) Mark(ctx context.Context, cfg *config.Config, mark, about string) ([]firstrun.Step, firstrun.Progress, error)
- func (s *Setup) Plan(ctx context.Context, cfg *config.Config) firstrun.Plan
- func (s *Setup) Progress(cfg *config.Config) (firstrun.Progress, error)
- func (s *Setup) Prove(ctx context.Context, cfg *config.Config, id string) (Proof, error)
- func (s *Setup) Register(registrant Registrant)
- func (s *Setup) Standing(ctx context.Context, cfg *config.Config) ([]firstrun.Step, firstrun.Progress)
- func (s *Setup) Step(cfg *config.Config, id string) (Step, bool)
- func (s *Setup) Unattended(ctx context.Context)
- func (s *Setup) Unset(ctx context.Context, cfg *config.Config) []firstrun.Step
- type Step
- type Steps
Constants ¶
const ( // The step in view MarkView = "view" MarkSkip = "skip" // A skip taken back MarkUnskip = "unskip" // The step's page gone through MarkGone = "gone" // The way chosen, named after it MarkWay = "way" // The first run ended, never to open by itself again MarkFinish = "finish" // The first run started over MarkAgain = "again" )
What a person does in the first run, the step or the way it is about after it
const Blanked = "blank"
Id of the host's own step, the blank slate, whose page the setup screen shows itself
const File = "setup.json"
File of a profile's folder the progress of its first run is kept in
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Blank ¶
type Blank struct {
// Setting it writes, and the value it writes there
Key string
To any
// What it is, as the plan of the blank slate lists it, such as Memory; and what becomes of it, a phrase such as off
Title, Said string
}
One thing the blank slate turns off, as the feature that owns it says
type Proof ¶
type Proof struct {
Worked bool
// What the try found, a sentence or two a person reads, such as how long the model took to answer and what the try cost
Said string
}
What a try of a step came to
type Registrant ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) Blank ¶
What every registrant's feature has the blank slate turn off, a registry nested in the host among them
func (*Registry) Register ¶
func (r *Registry) Register(registrant Registrant)
type Setup ¶
type Setup struct {
Registry
// contains filtered or unexported fields
}
func (*Setup) Blankout ¶
Writes the blank slate for the profile of the settings, every setting through its own guard, and records the step gone through: what it changed, a sentence, and what it could not, each with why
func (*Setup) Blanks ¶
What the blank slate turns off for the profile of the settings, each feature's part in the order they registered; a setting this build leaves out, such as that of a plugin it does not carry, is left out with it
func (*Setup) Look ¶
Every step the features offer the profile of the settings, each with what this computer and the profile have of it, looked at all at once and each within a few seconds; a look that runs over or fails says so in the step's words
func (*Setup) Mark ¶
func (s *Setup) Mark(ctx context.Context, cfg *config.Config, mark, about string) ([]firstrun.Step, firstrun.Progress, error)
Records what the person did of the first run of the profile of the settings and gives the steps and the progress as they stand after it. The window that shows the first run ends it once nothing waits any more, as it alone knows the steps of its own computer too
func (*Setup) Plan ¶
The plan of the first run of the profile of the settings as it stands: every step with what was found of it and what the person did. A progress that does not read is taken as none, the first run starting over
func (*Setup) Progress ¶
What the person did of the first run of the profile of the settings, nothing for a profile that never started one
func (*Setup) Prove ¶
Tries the step of the id once the person asked, within a minute and a half, and keeps whether it worked: a step said to work is one whose try worked since
func (*Setup) Register ¶
func (s *Setup) Register(registrant Registrant)
Adds a registrant; a registry nested in the host reaches it through Host
func (*Setup) Standing ¶
func (s *Setup) Standing(ctx context.Context, cfg *config.Config) ([]firstrun.Step, firstrun.Progress)
Every step the features offer the profile of the settings with what was found of it, and what the person did of its first run. A progress that does not read is taken as none, the first run starting over
func (*Setup) Unattended ¶
Logs what each profile still needs to set up, as a server starts with nobody watching; runs in the background since it can take a few seconds
type Step ¶
type Step struct {
firstrun.Step
// Reads what this computer and the profile have of the step, sending nothing anywhere; nil for a step that finds nothing
Look func(ctx context.Context, cfg *config.Config) firstrun.Found
// Tries the step once the person asks, such as the model of new sessions asked for one word; nil for a step with no try
Prove func(ctx context.Context, cfg *config.Config) (Proof, error)
}
One step of setting icebath up, as a feature offers it