config

package
v0.0.0-...-4811c58 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEnv

func CheckEnv()

Types

type Config

type Config struct {
	HTTPConfig
	DatabaseConfig
	RedisConfig
}

func LoadConfig

func LoadConfig() *Config

type DatabaseConfig

type DatabaseConfig struct {
	DBHost         string `mapstructure:"POSTGRES_HOST"`
	DBUserName     string `mapstructure:"POSTGRES_USER"`
	DBUserPassword string `mapstructure:"POSTGRES_PASSWORD"`
	DBName         string `mapstructure:"POSTGRES_DB"`
	DBPort         string `mapstructure:"POSTGRES_PORT"`
}

type HTTPConfig

type HTTPConfig struct {
	Port         string `mapstructure:"PORT"`
	ClientOrigin string `mapstructure:"CLIENT_ORIGIN"`
}

type RedisConfig

type RedisConfig struct {
	REDIS_HOST     string `mapstructure:"REDIS_HOST"`
	REDIS_PORT     string `mapstructure:"REDIS_PORT"`
	DB             int    `mapstructure:"REDIS_DB"`
	REDIS_PASSWORD string `mapstructure:"REDIS_PASSWORD"`
}

Jump to

Keyboard shortcuts

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