Igris/config/config.go

44 lines
1.1 KiB
Go

package config
type Config struct {
Server Server `mapstructure:"server"`
JWT JWT `mapstructure:"jwt"`
DB DB `mapstructure:"db"`
Redis Redis `mapstructure:"redis"`
KYCProvider KYC `mapstructure:"kyc"`
OTP OTP `mapstructure:"otp"`
}
type Server struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
}
type DB struct {
User string `mapstructure:"user"`
Pass string `mapstructure:"pass"`
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
DBName string `mapstructure:"db_name"`
}
type Redis struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Pass string `mapstructure:"pass"`
}
type JWT struct {
TokenExpMinutes uint `mapstructure:"token_exp_minutes"`
RefreshTokenExpMinutes uint `mapstructure:"refresh_token_exp_minutes"`
TokenSecret string `mapstructure:"token_secret"`
}
type KYC struct {
APIKey string `mapstructure:"api_key"`
URL string `mapstructure:"url"`
}
type OTP struct {
CodeExpMinutes uint `mapstructure:"code_exp_minutes"`
}