config

package
v0.12.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AWS_ACCOUNT_ID            = "LAYER0_AWS_ACCOUNT_ID"
	AWS_ACCESS_KEY_ID         = "LAYER0_AWS_ACCESS_KEY_ID"
	AWS_SECRET_ACCESS_KEY     = "LAYER0_AWS_SECRET_ACCESS_KEY"
	AWS_VPC_ID                = "LAYER0_AWS_VPC_ID"
	AWS_PRIVATE_SUBNETS       = "LAYER0_AWS_PRIVATE_SUBNETS"
	AWS_PUBLIC_SUBNETS        = "LAYER0_AWS_PUBLIC_SUBNETS"
	AWS_ECS_ROLE              = "LAYER0_AWS_ECS_ROLE"
	AWS_SSH_KEY_PAIR          = "LAYER0_AWS_SSH_KEY_PAIR"
	AWS_S3_BUCKET             = "LAYER0_AWS_S3_BUCKET"
	AWS_ECS_INSTANCE_PROFILE  = "LAYER0_AWS_ECS_INSTANCE_PROFILE"
	AWS_DYNAMO_TAG_TABLE      = "LAYER0_AWS_DYNAMO_TAG_TABLE"
	AWS_DYNAMO_JOB_TABLE      = "LAYER0_AWS_DYNAMO_JOB_TABLE"
	JOB_ID                    = "LAYER0_JOB_ID"
	AWS_LINUX_SERVICE_AMI     = "LAYER0_AWS_LINUX_SERVICE_AMI"
	AWS_WINDOWS_SERVICE_AMI   = "LAYER0_AWS_WINDOWS_SERVICE_AMI"
	AWS_REGION                = "LAYER0_AWS_REGION"
	AUTH_TOKEN                = "LAYER0_AUTH_TOKEN"
	API_ENDPOINT              = "LAYER0_API_ENDPOINT"
	API_PORT                  = "LAYER0_API_PORT"
	API_LOG_LEVEL             = "LAYER0_API_LOG_LEVEL"
	PREFIX                    = "LAYER0_PREFIX"
	RUNNER_LOG_LEVEL          = "LAYER0_RUNNER_LOG_LEVEL"
	RUNNER_VERSION_TAG        = "LAYER0_RUNNER_VERSION_TAG"
	SETUP_LOG_LEVEL           = "LAYER0_SETUP_LOG_LEVEL"
	SKIP_SSL_VERIFY           = "LAYER0_SKIP_SSL_VERIFY"
	SKIP_VERSION_VERIFY       = "LAYER0_SKIP_VERSION_VERIFY"
	TEST_AWS_TAG_DYNAMO_TABLE = "LAYER0_TEST_AWS_TAG_DYNAMO_TABLE"
	TEST_AWS_JOB_DYNAMO_TABLE = "LAYER0_TEST_AWS_JOB_DYNAMO_TABLE"
	AWS_TIME_BETWEEN_REQUESTS = "LAYER0_AWS_TIME_BETWEEN_REQUESTS"
)

IMPORTANT! The environment variables represented as constants here should always line up with the environment variables in setup/container_definitions.json

View Source
const (
	DEFAULT_AUTH_TOKEN            = "bGF5ZXIwOm5vaGF4cGx6"
	DEFAULT_API_ENDPOINT          = "http://localhost:9090/"
	DEFAULT_API_PORT              = "9090"
	DEFAULT_TIME_BETWEEN_REQUESTS = "10ms"
	DEFAULT_MAX_RETRIES           = 999
)

defaults bGF5ZXIwOm5vaGF4cGx6 = layer0:nohaxplz, base64 encoded (basic http auth)

View Source
const (
	API_ENVIRONMENT_ID     = "api"
	API_ENVIRONMENT_NAME   = "api"
	API_LOAD_BALANCER_ID   = "api"
	API_LOAD_BALANCER_NAME = "api"
	API_SERVICE_ID         = "api"
	API_SERVICE_NAME       = "api"
)

api resource tags

