config

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 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 {
	Server struct {
		Port string `env:"PORT" envDefault:"8080"`

		ProtectedUser     string `env:"PROTECTED_USER" envRequired:"true"`
		ProtectedPassword string `env:"PROTECTED_PASSWORD" envRequired:"true"`
	} `envPrefix:"SERVER_"`

	DB struct {
		Host     string `env:"HOST" envDefault:"localhost"`
		Name     string `env:"NAME" envDefault:"sueno_dict"`
		User     string `env:"USER" envDefault:"root"`
		Password string `env:"PASSWD" envDefault:"root"`
	} `envPrefix:"DB_"`
}

func Read

func Read() (*Config, error)

Jump to

Keyboard shortcuts

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