-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.go
48 lines (40 loc) · 970 Bytes
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*********************************************
*
* (C) 2019
* Fabian Salamanca - fabian@nuo.com.mx
*
*********************************************/
package main
// Network for unmarshalling
type Network struct {
Services []Services `json:"services"`
Networks []Networks `json:"networks"`
}
// Services for unmarshalling
type Services struct {
Type string `json:"type"`
Address string `json:"address"`
}
// Networks for unmarshalling
type Networks struct {
Type string `json:"type"`
Netmask string `json:"netmask"`
IPAddress string `json:"ip_address"`
Routes []Routes `json:"routes"`
ID string `json:"id"`
}
// Routes for unmarshalling
type Routes struct {
Netmask string `json:"netmask"`
Network string `json:"network"`
Gateway string `json:"gateway"`
}
// Keys for
type Keys struct {
Data string `json:"data"`
}
// Meta from CD
type Meta struct {
Hostname string `json:"hostname"`
Keys []Keys `json:"keys"`
}