-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
61 lines (49 loc) · 945 Bytes
/
model.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
package config
import (
"golang.org/x/text/language"
)
const (
productionEnv = "production"
)
type WebConfig struct {
AppName string
Port string
Env string
Version string
Endpoint string
}
type LanguageConfig struct {
Default language.Tag
Languages []language.Tag
}
type MysqlDBConfig struct {
URL string
}
type APIEndpointsConfig struct {
ComputeEndpoint string
NetworkEndpoint string
LoadBalancerEndpoint string
IdentityEndpoint string
}
type CloudflareConfig struct {
AuthToken string
ZoneID string
Domain string
}
type ImageRef struct {
ImageRef string
}
type PublicNetworkID struct {
PublicNetworkID string
}
type OpenStackApiConfig struct {
NovaMicroVersion string
}
type VkeAgentConfig struct {
VkeAgentVersion string
ClusterAutoscalerVersion string
CloudProviderVkeVersion string
}
func (w WebConfig) IsProductionEnv() bool {
return w.Env == productionEnv
}