Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment string
const ( Production Environment = "prod" QA Environment = "qa" Dev Environment = "dev" )
Define API environments
func Parse ¶
func Parse(env string) Environment
func (Environment) IsDev ¶
func (e Environment) IsDev() bool
func (Environment) IsProduction ¶
func (e Environment) IsProduction() bool
func (Environment) IsQA ¶
func (e Environment) IsQA() bool
type EnvironmentURLs ¶
type EnvironmentURLs struct { // Base URL for each environment Prod string QA string Dev string // OverrideWith specifies an environment // variable name. When set, the value // it contains will override the base URL OverrideWith string }
func URLs ¶
func URLs(pkg, prod, qa, dev string) EnvironmentURLs
URLs expects the package name and base URLs for prod, qa, dev the package name is used fot setting OverrideWith for example, for pkg=costs, OverrideWith will be STACKIT_COSTS_BASEURL
func (EnvironmentURLs) GetURL ¶
func (eu EnvironmentURLs) GetURL(e Environment) string
Click to show internal directories.
Click to hide internal directories.