Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CORS ¶
type CORS struct {
AccessControlAllowHeaders string `env:"ACCESS_CONTROL_ALLOW_HEADERS" env-default:""`
AccessControlExposeHeaders string `env:"ACCESS_CONTROL_EXPOSE_HEADERS" env-default:""`
AccessControlAllowMethods string `env:"ACCESS_CONTROL_ALLOW_METHODS" env-default:""`
AccessControlAllowOrigin string `env:"ACCESS_CONTROL_ALLOW_ORIGIN" env-default:""`
}
type Centrifugo ¶
type Config ¶
type Config struct {
AppName string `env:"APP_NAME" env-required:"true"`
AppURL string `env:"APP_URL" env-default:"http://localhost"`
Env string `env:"ENV" env-default:"dev"`
Debug Debug
Profiling bool `env:"PROFILING" env-default:"false"`
DatabaseDSN string `env:"DATABASE_DSN" env-required:"true"`
HTTPServer HTTPServer
Logger Logger
CORS CORS
JWT JWT
Mail Mail
Static Static
RabbitMQ RabbitMQ
Redis Redis
Centrifugo Centrifugo
}
func GetConfigInstance ¶
func GetConfigInstance() *Config
func MustLoadConfig ¶
func MustLoadConfig() *Config
type HTTPServer ¶
type JWT ¶
type JWT struct {
PublicKey string `env:"JWT_PUBLIC_KEY" env-required:"true"`
PrivateKey string `env:"JWT_PRIVATE_KEY" env-required:"true"`
Algorithm string `env:"JWT_TOKEN_ALGORITHM" env-default:"HS256"`
AccessLifeTime time.Duration `env:"TOKEN_ACCESS_LIFE_TIME_SECONDS" env-default:"3600s"`
RefreshLifeTime time.Duration `env:"TOKEN_REFRESH_LIFE_TIME_SECONDS" env-default:"7200s"`
ConfirmLifeTime time.Duration `env:"TOKEN_CONFIRM_LIFE_TIME_SECONDS" env-default:"7200s"`
SystemAPIKey string `env:"SYSTEM_API_KEY" env-required:"true"`
}
type RabbitMQ ¶
type RabbitMQ struct {
Host string `env:"RABBITMQ_HOST" env-required:"true"`
Port int `env:"RABBITMQ_PORT" env-required:"true"`
User string `env:"RABBITMQ_USER" env-required:"true"`
Password string `env:"RABBITMQ_PASSWORD" env-required:"true"`
Vhost string `env:"RABBITMQ_VHOST" env-required:"true"`
}
Click to show internal directories.
Click to hide internal directories.