config

package
v0.0.0-...-f17982d Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 6 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 {
	App struct {
		Host         string `yaml:"host" envconfig:"HJKL_HOST" json:"host"`
		Port         int    `yaml:"port" envconfig:"HJKL_PORT" json:"port"`
		RootPassword string `yaml:"root_password" envconfig:"HJKL_ROOT_PASSWORD" json:"root_password"`
	} `yaml:"app" json:"app"`
	Postgres struct {
		Username string `yaml:"username" envconfig:"HJKL_POSTGRES_USERNAME" json:"username"`
		Password string `yaml:"password" envconfig:"HJKL_POSTGRES_PASSWORD" json:"password"`
		Addr     string `yaml:"addr" envconfig:"HJKL_POSTGRES_ADDR" json:"addr"`
	} `yaml:"postgres" json:"postgres"`
	Redis struct {
		Addr     string `yaml:"addr" envconfig:"HJKL_REDIS_ADDR" json:"addr"`
		Db       int    `yaml:"db" envconfig:"HJKL_REDIS_DB" json:"db"`
		Password string `yaml:"password" envconfig:"HJKL_REDIS_PASSWORD" json:"password"`
	} `yaml:"redis" json:"redis"`
}

func Read

func Read() Config

Jump to

Keyboard shortcuts

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