Documentation
¶
Index ¶
- type App
- func (a *App) ApplyUpdate() error
- func (a *App) CanSelfUpdate() bool
- func (a *App) Cancel()
- func (a *App) CheckForUpdate() updater.Status
- func (a *App) DownloadUpdate() error
- func (a *App) ITContactEmail() string
- func (a *App) IngestURL() string
- func (a *App) LastUploadInfo() map[string]string
- func (a *App) LocalReportPath() string
- func (a *App) POPs() []config.POP
- func (a *App) SavedIdentity() map[string]string
- func (a *App) SendReport() error
- func (a *App) SetRunningForTest(v bool)
- func (a *App) StartRun(fullName, email string) error
- func (a *App) Startup(ctx context.Context)
- func (a *App) ValidateIdentity(fullName, email string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the Wails-bound backend. Public methods on this type are callable from the frontend JS as `window.go.wizard.App.<Method>(...)`.
func NewApp ¶
func NewApp() *App
NewApp constructs the app with config loaded from the baked-in defaults plus an optional sidecar next to the binary. On startup it tries to fetch the live POP list from ingest; on any failure the baked-in list is used. Config errors are logged to stderr and the app falls back to defaults so the wizard never fails to launch.
func NewAppWithConfigAndLivePOPs ¶
NewAppWithConfigAndLivePOPs is the full-featured constructor used by tests and by NewApp. If popsURL is non-empty, it fetches the live list and, on success, replaces cfg.POPs. Any failure keeps cfg.POPs as the baked-in list.
func (*App) ApplyUpdate ¶
ApplyUpdate spawns the detached helper and quits so the swap can complete. Refused while a tech check is running, or if nothing has been downloaded.
func (*App) CanSelfUpdate ¶
CanSelfUpdate reports whether an in-place update can be performed: the binary is laid out as an installed app and its directory is writable. When false the frontend keeps the browser-download fallback.
func (*App) CheckForUpdate ¶
CheckForUpdate queries the ingest server for the latest published version of this app. A 3-second timeout keeps the UI responsive; any error is swallowed and returns a zero Status (UI shows no banner). Bound to the Wails frontend.
func (*App) DownloadUpdate ¶
DownloadUpdate fetches and verifies the latest artifact in the background and stages it next to the install target. Progress and outcome are reported via the "update_progress" / "update_ready" / "update_error" events. Returns immediately; an error here means the download could not even be started.
func (*App) ITContactEmail ¶
ITContactEmail is shown on the fallback screen. Configured value.
func (*App) LastUploadInfo ¶
LastUploadInfo returns id/received_at/share_url from the most recent successful upload, or zero values if nothing has been uploaded yet. share_url is the candidate-facing result link (empty when the server didn't send one).
func (*App) LocalReportPath ¶
LocalReportPath returns the path written on the most recent run, or "".
func (*App) POPs ¶
POPs returns the effective POP list (live if the startup fetch succeeded, otherwise baked-in). Exposed for testing and for the frontend status screen.
func (*App) SavedIdentity ¶
SavedIdentity returns the name + email persisted from a previous run, or empty strings if none is saved. Used by the identify screen to pre-fill.
func (*App) SendReport ¶
SendReport uploads the most recent report to the ingest server. Called from the result screen's Send button and, if that fails, the Retry button. The server dedupes on run_id so repeated calls are safe.
func (*App) SetRunningForTest ¶
SetRunningForTest toggles the run-in-progress flag. Test-only seam.
func (*App) StartRun ¶
StartRun kicks off sysinfo → nettest → local write → upload. Returns immediately; the frontend listens for "progress" and "complete" events.