Documentation ¶
Index ¶
Constants ¶
View Source
const ( ServerHostname = "server.hostname" DatabaseHost = "database.host" DatabaseName = "database.name" DatabaseUser = "database.user" DatabasePassword = "database.password" DatabasePort = "database.port" DatabaseSslMode = "database.sslmode" SecurityTokenExpiration = "security.token_expiration" SecuritySecret = "security.secret" JobEnabled = "job.enabled" JobBroker = "job.broker" JobStore = "job.store" JobQueueName = "job.queue_name" MessageQueue = "message.queue" SmtpFrom = "smtp.from" SmtpHost = "smtp.host" SmtpPort = "smtp.port" SmtpUsername = "smtp.username" SmtpPassword = "smtp.password" SmtpSkipVerify = "false" )
Variables ¶
This section is empty.
Functions ¶
func InitDefaults ¶
func InitDefaults()
Types ¶
type AppConfig ¶
type AppConfig struct { Email EmailConfig Security SecurityConfig Database DatabaseConfig Job JobConfig MessageQueue MessageQueueConfig }
func GetAppConfig ¶
type DatabaseConfig ¶
type DatabaseConfig struct { Host string Port string Name string Username string Password string SslMode string }
func GetDatabaseConfig ¶
func GetDatabaseConfig() DatabaseConfig
func (DatabaseConfig) GetDatabaseConnectionUri ¶
func (cfg DatabaseConfig) GetDatabaseConnectionUri() string
type EmailConfig ¶
type EmailConfig struct { Host string Port int From string Username string Password string SiteURL string InsecureSkipVerify bool }
func GetEmailConfig ¶
func GetEmailConfig() EmailConfig
type MessageQueueConfig ¶
type MessageQueueConfig struct {
URI string
}
func (MessageQueueConfig) GetMessageQueueClient ¶
func (c MessageQueueConfig) GetMessageQueueClient() (*redis.Client, error)
type SecurityConfig ¶
func GetSecurityConfig ¶
func GetSecurityConfig(accessTokenExp string, secret []byte) (SecurityConfig, error)
Click to show internal directories.
Click to hide internal directories.