Documentation
¶
Index ¶
- Constants
- func ChooseTemplate(templates []workspace.Template, opts display.Options) (workspace.Template, error)
- func ErrorIfNotEmptyDirectory(path string) error
- func GetStack(ctx context.Context, b backend.Backend, stack string, opts display.Options) (backend.Stack, string, string, error)
- func HandleConfig(ctx context.Context, ssml cmdStack.SecretsManagerLoader, ...) error
- func InstallDependencies(ctx *plugin.Context, runtime *workspace.ProjectRuntimeInfo, main string) error
- func NewNewCmd() *cobra.Command
- func ParseConfig(configArray []string, path bool) (config.Map, error)
- func PromptAndCreateStack(ctx context.Context, ws pkgWorkspace.Context, b backend.Backend, ...) (backend.Stack, error)
- func SaveConfig(ws pkgWorkspace.Context, stack backend.Stack, c config.Map) error
- func UseSpecifiedDir(dir string) (string, error)
Constants ¶
const (
BrokenTemplateDescription = "(This template is currently broken)"
)
Variables ¶
This section is empty.
Functions ¶
func ChooseTemplate ¶
func ChooseTemplate(templates []workspace.Template, opts display.Options) (workspace.Template, error)
ChooseTemplate will prompt the user to choose amongst the available templates.
func ErrorIfNotEmptyDirectory ¶
ErrorIfNotEmptyDirectory returns an error if path is not empty.
func GetStack ¶
func GetStack(ctx context.Context, b backend.Backend, stack string, opts display.Options, ) (backend.Stack, string, string, error)
GetStack gets a stack and the project name & description, or returns nil if the stack doesn't exist.
func HandleConfig ¶
func HandleConfig( ctx context.Context, ssml cmdStack.SecretsManagerLoader, ws pkgWorkspace.Context, prompt promptForValueFunc, project *workspace.Project, s backend.Stack, templateNameOrURL string, template workspace.Template, configArray []string, yes bool, path bool, opts display.Options, ) error
HandleConfig handles prompting for config values (as needed) and saving config.
func InstallDependencies ¶
func InstallDependencies(ctx *plugin.Context, runtime *workspace.ProjectRuntimeInfo, main string) error
InstallDependencies will install dependencies for the project, e.g. by running `npm install` for nodejs projects.
func NewNewCmd ¶
NewNewCmd creates a New command with default dependencies. Intentionally disabling here for cleaner err declaration/assignment.
func ParseConfig ¶
ParseConfig parses the config values passed via command line flags. These are passed as `-c aws:region=us-east-1 -c foo:bar=blah` and end up in configArray as ["aws:region=us-east-1", "foo:bar=blah"]. This function converts the array into a config.Map.
func PromptAndCreateStack ¶
func PromptAndCreateStack(ctx context.Context, ws pkgWorkspace.Context, b backend.Backend, prompt promptForValueFunc, stack string, root string, setCurrent bool, yes bool, opts display.Options, secretsProvider string, ) (backend.Stack, error)
PromptAndCreateStack creates and returns a new stack (prompting for the name as needed).
func SaveConfig ¶
SaveConfig saves the config for the stack.
func UseSpecifiedDir ¶
Ensure the directory exists and uses it as the current working directory.
Types ¶
This section is empty.