netboxapi

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 8 Imported by: 0

README

netboxapi

This package provides custom functions for the default go-netbox package, it mostly handles pagination right now

Documentation

Overview

Package netboxapi provides custom functions for the default go-netbox package. It mostly handles pagination.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetBoxAPI

type NetBoxAPI struct {
	client.NetBoxAPI        // API of NetBox
	Token            string // Token used to access the NetBox API
	URL              string // URL of this NetBox instance
}

NetBoxAPI is the type we use to add custom functions

func NewNetBoxClient

func NewNetBoxClient(token string, url string) NetBoxAPI

NewNetBoxClient returns a client to NetBox at the given url, using the provided token

func (NetBoxAPI) GetClusterGroups added in v0.0.7

func (NetBoxAPI) GetClusters added in v0.0.5

GetClusters returns Clusters from the api nb filtered by the parameter list param

func (NetBoxAPI) GetDevices added in v0.0.6

GetDevices returns devices from the api nb filtered by the parameter list param

func (NetBoxAPI) GetIPAddresses

func (nb NetBoxAPI) GetIPAddresses(param ipam.IpamIPAddressesListParams) ([]*models.IPAddress, error)

GetIPAddresses returns IP addresses from the api nb filtered by the parameter list param

func (NetBoxAPI) GetPrefixes

func (nb NetBoxAPI) GetPrefixes(param ipam.IpamPrefixesListParams) ([]*models.Prefix, error)

GetPrefixes returns prefixes from the api nb filtered by the parameter list param

Jump to

Keyboard shortcuts

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