Auto-generated Go client library for NetBox, generated from NetBox’s OpenAPI specification.
jq for JSON processinggoimports for fixing importsmake up
This starts a complete NetBox environment with Docker Compose, including PostgreSQL and Redis.
make generate
This will:
v4.2.1/)import "github.com/inngest/netbox-go/v4.2.1"
// Use the generated client...
Set environment variables to point to your NetBox instance:
NETBOX_URL=https://netbox.example.com \
NETBOX_TOKEN=your-api-token \
make generate
NETBOX_URL - NetBox instance URL (default: http://localhost:8000)NETBOX_TOKEN - NetBox API token (default: local dev token)make generate - Generate Go client from NetBox APImake lint - Run golangci-lint (in versioned directories)make up - Start local NetBox with Docker Composemake down - Stop local NetBox.
├── bin/
│ └── generate.sh # Generation script
├── vX.Y.Z/ # Generated versioned clients
│ ├── netbox.go # Generated client code
│ ├── openapi.json # OpenAPI specification
│ ├── codegen.yml # Code generation config
│ └── go.mod # Go module
├── codegen.tpl.yml # Codegen template
└── compose.yml # Docker Compose for NetBox
oapi-codegengofmt, and goimportsThis is auto-generated code. Refer to NetBox’s license for the API specification.