common

package
v0.2.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SourceFlag is the name of the flag that contains path to the source folder
	SourceFlag = "source"
	// OutputFlag is the name of the flag that contains path to the output folder
	OutputFlag = "output"
	// QACacheFlag is the name of the flag that contains list of qacache files
	QACacheFlag = "qacache"
	// NameFlag is the name of the flag that contains the project name
	NameFlag = "name"
	// PlanFlag is the name of the flag that contains the path to the plan file
	PlanFlag = "plan"
	// IgnoreEnvFlag is the name of the flag that tells us whether to use data collected from the local machine
	IgnoreEnvFlag = "ignoreenv"
	// QASkipFlag is the name of the flag that lets you skip all the question answers
	QASkipFlag = "qaskip"
	// ConfigFlag is the name of the flag that contains list of config files
	ConfigFlag = "config"
	// SetConfigFlag is the name of the flag that contains list of key-value configs
	SetConfigFlag = "setconfig"
	// PreSetFlag is the name of the flag that contains list of preset configurations to use
	PreSetFlag = "preset"
	// OverwriteFlag is the name of the flag that lets you overwrite the output directory if it exists
	OverwriteFlag = "overwrite"
	// TransformsFlag is the name of the flag that lets you specify a list of paths to transformations scripts
	TransformsFlag = "transforms"
)

Variables

This section is empty.

Functions

func CheckOutputPath

func CheckOutputPath(outpath string, overwrite bool)

CheckOutputPath checks if the output path is already in use.

func CheckSourcePath

func CheckSourcePath(srcpath string)

CheckSourcePath checks if the source path is an existing directory.

func GetVersionCommand added in v0.2.0

func GetVersionCommand() *cobra.Command

GetVersionCommand returns the version

func NormalizePaths added in v0.2.0

func NormalizePaths(paths []string) ([]string, error)

NormalizePaths cleans the paths and makes them absolute

Types

type TranslateFlags added in v0.2.0

type TranslateFlags struct {
	//IgnoreEnv tells us whether to use data collected from the local machine
	IgnoreEnv bool
	//Planfile is contains the path to the plan file
	Planfile string
	//Outpath contains the path to the output folder
	Outpath string
	//SourceFlag contains path to the source folder
	Srcpath string
	//Name contains the project name
	Name string
	//Qacaches contains a list of qacache files
	Qacaches []string
	//Configs contains a list of config files
	Configs []string
	//Configs contains a list of key-value configs
	Setconfigs []string
	//Qaskip lets you skip all the question answers
	Qaskip bool
	// Overwrite lets you overwrite the output directory if it exists
	Overwrite bool
	//PreSets contains a list of preset configurations
	PreSets []string
	// TransformPaths contains a list of paths to starlark transformation scripts
	TransformPaths []string
}

TranslateFlags to store values from command line paramters

Jump to

Keyboard shortcuts

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