models

package
v0.0.0-...-d485828 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomFields

type CustomFields map[string]string

type DHCPConfigContext

type DHCPConfigContext struct {
	Routers       []string `json:"routers"`
	DomainName    string   `json:"domain_name"`
	DNSServers    []string `json:"dns_servers"`
	NTPServers    []string `json:"ntp_servers"`
	NextServer    string   `json:"next_server"`
	BootFileName  string   `json:"bootfile_name"`
	LeaseDuration string   `json:"lease_duration"`
}

type Device

type Device struct {
	NetboxObject
	Name          string     `json:"name"`
	PrimaryIP4    EmbeddedIP `json:"primary_ip4"`
	PrimaryIP6    EmbeddedIP `json:"primary_ip6"`
	ConfigContext struct {
		DHCP DHCPConfigContext `json:"dhcp"`
	} `json:"config_context"`
}

func (Device) Resolve

func (d Device) Resolve() string

type DeviceList

type DeviceList struct {
	NetboxList
	Devices []Device `json:"results"`
}

func (DeviceList) Resolve

func (DeviceList) Resolve() string

type EmbeddedDevice

type EmbeddedDevice struct {
	EmbeddedNetboxObject
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
}

type EmbeddedIP

type EmbeddedIP struct {
	EmbeddedNetboxObject
	Family     uint8  `json:"family"`
	RawAddress string `json:"address"`
}

func (EmbeddedIP) Address

func (ip EmbeddedIP) Address() (net.IP, *net.IPNet, error)

type EmbeddedInterface

type EmbeddedInterface struct {
	EmbeddedNetboxObject
	Name           string                 `json:"name"`
	Device         EmbeddedDevice         `json:"device"`
	VirtualMachine EmbeddedVirtualMachine `json:"virtual_machine"`
}

type EmbeddedNetboxObject

type EmbeddedNetboxObject struct {
	ID  uint64 `json:"id"`
	URL string `json:"url"`
}

type EmbeddedSite

type EmbeddedSite struct {
	EmbeddedNetboxObject
	Name string `json:"name"`
	Slug string `json:"slug"`
}

type EmbeddedVirtualMachine

type EmbeddedVirtualMachine EmbeddedDevice

type IP

type IP struct {
	NetboxCustomFieldsObject
	Family     uint8             `json:"family"`
	RawAddress string            `json:"address"`
	Interface  EmbeddedInterface `json:"interface"`
}

func (IP) Address

func (ip IP) Address() (net.IP, *net.IPNet, error)

func (IP) Resolve

func (ip IP) Resolve() string

type IPList

type IPList struct {
	NetboxList
	IPs []IP `json:"results"`
}

func (IPList) Resolve

func (IPList) Resolve() string

type Interface

type Interface struct {
	NetboxObject
	Device EmbeddedDevice `json:"device"`
	Name   string         `json:"name"`
}

func (Interface) Resolve

func (i Interface) Resolve() string

type InterfaceList

type InterfaceList struct {
	NetboxList
	Interfaces []Interface `json:"results"`
}

func (InterfaceList) Resolve

func (InterfaceList) Resolve() string

type NetboxCustomFieldsObject

type NetboxCustomFieldsObject struct {
	NetboxObject
	CustomFields CustomFields `json:"custom_fields"`
}

type NetboxList

type NetboxList struct {
	Count    uint64 `json:"count"`
	Next     string `json:"next"`
	Previous string `json:"previous"`
}

type NetboxObject

type NetboxObject struct {
	ID          uint64 `json:"id"`
	Tags        Tags   `json:"tags"`
	Created     string `json:"created"`
	LastUpdated string `json:"last_updated"`
}

type Prefix

type Prefix struct {
	NetboxCustomFieldsObject
	Family    uint8        `json:"family"`
	RawPrefix string       `json:"prefix"`
	Site      EmbeddedSite `json:"site"`
	IsPool    bool         `json:"is_pool"`
	Status    Status       `json:"status"`
}

func (Prefix) Prefix

func (ip Prefix) Prefix() (net.IP, *net.IPNet, error)

func (Prefix) Resolve

func (p Prefix) Resolve() string

type PrefixList

type PrefixList struct {
	NetboxList
	Prefixes []Prefix `json:"results"`
}

func (PrefixList) Resolve

func (PrefixList) Resolve() string

type Site

type Site struct {
	NetboxCustomFieldsObject
	Name     string `json:"name"`
	Slug     string `json:"slug"`
	TimeZone string `json:"time_zone"`
	Status   Status `json:"status"`
}

func (Site) Resolve

func (s Site) Resolve() string

type SiteList

type SiteList struct {
	NetboxList
	Sites []Site `json:"results"`
}

func (SiteList) Resolve

func (SiteList) Resolve() string

type Status

type Status struct {
	Value uint   `json:"value"`
	Label string `json:"label"`
}

type Tags

type Tags []string

Jump to

Keyboard shortcuts

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