Documentation
¶
Overview ¶
Package sysinfo Base system information
- API version: 0.0.1
- Contact: support@peraMIC.io
Package sysinfo Base system information
* * API version: 0.0.1 * Contact: support@peraMIC.io
Package sysinfo System Information
* * Network configuration * * API version: 0.0.1 * Contact: support@peraMIC.io
Index ¶
Constants ¶
View Source
const ( // Reboot State Reboot Reboot string = "Reboot" // PowerOff State PowerOff PowerOff string = "PowerOff" // Suspend State Suspend Suspend string = "Suspend" // SuspendThenHibernate State SuspendThenHibernate SuspendThenHibernate string = "SuspendThenHibernate" // HybridSleep State HybridSleep HybridSleep string = "HybridSleep" // Hibernate State Hibernate Hibernate string = "Hibernate" // Halt State Halt Halt string = "Halt" )
Variables ¶
View Source
var SysInfoRoutes = utils.Routes{ utils.Route{ Name: "GetSysInfo", Method: "GET", Pattern: "/rest/sysinfo", HandlerFunc: GetSysInfo, }, utils.Route{ Name: "SetState", Method: "PUT", Pattern: "/rest/system/state", HandlerFunc: State, }, }
SysInfoRoutes all routes concerning sysinfo
Functions ¶
func GetSysInfo ¶
func GetSysInfo(w http.ResponseWriter, r *http.Request)
GetSysInfo Base system information
Types ¶
type SysInfo ¶
type SysInfo struct {
Hostname string `json:"hostname,omitempty"`
IPv4 string `json:"ipv4,omitempty"`
IPv6 string `json:"ipv6,omitempty"`
DeviceType string `json:"deviceType,omitempty"`
Serial string `json:"serial,omitempty"`
Processor string `json:"processor,omitempty"`
MemTotal uint64 `json:"memTotal,omitempty"`
MemFree uint64 `json:"memFree,omitempty"`
SpaceTotal uint64 `json:"spaceTotal,omitempty"`
SpaceFree uint64 `json:"spaceFree,omitempty"`
OS string `json:"os,omitempty"`
Version string `json:"version,omitempty"`
Kernel string `json:"kernel,omitempty"`
}
SysInfo Base system information
Click to show internal directories.
Click to hide internal directories.