From c2f0f06b59c8c849d063f21d54acda7eeff811ff Mon Sep 17 00:00:00 2001 From: Nils Stinnesbeck Date: Sun, 26 Mar 2023 17:34:41 +0200 Subject: [PATCH] api was not exported, changed that --- client.go | 4 ++-- ipam.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index 44973b1..a8bbf9a 100644 --- a/client.go +++ b/client.go @@ -16,7 +16,7 @@ import ( // NetBoxAPI is the type we use to add custom functions type NetBoxAPI struct { - api client.NetBoxAPI + API client.NetBoxAPI Token string URL string } @@ -44,7 +44,7 @@ func NewNetBoxClient(token string, url string) (NetBoxAPI, error) { // create a new variable for our custom functions nb := NetBoxAPI{ - api: *n, + API: *n, Token: token, URL: url, } diff --git a/ipam.go b/ipam.go index fa21ff8..32fc3e0 100644 --- a/ipam.go +++ b/ipam.go @@ -29,7 +29,7 @@ func (nb NetBoxAPI) GetPrefixes(param ipam.IpamPrefixesListParams) ([]*models.Pr } // get prefixes - prefixes, err := nb.api.Ipam.IpamPrefixesList(¶m, nil) + prefixes, err := nb.API.Ipam.IpamPrefixesList(¶m, nil) if err != nil { return nil, e.FormatError("can't get prefixes", err) } @@ -83,7 +83,7 @@ func (nb NetBoxAPI) GetIPAddresses(param ipam.IpamIPAddressesListParams) ([]*mod } // get addresses - addresses, err := nb.api.Ipam.IpamIPAddressesList(¶m, nil) + addresses, err := nb.API.Ipam.IpamIPAddressesList(¶m, nil) if err != nil { return nil, e.FormatError("can't get prefixes", err) }