Documentation ¶
Index ¶
- func AllBackendStacksString() string
- func AllMobileStacksString() string
- func AllStacksString() string
- func AllWebStacksString() string
- func AppendToFile(path, data string) error
- func CheckStacksExist(stacks []string) error
- func ConvertStacksIntoString(stacks []string) string
- func ConvertToCamelCase(slice []string) []string
- func CreateDirectory(filePath string) error
- func CreateFile(file string) error
- func CreateGithubWorkflowDir()
- func CreateInfraOutputsJson(environment string) error
- func CreateMessageTemplate(name, text string) *template.Template
- func CreateStackDirectory(dirName, stack, database string) string
- func CurrentDirectory() string
- func EndsWith(inputString, endString string) bool
- func ExistingStackAndDatabase(dirName string) (string, string)
- func FetchExistingPortNumber(stackDir, portName string) string
- func FindExistingGraphqlBackendAndWebStacks() ([]string, []string)
- func FindService(dirName string) string
- func FindStackAndDatabase(dirName string) (string, string)
- func FindStackDirectoriesByConfigStacks(configStacks []string) []string
- func FindUserInputStackName(dirName string) string
- func GetCloudProvider(cp string) string
- func GetDatabase(db string) string
- func GetDatabasePortNumber(driver string) int
- func GetEnvironmentValue(env string) string
- func GetExistingInfraStacks() []string
- func GetExistingStacks() []string
- func GetExistingStacksDatabasesAndDirectories() ([]string, []string, []string)
- func GetPackageManagerOfUser() string
- func GetPortNumber(defaultPN int) int
- func GetProjectName() string
- func GetShortEnvName(environment string) string
- func GetStackByFlags(stack string) string
- func GetStackDetails(service string) []stackDetails
- func GetSuffixOfStack(stack, database string) string
- func IsBackendStack(stack string) (string, bool)
- func IsBackendWebAndMobileExist() (bool, bool, bool)
- func IsExists(path string) (bool, error)
- func IsMobileStack(stack string) (string, bool)
- func IsWebStack(stack string) (string, bool)
- func MakeDirectory(path string, dirName string) error
- func MakeFile(path, fileName string) error
- func PrintErrorMessage(message string) error
- func PrintInfoMessage(message string) error
- func PrintMultiSelectMessage(messages []string) error
- func PrintWarningMessage(message string) error
- func ReadAllContents(path string) ([]string, error)
- func ReadJsonDataInSstOutputs() map[string]interface{}
- func RemoveAll(path string) error
- func RemoveAllContents(path string) error
- func RemoveFile(path string) error
- func RunCommandWithLogs(path string, name string, args ...string) error
- func RunCommandWithoutLogs(path string, name string, args ...string) error
- func SplitStackDirectoryName(dirName string) (string, string, string, string)
- func StartsWith(inputString, startString string) bool
- func TruncateAndWriteToFile(path, file, data string) error
- func UseCD() string
- func UseCI() string
- func UseCloudProvider() string
- func UseDatabase() string
- func UseDirectory() string
- func UseDockerCompose() string
- func UseEnvironment() string
- func UseInfraStacks() string
- func UsePlatform() string
- func UseService() string
- func UseStack() string
- func WriteToFile(file, data string) error
- type BackendOutputKeys
- type LogDriverOptionsKeys
- type TaskDefinitionDetails
- type WebOutputKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllBackendStacksString ¶
func AllBackendStacksString() string
func AllMobileStacksString ¶
func AllMobileStacksString() string
func AllStacksString ¶
func AllStacksString() string
func AllWebStacksString ¶
func AllWebStacksString() string
func AppendToFile ¶
AppendToFile will append given string to existing file.
func CheckStacksExist ¶
func ConvertStacksIntoString ¶
func ConvertToCamelCase ¶
CovertToCamelCase return camel cased array of string of the given array of string.
func CreateDirectory ¶
CreateDirectory creates directory according to the input.
func CreateFile ¶
func CreateGithubWorkflowDir ¶
func CreateGithubWorkflowDir()
func CreateInfraOutputsJson ¶
func CreateMessageTemplate ¶
CreateMessageTemplate creates new text template for printing colorful logs.
func CreateStackDirectory ¶
CreateStackDirectory will create a a directory based on the user input, stack and the database selected.
func CurrentDirectory ¶
func CurrentDirectory() string
CurrentDirectory will give the root directory.
func ExistingStackAndDatabase ¶
ExistingStackAndDatabase return stack and database of the given stack directory name.
func FetchExistingPortNumber ¶
func FindService ¶
FindService return service of the given stack directory name.
func FindStackAndDatabase ¶
FindStackAndDatabase return stack and database of given directory name.
func FindStackDirectoriesByConfigStacks ¶
FindStackDirectoriesByConfigStacks will return an array of stack directories present in the root directory. Eg: [api-node-hapi-mysql, fe-react-web]
func FindUserInputStackName ¶
FindUserInputStackName return user-input of the given stack directory name.
func GetCloudProvider ¶
func GetDatabase ¶
func GetDatabasePortNumber ¶
func GetEnvironmentValue ¶
func GetExistingInfraStacks ¶
func GetExistingInfraStacks() []string
GetExistingInfraStacks fetch stack files inside the stacks directory.
func GetExistingStacks ¶
func GetExistingStacks() []string
func GetExistingStacksDatabasesAndDirectories ¶
GetExistingStacksDatabasesAndDirectories return existing stacks details. Stack details contain stack name, database, and the directory name.
func GetPackageManagerOfUser ¶
func GetPackageManagerOfUser() string
GetPackageManagerOfUser checks whether yarn or npm is installed in the user's machine. If both are not installed, then the system will throw error.
func GetPortNumber ¶
func GetShortEnvName ¶
GetShortEnvName return short environment name for the given environment.
func GetStackByFlags ¶
func GetStackDetails ¶
func GetStackDetails(service string) []stackDetails
GetStackDetails returns an array of StackDetails for showing details when user selects stacks prompt.
func GetSuffixOfStack ¶
GetSuffixOfStack returns suffix name for the given stack and database.
func IsBackendStack ¶
func IsBackendWebAndMobileExist ¶
IsBackendWebAndMobileExist checks backend, web and mobile stacks is exist or not.
func IsMobileStack ¶
func IsWebStack ¶
func MakeDirectory ¶
MakeDirectory will make directory according to input.
func PrintErrorMessage ¶
PrintErrorMessage prints the given message in red color as error message
func PrintInfoMessage ¶
PrintInfoMessage prints given message in cyan color as info message in terminal.
func PrintMultiSelectMessage ¶
PrintMultiSelectMessage prints multi selected options.
func PrintWarningMessage ¶
PrintWarningMessage prints given message in yellow color as warning message in terminal.
func ReadAllContents ¶
Read all existing in the given path.
func ReadJsonDataInSstOutputs ¶
func ReadJsonDataInSstOutputs() map[string]interface{}
func RemoveAllContents ¶
Remove all existing files in the given path.
func RunCommandWithLogs ¶
RunCommandWithLogs runs the given command with logs.
func RunCommandWithoutLogs ¶
RunCommandWithLogs runs the given command without logs.
func SplitStackDirectoryName ¶
SplitStackDirectoryName returns user-input, stack-suffix and last-suffix of the given stack directory name.
func StartsWith ¶
func TruncateAndWriteToFile ¶
TruncateAndWriteToFile will delete all the existing data and write input data into the file.
func UseCloudProvider ¶
func UseCloudProvider() string
func UseDatabase ¶
func UseDatabase() string
func UseDirectory ¶
func UseDirectory() string
func UseDockerCompose ¶
func UseDockerCompose() string
func UseEnvironment ¶
func UseEnvironment() string
func UseInfraStacks ¶
func UseInfraStacks() string
func UsePlatform ¶
func UsePlatform() string
func UseService ¶
func UseService() string
func WriteToFile ¶
WriteToFile will delete all the existing data and write input data into the file.
Types ¶
type BackendOutputKeys ¶
type BackendOutputKeys struct { TaskRole string `json:"taskRole"` Image string `json:"image"` ContainerName string `json:"containerName"` ContainerPort string `json:"containerPort"` ExecutionRole string `json:"executionRole"` TaskDefinition string `json:"taskDefinition"` LogDriver string `json:"logDriver"` LogDriverOptions LogDriverOptionsKeys Family string `json:"family"` AwsRegion string `json:"awsRegion"` RedisHost string `json:"redisHost"` SecretName string `json:"secretName"` DatabaseHost string `json:"databaseHost"` DatabaseName string `json:"databaseName"` SecretArn string `json:"secretArn"` LoadBalancerDns string `json:"loadBalancerDns"` ServiceName string `json:"serviceName"` ClusterName string `json:"clusterName"` ElasticContainerRegistryRepo string `json:"elasticContainerRegistryRepo"` }
type LogDriverOptionsKeys ¶
type TaskDefinitionDetails ¶
type TaskDefinitionDetails struct { BackendObj BackendOutputKeys Environment string EnvName string SecretName string }
func GetOutputsBackendObject ¶
func GetOutputsBackendObject(environment, stackDir string) TaskDefinitionDetails