env

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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