Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Device ¶
type Device struct { CustomFields map[string]interface{} DeviceRole string // DeviceRole.Name DeviceType string // DeviceType.Model DeviceManufacturer string // DeviceType.Manufacturer.Name Display string // Display ID int64 // ID Location string // Location.Name Name string // Name ParentDeviceID int64 // ParentDevice.ID Platform string // Platform.Name PrimaryIP netip.Prefix // PrimaryIP.Address PrimaryIP4 netip.Prefix // PrimaryIP4.Address PrimaryIP6 netip.Prefix // PrimaryIP6.Address Tags map[string]bool // Tags.Name -> true }
Extracted from netbox/models/device's Device, but reduced to basic Go types to make it easier to work with the subset that I care about.
type IPAddr ¶
type IPAddr struct { CustomFields map[string]reflect.Value Address netip.Prefix AssignedObjectID int64 AssignedObjectType string Description string Display string DNSName string Family string ID int64 Role string Status string Tags map[string]bool // Tags.Name -> true VRF string }
Extracted from netbox/models/device's Device, but reduced to basic Go types to make it easier to work with the subset that I care about.
type IPPrefix ¶
type IPPrefixes ¶
type IPPrefixes []*IPPrefix
func ListIPPrefixes ¶
func ListIPPrefixes(c *client.NetBoxAPI) (IPPrefixes, error)
type IPRange ¶ added in v1.2.0
type Interface ¶
type Interface struct { CableID int64 CableDisplay string CableLabel string CableEnd string ConnectedEndpoints []string ConnectedEndpointsReachable bool // why is it a bool when ConnectedEndpoints is a list? CustomFields map[string]interface{} Description string DeviceID int64 Display string Enabled bool ID int64 Label string LAGName string // lag.name LinkPeers []string LinkPeersType string MACAddress string MarkConnected bool MgmtOnly bool MTU int64 Name string ParentID int64 ParentName string PoeMode string // poe_mode.value PoeType string // poe_type.value Speed int64 TaggedVLANNames []string TaggedVLANIDs []int64 TaggedVLANVIDs []int64 Tags map[string]bool // Tags.Name -> true Type string // type.value UntaggedVLANName string UntaggedVLANID int64 UntaggedVLANVID int64 VRF string // presumably? Not currently using. WirelessLANs []string // wireless_lans.ssid }
Extracted from netbox/models/device's Interface, but reduced to basic Go types to make it easier to work with the subset that I care about.
type Interfaces ¶
type Interfaces []*Interface
func ListInterfaces ¶
func ListInterfaces(c *client.NetBoxAPI) (Interfaces, error)
func (Interfaces) ForDeviceID ¶
func (ints Interfaces) ForDeviceID(id int64) Interfaces
Source Files
¶
Click to show internal directories.
Click to hide internal directories.