steps

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2023 License: BSD-2-Clause Imports: 18 Imported by: 0

Documentation

Overview

Package steps provides a set of handlers for create command chain of responsibility.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 stringReader
}

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 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

Run creates temporary application directory.

type FillTemplateVarsFromCli

type FillTemplateVarsFromCli struct {
}

FillTemplateVarsFromCli represents a step for collecting variables from command line args.

func (FillTemplateVarsFromCli) Run

Run collects variables passed using command line args.

type LoadManifest

type LoadManifest struct {
}

LoadManifest represents manifest load step.

func (LoadManifest) Run

Run loads template manifest. Missing manifest is not an error.

type LoadVarsFile

type LoadVarsFile struct {
}

LoadVarsFile represents variables file load step.

func (LoadVarsFile) Run

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 PrintFollowUpMessage added in v1.0.0

type PrintFollowUpMessage struct {
	// Writer is used to write follow-up message.
	Writer io.Writer
}

func (PrintFollowUpMessage) Run added in v1.0.0

func (printFollowUpMsgStep PrintFollowUpMessage) Run(createCtx *create_ctx.CreateCtx,
	templateCtx *app_template.TemplateCtx) error

Run prints application template follow-up message.

type RenderTemplate

type RenderTemplate struct {
}

RenderTemplate represents template render step.

func (RenderTemplate) Run

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL