config

package
v0.0.0-...-26d71a5 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name    string `env-required:"false" json:"name"    env:"APP_NAME"`
	Version string `env-required:"false" json:"version" env:"APP_VERSION"`
}

type Config

type Config struct {
	App  `json:"app"`
	HTTP `json:"rest"`
	DB   `json:"db"`
	Log  `json:"logger"`
}

func LoadConfig

func LoadConfig() (*Config, error)

LoadConfig returns Involvio config.

type DB

type DB struct {
	DBHost     string `env-required:"false" json:"host"     env:"DB_HOST"`
	DBPort     int    `env-required:"false" json:"port"     env:"DB_PORT"`
	DBUser     string `env-required:"false" json:"user"     env:"DB_USER"`
	DBPassword string `env-required:"true"  json:"password" env:"DB_PASSWORD"`
	DBName     string `env-required:"false" json:"name"     env:"DB_NAME"`
	PoolMax    int32  `env-required:"true"  json:"pool_max" env:"PG_POOL_MAX"`
}

type HTTP

type HTTP struct {
	Port string `env-required:"false" json:"port" env:"HTTP_PORT"`
}

type Log

type Log struct {
	Level slog.Level `env-required:"false" json:"level"   env:"LOG_LEVEL"`
}

Jump to

Keyboard shortcuts

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