env

package
v0.0.0-...-fa1d1bb Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Required Environment Variable Keys
	BucketName     = "BUCKET_NAME"
	Region         = "REGION"
	RuntimeEnv     = "ENV"
	ServiceRoleArn = "SERVICE_ROLE_ARN"

	// Optional Environment Variable Keys
	AWSAccessKeyID     = "AWS_ACCESS_KEY_ID"
	AWSSecretAccessKey = "AWS_SECRET_ACCESS_KEY"

	// Valid values for the ENV environment variable
	RuntimeDev  = "development"
	RuntimeProd = "production"
)

Environment variable constants so that we don't keep messing stuff up

Variables

This section is empty.

Functions

func Check

func Check()

Check ensures that the necessary environment variables are present

func Get

func Get(envKey string) string

Get returns the value of an environment variable. If it doesn't exist, it asks os.LookupEnv and caches the value.

func IsDevelopment

func IsDevelopment() bool

IsDevelopment returns whether the runtime environment is development. Specifically, it checks the value of the ENV environment variable.

func IsProduction

func IsProduction() bool

IsProduction returns whether the runtime environment is production. Specifically, it checks the value of the ENV environment variable.

Types

This section is empty.

Jump to

Keyboard shortcuts

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