-
Notifications
You must be signed in to change notification settings - Fork 0
/
types_yaml.go
74 lines (64 loc) · 1.01 KB
/
types_yaml.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
package main
import (
"regexp"
"go.uber.org/zap"
)
// YAML
// # db
// ## rules
type Rule struct {
Ips []IP
Pubkeys []string
User string
}
// ## indentification
type Identity struct {
Users []string
Groups [][]string
}
// ## access control rules
type Access struct {
Identity `yaml:",inline"`
Domains []string
Resource regexp.Regexp
Headers map[string]string
}
// ## Authelia users
type User struct {
Disabled bool
DisplayName string
Email string
Groups []string
}
type DB struct {
Rules []Rule
Admins Identity
Access []Access
Users map[string]User
}
// # wrauth
// ## Authelia config
type Authelia struct {
Address string
Db string
Connections int
Cache int
Ping int
}
// ## WG interfaces
type Interface struct {
Name string
Addr IP
Conf string
Shake int
}
// ## final struct
type Config struct {
Address string
External string
Caching bool
Level zap.AtomicLevel
Theme string
Authelia Authelia
Interfaces []Interface
}