step

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildVerify

func BuildVerify() error

BuildVerify creates a step that ensures the validity of the generated project.

func Execute

func Execute(steps []Step) error

Execute runs the provided steps.

func Generate

func Generate() error

Generate creates a step that runs go generate for all files.

func GetDependencies

func GetDependencies(dependencies []string) func() error

GetDependencies creates a step that downloads the specified dependencies.

func ModTidy

func ModTidy() error

ModTidy creates a step that runs go mod tidy.

func ModVendor

func ModVendor() error

ModVendor creates a step that runs go mod vendor.

func TerraformInit

func TerraformInit() error

TerraformInit creates a step that runs terraform init with the upgrade flag.

func TerraformInitFast added in v0.16.1

func TerraformInitFast() error

TerraformInitFast creates a step that runs terraform init without the upgrade flag.

func TerraformRequire

func TerraformRequire() error

TerraformRequire creates a step that ensures that terraform is installed.

Types

type Step

type Step func() error

Step defines the function interface for an action to be performed.

func Backup added in v0.13.0

func Backup(path string) Step

Backup creates a step that backups the provided file path.

func Build

func Build(pkg string, target string, goEnvs ...string) Step

Build creates a step that runs go build.

func Chdir

func Chdir(path string) Step

Chdir creates a step that changes the directory to the provided path.

func Delete added in v0.21.0

func Delete(path string) Step

Delete creates a step that removes the provided file.

func InitProjectPath

func InitProjectPath(path string, finalModulePath *string) Step

InitProjectPath creates a step that gathers information about the project path.

func ModInit

func ModInit(finalModulePath *string) Step

ModInit creates a step that initializes the go module.

func PackageZip

func PackageZip(source string, target string) Step

PackageZip creates a step that packages the source into a zip file.

func PackageZipRename added in v0.6.0

func PackageZipRename(source string, target string, newSourceName string) Step

PackageZipRename packages source file into target zip, the resulting zip contains the source file but named with newSourceName

func PluginInstall

func PluginInstall(pkg, version, target string) Step

PluginInstall creates a step that installs the provided plugin.

func RenderTemplate added in v0.13.0

func RenderTemplate(fs embed.FS, source string, target string, variables interface{}) Step

RenderTemplate creates a step that renders the provided template.

func RenderTemplates

func RenderTemplates(fs embed.FS, prefix string, variables interface{}) Step

RenderTemplates creates a step that renders the provided templates.

func TerraformApply

func TerraformApply(workspace string, args ...string) Step

TerraformApply creates a step that runs terraform apply with the provided arguments.

func TerraformDestroy

func TerraformDestroy(workspace string, args ...string) Step

TerraformDestroy creates a step that runs terraform destroy with the provided arguments.

func TerraformNewWorkspace added in v0.12.0

func TerraformNewWorkspace(workspace string) Step

TerraformNewWorkspace creates a step that initializes a new terraform workspace if it does not yet exist.

func TerraformPlan added in v0.15.0

func TerraformPlan(workspace string, args ...string) Step

TerraformPlan creates a step that runs terraform plan with the provided arguments.

Jump to

Keyboard shortcuts

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