config

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: MIT Imports: 2 Imported by: 2

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:"APP_NAME,required"`
	Version string `env:"APP_VERSION,required"`
}

App -.

type Config

type Config struct {
	App  App
	HTTP HTTP
	Log  Log
	PG   PG
	RMQ  RMQ
}

Config -.

func NewConfig added in v1.4.2

func NewConfig() (*Config, error)

NewConfig returns app config.

type HTTP

type HTTP struct {
	Port string `env:"HTTP_PORT,required"`
}

HTTP -.

type Log

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

Log -.

type PG

type PG struct {
	PoolMax int    `env:"PG_POOL_MAX,required"`
	URL     string `env:"PG_URL,required"`
}

PG -.

type RMQ

type RMQ struct {
	ServerExchange string `env:"RMQ_RPC_SERVER,required"`
	ClientExchange string `env:"RMQ_RPC_CLIENT,required"`
	URL            string `env:"RMQ_URL,required"`
}

RMQ -.

Jump to

Keyboard shortcuts

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