-
Notifications
You must be signed in to change notification settings - Fork 2
/
structs.go
40 lines (35 loc) · 1.06 KB
/
structs.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
package main
//Config - root struct for config
type Config struct {
Host string `json:"host"`
Port string `json:"port"`
Security Security `json:"security"`
Cache Cache `json:"caching"`
Routes []Route `json:"routes"`
}
//Security - struct for security details
type Security struct {
Enabled bool `json:"enabled"`
CertPath string `json:"certPath"`
KeyPath string `json:"keyPath"`
MinTLSVersion string `json:"minTLSVersion"`
MaxTLSVersion string `json:"maxTLSVersion"`
}
//Route - struct for routing details
type Route struct {
Path string `json:"path"`
Headers Headers `json:"headers"`
Target string `json:"target"`
TargetType string `json:"targetType"`
CacheExpiry int32 `json:"cacheExpiry"`
}
//Headers - struct for headers
type Headers struct {
Request map[string]string `json:"request"`
Response map[string]string `json:"response"`
}
//Cache - struct for caching details
type Cache struct {
Enabled bool `json:"enabled"`
EndPoint string `json:"endPoint"`
}