config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = loadConfig()

Functions

func GetUserAgent added in v0.6.0

func GetUserAgent() string

func LogSortingFunc added in v0.6.0

func LogSortingFunc(keys []string)

func RootDir added in v0.6.0

func RootDir() string

Types

type ConfigSpec

type ConfigSpec struct {
	NoColor                   bool
	LogLevel                  string `envconfig:"INFRACOST_LOG_LEVEL"  required:"false"`
	DefaultPricingAPIEndpoint string `envconfig:"DEFAULT_INFRACOST_PRICING_API_ENDPOINT" default:"https://pricing.api.infracost.io"`
	PricingAPIEndpoint        string `envconfig:"INFRACOST_PRICING_API_ENDPOINT" required:"true" default:"https://pricing.api.infracost.io"`
	DashboardAPIEndpoint      string `envconfig:"INFRACOST_DASHBOARD_API_ENDPOINT" required:"true" default:"https://dashboard.api.infracost.io"`
	ApiKey                    string `envconfig:"INFRACOST_API_KEY"`
}

ConfigSpec contains mapping of environment variable names to config values

func (*ConfigSpec) IsLogging added in v0.6.0

func (c *ConfigSpec) IsLogging() bool

func (*ConfigSpec) SetLogLevel added in v0.6.0

func (c *ConfigSpec) SetLogLevel(l string) error

Jump to

Keyboard shortcuts

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