mirror of
https://github.com/outbackdingo/certificates.git
synced 2026-01-27 10:18:34 +00:00
Use an actual Hosts type when returning ssh hosts
This commit is contained in:
14
sshutil/types.go
Normal file
14
sshutil/types.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package sshutil
|
||||
|
||||
// HostGroup defines expected attributes for a host group that a host might belong to.
|
||||
type HostGroup struct {
|
||||
ID string
|
||||
Name string
|
||||
}
|
||||
|
||||
// Host defines expected attributes for an ssh host.
|
||||
type Host struct {
|
||||
HostID string `json:"hid"`
|
||||
HostGroups []HostGroup `json:"host_groups"`
|
||||
Hostname string `json:"hostname"`
|
||||
}
|
||||
Reference in New Issue
Block a user