aboutsummaryrefslogtreecommitdiff
path: root/echo/netbox/model.go
diff options
context:
space:
mode:
Diffstat (limited to 'echo/netbox/model.go')
-rw-r--r--echo/netbox/model.go74
1 files changed, 74 insertions, 0 deletions
diff --git a/echo/netbox/model.go b/echo/netbox/model.go
new file mode 100644
index 0000000..78f2ca6
--- /dev/null
+++ b/echo/netbox/model.go
@@ -0,0 +1,74 @@
1package netbox
2
3type LabeledInt struct {
4 Value int `json:"value"`
5 Label string `json:"label"`
6}
7
8type LabeledString struct {
9 Value string `json:"value"`
10 Label string `json:"label"`
11}
12
13type Role struct {
14 ID int `json:"ID"`
15 Url string `json:"url"`
16 Display string `json:"display"`
17 Name string `json:"name"`
18 Slug string `json:"slub"`
19}
20
21type Tag struct {
22 ID int `json:"id"`
23 Url string `json:"url"`
24 Display string `json:"display"`
25 Name string `json:"name"`
26 Slug string `json:"slug"`
27 Color string `json:"color"`
28}
29
30type SiteList struct {
31 Count int `json:"count"`
32 Next string `json:"next"`
33 Previous string `json:"previous"`
34 Results []*Site `json:"results"`
35}
36
37type Site struct {
38 ID int `json:"id"`
39 Url string `json:"url"`
40 Display string `json:"display"`
41 Name string `json:"name"`
42 Slug string `json:"slug"`
43 Facility string `json:"facility"`
44 Description string `json:"description"`
45 Timezone string `json:"time_zone"`
46 ASN int `json:"asn"`
47 Status LabeledString `json:"status"`
48}
49
50type PrefixList struct {
51 Count int `json:"count"`
52 Next string `json:"next"`
53 Previous string `json:"previous"`
54 Results []*Prefix `json:"results"`
55}
56
57type Prefix struct {
58 ID int `json:"ID"`
59 Url string `json:"url"`
60 Display string `json:"display"`
61 Prefix string `json:"prefix"`
62 IsPool bool `json:"is_pool"`
63 Description string `json:"description"`
64 Created string `json:"created"`
65 LastUpdated string `json:"last_updated"`
66 Children int `json:"children"`
67 Depth int `json:"_depth"`
68 Family LabeledInt `json:"family"`
69 Status LabeledString `json:"status"`
70 Site *Site `json:"site"`
71 Role *Role `json:"role"`
72 Tags []*Tag `json:"tags"`
73 CustomFields map[string]interface{} `json:"custom_fields"`
74}