Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationConfig ¶
type AuthenticationConfig struct { EXPLeeway time.Duration `default:"180s"` NBFLeeway time.Duration `default:"180s"` JWTExpires time.Duration `default:"15m"` JWTSubject string `default:"auth"` }
func LoadAuthenticationConfig ¶
func LoadAuthenticationConfig() (*AuthenticationConfig, error)
type Config ¶
type Config struct { Prod bool `default:"false"` Server *ServerConfig Database *DatabaseConfig Auth *AuthenticationConfig }
type DatabaseConfig ¶
type DatabaseConfig struct { Host string `default="localhost:5432"` DbName string `default="portal"` User string Password string URL string }
func LoadDatabaseConfig ¶
func LoadDatabaseConfig() (*DatabaseConfig, error)
type ServerConfig ¶
type ServerConfig struct { Host string `default:""` Port int `default:"3000"` WriteTimeout time.Duration `default:"15s"` ReadTimeout time.Duration `default:"15s"` IdleTimeout time.Duration `default:"60s"` ShutdownWait time.Duration `default:"15s"` }
func LoadServerConfig ¶
func LoadServerConfig() (*ServerConfig, error)
func (*ServerConfig) Addr ¶
func (config *ServerConfig) Addr() string
Click to show internal directories.
Click to hide internal directories.