config

package
v0.0.0-...-d85361f Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2023 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 App

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

type Config

type Config struct {
	App  `yaml:"app"`
	GRPC `yaml:"grpc"`
	Log  `yaml:"logger"`
	DB   `yaml:"database"`
}

Config -.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns app config.

type DB

type DB struct {
	PoolMax int    `env-required:"true" yaml:"pool_max" env:"PG_POOL_MAX"`
	URL     string `env-required:"true" yaml:"url" env:"PG_URL"`
}

type GRPC

type GRPC struct {
	Port string `env-required:"true" yaml:"port" env:"GRPC_PORT"`
}

type Log

type Log struct {
	Level string `env-required:"true" yaml:"level"   env:"LOG_LEVEL"`
}

Jump to

Keyboard shortcuts

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