View Source
const (
	CREATE_TASK_JOB_TTL          = 6
	DELETE_TASK_JOB_TTL          = 6
	DELETE_LOAD_BALANCER_JOB_TTL = 6
	DELETE_SERVICE_JOB_TTL       = 6
	DELETE_ENVIRONMENT_JOB_TTL   = 6
)

job ttl expire time in hours

View Source
const (
	TASK_TAG_TTL       = 6
	DEPLOY_JOB_TAG_TTL = 6
)

tag ttl expire time in hours

View Source
const (
	TEST_PREFIX                   = "l0"
	TEST_AWS_PRIVATE_SUBNETS      = "subnet-12345678,subnet-87654321"
	TEST_AWS_PUBLIC_SUBNETS       = "subnet-11111111,subnet-22222222"
	TEST_AWS_VPC_ID               = "vpc-12345678"
	TEST_AWS_ECS_INSTANCE_PROFILE = "l0-test-vpc-ECSInstanceProfile-123456789ABC"
	TEST_AWS_S3_BUCKET            = "layer0-l0-123456789ABC"
	TEST_AWS_SERVICE_AMI          = "ami-abc123"
	TEST_AWS_ECS_ROLE             = "role-abc123"
	TEST_AWS_KEY_PAIR             = "test-key-pair"
)

Variables

View Source
var RequiredCLIVariables = []string{}

Functions

func APIEndpoint

func APIEndpoint() string

func APILogLevel

func APILogLevel() string

func APIPort

func APIPort() string

func APIVersion

func APIVersion() string

func AWSAccessKey

func AWSAccessKey() string

func AWSAccountID

func AWSAccountID() string

func AWSECSInstanceProfile

func AWSECSInstanceProfile() string

func AWSECSRole

func AWSECSRole() string

func AWSKeyPair

func AWSKeyPair() string

func AWSLinuxServiceAMI

func AWSLinuxServiceAMI() string

func AWSLogGroupID

func AWSLogGroupID() string

func AWSPrivateSubnets

func AWSPrivateSubnets() string

func AWSPublicSubnets

func AWSPublicSubnets() string

func AWSRegion

func AWSRegion() string

func AWSS3Bucket

func AWSS3Bucket() string

func AWSSecretKey

func AWSSecretKey() string

func AWSTimeBetweenRequests added in v0.10.4

func AWSTimeBetweenRequests() string

func AWSVPCID

func AWSVPCID() string

func AWSWindowsServiceAMI

func AWSWindowsServiceAMI() string

func AuthToken

func AuthToken() string

func CLIVersion

func CLIVersion() string

func DynamoJobTableName

func DynamoJobTableName() string

func DynamoTagTableName

func DynamoTagTableName() string

func GetAWSConfig added in v0.10.4

func GetAWSConfig(creds *credentials.Credentials, region string) *aws.Config

func Prefix

func Prefix() string

func RunnerLogLevel

func RunnerLogLevel() string

func RunnerVersionTag

func RunnerVersionTag() string

func SetAPIVersion

func SetAPIVersion(version string)

func SetCLIVersion

func SetCLIVersion(version string)

func SetTestConfig

func SetTestConfig()

func ShouldVerifySSL

func ShouldVerifySSL() bool

func ShouldVerifyVersion

func ShouldVerifyVersion() bool

func TestDynamoJobTableName

func TestDynamoJobTableName() string

func TestDynamoTagTableName

func TestDynamoTagTableName() string

func Validate

func Validate(required []string) error

Types

type ConfigCredProvider

type ConfigCredProvider struct{}

func NewConfigCredProvider

func NewConfigCredProvider() *ConfigCredProvider

func (*ConfigCredProvider) GetAWSAccessKeyID

func (this *ConfigCredProvider) GetAWSAccessKeyID() (string, error)

func (*ConfigCredProvider) GetAWSSecretAccessKey

func (this *ConfigCredProvider) GetAWSSecretAccessKey() (string, error)

Jump to

Keyboard shortcuts

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