forked from transip/gotransip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sshkey.go
41 lines (35 loc) · 1.05 KB
/
sshkey.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
package sshkey
import (
"github.com/assi010/gotransip/v6/rest"
)
// addSSHKeyRequest is used to marshal to a request that adds an SSH key
type addSSHKeyRequest struct {
Description string `json:"description,omitempty"`
SSHKey string `json:"sshKey,omitempty"`
}
// modifySSHKeyRequest is used to marshal to a request that modifies an SSH key
// it is only possible to modify the description
type modifySSHKeyRequest struct {
Description string `json:"description,omitempty"`
}
// sshKeyWrapper will be used to unmarshal an SSH keys
type sshKeyWrapper struct {
SSHKey SSHKey `json:"sshKey"`
}
// sshKeysWrapper will be used to unmarshal a list of SSH keys
type sshKeysWrapper struct {
SSHKeys []SSHKey `json:"sshKeys"`
}
// SSHKey struct
type SSHKey struct {
// The SSH key id
ID int64 `json:"id,omitempty"`
// Description
Description string `json:"description,omitempty"`
// SSH key
Key string `json:"key"`
// SSH key fingerprint
MD5Fingerprint string `json:"fingerprint"`
// Creation date of the SSH key
CreationDate rest.Time `json:"creationDate"`
}