setup

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 17 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

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

View Source
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

View Source
const Blanked = "blank"

Id of the host's own step, the blank slate, whose page the setup screen shows itself

View Source
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

func (Blank) Held

func (b Blank) Held(cfg *config.Config) bool

Whether the setting holds the value the blank slate writes, for the profile of the settings

type Blanker

type Blanker interface {
	Blank(cfg *config.Config) []Blank
}

A registrant whose feature has something the blank slate turns off

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 Registrant interface {
	// Steps the feature offers the profile of the settings, read quickly: what is slow goes in Look
	Steps(cfg *config.Config) []Step
}

type Registry

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

func (*Registry) Blank

func (r *Registry) Blank(cfg *config.Config) []Blank

What every registrant's feature has the blank slate turn off, a registry nested in the host among them

func (*Registry) Host

func (r *Registry) Host() *Setup

func (*Registry) Register

func (r *Registry) Register(registrant Registrant)

func (*Registry) Steps

func (r *Registry) Steps(cfg *config.Config) []Step

type Setup

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

func New

func New(cfg *config.Config) *Setup

func (*Setup) Blankout

func (s *Setup) Blankout(ctx context.Context, cfg *config.Config) (string, error)

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

func (s *Setup) Blanks(cfg *config.Config) []Blank

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

func (s *Setup) Look(ctx context.Context, cfg *config.Config) []firstrun.Step

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

func (s *Setup) Plan(ctx context.Context, cfg *config.Config) firstrun.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

func (s *Setup) Progress(cfg *config.Config) (firstrun.Progress, error)

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

func (s *Setup) Prove(ctx context.Context, cfg *config.Config, id string) (Proof, error)

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) Step

func (s *Setup) Step(cfg *config.Config, id string) (Step, bool)

Step of the id among those the features offer the profile, false for none

func (*Setup) Unattended

func (s *Setup) Unattended(ctx context.Context)

Says in the log, once a server nobody may watch starts, what the profile it serves first has not set up that icebath needs: no screen asks it there, so the log and the doctor say it in words. In the background, as looking may take a few seconds

func (*Setup) Unset

func (s *Setup) Unset(ctx context.Context, cfg *config.Config) []firstrun.Step

Steps icebath needs that the profile of the settings has not set up, in their order

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 chats 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

type Steps

type Steps []Step

A registrant whose steps are fixed once registered

func (Steps) Steps

func (s Steps) Steps(*config.Config) []Step

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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