ssh config

This commit is contained in:
Anton Schirg
2018-08-26 23:46:59 +02:00
parent 5e51595d7f
commit b4ea5f56b2
3 changed files with 94 additions and 0 deletions
+16
View File
@@ -120,6 +120,15 @@ type TLSConnect struct {
Key string `yaml:"key"`
}
type SSHStdinserverConnect struct {
Type string `yaml:"type"`
Host string `yaml:"host"`
User string `yaml:"user"`
Port uint16 `yaml:"port"`
IdentityFile string `yaml:"identity_file"`
Options []string `yaml:"options"`
}
type ServeEnum struct {
Ret interface{}
}
@@ -138,6 +147,11 @@ type TLSServe struct {
Key string `yaml:"key"`
}
type StdinserverServer struct {
Type string `yaml:"type"`
ClientIdentity string `yaml:"client_identity"`
}
type PruningEnum struct {
Ret interface{}
}
@@ -242,6 +256,7 @@ func (t *ConnectEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error)
t.Ret, err = enumUnmarshal(u, map[string]interface{}{
"tcp": &TCPConnect{},
"tls": &TLSConnect{},
"ssh+stdinserver": &SSHStdinserverConnect{},
})
return
}
@@ -250,6 +265,7 @@ func (t *ServeEnum) UnmarshalYAML(u func(interface{}, bool) error) (err error) {
t.Ret, err = enumUnmarshal(u, map[string]interface{}{
"tcp": &TCPServe{},
"tls": &TLSServe{},
"stdinserver": &StdinserverServer{},
})
return
}