Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DMI ¶
type DMI struct {
Cloud string `json:"cloud"`
Vendor string `json:"sys_vendor,omitempty"`
ProductName string `json:"product_name,omitempty"`
ProductUUID string `json:"product_uuid,omitempty"`
ProductVersion string `json:"product_version,omitempty"`
BoardAssetTag string `json:"board_asset_tag,omitempty"`
ChassisAssetTag string `json:"chassis_asset_tag,omitempty"`
}
DMI can be used to find various information about the machine
type IPList ¶
func (IPList) GetFirstV4 ¶
GetFirstV4 returns the first IPv4 found in the list
func (IPList) GetFirstV6 ¶
GetFirstV6 returns the first IPv6 found in the list
type Info ¶
type Info struct {
Provider string `json:"provider"` // provider name code, such as "aws", "gcp", etc
AccountId string `json:"account_id,omitempty"` // account id with provider
Architecture string `json:"architecture,omitempty"` // x86_64
PublicIP IPList `json:"public_ip,omitempty"`
PrivateIP IPList `json:"private_ip,omitempty"`
Name string `json:"name,omitempty"`
Hostname string `json:"hostname,omitempty"`
Image string `json:"image,omitempty"`
ID string `json:"id,omitempty"`
Type string `json:"type,omitempty"`
Location LocationArray `json:"location,omitempty"` // structured location
DMI *DMI `json:"dmi,omitempty"`
}
type Location ¶
type LocationArray ¶
type LocationArray []*Location
func (LocationArray) Get ¶
func (la LocationArray) Get(typ string) string
func (LocationArray) String ¶
func (la LocationArray) String() string
Click to show internal directories.
Click to hide internal directories.