Add Device to its own type

This commit is contained in:
Kalle Carlbark 2021-05-24 15:10:20 +02:00
parent 3eb210c9e5
commit 8383ef9bb9
No known key found for this signature in database
GPG key ID: 5E4BAB01A57CDD62

View file

@ -20,7 +20,10 @@ type DcimDevicesList struct {
Count int `json:"count"` Count int `json:"count"`
Next string `json:"next"` Next string `json:"next"`
Previous string `json:"previous"` Previous string `json:"previous"`
Results []struct { Results []Device `json:"results"`
}
type Device struct {
ID int `json:"id"` ID int `json:"id"`
Name string `json:"name"` Name string `json:"name"`
DisplayName string `json:"display_name"` DisplayName string `json:"display_name"`
@ -168,7 +171,6 @@ type DcimDevicesList struct {
} `json:"config_context"` } `json:"config_context"`
Created string `json:"created"` Created string `json:"created"`
LastUpdated time.Time `json:"last_updated"` LastUpdated time.Time `json:"last_updated"`
} `json:"results"`
} }
type DcimCreateDevice struct { type DcimCreateDevice struct {