https://github.com/protonmail/go-netbox-dns
https://github.com/protonmail/go-netbox-dns
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/protonmail/go-netbox-dns
- Owner: ProtonMail
- License: apache-2.0
- Created: 2023-02-10T16:53:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-17T13:52:43.000Z (over 3 years ago)
- Last Synced: 2025-03-24T18:13:13.920Z (over 1 year ago)
- Language: Python
- Size: 125 KB
- Stars: 2
- Watchers: 8
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-netbox-dns
[](http://godoc.org/github.com/proton/go-netbox-dns)
This package is largely inspired by [go-netbox](https://raw.githubusercontent.com/netbox-community/go-netbox)
but providing a client for the [netbox-dns](https://github.com/auroraresearchlab/netbox-dns) plugin API.
This package has been generated with Netbox 3.4.2 and netbox-dns 0.16.1.
## Using the client
The `github.com/proton/go-netbox-dns/netbox_dns` package has some convenience functions for creating clients with the most common
configurations you are likely to need while connecting to NetBox. `NewNetboxDNSAt` allows you to specify a hostname
(including port, if you need it), and `NewNetboxDNSWithAPIKey` allows you to specify both a hostname:port and API token.
```golang
import (
"github.com/proton/go-netbox-dns/netbox_dns"
)
...
c := netbox_dns.NewNetboxDNSAt("your.netbox.host:8000")
// OR
c := netbox_dns.NewNetboxDNSWithAPIKey("your.netbox.host:8000", "your_netbox_token")
```
If you specify the API key, you do not need to pass an additional `authInfo` to operations that need authentication, and
can pass `nil`:
```golang
c.Plugin.PluginsNetboxDNSZonesCreate(createRequest, nil)
```
## Regenerating the clients
You can download a swagger.json (available via `/api/docs/?format=openapi`) and run
`make clean generate`.