forked from canonical/lxd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.go
34 lines (30 loc) · 1.17 KB
/
server.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
package shared
type ServerStateEnvironment struct {
Addresses []string `json:"addresses"`
Architectures []string `json:"architectures"`
Certificate string `json:"certificate"`
Driver string `json:"driver"`
DriverVersion string `json:"driver_version"`
Kernel string `json:"kernel"`
KernelArchitecture string `json:"kernel_architecture"`
KernelVersion string `json:"kernel_version"`
Server string `json:"server"`
ServerPid int `json:"server_pid"`
ServerVersion string `json:"server_version"`
Storage string `json:"storage"`
StorageVersion string `json:"storage_version"`
}
type ServerState struct {
APICompat int `json:"api_compat"`
Auth string `json:"auth"`
Environment ServerStateEnvironment `json:"environment"`
Config map[string]interface{} `json:"config"`
Public bool `json:"public"`
}
type BriefServerState struct {
Config map[string]interface{} `json:"config"`
}
func (c *ServerState) Brief() BriefServerState {
retstate := BriefServerState{Config: c.Config}
return retstate
}