generated from CyanAsterisk/.github
-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
config.go
44 lines (37 loc) · 1.44 KB
/
config.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
34
35
36
37
38
39
40
41
42
43
44
package config
type MongoDBConfig struct {
Host string `mapstructure:"host" json:"host"`
Port int `mapstructure:"port" json:"port"`
Name string `mapstructure:"db" json:"db"`
User string `mapstructure:"user" json:"user"`
Password string `mapstructure:"password" json:"password"`
Collection string `mapstructure:"collection" json:"collection"`
}
type ConsulConfig struct {
Host string `mapstructure:"host" json:"host"`
Port int `mapstructure:"port" json:"port"`
Key string `mapstructure:"key" json:"key"`
}
type RedisConfig struct {
Host string `mapstructure:"host" json:"host"`
Port int `mapstructure:"port" json:"port"`
Password string `mapstructure:"password" json:"password"`
}
type OtelConfig struct {
EndPoint string `mapstructure:"endpoint" json:"endpoint"`
}
type OCRConfig struct {
AccessToken string `mapstructure:"access_token" json:"access_token"`
}
type ServerConfig struct {
Name string `mapstructure:"name" json:"name"`
Host string `mapstructure:"host" json:"host"`
MongoDBInfo MongoDBConfig `mapstructure:"mongodb" json:"mongodb"`
RedisInfo RedisConfig `mapstructure:"redis" json:"redis"`
OtelInfo OtelConfig `mapstructure:"otel" json:"otel"`
OCRConfig OCRConfig `mapstructure:"ocr" json:"ocr"`
BlobSrvInfo BlobSrvConfig `mapstructure:"blob_srv" json:"blob_srv"`
}
type BlobSrvConfig struct {
Name string `mapstructure:"name" json:"name"`
}