/
messages.go
69 lines (54 loc) · 1.95 KB
/
messages.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package cmd
import "fmt"
const WEBSOCKET_MODULE_MESSAGE = `
module "websocket" {
source = "./modules/websocket"
ENVIRONMENT = var.ENVIRONMENT
PROJECT_NAME = var.PROJECT_NAME
AWS_REGION = var.AWS_REGION
AWS_ACCOUNT_ID = var.AWS_ACCOUNT_ID
WEBSOCKET_AUTHORIZATION_SECRET_VALUE = var.WEBSOCKET_AUTHORIZATION_SECRET_VALUE
}`
const VARIABLES_MESSAGE = `
variable "ENVIRONMENT" {
type = string
}
variable "PROJECT_NAME" {
type = string
}
variable "AWS_REGION" {
type = string
}
variable "AWS_ACCOUNT_ID" {
type = string
}
variable "WEBSOCKET_AUTHORIZATION_SECRET_VALUE" {
type = string
sensitive = true
}`
const GIT_IGNORE_MESSAGE = `
*.tfstate*
.terraform
`
const UNACCEPTED_ENVIRONMENT_MESSAGE = `
Environment name does not match any of the environments in the WebSocket generator config file.
Please try again using one of the environments you set when running websocket-generator %s.
`
const PROJECT_ENVIRONMENT_MISSING_MESSAGE = `
Project and Environment name are required,
i.e. 'websocket-generator %s <project-name> <environment>'.
`
const UNACCEPTED_PROJECT_NAME_MESSAGE = `
Project name does not match the project name in the WebSocket generator config file.
Did you mean to run websocket-generator %s?
`
const WEBSOCKET_GENERATOR_FILE_MESSAGE =
`// This is to stop Serverless complaining that the confirguration file is not in the same directory as serverless file.
const websocketGeneratorConfig = require('%s');
module.exports = websocketGeneratorConfig;
`
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:`
var CONFIG_FILE_NOT_FOUND_MESSAGE = fmt.Sprintf("The file %s could not be found.", WEBSOCKET_CONFIG_FILE_PATH)
var CURRENT_DIRECTORY_ERROR_MESSAGE = "Error currentDirectory: The current directory path was not retrieved"