config

package
v0.0.0-...-74cc791 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel    string `env:"LOG_LEVEL"`
	Environment string `env:"ENVIRONMENT"`
	ServiceName string `env:"SERVICE_NAME"`
	HTTPPort    string `env:"HTTP_PORT,default=4012"`
	DB          *DB
}

func LoadFromEnv

func LoadFromEnv(ctx context.Context) (*Config, error)

type DB

type DB struct {
	Host          string `env:"DB_HOST"`
	Name          string `env:"DB_NAME"`
	User          string `env:"DB_USER"`
	Password      string `env:"DB_PASSWORD" json:"-"` // zap ignore
	Port          string `env:"DB_PORT"`
	ConnectionURL string `env:"CONNECTION_URL" json:"-"` // zap ignore
}

Jump to

Keyboard shortcuts

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