Documentation
¶
Overview ¶
Package steps provides a set of handlers for create command chain of responsibility.
Index ¶
- func NewConsoleReader() consoleReader
- type Cleanup
- type CollectTemplateVarsFromUser
- type CopyAppTemplate
- type CreateAppSymlink
- type CreateDockerfile
- type CreateTemporaryAppDirectory
- type FillTemplateVarsFromCli
- type LoadManifest
- type LoadVarsFile
- type MoveAppDirectory
- type Reader
- type RenderTemplate
- type RunHook
- type SetPredefinedVariables
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConsoleReader ¶
func NewConsoleReader() consoleReader
NewConsoleReader creates new console reader.
Types ¶
type Cleanup ¶
type Cleanup struct { }
Cleanup represents application directory cleanup step.
func (Cleanup) Run ¶
func (hook Cleanup) Run(createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run removes all files/directories, except files in the include list.
type CollectTemplateVarsFromUser ¶
type CollectTemplateVarsFromUser struct { // Reader is used to get user input. Reader Reader }
CollectTemplateVarsFromUser represents interactive variables collecting step.
func (CollectTemplateVarsFromUser) Run ¶
func (collectTemplateVarsFromUser CollectTemplateVarsFromUser) Run( createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run collects template variables from user in interactive mode.
type CopyAppTemplate ¶
type CopyAppTemplate struct { }
CopyAppTemplate represents template -> app directory copy step.
func (CopyAppTemplate) Run ¶
func (CopyAppTemplate) Run(createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run copies/extracts application template to target application directory.
type CreateAppSymlink ¶
type CreateAppSymlink struct {
SymlinkDir string
}
CreateAppSymlink step creates a symbolic link to the new application in instances enabled directory.
func (CreateAppSymlink) Run ¶
func (createSymlinkStep CreateAppSymlink) Run(createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run creates a symbolic link to the new application in instances enabled directory.
type CreateDockerfile ¶
type CreateDockerfile struct { }
CreateDockerfile represents create docker file step.
func (CreateDockerfile) Run ¶
func (CreateDockerfile) Run(createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run creates a docker file in application directory.
type CreateTemporaryAppDirectory ¶
type CreateTemporaryAppDirectory struct { }
CreateTemporaryAppDirectory represents create temporary application directory step.
func (CreateTemporaryAppDirectory) Run ¶
func (CreateTemporaryAppDirectory) Run(createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run creates temporary application directory.
type FillTemplateVarsFromCli ¶
type FillTemplateVarsFromCli struct { }
FillTemplateVarsFromCli represents a step for collecting variables from command line args.
func (FillTemplateVarsFromCli) Run ¶
func (FillTemplateVarsFromCli) Run(createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run collects variables passed using command line args.
type LoadManifest ¶
type LoadManifest struct { }
LoadManifest represents manifest load step.
func (LoadManifest) Run ¶
func (LoadManifest) Run(ctx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run loads template manifest. Missing manifest is not an error.
type LoadVarsFile ¶
type LoadVarsFile struct { }
LoadVarsFile represents variables file load step.
func (LoadVarsFile) Run ¶
func (LoadVarsFile) Run(ctx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run collects variables passed using command line args.
type MoveAppDirectory ¶
type MoveAppDirectory struct { }
MoveAppDirectory represents temporary application directory move step.
func (MoveAppDirectory) Run ¶
func (MoveAppDirectory) Run(createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run moves temporary application directory to destination.
type Reader ¶
type Reader interface {
// contains filtered or unexported methods
}
Reader interface is used for reading user input.
type RenderTemplate ¶
type RenderTemplate struct { }
RenderTemplate represents template render step.
func (RenderTemplate) Run ¶
func (RenderTemplate) Run(ctx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run renders template in application directory.
type RunHook ¶
type RunHook struct {
HookType string
}
RunHook represents run hook step.
func (RunHook) Run ¶
func (hook RunHook) Run(ctx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run executes template hooks.
type SetPredefinedVariables ¶
type SetPredefinedVariables struct { }
SetPredefinedVariables represents a step for setting pre-defined variables.
func (SetPredefinedVariables) Run ¶
func (SetPredefinedVariables) Run(createCtx *create_ctx.CreateCtx, templateCtx *app_template.TemplateCtx) error
Run sets predefined variables values.
type Step ¶
type Step interface {
Run(ctx *create_ctx.CreateCtx, appTemplateCtx *app_template.TemplateCtx) error
}
Step is an interface for single step in create chain.