Documentation ¶
Index ¶
- func AttachHeader(header *Header, body []byte) []byte
- func Encode(connid UID, cmdtype CommandType, flow FlowType, v interface{}) ([]byte, error)
- func UpdateHeader(header *Header, body []byte) []byte
- type AgentsCountMsg
- type Byteable
- type CommandType
- type DownloaderReq
- type Exit
- type FSNode
- type FlowType
- type FmActionReq
- type FmActionRes
- type Header
- type ListDirReply
- type ListDirReq
- type ListServicesCmd
- type ListServicesMsg
- type Packet
- type ProcessActionCmd
- type ProcessActionData
- type ProcessInfo
- type ScriptReq
- type ScriptRes
- type ServiceInfo
- type StartServiceReq
- type SysStatCmd
- type SysStatData
- type SystemActionReq
- type TaskMgrCmd
- type TaskMgrData
- type TermData
- type TokenMessage
- type UID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachHeader ¶
func Encode ¶
func Encode(connid UID, cmdtype CommandType, flow FlowType, v interface{}) ([]byte, error)
func UpdateHeader ¶
Types ¶
type AgentsCountMsg ¶
used by server to give connid and list of agents online
type CommandType ¶
type CommandType byte
const ( CMD_SERVER_HELLO CommandType = iota CMD_SYSTEM_STAT CMD_TERMINAL CMD_TASKMGR CMD_PROCESS_ACTION CMD_LIST_SERVICES CMD_SERVICE_ACTION CMD_EXIT CMD_GCM_TOKEN // register gcm or notification tokens from browser to server CMD_AGENTS_NO CMD_EVENTS CMD_FM_LISTDIR CMD_FM_ACTION CMD_SYSTEM_ACTION CMD_START_SERVICE CMD_DOWNLOAD_SERVICE CMD_UPLOAD_SERVICE CMD_SCRIPT CMD_BUILTIN_MAX )
type DownloaderReq ¶
type FmActionReq ¶
type FmActionRes ¶
type FmActionRes map[string]interface{}
type FmActionRes struct { Action string Status bool Errors []string Outputs []string }
type Header ¶
type Header struct { Connid UID CmdType CommandType Flow FlowType }
type ListDirReply ¶
type ListServicesCmd ¶
type ListServicesCmd struct { }
type ListServicesMsg ¶
type ListServicesMsg struct {
Services []*ServiceInfo
}
type ProcessActionCmd ¶
type ProcessActionData ¶
type ProcessInfo ¶
type ServiceInfo ¶
type ServiceInfo struct {
Name string
}
type StartServiceReq ¶
type SysStatCmd ¶
type SysStatData ¶
type SystemActionReq ¶
shutdown and reboot for now
type TaskMgrCmd ¶
type TaskMgrData ¶
type TaskMgrData struct { Uptime int64 AvgLoad int Battery uint8 Processes []*ProcessInfo }
type TokenMessage ¶
type TokenMessage struct {
Token string
}
Click to show internal directories.
Click to hide internal directories.