config

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cfg = Config{}

Cfg stores config values

Functions

func Init

func Init()

Init load variable from .env file or environment variables

func InitTracer added in v1.5.0

func InitTracer(config Config) func(ctx context.Context) error

Types

type Config

type Config struct {
	APIRouterLoggerFormat string `` //nolint
	/* 234-byte string literal not displayed */
	AppEnv              string   `env:"APP_ENV" envDefault:"development"`
	CorsOrigins         []string `env:"CORS_ORIGINS" envDefault:"http://localhost:8080" envSeparator:","`
	FirestoreCollection string   `env:"FIRESTORE_COLLECTION" envDefault:"dev"`
	GoogleAPIKey        string   `env:"GOOGLE_API_KEY,required"`
	Port                string   `env:"PORT" envDefault:"3000"`
	ProjectID           string   `env:"PROJECT_ID" envDefault:"youtubegoespodcast"`
}

Config stores all data from env variables

Jump to

Keyboard shortcuts

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