Documentation
¶
Overview ¶
Package setupguide derives the Get started checklist from real instance state. It is pure: callers gather an Input, Derive returns the guide.
Index ¶
Constants ¶
View Source
const ( ReasonTLSUpstream = "tls_terminated_upstream" ReasonProxyMode = "proxy_mode" ReasonHTTPOnly = "http_only" ReasonNoRules = "no_alert_rule" ReasonCertsPending = "certificates_pending" ReasonACMEOff = "acme_disabled" ReasonManual = "marked_done" )
Reason codes explain why a step is not applicable or only partly done.
View Source
const ( OverrideSkipped = "skipped" OverrideDone = "done" )
Override values an operator can record.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Guide ¶
type Guide struct {
Steps []Step `json:"steps"`
ReadyPercent int `json:"ready_percent"`
Done int `json:"done"`
Total int `json:"total"`
NextStep StepID `json:"next_step,omitempty"`
Complete bool `json:"complete"`
Hidden bool `json:"hidden"`
ServerAddress string `json:"server_address,omitempty"`
}
Guide is the derived checklist.
type Input ¶
type Input struct {
SecuredAdmin bool
DashboardURL string
ServerAddress string
BehindProxy bool
ACMEEnabled bool
GitConnected bool
Apps int
Domains []DomainTLS
DNSProviderConnected bool
BackupTargets int
ControlPlaneBackups int
VerifiedBackups int
Channels int
AlertRules int
Users int
PendingInvites int
AutomaticUpgrades bool
Unavailable map[StepID]bool
// Overrides holds operator overrides keyed by step id.
Overrides map[StepID]string
Hidden bool
}
Input is everything Derive needs. Zero values mean "nothing set up yet".
type Step ¶
type Step struct {
ID StepID `json:"id"`
Title string `json:"title"`
State State `json:"state"`
Optional bool `json:"optional"`
EstimateMinutes int `json:"estimate_minutes"`
Href string `json:"href"`
BlockedBy []StepID `json:"blocked_by,omitempty"`
Reason string `json:"reason,omitempty"`
Progress *Progress `json:"progress,omitempty"`
Manual bool `json:"manual,omitempty"`
}
Step is one derived checklist entry.
type StepID ¶
type StepID string
StepID names one checklist step.
const ( StepSecureAdmin StepID = "secure_admin" StepPublicAddress StepID = "public_address" StepGitProvider StepID = "git_provider" StepFirstApp StepID = "first_app" StepAppDomain StepID = "app_domain" StepDNS StepID = "dns" StepTLS StepID = "tls" StepBackupTarget StepID = "backup_target" StepFirstBackup StepID = "first_backup" StepVerifiedBackup StepID = "verified_restore" StepNotifications StepID = "notifications" StepTeammate StepID = "teammate" StepUpgrades StepID = "upgrades" )
Step identifiers, in presentation order.
Click to show internal directories.
Click to hide internal directories.