netbox

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get[R any](endpoint string, out *NetboxResponse[R], params url.Values) error

Get fetches a Netbox endpoint.

func NewGetRequest

func NewGetRequest(url string) (*http.Request, error)

NewGetRequest returns a prepared Netbox request with the authentication set.

Types

type NetboxResponse

type NetboxResponse[R any] struct {
	Next    string `json:"next"`
	Results []*R   `json:"results" validate:"dive"`
	Count   int    `json:"count"`
}

Jump to

Keyboard shortcuts

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