netbox

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLikelyMAC

func IsLikelyMAC(mac string) (isLikelyMAC bool)

Types

type Client

type Client struct {
	Config *NetboxConfig
}

func (*Client) CheckSites

func (c *Client) CheckSites() bool

func (*Client) FindDevicesByMAC

func (c *Client) FindDevicesByMAC(mac string) (res []models.Device, err error)

func (*Client) FindIPAddressesByInterfaceID

func (c *Client) FindIPAddressesByInterfaceID(ifaceID uint64) ([]models.IP, error)

func (*Client) FindInterfacesByMAC

func (c *Client) FindInterfacesByMAC(mac string) (res []models.Interface, err error)

func (*Client) GetDeviceByDUID

func (c *Client) GetDeviceByDUID(duid string) (res *models.Device, err error)

func (*Client) GetDeviceByID

func (c *Client) GetDeviceByID(id uint64) (res *models.Device, err error)

func (*Client) GetIPAddressByID

func (c *Client) GetIPAddressByID(id uint64) (res *models.IP, err error)

func (*Client) GetSites

func (c *Client) GetSites() (res []models.Site, err error)

type EntityResolver

type EntityResolver interface {
	Resolve() string
}

type NetboxConfig

type NetboxConfig struct {
	API struct {
		URL   string
		Token string
	}
	Cache struct {
		RawDuration string `yaml:"duration"`
	}
	Sites           []string
	DeviceDUIDField string `yaml:"device_duid_field"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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