-
Notifications
You must be signed in to change notification settings - Fork 105
/
tau.go
70 lines (58 loc) · 1.56 KB
/
tau.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
package config
import (
"time"
seerIface "github.com/taubyte/tau/core/services/seer"
)
type Ports struct {
Main int `yaml:"main"`
Lite int `yaml:"lite,omitempty"`
Ipfs int `yaml:"ipfs,omitempty"`
}
func (p Ports) ToMap() map[string]int {
return map[string]int{
"main": p.Main,
"lite": p.Lite,
"ipfs": p.Ipfs,
}
}
type Source struct {
Privatekey string `yaml:"privatekey"`
Swarmkey string `yaml:"swarmkey"`
Services []string `yaml:"services,omitempty"`
P2PListen []string `yaml:"p2p-listen"`
P2PAnnounce []string `yaml:"p2p-announce"`
Ports Ports `yaml:"ports"`
Location *seerIface.Location `yaml:"location,omitempty"`
Peers []string `yaml:"peers,omitempty"`
NetworkFqdn string `yaml:"network-fqdn"`
Domains Domains `yaml:"domains"`
Plugins
}
type BundleOrigin struct {
Shape string `yaml:"shape"`
Host string `yaml:"host"`
Creation time.Time `yaml:"time"`
Version *string `yaml:"version,omitempty"`
Protected bool `yaml:"protected,omitempty"`
}
type Bundle struct {
Origin BundleOrigin `yaml:"origin"`
Source
}
type Plugin string
type Plugins struct {
Plugins []Plugin `yaml:"plugins,omitempty"`
}
type Domains struct {
Key DVKey `yaml:"key"`
Aliases []string `yaml:"aliases"`
Generated string `yaml:"generated"`
}
type DomainsWhiteList struct {
Postfix []string
Regex []string
}
type DVKey struct {
Private string `yaml:"private"`
Public string `yaml:"public"`
}