config

package
v0.0.0-...-21c1986 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 4 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"`
	HTTP `yaml:"http"`
	SQL  `yaml:"sql"`
}

func NewConfig

func NewConfig() (*Config, error)

type HTTP

type HTTP struct {
	Port string `env-required:"true" yaml:"port" env:"HTTP_PORT"`
}

type SQL

type SQL struct {
	Timeout string `env-required:"true" yaml:"timeout" env:"SQL_TIMEOUT"`
	URL     string `env:"SQL_URL"`
}

Jump to

Keyboard shortcuts

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