cmd

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_AUTHORIZATION_KEY_NAME = "Authorization"
View Source
const DEFAULT_AWS_REGION = "eu-west-2"
View Source
const DEFAULT_ENVIRONMENT = "development"
View Source
const GIT_IGNORE_MESSAGE = `
*.tfstate*
.terraform
`
View Source
const PROJECT_ENVIRONMENT_MISSING_MESSAGE = `
Project and Environment name are required,
i.e. 'websocket-generator %s <project-name> <environment>'.
`
View Source
const UNACCEPTED_ENVIRONMENT_MESSAGE = `` /* 189-byte string literal not displayed */
View Source
const UNACCEPTED_PROJECT_NAME_MESSAGE = `` /* 130-byte string literal not displayed */
View Source
const VARIABLES_MESSAGE = `` /* 265-byte string literal not displayed */
View Source
const WEBSOCKET_CONFIG_FILE_PATH = "websocket-generator-config.json"
View Source
const WEBSOCKET_GENERATOR_FILE_MESSAGE = `` /* 211-byte string literal not displayed */
View Source
const WEBSOCKET_GENERATOR_PACKAGE = "github.com/CourtneyLO/websocket-generator/"
View Source
const WEBSOCKET_MODULE_MESSAGE = `` /* 393-byte string literal not displayed */

Variables

View Source
var CONFIG_FILE_NOT_FOUND_MESSAGE = fmt.Sprintf("The file %s could not be found.", WEBSOCKET_CONFIG_FILE_PATH)
View Source
var CURRENT_DIRECTORY_ERROR_MESSAGE = "Error currentDirectory: The current directory path was not retrieved"
View Source
var FILE_ALREADY_EXISTS_MESSAGE = `
It appears you already have a %s file.
Please add following code to your existing file, if it does not already exist:`

Functions

func ApplyTerraform

func ApplyTerraform(configFile map[string]interface{}, currentDirectory string, projectName string, environment string)

func CopyAndMoveFile

func CopyAndMoveFile(sourceFilePath, destinationFilePath string) error

func CopyAndMoveFolder

func CopyAndMoveFolder(sourceFilePath string, destinationFilePath string) error

func DeleteWorkSpaceTerraform

func DeleteWorkSpaceTerraform(configFile map[string]interface{}, currentDirectory string, projectName string, environment string)

func DeployServerless

func DeployServerless(configFile map[string]interface{}, currentDirectory, environment string)

func DestroyTerraform

func DestroyTerraform(configFile map[string]interface{}, currentDirectory string, projectName string, environment string)

func Execute

func Execute()

func GetAWSParameter added in v0.21.0

func GetAWSParameter(parameterName string, awsRegion string) (string, error)

func InitTerraform

func InitTerraform(configFile map[string]interface{}, currentDirectory string, projectName string, environment string)

func InstallNodePackages added in v0.9.0

func InstallNodePackages(configFile map[string]interface{}, currentDirectory, environment string)

func PlanTerraform

func PlanTerraform(configFile map[string]interface{}, currentDirectory string, projectName string, environment string)

func ReadFile

func ReadFile(fileName string) (map[string]interface{}, error)

func RemoveServerless

func RemoveServerless(configFile map[string]interface{}, currentDirectory, environment string)

func SelectWorkSpaceTerraform

func SelectWorkSpaceTerraform(configFile map[string]interface{}, currentDirectory string, environment string)

func WriteFile

func WriteFile(filePath string, data []byte) error

func WriteJsonFile

func WriteJsonFile(fileName string, data map[string]interface{}) error

Types

type EnvironmentData

type EnvironmentData struct {
	AwsAccountId string `json:"awsAccountId"`
}

type QuestionDetails

type QuestionDetails struct {
	QuestionLabel   string
	DefaultResponse string
	ResponseLabel   string
}

func GetQuestionDetails

func GetQuestionDetails(reference string) QuestionDetails

type WebsocketConfig

type WebsocketConfig struct {
	Environments           []string
	ProjectName            string
	Language               string
	InfrastructureFilePath string
	WebsocketFilePath      string
	AwsRegion              string
	AuthorizationKey       string
}

func Questions

func Questions(projectName string) (WebsocketConfig, map[string]EnvironmentData)

Jump to

Keyboard shortcuts

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