config

package
v0.0.0-...-8973fb7 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 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"`
}

App -.

type Config

type Config struct {
	App     `yaml:"app"`
	HTTP    `yaml:"http"`
	Log     `yaml:"logger"`
	Request `yaml:"request"`
}

Config -.

func NewConfig

func NewConfig() (*Config, error)

NewConfig returns app config.

type HTTP

type HTTP struct {
	Port         string `env-required:"true" yaml:"port" env:"HTTP_PORT"`
	ReadTimeout  int64  `env-required:"true" yaml:"read_timeout"`
	WriteTimeout int64  `env-required:"true" yaml:"write_timeout"`
}

HTTP -.

type Log

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

Log -.

type Request

type Request struct {
	Timeout    int64 `env-required:"true" yaml:"request_timeout"`
	RetryCount int   `env-required:"true" yaml:"retry_count"`
}

Request

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