config

package
v1.12.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 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
	GRPC    GRPC
	RMQ     RMQ
	Metrics Metrics
	Swagger Swagger
}

Config -.

func NewConfig added in v1.4.2

func NewConfig() (*Config, error)

NewConfig returns app config.

type GRPC added in v1.12.0

type GRPC struct {
	Port string `env:"GRPC_PORT,required"`
}

GRPC -.

type HTTP

type HTTP struct {
	Port           string `env:"HTTP_PORT,required"`
	UsePreforkMode bool   `env:"HTTP_USE_PREFORK_MODE" envDefault:"false"`
}

HTTP -.

type Log

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

Log -.

type Metrics added in v1.9.0

type Metrics struct {
	Enabled bool `env:"METRICS_ENABLED" envDefault:"true"`
}

Metrics -.

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 -.

type Swagger added in v1.9.0

type Swagger struct {
	Enabled bool `env:"SWAGGER_ENABLED" envDefault:"false"`
}

Swagger -.

Jump to

Keyboard shortcuts

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