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%
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy