config

package
v0.0.0-...-f5e8e9b Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 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 Config

type Config struct {
	Http     `yaml:"http"`
	Redis    `yaml:"redis"`
	Postgres `yaml:"postgres"`
}

func NewConfig

func NewConfig() (*Config, error)

type Http

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

type Postgres

type Postgres struct {
	Host     string `env-required:"true" yaml:"host" env:"POSTGRES_HOST"`
	Port     string `env-required:"true" yaml:"port" env:"POSTGRES_PORT"`
	Db       string `env-required:"true" yaml:"db" env:"POSTGRES_DB"`
	User     string `env-required:"true" yaml:"user" env:"POSTGRES_USER"`
	Password string `env-required:"true" yaml:"password" env:"POSTGRES_PASSWORD"`
}

type Redis

type Redis struct {
	Host string `env-required:"true" yaml:"host" env:"REDIS_HOST"`
	Port string `env-required:"true" yaml:"port" env:"REDIS_PORT"`
}

Jump to

Keyboard shortcuts

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