Documentation ¶
Index ¶
- Constants
- func ServiceName() string
- type Universe
- func (u Universe) IsCloud() bool
- func (u Universe) IsContainer() bool
- func (u Universe) IsDebug() bool
- func (u Universe) IsDev() bool
- func (u Universe) IsProd() bool
- func (u Universe) IsProdOrStaging() bool
- func (u Universe) IsTestOrCI() bool
- func (u Universe) IsUndefined() bool
- func (u Universe) Validate() error
Constants ¶
const (
EnvKeyUniverse = "UC_UNIVERSE"
)
Environment keys for config settings We use these instead of command line args because it works better with `go test`
Variables ¶
This section is empty.
Functions ¶
func ServiceName ¶
func ServiceName() string
ServiceName returns the name of the currently-running service. TODO: this probably should live in service or something else, but that currently creates a cycle so here is fine (and it's not unrelated to universe)
Types ¶
type Universe ¶
type Universe string
Universe represents a universe (or environment) that UC code runs in
const ( Undefined Universe = "undefined" // undefined universe Dev Universe = "dev" // local dev laptops Test Universe = "test" // automated tests on localhost CI Universe = "ci" // AWS continuous integration env Debug Universe = "debug" // AWS EB universe to debug off master Staging Universe = "staging" // cloud hosted staging universe (similar to prod) Prod Universe = "prod" // user-facing prod deployment Container Universe = "container" // container (dev only for now) )
Supported universes.
func AllUniverses ¶
func AllUniverses() []Universe
AllUniverses returns a list of all known universes Useful for config testing etc
func (Universe) IsCloud ¶
IsCloud returns true if universe is one of the cloud envs (prod, staging debug)
func (Universe) IsContainer ¶ added in v1.1.0
IsContainer true if universe is container
func (Universe) IsProdOrStaging ¶
IsProdOrStaging returns true if universe is prod or staging
func (Universe) IsTestOrCI ¶
IsTestOrCI returns true if universe is CI or tests
func (Universe) IsUndefined ¶ added in v1.1.0
IsUndefined returns true if universe is undefined