Forgot to add the new services to the client

This commit is contained in:
Kalle Carlbark 2022-02-09 10:42:44 +01:00
parent 9d226de485
commit 14c9b748c6
No known key found for this signature in database

View file

@ -128,12 +128,14 @@ func NewClient(apiurl string, httpClient *http.Client) (*Client, error) {
c.common.client = c
c.Clusters = (*ClustersService)(&c.common)
c.ClusterTypes = (*ClusterTypesService)(&c.common)
c.Devices = (*DevicesService)(&c.common)
c.DeviceRoles = (*DeviceRolesService)(&c.common)
c.DeviceTypes = (*DeviceTypesService)(&c.common)
c.Interfaces = (*InterfacesService)(&c.common)
c.InventoryItems = (*InventoryItemsService)(&c.common)
c.Prefixes = (*PrefixesService)(&c.common)
c.Platforms = (*PlatformsService)(&c.common)
c.RearPorts = (*RearPortsService)(&c.common)
c.Tenants = (*TenantsService)(&c.common)
c.Secrets = (*SecretsService)(&c.common)
@ -254,6 +256,6 @@ func (c *Client) do(req *http.Request, v interface{}) (*http.Response, error) {
// debugf is used as a formtter for debugging information
func (c *Client) debugf(fmt string, v ...interface{}) {
if c.Debug {
log.Printf("cendot client: "+fmt, v...)
log.Printf("netbox client: "+fmt, v...)
}
}