-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.go
33 lines (28 loc) · 990 Bytes
/
data.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package configs
type Config struct {
Servers map[string]Server `mapstructure:"servers"`
JWTSecretKey string `mapstructure:"jwt_secret_key"`
APIUrl string `mapstructure:"api_url"`
SwaggerPort int `mapstructure:"swagger_port"`
TestMode bool `mapstructure:"test_mode"`
MongoDB MongoDB `mapstructure:"mongodb"`
Redis Redis `mapstructure:"redis"`
RabbitMQ RabbitMQ `mapstructure:"rabbit_mq"`
}
type Server struct {
Address string `mapstructure:"address,omitempty"`
}
type MongoDB struct {
Database string `mapstructure:"database"`
URI string `mapstructure:"uri"`
}
type Redis struct {
Address string `mapstructure:"address"`
Password string `mapstructure:"password"`
}
type RabbitMQ struct {
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Host string `mapstructure:"host"`
Vhost string `mapstructure:"vhost"`
}