config

package
v1.0.0-alpha.11 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 1 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" yaml:"name" env:"APP_NAME"`
	Repo    string `env-required:"false" yaml:"repo" env:"APP_REPO"`
	Version string `env-required:"false"`
}

App -.

type Config

type Config struct {
	App  `yaml:"app"`
	HTTP `yaml:"http"`
	Log  `yaml:"logger"`
	DB   `yaml:"postgres"`
}

Config -.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns app config.

type DB

type DB struct {
	PoolMax int    `env-required:"false" yaml:"pool_max" env:"DB_POOL_MAX"`
	URL     string `env:"DB_URL"`
}

DB -.

type HTTP

type HTTP struct {
	Host           string   `env-required:"false" yaml:"host" env:"HTTP_HOST"`
	Port           string   `env-required:"false" yaml:"port" env:"HTTP_PORT"`
	AllowedOrigins []string `env-required:"false" yaml:"allowed_origins" env:"HTTP_ALLOWED_ORIGINS"`
	AllowedHeaders []string `env-required:"false" yaml:"allowed_headers" env:"HTTP_ALLOWED_HEADERS"`
}

HTTP -.

type Log

type Log struct {
	Level string `env-required:"false" yaml:"log_level"   env:"LOG_LEVEL"`
}

Log -.

Jump to

Keyboard shortcuts

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