-
Notifications
You must be signed in to change notification settings - Fork 15
/
types.go
65 lines (55 loc) · 1.07 KB
/
types.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package config
type server struct {
Secret []byte
Version string
Name string
}
type snowflake struct {
WorkerID int64 `mapstructure:"worker-id"`
DatancenterID int64 `mapstructure:"datancenter-id"`
}
type service struct {
Name string
AddrList []string
LB bool `mapstructure:"load-balance"`
}
type mySQL struct {
Addr string
Database string
Username string
Password string
Charset string
}
type etcd struct {
Addr string
}
type rabbitMQ struct {
Addr string
Username string
Password string
}
type redis struct {
Addr string
Password string
}
type oss struct {
Endpoint string
AccessKeyID string `mapstructure:"accessKey-id"`
AccessKeySecret string `mapstructure:"accessKey-secret"`
BucketName string
MainDirectory string `mapstructure:"main-directory"`
}
type elasticsearch struct {
Addr string
Host string
}
type config struct {
Server server
Snowflake snowflake
MySQL mySQL
Etcd etcd
RabbitMQ rabbitMQ
Redis redis
OSS oss
Elasticsearch elasticsearch
}