forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ssh.go
60 lines (50 loc) · 1.76 KB
/
ssh.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
// Copyright 2016 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package params
// SSHHostKeySet defines SSH host keys for one or more entities
// (typically machines).
type SSHHostKeySet struct {
EntityKeys []SSHHostKeys `json:"entity-keys"`
}
// SSHHostKeys defines the SSH host keys for one entity.
type SSHHostKeys struct {
Tag string `json:"tag"`
PublicKeys []string `json:"public-keys"`
}
// SSHProxyResult defines the response from the SSHClient.Proxy API.
type SSHProxyResult struct {
UseProxy bool `json:"use-proxy"`
}
// SSHAddressResults defines the response from various APIs on the
// SSHClient facade.
type SSHAddressResults struct {
Results []SSHAddressResult `json:"results"`
}
// SSHAddressResult defines a single SSH address result (see
// SSHAddressResults).
type SSHAddressResult struct {
Error *Error `json:"error,omitempty"`
Address string `json:"address,omitempty"`
}
// SSHAddressesResults defines the response from AllAddresses on the SSHClient
// API facade.
type SSHAddressesResults struct {
Results []SSHAddressesResult `json:"results"`
}
// SSHAddressesResult defines a single result with multiple addresses (see
// SSHAddressesResults).
type SSHAddressesResult struct {
Error *Error `json:"error,omitempty"`
Addresses []string `json:"addresses"`
}
// SSHPublicKeysResults is used to return SSH public host keys for one
// or more target for the SSHClient.PublicKeys API.
type SSHPublicKeysResults struct {
Results []SSHPublicKeysResult `json:"results"`
}
// SSHPublicKeysResult is used to return the SSH public host keys for
// one SSH target (see SSHPublicKeysResults).
type SSHPublicKeysResult struct {
Error *Error `json:"error,omitempty"`
PublicKeys []string `json:"public-keys,omitempty"`
}