This repository has been archived by the owner on Mar 8, 2023. It is now read-only.
/
option.go
101 lines (84 loc) · 2.23 KB
/
option.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package config
// === App ===
type SvcAddr struct {
Id string `json:"id" yaml:"id"`
Dtm string `json:"dtm" yaml:"dtm"`
Chatbot string `json:"chatbot" yaml:"chatbot"`
Message string `json:"message" yaml:"message"`
Middle string `json:"middle" yaml:"middle"`
Workflow string `json:"workflow" yaml:"workflow"`
User string `json:"user" yaml:"user"`
Nlp string `json:"nlp" yaml:"nlp"`
Storage string `json:"storage" yaml:"storage"`
Task string `json:"task" yaml:"task"`
Bot string `json:"bot" yaml:"bot"`
}
// Http http config
type Http struct {
Host string `json:"host" yaml:"host"`
Port int `json:"port" yaml:"port"`
Mode string `json:"mode" yaml:"mode"`
}
// Rpc http config
type Rpc struct {
Host string `json:"host" yaml:"host"`
Port int `json:"port" yaml:"port"`
}
// Web config
type Web struct {
Url string `json:"url" yaml:"url"`
}
// Gateway config
type Gateway struct {
Url string `json:"url" yaml:"url"`
}
// Storage config
type Storage struct {
Adapter string `json:"adapter" yaml:"adapter"`
}
// Jwt config
type Jwt struct {
Secret string `json:"secret" yaml:"secret"`
}
// === Middleware ===
// Mysql config
type Mysql struct {
Dsn string `json:"dsn" yaml:"dsn"`
}
// Redis config
type Redis struct {
Addr string `json:"addr" yaml:"addr"`
Password string `json:"password" yaml:"password"`
}
// Influx config
type Influx struct {
Token string `json:"token" yaml:"token"`
Org string `json:"org" yaml:"org"`
Bucket string `json:"bucket" yaml:"bucket"`
Url string `json:"url" yaml:"url"`
}
// Jaeger config
type Jaeger struct {
Reporter struct {
LocalAgentHostPort string `json:"localAgentHostPort" yaml:"localAgentHostPort"`
} `json:"reporter" yaml:"reporter"`
Sampler struct {
Type string `json:"type" yaml:"type"`
Param float64 `json:"param" yaml:"param"`
} `json:"sampler" yaml:"sampler"`
}
// Nats config
type Nats struct {
Url string `json:"url" yaml:"url"`
}
// === Vendor ===
// Rollbar config
type Rollbar struct {
Token string `json:"token" yaml:"token"`
Environment string `json:"environment" yaml:"environment"`
}
// Newrelic config
type Newrelic struct {
Name string `json:"name" yaml:"name"`
License string `json:"license" yaml:"license"`
}