Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Wrap ¶
func Wrap(command RunCommand) cli.ActionFunc
Wrap wraps a RunCommand to work with urfave/cli.
Types ¶
type CommandInput ¶
type CommandInput struct {
FS afero.Fs
Command *cli.Command
AppDefCache *appdef.Definition
BaseDir string
SOPSCache sops.EncrypterDecrypter
Manifest *manifest.Tracker
// contains filtered or unexported fields
}
CommandInput provides dependencies and context to command handlers.
func (*CommandInput) AppDef ¶
func (c *CommandInput) AppDef() *appdef.Definition
AppDef retrieves the main app manifest from the root of the project. Exits without it.
func (*CommandInput) Generator ¶
func (c *CommandInput) Generator() scaffold.Generator
Generator creates a new file scaffolder for command actions.
func (*CommandInput) Printer ¶
func (c *CommandInput) Printer() *printer.Console
Printer returns a new console writer to stdout.
func (*CommandInput) SOPSClient ¶
func (c *CommandInput) SOPSClient() sops.EncrypterDecrypter
SOPSClient returns a cached sops.Client or initialises it by using an age provider.
func (*CommandInput) Spinner ¶
func (c *CommandInput) Spinner() *spinner.Spinner
type ExitError ¶
type ExitError struct {
Code int
}
ExitError is an error that causes the program to exit with a non-zero code without printing an error message
type RunCommand ¶
type RunCommand func(ctx context.Context, input CommandInput) error
RunCommand is the signature for command handlers. Each command should implement this function signature to run.
Click to show internal directories.
Click to hide internal directories.