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"` Encryption Encryption `mapstructure:"encryption"` DbMySQL DbMySQL `mapstructure:"dbMysql"` Enforcer Enforcer `mapstructure:"enforcer"` GraphQL GraphQL `mapstructure:"graphQL"` }
func (*Config) BuildEncryptionKeys ¶
BuildEncryptionKeys builds private key and public key RSA
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 Encryption ¶
type Enforcer ¶
type Enforcer struct { ModelFile string `mapstructure:"modelFile"` TableName string `mapstructure:"tableName"` }
Enforcer defines the enforcer configuration
type GraphQL ¶
type GraphQL struct {
PublicFunctions []string `mapstructure:"publicFunctions"`
}
GraphQL defines the GraphQL 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 { Secret string `mapstructure:"jwtSecret"` Algorithm jwa.SignatureAlgorithm `mapstructure:"jwtAlgorithm"` ExpiredInSec int `mapstructure:"jwtExpiredInSec"` }
JwtAuth defines JWT authentication related
Click to show internal directories.
Click to hide internal directories.