-
Notifications
You must be signed in to change notification settings - Fork 0
/
AlyslsSettings.go
49 lines (37 loc) · 869 Bytes
/
AlyslsSettings.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
package logx
type alyslsSettings struct {
apiDomain string
appid string
appsecret string
projectName string
logstoreName string
}
func newAlyslsSettings(settings map[string]interface{}) *alyslsSettings {
var apiDomain string
if s1, ok := settings["apiDomain"].(string); ok {
apiDomain = s1
}
var appid string
if s1, ok := settings["appid"].(string); ok {
appid = s1
}
var appsecret string
if s1, ok := settings["appsecret"].(string); ok {
appsecret = s1
}
var projectName string
if s1, ok := settings["projectName"].(string); ok {
projectName = s1
}
var logstoreName string
if s1, ok := settings["logstoreName"].(string); ok {
logstoreName = s1
}
return &alyslsSettings{
apiDomain: apiDomain,
appid: appid,
appsecret: appsecret,
projectName: projectName,
logstoreName: logstoreName,
}
}