Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Flavor string Production bool Port string PostgresqlHost string PostgresqlPort int PostgresqlDbName string PostgresqlUser string PostgresqlPassword string PostgresqlSslMode string StripeSecretLive string StripeSecretTest string AWSBucket string AWSRegion string AWSAccessKeyId string // Unused, just used to remind you to set the env AWSSecretAccessKey string // vars AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY }
var Conf Config = Config{ Flavor: os.Getenv("FLAVOR"), Production: os.Getenv("FLAVOR") == "production", Port: EnvDef("PORT", "8000"), PostgresqlHost: HostDef("GRADIENTZOO_POSTGRES_SVC", EnvDefInt("POSTGRESQL_PORT", 5432), "localhost"), PostgresqlPort: EnvDefInt("POSTGRESQL_PORT", 5432), PostgresqlDbName: EnvDef("POSTGRESQL_NAME", "gradientzoo"), PostgresqlUser: EnvDef("POSTGRESQL_USER", "gradientzoo"), PostgresqlPassword: EnvDef("POSTGRESQL_PASSWORD", "gradientzoo"), PostgresqlSslMode: EnvDef("POSTGRESQL_SSLMODE", "disable"), StripeSecretLive: EnvDef("STRIPE_SECRET_LIVE", ""), StripeSecretTest: EnvDef("STRIPE_SECRET_TEST", ""), AWSBucket: EnvDef("AWS_BUCKET", "gradientzoo-1"), AWSRegion: EnvDef("AWS_REGION", "us-west-2"), AWSAccessKeyId: EnvDef("AWS_ACCESS_KEY_ID", ""), AWSSecretAccessKey: EnvDef("AWS_SECRET_ACCESS_KEY", ""), }
Click to show internal directories.
Click to hide internal directories.