forked from labstack/armor
/
armor.go
46 lines (39 loc) · 1.24 KB
/
armor.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
package armor
import (
"crypto/tls"
"time"
"github.com/labstack/echo"
"github.com/labstack/gommon/log"
)
type (
Armor struct {
Address string `json:"address"`
TLS *TLS `json:"tls"`
ReadTimeout time.Duration `json:"read_timeout"`
WriteTimeout time.Duration `json:"write_timeout"`
Plugins map[string]interface{} `json:"plugins"`
Hosts map[string]*Host `json:"hosts"`
Logger *log.Logger `json:"-"`
}
TLS struct {
Address string `json:"address"`
CertFile string `json:"cert_file"`
KeyFile string `json:"key_file"`
Auto bool `json:"auto"`
CacheFile string `json:"cache_file"`
Certificates map[string]*tls.Certificate `json:"-"`
}
Host struct {
CertFile string `json:"cert_file"`
KeyFile string `json:"key_file"`
Plugins map[string]interface{} `json:"plugins"`
Paths map[string]*Path `json:"paths"`
Echo *echo.Echo `json:"-"`
}
Path struct {
Plugins map[string]interface{} `json:"plugins"`
}
)
const (
Version = "0.1.1"
)