59 lines
1006 B
Go
59 lines
1006 B
Go
package hypervisors
|
|
|
|
// Main information about hypervisor
|
|
type RecordHypervisor struct {
|
|
// Created at
|
|
CreatedAt string `json:"created_at"`
|
|
|
|
// Display name
|
|
DisplayName string `json:"display_name"`
|
|
|
|
// Hostname
|
|
Hostname string `json:"hostname"`
|
|
|
|
// IP
|
|
IP string `json:"ip"`
|
|
|
|
// Synced at
|
|
SyncedAt string `json:"synced_at"`
|
|
|
|
// Name
|
|
Name string `json:"name"`
|
|
|
|
// Ports
|
|
Ports Ports `json:"ports"`
|
|
|
|
// Status
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
// List of hypervisors
|
|
type HypervisorsList []RecordHypervisor
|
|
|
|
// Hypervisor ports
|
|
type Ports struct {
|
|
Data []Port `json:"data"`
|
|
Info Info `json:"info"`
|
|
}
|
|
|
|
// Info about a port
|
|
type Port struct {
|
|
// ID of a port
|
|
ID string `json:"id"`
|
|
|
|
// Unique ID of a port
|
|
UniqueIdentifier string `json:"unique_identifier"`
|
|
|
|
// Display name of a port
|
|
DisplayName string `json:"display_name"`
|
|
|
|
// Is a port up
|
|
UP bool `json:"up"`
|
|
}
|
|
|
|
// Port counters
|
|
type Info struct {
|
|
ActivePorts uint64 `json:"active_ports"`
|
|
TotalPorts uint64 `json:"total_ports"`
|
|
}
|