config

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig() error

Types

type Config

type Config struct {
	Server struct {
		Port          string `yaml:"port" envconfig:"SERVER_PORT"`
		Secret        string `yaml:"secret" envconfig:"SERVER_SECRET"`
		TokenLifespan int32  `yaml:"tokenLifespan" envconfig:"SERVER_TOKEN_LIFESPAN"`
	} `yaml:"server"`
	Database struct {
		Username string `yaml:"username" envconfig:"DB_USERNAME"`
		Password string `yaml:"password" envconfig:"DB_PASSWORD"`
		Host     string `yaml:"host" envconfig:"DB_HOST"`
		Port     string `yaml:"port" envconfig:"DB_PORT"`
	} `yaml:"database"`
}
var Cfg Config

Jump to

Keyboard shortcuts

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