Documentation ¶
Index ¶
Constants ¶
const AWSRegion = "AWS_REGION"
AWSRegion is the key for the region we establish a session to for AWS services
const AWSS3FileUploadBucket = "AWS_S3_FILE_UPLOAD_BUCKET"
AWSS3FileUploadBucket is the key for the bucket we upload files to
const AWSSESSourceARNKey = "AWS_SES_SOURCE_ARN"
AWSSESSourceARNKey is the key for the ARN for sending email
const AWSSESSourceKey = "AWS_SES_SOURCE"
AWSSESSourceKey is the key for the sender for sending email
const AltJobCodes = "ALT_JOB_CODES"
AltJobCodes are alternate job codes
const CEDARAPIKey = "CEDAR_API_KEY" // #nosec
CEDARAPIKey is the key for accessing CEDAR
const CEDARAPIURL = "CEDAR_API_URL"
CEDARAPIURL is the key for the CEDAR base url
const CEDARCoreAPIVersion = "CEDAR_CORE_API_VERSION"
CEDARCoreAPIVersion is the version of the CEDAR core API to use
const CEDARCoreMock = "CEDAR_CORE_MOCK"
CEDARCoreMock is the key for the environment variable that determines if the CEDAR Core API should be mocked If set to true, mock data will be used If set to false, real calls to the CEDAR Core API will be made
const CEDARCoreSkipProxy = "CEDAR_CORE_SKIP_PROXY"
CEDARCoreSkipProxy is the key for whether to make calls directly to CEDAR Core
const CEDAREmailAddress = "CEDAR_EMAIL_ADDRESS"
CEDAREmailAddress is the key for the env var that holds the email address that we use when notifying CEDAR of changes
const CEDARIntakeEnabled = "CEDAR_INTAKE_ENABLED"
CEDARIntakeEnabled is the key for the environment variable that determines if the CEDAR Intake API should enabled If set to true, real calls to the CEDAR Intake API will be made If set to false, the Intake API Client methods will do nothing
const CEDARPROXYURL = "CEDAR_PROXY_URL"
CEDARPROXYURL is the key for the CEDAR proxy url
const ClientHostKey = "CLIENT_HOSTNAME"
ClientHostKey is the key for getting the client's domain name
const ClientProtocolKey = "CLIENT_PROTOCOL"
ClientProtocolKey is the key for getting the client's protocol
const DBHostConfigKey = "PGHOST"
DBHostConfigKey is the Postgres hostname config key
const DBMaxConnections = "DB_MAX_CONNECTIONS"
DBMaxConnections is the maximum number of connections to the database
const DBNameConfigKey = "PGDATABASE"
DBNameConfigKey is the Postgres database name config key
const DBPasswordConfigKey = "PGPASS"
DBPasswordConfigKey is the Postgres password config key
const DBPortConfigKey = "PGPORT"
DBPortConfigKey is the Postgres port config key
const DBSSLModeConfigKey = "PGSSLMODE"
DBSSLModeConfigKey is the Postgres SSL mode config key
const DBUsernameConfigKey = "PGUSER"
DBUsernameConfigKey is the Postgres username config key
const EASIHelpEmailKey = "EASI_HELP_EMAIL"
EASIHelpEmailKey is the key for the receiving email for EASI help requests
const EmailTemplateDirectoryKey = "EMAIL_TEMPLATE_DIR"
EmailTemplateDirectoryKey is the key for getting the email template directory
const EnvironmentKey = "APP_ENV"
EnvironmentKey is used to access the environment from a config
const FlagSourceKey = "FLAG_SOURCE"
FlagSourceKey indicates where flags should be loaded from
const FlagValuesFileKey = "FLAGDATA_FILE"
FlagValuesFileKey is the key for the environment variable with the file path to a LaunchDarkly flag values file
const GRTEmailKey = "GRT_EMAIL"
GRTEmailKey is the key for the receiving email for the GRT
const ITInvestmentEmailKey = "IT_INVESTMENT_EMAIL"
ITInvestmentEmailKey is the key for the receiving email for IT investment
const LDKey = "LD_SDK_KEY"
LDKey is the key for accessing LaunchDarkly
const LDTimeout = "LD_TIMEOUT_SECONDS"
LDTimeout is the key for accessing LaunchDarkly
const LocalAuthEnabled = "LOCAL_AUTH_ENABLED"
LocalAuthEnabled is whether local auth should be enabled
const LocalMinioAddressKey = "MINIO_ADDRESS"
LocalMinioAddressKey is the host used for local minio
const LocalMinioS3AccessKey = "MINIO_ACCESS_KEY"
LocalMinioS3AccessKey is a key used for local access to minio
const LocalMinioS3SecretKey = "MINIO_SECRET_KEY"
LocalMinioS3SecretKey is the secret key used for local access to minio
const OITFeedbackChannelSlackLink = "OIT_FEEDBACK_CHANNEL_SLACK_LINK"
OITFeedbackChannelSlackLink is the key for the OIT feedback slack channel
const OKTAAPIToken = "OKTA_API_TOKEN"
OKTAAPIToken is the key for the Okta API token #nosec G101 false positive - not the actual API key itself
const OKTAAPIURL = "OKTA_API_URL"
OKTAAPIURL is the key for the Okta API url
const OktaClientID = "OKTA_CLIENT_ID"
OktaClientID is the okta client id
const OktaIssuer = "OKTA_ISSUER"
OktaIssuer is the okta issuer
const OktaLocalEnabled = "USE_OKTA_LOCAL"
OktaLocalEnabled is the key for enabling OKTA on local dev
const SESRecipientAllowListRegexKey = "SES_RECIPIENT_ALLOWLIST_REGEX"
SESRecipientAllowListRegexKey is the key for getting the regex that Email recipients (SES specifically) must match
const TRBEmailKey = "TRB_EMAIL"
TRBEmailKey is the key for the receiving email to the TRB email
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment string
Environment represents an environment
func NewEnvironment ¶
func NewEnvironment(config string) (Environment, error)
NewEnvironment returns an environment from a string
func (Environment) Deployed ¶
func (e Environment) Deployed() bool
Deployed returns true if in a deployed environment (anything in AWS)
func (Environment) Dev ¶
func (e Environment) Dev() bool
Dev returns true if the environment is dev (dev.easi.cms.gov)
func (Environment) Impl ¶
func (e Environment) Impl() bool
Impl returns true if the environment is Impl (impl.easi.cms.gov)
func (Environment) Local ¶
func (e Environment) Local() bool
Local returns true if the environment is local (local development)
func (Environment) Prod ¶
func (e Environment) Prod() bool
Prod returns true if the environment is Production (easi.cms.gov)
func (Environment) String ¶
func (e Environment) String() string
String gets the environment as a string
func (Environment) Test ¶
func (e Environment) Test() bool
Test returns true if the environment is test (used for local or CI/CD testing)
type FlagSourceOption ¶
type FlagSourceOption string
FlagSourceOption represents an environment
const ( // FlagSourceLocal is LOCAL FlagSourceLocal FlagSourceOption = "LOCAL" // FlagSourceFile is FILE (for setting LaunchDarkly flag values in a file for use when testing) FlagSourceFile FlagSourceOption = "FILE" // FlagSourceLaunchDarkly is LAUNCH_DARKLY FlagSourceLaunchDarkly FlagSourceOption = "LAUNCH_DARKLY" )