Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { GinMode string `mapstructure:"gin_mode" validate:"required,oneof=debug release test"` AppEnv string `mapstructure:"app_env" validate:"required"` AppName string `mapstructure:"app_name" validate:"required"` Server ServerConfig `mapstructure:"server" validate:"required"` Database DatabaseConfig `mapstructure:"database" validate:"required"` Cors CorsConfig `mapstructure:"cors" validate:"required"` Crypto CryptoConfig `mapstructure:"crypto" validate:"required"` Jwt JwtConfig `mapstructure:"jwt" validate:"required"` Slack SlackConfig `mapstructure:"slack" validate:"required"` }
func LoadConfig ¶
func LoadConfig() *Configuration
type CorsConfig ¶
type CorsConfig struct { AllowedOrigins []string `mapstructure:"allowed_origins" validate:"required"` AllowMethods []string `mapstructure:"allow_methods" validate:"required"` AllowHeaders []string `mapstructure:"allow_headers" validate:"required"` ExposeHeaders []string `mapstructure:"expose_headers" validate:"required"` AllowCredentials bool `mapstructure:"allow_credentials"` MaxAge int64 `mapstructure:"max_age" validate:"gte=0"` }
type CryptoConfig ¶
type CryptoConfig struct {
Salt int `mapstructure:"salt" validate:"required,numeric,gt=1,lte=15"`
}
type DatabaseConfig ¶
type ServerConfig ¶
type SlackConfig ¶
Click to show internal directories.
Click to hide internal directories.