config

package
v0.0.0-...-e6d10a5 Latest Latest
Warning

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

Go to latest
Published: May 4, 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 Config

type Config struct {
	HTTP
	Log
	Storage
	PG
	JWT

	BaseURL string `env:"BASE_URL"`
}

func New

func New() (*Config, error)

New returns app config

type HTTP

type HTTP struct {
	Addr string `env:"SERVER_ADDRESS"`
}

type JWT

type JWT struct {
	Key string `env:"JWT_KEY"`
}

type Log

type Log struct {
	Level string `env:"LOG_LEVEL"`
}

type PG

type PG struct {
	PoolMax int    `env:"PG_POOL_MAX"`
	URL     string `env:"DATABASE_DSN"`
}

type Storage

type Storage struct {
	Path string `env:"FILE_STORAGE_PATH"`
}

Jump to

Keyboard shortcuts

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