forked from cloudfoundry-attic/bosh-init
-
Notifications
You must be signed in to change notification settings - Fork 0
/
manifest.go
47 lines (39 loc) · 868 Bytes
/
manifest.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
package manifest
import (
bmkeystr "github.com/cloudfoundry/bosh-micro-cli/keystringifier"
)
type Manifest struct {
Name string
Release string
RawProperties map[interface{}]interface{}
Mbus string
Registry Registry
AgentEnvService string
SSHTunnel SSHTunnel
}
type ReleaseJobRef struct {
Name string
Release string
}
type Registry struct {
Username string
Password string
Host string
Port int
}
func (r Registry) IsEmpty() bool {
return r == Registry{}
}
type SSHTunnel struct {
User string
Host string
Port int
Password string
PrivateKey string `yaml:"private_key"`
}
func (o SSHTunnel) IsEmpty() bool {
return o == SSHTunnel{}
}
func (m Manifest) Properties() (map[string]interface{}, error) {
return bmkeystr.NewKeyStringifier().ConvertMap(m.RawProperties)
}