config

package
v0.0.0-...-6f359ee Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDev

func IsDev(env string) bool

IsDev return true if application is on dev stack

func SetAppConfig

func SetAppConfig(cfg AppConfig)

Types

type AppConfig

type AppConfig struct {
	APIUrl          string `env:"APIUrl"`
	XOrganizationId string `env:"XOrganizationId"`
	APIKey          string `env:"APIKey"`
	APISecret       string `env:"APISecret"`
	Environment     string `default:"dev" env:"ENVIRONMENT"`
}

func GetAppConfig

func GetAppConfig() AppConfig

GetAppConfig return initialize config structure with variable env

func (AppConfig) IsDev

func (a AppConfig) IsDev() bool

IsDev return true if application is on dev stack

Jump to

Keyboard shortcuts

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