subnet

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package subnet contains entities related to subnets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPAddress

type IPAddress struct {
	Created     string      `json:"created,omitempty"`
	Updated     string      `json:"updated,omitempty"`
	User        string      `json:"user,omitempty"`
	IP          net.IP      `json:"ip,omitempty"`
	NodeSummary NodeSummary `json:"node_summary,omitempty"`
	AllocType   int         `json:"alloc_type,omitempty"`
}

IPAddress represents an IP address from a Subnet's GetIPAddresses()

type IPRange

type IPRange struct {
	Start        net.IP `json:"start,omitempty"`
	End          net.IP `json:"end,omitempty"`
	NumAddresses int    `json:"num_addresses,omitempty"`
}

IPRange represents an IP range from a Subnet's GetUnreservedIPRanges()

type NodeSummary

type NodeSummary struct {
	SystemID    string `json:"system_id,omitempty"`
	FQDN        string `json:"fqdn,omitempty"`
	Hostname    string `json:"hostname,omitempty"`
	Via         string `json:"via,omitempty"`
	NodeType    int    `json:"node_type,omitempty"`
	IsContainer bool   `json:"is_container,omitempty"`
}

NodeSummary represents the optional node_summary from GetIPAddresses(). This type should not be used directly.

type ReservedIPRange

type ReservedIPRange struct {
	Purpose []string `json:"purpose,omitempty"`
	IPRange
}

ReservedIPRange represents an IP range from a Subnet's GetReservedIPRanges()

type Statistics

type Statistics struct {
	UsageString      string  `json:"usage_string,omitempty"`
	AvailableString  string  `json:"available_string,omitempty"`
	FirstAddress     net.IP  `json:"first_address,omitempty"`
	LastAddress      net.IP  `json:"last_address,omitempty"`
	NumAvailable     int     `json:"num_available,omitempty"`
	LargestAvailable int     `json:"largest_available,omitempty"`
	NumUnavailable   int     `json:"num_unavailable,omitempty"`
	TotalAddresses   int     `json:"total_addresses,omitempty"`
	Usage            float64 `json:"usage,omitempty"`
	IPVersion        int     `json:"ip_version,omitempty"`
}

Statistics represents a Subnet's GetStatistics()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL