config

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 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 AppConfig

type AppConfig struct {
	Url  string
	Port string
	Name string
}

App is the application settings

var App AppConfig = AppConfig{
	Url:  os.Getenv("APP_URL"),
	Port: os.Getenv("APP_PORT"),
	Name: os.Getenv("APP_NAME"),
}

type AuthConfig

type AuthConfig struct {
	JWT JWTConfig
}

Auth is the auth settings

var Auth AuthConfig = AuthConfig{
	JWT: JWTConfig{
		Secret: os.Getenv("JWT_SECRET"),
		TTL:    os.Getenv("JWT_TTL"),
	},
}

type DatabaseConfig

type DatabaseConfig struct {
	Host     string
	Port     string
	User     string
	Password string
	Database string
	SSLMode  string
	Timezone string
}

Database is the database settings

var Database DatabaseConfig = DatabaseConfig{
	Host:     os.Getenv("DB_HOST"),
	Port:     os.Getenv("DB_PORT"),
	User:     os.Getenv("DB_USERNAME"),
	Password: os.Getenv("DB_PASSWORD"),
	Database: os.Getenv("DB_DATABASE"),
	SSLMode:  os.Getenv("DB_SSLMODE"),
	Timezone: os.Getenv("DB_TIMEZONE"),
}

type JWTConfig

type JWTConfig struct {
	Secret string
	TTL    string
}

Jump to

Keyboard shortcuts

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