Update to work with netbox > 2.9.0. Take 3.
This commit is contained in:
parent
d84b5df6dd
commit
6e2b8836b2
1 changed files with 12 additions and 8 deletions
|
@ -3,11 +3,9 @@ package netboxgo
|
|||
import (
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/gorilla/schema"
|
||||
|
@ -37,7 +35,13 @@ type SecretsList struct {
|
|||
Name string `json:"name"`
|
||||
Plaintext string `json:"plaintext"`
|
||||
Hash string `json:"hash"`
|
||||
Tags []string `json:"tags"`
|
||||
Tags []struct {
|
||||
ID int `json:"id"`
|
||||
URL string `json:"url"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
Color string `json:"color"`
|
||||
} `json:"tags"`
|
||||
CustomFields struct {
|
||||
} `json:"custom_fields"`
|
||||
Created string `json:"created"`
|
||||
|
@ -64,7 +68,7 @@ type SecretFilter struct {
|
|||
|
||||
// ListSecrets returns Netbox Secrets
|
||||
func (n *NetBox) ListSecrets(i *SecretsList, f *SecretFilter) error {
|
||||
var encoder = schema.NewEncoder()
|
||||
encoder := schema.NewEncoder()
|
||||
|
||||
form := url.Values{}
|
||||
err := encoder.Encode(f, form)
|
||||
|
|
Loading…
Reference in a new issue