Skip to content

sherweb/go-netbox

 
 

Repository files navigation

go-netbox

GoDoc

This is a fork of netbox-community/go-netbox as it's not very maintainted.

Installation

Use go get to add the library as a dependency to your project. Do not forget to run go mod init first if necessary.

go get github.com/sherweb/go-netbox/v4

Usage

Instantiate the client

The package has a constructor for creating a client by providing a URL and an authentication token.

package main

import (
	"context"
	"log"

	"github.com/sherweb/go-netbox/v4/netbox"
)

func main() {
	cfg := netbox.NewConfiguration()
	cfg.Servers[0].URL = "Netbox URL"
	cfg.AddDefaultHeader("Authorization", "Token sometoken")

	client := netbox.NewAPIClient(cfg)
	
}

Important !

We'd recommend you look at the tests/ folder to look at what we've tested works...

Contribs welcome.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 33.8%
  • Shell 26.1%
  • Go 21.2%
  • Dockerfile 9.7%
  • Makefile 9.2%