config

package
v0.2.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: GPL-3.0 Imports: 3 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"`
	ResourcesDir string `env-required:"true" yaml:"resources_dir" env:"RESOURCES_DIR"`
}

App -.

type Config

type Config struct {
	App   App            `yaml:"app"`
	HTTP  HTTP           `yaml:"http"`
	Log   prepare.Config `yaml:"logger"`
	Redis Redis          `yaml:"redis"`
}

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"`
}

HTTP -.

type Redis

type Redis struct {
	URL string `env-required:"true" yaml:"url,omitempty" env:"REDIS_URL"`
}

Redis -.

Jump to

Keyboard shortcuts

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