config

package
v0.0.0-...-14f5618 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 5 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 {
	// Web Server
	WebServerHost   string   `env:"WEB_SERVER_HOST,notEmpty"`
	WebServerPort   int16    `env:"WEB_SERVER_PORT,notEmpty"`
	DomainWhitelist []string `env:"DOMAIN_WHITELIST,notEmpty"`
	// Postgres
	Database string `env:"DATABASE,notEmpty"`
	// Authentication Token
	AccessTokenExpiryInHour  int    `env:"ACCESS_TOKEN_EXPIRY_IN_HOUR,notEmpty"`
	RefreshTokenExpiryInHour int    `env:"REFRESH_TOKEN_EXPIRY_IN_HOUR,notEmpty"`
	RefreshTokenSecret       string `env:"REFRESH_TOKEN_SECRET,notEmpty"`
	AccessTokenSecret        string `env:"ACCESS_TOKEN_SECRET,notEmpty"`
	// Logger
	LogLevel string `env:"LOG_LEVEL,notEmpty"`
}

func New

func New() *Config

Jump to

Keyboard shortcuts

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