34 lines
839 B
Go
34 lines
839 B
Go
package config
|
|
|
|
type Config struct {
|
|
Server Server `mapstructure:"server"`
|
|
JWT JWT `mapstructure:"jwt"`
|
|
DB DB `mapstructure:"db"`
|
|
Redis Redis `mapstructure:"redis"`
|
|
}
|
|
|
|
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"`
|
|
}
|