Add Device to its own type
This commit is contained in:
parent
3eb210c9e5
commit
8383ef9bb9
1 changed files with 145 additions and 143 deletions
|
@ -20,7 +20,10 @@ type DcimDevicesList struct {
|
|||
Count int `json:"count"`
|
||||
Next string `json:"next"`
|
||||
Previous string `json:"previous"`
|
||||
Results []struct {
|
||||
Results []Device `json:"results"`
|
||||
}
|
||||
|
||||
type Device struct {
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
DisplayName string `json:"display_name"`
|
||||
|
@ -168,7 +171,6 @@ type DcimDevicesList struct {
|
|||
} `json:"config_context"`
|
||||
Created string `json:"created"`
|
||||
LastUpdated time.Time `json:"last_updated"`
|
||||
} `json:"results"`
|
||||
}
|
||||
|
||||
type DcimCreateDevice struct {
|
||||
|
|
Loading…
Reference in a new issue