Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { General General `mapstructure:"general"` Log Log `mapstructure:"log"` LogPublisher LogPublisher `mapstructure:"logPublisher"` Http Http `mapstructure:"http"` Cors Cors `mapstructure:"cors"` JwtAuth JwtAuth `mapstructure:"jwtAuth"` DbMySQL DbMySQL `mapstructure:"dbMysql"` Enforcer Enforcer `mapstructure:"enforcer"` }
type Cors ¶
type Cors struct { AllowedOrigins []string `mapstructure:"allowedOrigins"` AllowedMethods []string `mapstructure:"allowedMethods"` AllowedHeaders []string `mapstructure:"allowedHeaders"` ExposedHeaders []string `mapstructure:"exposedHeaders"` AllowCredentials bool `mapstructure:"allowCredentials"` MaxAge int `mapstructure:"maxAge"` Debug bool `mapstructure:"debug"` }
Cors defines cors-related configurations
type DbMySQL ¶
type DbMySQL struct { Host string `mapstructure:"host"` Port string `mapstructure:"port"` User string `mapstructure:"user"` Pass string `mapstructure:"pass"` DbName string `mapstructure:"dbName"` }
DbMySQL defines the database connection for MySQL database
type Enforcer ¶
type Enforcer struct { ModelFile string `mapstructure:"modelFile"` TableName string `mapstructure:"tableName"` }
Enforcer defines the enforcer configuration
type Http ¶
type Http struct { Address string `mapstructure:"address"` Port int `mapstructure:"port"` RequestTimeout time.Duration `mapstructure:"requestTimeout"` ReadTimeout time.Duration `mapstructure:"readTimeout"` // The maximum time to wait while writing data to the server WriteTimeout time.Duration `mapstructure:"writeTimeout"` // The maximum time to wait while reading data from the server HttpClientTLS bool `mapstructure:"httpClientTLS"` LogHttpRequest bool `mapstructure:"logHttpRequest"` }
type JwtAuth ¶
type JwtAuth struct { JWTSecret string `mapstructure:"jwtSecret"` JWTAlgorithm jwa.SignatureAlgorithm `mapstructure:"jwtAlgorithm"` JWTExpiredInSec int `mapstructure:"jwtExpiredInSec"` }
JwtAuth defines JWT authentication related
type LogPublisher ¶
type ViperConfigReader ¶
type ViperConfigReader struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.