accountcommand

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: AGPL-3.0 Imports: 18 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 accountcommand presents the engine's shared official-service account.

Index

Constants

View Source
const Synopsis = "  " + command.Name + " account status [--json] | register | refresh\n" +
	"  " + command.Name + " account login <username> | password <username> [--password-stdin]\n" +
	"  " + command.Name + " account email <address> | verify <code> | revoke <credential>"

Synopsis is the single source of truth for account command lines shared between accountcommand.Usage and top-level wind usage.

View Source
const Usage = "Usage:\n" + Synopsis

Variables

This section is empty.

Functions

func Describe

func Describe(value account.Snapshot) string

func IdentityLines added in v0.1.5

func IdentityLines(value account.Snapshot) []string

func Watch

func Watch(ctx context.Context, service *account.Service, canvas *terminalcanvas.Canvas) func()

Watch owns the progress row only until initial publication, so transfer progress never competes with account setup for terminal presentation.

Types

type Request added in v0.1.6

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

Request is a validated account subcommand ready to execute against a Service.

func Parse added in v0.1.6

func Parse(args []string, output command.LineOutput) (Request, command.ExitCode, bool)

Parse validates account subcommand arguments without requiring an initialized engine or account service. When ready is false, code is the terminal exit status.

type Runner

type Runner struct {
	Service    Service
	Input      io.Reader
	Output     command.LineOutput
	JSONOutput io.Writer
}

func (Runner) Execute added in v0.1.6

func (runner Runner) Execute(ctx context.Context, request Request) command.ExitCode

func (Runner) Run

func (runner Runner) Run(ctx context.Context, args []string) command.ExitCode

type Service

type Service interface {
	Snapshot() (account.Snapshot, <-chan struct{})
	RefreshOnce(context.Context) (account.RefreshOutcome, error)
	Register(context.Context) error
	Login(context.Context, string, string) error
	SetPassword(context.Context, string, string, string) error
	RequestEmail(context.Context, string) error
	VerifyEmail(context.Context, string) error
	RevokeCredential(context.Context, string, [16]byte) error
}

Jump to

Keyboard shortcuts

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