Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLoadConf = errors.New("conf: error loading configuration") ErrReloadConf = errors.New("conf: error reloading configuration") ErrAlreadyLoaded = errors.New("conf: configuration already exist") ErrNoConfigFileFound = errors.New("conf: configuration file not provided/found") // C is the global configuration obj C = &Config{} )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Env string `mapstructure:"env"`
ReqIDKey string `mapstructure:"req_id_key"`
SVCName string `mapstructure:"svc_name"`
NATSUrl string `mapstructure:"nats_url"`
AuthzSvcUrl string `mapstructure:"authzsvc_url"`
Postgres struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
DB string `mapstructure:"db"`
SSLMode string `mapstructure:"sslmode"`
} `mapstructure:"postgres"`
Redis struct {
Addr string `mapstructure:"addr"`
Password string `mapstructure:"password"`
DB int `mapstructure:"db"`
} `mapstructure:"redis"`
Auth struct {
SecretKey string `mapstructure:"secret_key"`
Issuer string `mapstructure:"issuer"`
AccessTokenTTL time.Duration `mapstructure:"access_token_ttl"`
RefreshTokenTTL time.Duration `mapstructure:"refresh_token_ttl"`
AccessKID string `mapstructure:"access_kid"`
RefreshKID string `mapstructure:"refresh_kid"`
} `mapstructure:"auth"`
}
Config hold the user service configuration
Click to show internal directories.
Click to hide internal directories.