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"`
|
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 {
|
||||||
|
|
Loading…
Reference in a new issue