Documentation
¶
Overview ¶
Package cli builds ultra's command tree and wires the domain services together. It is the composition root: each command constructs the scanner, composer and resolvers once and injects them into the run, validate and lint services. Consumers extend ultra by registering their own resolvers (see resolvers.go) and calling Execute from their own main.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSecretNotFound = resolve.ErrSecretNotFound
Functions ¶
func DocsCommand ¶
DocsCommand builds the ultra command tree with no config-file defaults applied, for generating the command reference. Resolver-specific flags are bound only when a resolver is selected, so they are documented in the resolvers guide rather than here.
func Execute ¶
func Execute() error
Execute builds the ultra command tree (root, run, validate, lint) and runs it. Flags default to any values set in the ultra config file (.ultra.toml under --root, or the path given by --config-file); the command line overrides them.
func RegisterConfigResolver ¶
func RegisterConfigResolver(rc ConfigResolverCommand)
RegisterConfigResolver adds a config resolver. Call before Execute.
func RegisterSecretResolver ¶
func RegisterSecretResolver(rc SecretResolverCommand)
RegisterSecretResolver adds a secret resolver. Call before Execute.
Types ¶
type ConfigResolver ¶
type ConfigResolver = resolve.ConfigResolver
The resolver API is re-exported from internal/resolve so a custom build can add its own backend: import this package, register a resolver, and call Execute. The types are aliases, so a resolver written against cli.SecretResolver is the exact type the internal domains consume.
type ConfigResolverCommand ¶
type ConfigResolverCommand = resolve.ConfigResolverCommand
The resolver API is re-exported from internal/resolve so a custom build can add its own backend: import this package, register a resolver, and call Execute. The types are aliases, so a resolver written against cli.SecretResolver is the exact type the internal domains consume.
type SecretResolver ¶
type SecretResolver = resolve.SecretResolver
The resolver API is re-exported from internal/resolve so a custom build can add its own backend: import this package, register a resolver, and call Execute. The types are aliases, so a resolver written against cli.SecretResolver is the exact type the internal domains consume.
type SecretResolverCommand ¶
type SecretResolverCommand = resolve.SecretResolverCommand
The resolver API is re-exported from internal/resolve so a custom build can add its own backend: import this package, register a resolver, and call Execute. The types are aliases, so a resolver written against cli.SecretResolver is the exact type the internal domains consume.