Documentation
¶
Index ¶
- func ExitCode(err error) int
- func IsPassphraseError(err error, kind PassphraseErrorKind) bool
- func NewRoot(deps Dependencies) *cobra.Command
- func RenderError(w io.Writer, err error)
- type AuthorityPassphraseIntent
- type AuthorityPassphraseProvider
- type AuthorityPassphraseRequest
- type Dependencies
- type ExecutionProfile
- type PassphraseError
- type PassphraseErrorKind
- type UpdateService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsPassphraseError ¶ added in v0.1.20
func IsPassphraseError(err error, kind PassphraseErrorKind) bool
func NewRoot ¶
func NewRoot(deps Dependencies) *cobra.Command
func RenderError ¶
Types ¶
type AuthorityPassphraseIntent ¶ added in v0.1.20
type AuthorityPassphraseIntent uint8
const ( AuthorityPassphraseCreate AuthorityPassphraseIntent = iota + 1 AuthorityPassphraseUnlock )
type AuthorityPassphraseProvider ¶ added in v0.1.20
type AuthorityPassphraseProvider interface {
Acquire(context.Context, AuthorityPassphraseRequest) ([]byte, error)
}
type AuthorityPassphraseRequest ¶ added in v0.1.20
type AuthorityPassphraseRequest struct {
Intent AuthorityPassphraseIntent
Input io.Reader
Diagnostic io.Writer
}
type Dependencies ¶
type Dependencies struct {
In io.Reader
Out, Err io.Writer
Logger *slog.Logger
Version string
IsTerminal func(io.Reader, io.Writer) bool
Updater UpdateService
Initializer *initialize.Service
Resetter *resetdomain.Service
Migrator *migration.Service
Passphrases AuthorityPassphraseProvider
Profile ExecutionProfile
DevelopmentRoot string
}
type ExecutionProfile ¶ added in v0.1.27
type ExecutionProfile string
const ( ProductionProfile ExecutionProfile = "production" DevelopmentProfile ExecutionProfile = "development" )
func ProfileForExecutable ¶ added in v0.1.28
func ProfileForExecutable(version, executable string) ExecutionProfile
ProfileForExecutable prevents a source-checkout build from becoming a production executable merely because Go embeds the checkout's tagged module version. Stable binaries outside a worktree remain production binaries.
func ProfileForVersion ¶ added in v0.1.27
func ProfileForVersion(version string) ExecutionProfile
type PassphraseError ¶ added in v0.1.20
type PassphraseError struct {
Kind PassphraseErrorKind
Interaction bool
// contains filtered or unexported fields
}
func (*PassphraseError) Error ¶ added in v0.1.20
func (e *PassphraseError) Error() string
type PassphraseErrorKind ¶ added in v0.1.20
type PassphraseErrorKind string
const ( PassphraseCancelled PassphraseErrorKind = "cancelled" PassphraseLaunch PassphraseErrorKind = "launch_failure" PassphraseProtocol PassphraseErrorKind = "protocol_failure" PassphraseTimeout PassphraseErrorKind = "timeout" PassphrasePolicy PassphraseErrorKind = "policy_failure" )
type UpdateService ¶ added in v0.1.4
Source Files
¶
Click to show internal directories.
Click to hide internal directories.