env

package
v0.0.0-...-48c6f6e Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Values

type Values struct {
	ENV               string   `env:"ENV" default:"development"`
	LOG_LEVEL         string   `env:"LOG_LEVEL" default:"debug"`
	APP_NAME          string   `env:"APP_NAME" default:"go-api-template"`
	HTTP_ADDRESS      string   `env:"HTTP_ADDRESS" default:"localhost"`
	HTTP_PORT         string   `env:"HTTP_PORT" default:"8080"`
	HTTP_ALLOW_ORIGIN []string `env:"HTTP_ALLOW_ORIGIN" default:"*" delimiter:";"`
	POSTGRES_URL      string   `env:"POSTGRES_URL" default:"postgres://postgres:postgres@localhost:5432/main?sslmode=disable"`
	REDIS_URL         string   `env:"REDIS_URL" default:"redis://default:password@localhost:6379/0"`

	KAFKA_BROKER                   string `env:"KAFKA_BROKER" default:""`
	KAFKA_SSL                      bool   `env:"KAFKA_SSL" default:"false"`
	KAFKA_USERNAME                 string `env:"KAFKA_USERNAME" default:""`
	KAFKA_PASSWORD                 string `env:"KAFKA_PASSWORD" default:""`
	KAFKA_GROUP_ID                 string `env:"KAFKA_GROUP_ID" default:""`
	KAFKA_CLIENT_ID                string `env:"KAFKA_CLIENT_ID" default:""`
	KAFKA_NOTIFICATION_ERROR_EMAIL string `env:"KAFKA_NOTIFICATION_ERROR_EMAIL" default:""`
}

func GetInstance

func GetInstance() *Values

GetInstance returns the singleton instance of EnvVars or panic if it's not load correctly

Jump to

Keyboard shortcuts

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