config

package
v0.0.0-...-ebce001 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Config = struct {
	Db   DBConfig
	Smtp SMTPConfig
	App  AppConfig
}{}
View Source
var DB *gorm.DB

global DB variable => TODO repository pattern

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Port  uint   `default:"7000" env:"PORT"`
	Env   string `default:"localhost" env:"ENV"`
	Debug bool   `default:"false" env:"DEBUG"`

	// Session Timeout - minutes
	Timeout uint `default:"60"`

	// Auth Max Refresh - minutes
	MaxRefresh uint `default:"60"`

	// Auth Key
	Key string `default:"12345678" env:"AUTH_KEY"`

	// Realm name to display to the user.
	Realm string `default:"ibanim zone"`
}

type DBConfig

type DBConfig struct {
	Name     string `env:"DBName" default:"ibanim"`
	Adapter  string `env:"DBAdapter" default:"postgres"`
	Host     string `env:"DBHost" default:"localhost"`
	Port     string `env:"DBPort" default:"5432"`
	User     string `env:"DBUser" default:"ibanim"`
	Password string `env:"DBPassword" default:"ibanim"`
}

type SMTPConfig

type SMTPConfig struct {
	Host     string
	Port     string
	User     string
	Password string
}

Jump to

Keyboard shortcuts

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