Documentation ¶
Index ¶
- func GenerateResponseToAgent(db *gorp.DbMap, systemID int64, response command.ResponseToAgent) (string, int)
- type Controller
- func (controller *Controller) CatalogFileEvent(c web.C, r *http.Request) (string, int)
- func (controller *Controller) GetUpdate(c web.C, r *http.Request) (string, int)
- func (controller *Controller) Heartbeat(c web.C, r *http.Request) (string, int)
- func (controller *Controller) ProcessEvent(c web.C, r *http.Request) (string, int)
- func (controller *Controller) RegisterAgent(c web.C, r *http.Request) (string, int)
- func (controller *Controller) Status(c web.C, r *http.Request) (string, int)
- func (controller *Controller) UploadFile(c web.C, r *http.Request) (string, int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateResponseToAgent ¶
func GenerateResponseToAgent(db *gorp.DbMap, systemID int64, response command.ResponseToAgent) (string, int)
GenerateResponseToAgent creates a response the agent expects given a command If the command is a NOP, check if we have any tasks
Types ¶
type Controller ¶
type Controller struct {
system.Controller
}
Controller object
func (*Controller) CatalogFileEvent ¶
CatalogFileEvent route is called by clients when a catalog file is used
func (*Controller) Heartbeat ¶
Heartbeat route curl -d '{"SystemUUID":"29c0b4f4-d6ab-46d8-604a-268863059f76","CustomerUUID":"3d794551-91a0-4db4-6296-ffcbfc5577f9","CurrentClientTime":1415296881 }' http://127.0.0.1:8080/api/v1/Heartbeat
func (*Controller) ProcessEvent ¶
ProcessEvent route is called by clients when a process is started
Test with: curl -d '{"SystemUUID":"631a838a-9509-46de-7612-91f0a246cce9","CustomerUUID":"3d794551-91a0-4db4-6296-ffcbfc5577f9","CurrentClientTime":1,"TimeOfEvent":1,"Type":1,"PID":1,"PPID":1,"CommandLine":"this","Md5":"4ec38625fdb2bd3cf7e237f4b1387c04","Sha1":"142124bc228f603235f537298a893a95b6af5e28","Sha256":"5e2091457a435e68cc669189432635442360d70cf3f44880ccf1bd35ef393be1"}' http://127.0.0.1:8080/api/v1/ProcessEvent
func (*Controller) RegisterAgent ¶
RegisterAgent route
func (*Controller) UploadFile ¶
UploadFile receives a file from the client