init

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AvailableVendorOrders = []string{"aws", "github", "circleci"}

Constant to maintain prompt orders so users can have the same flow, modules get downloaded asynchronously therefore its easier to just hardcode an order

Functions

func Init

func Init(outDir string, localModulePath string) *projectconfig.ZeroProjectConfig

Create cloud provider context

func NoCondition

func NoCondition(map[string]string) bool

func NoValidation

func NoValidation(string) error

func PromptModuleParams

func PromptModuleParams(moduleConfig moduleconfig.ModuleConfig, parameters map[string]string, projectCredentials globalconfig.ProjectCredential) (map[string]string, error)

PromptParams renders series of prompt UI based on the config

func SpecificValueValidation

func SpecificValueValidation(values ...string) func(string) error

func ValidateAKID

func ValidateAKID(input string) error

func ValidateProjectName

func ValidateProjectName(input string) error

ValidateProjectName validates Project Name field user input.

func ValidateSAK

func ValidateSAK(input string) error

Types

type CredentialPrompts

type CredentialPrompts struct {
	Vendor  string
	Prompts []PromptHandler
}

type CustomConditionSignature

type CustomConditionSignature func(map[string]string) bool

func KeyMatchCondition

func KeyMatchCondition(key string, value string) CustomConditionSignature

type PromptHandler

type PromptHandler struct {
	moduleconfig.Parameter
	Condition CustomConditionSignature
	Validate  func(string) error
}

func (PromptHandler) GetParam

func (p PromptHandler) GetParam(projectParams map[string]string) string

Jump to

Keyboard shortcuts

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