updating client with capture type

This commit is contained in:
farhan 2020-12-13 08:25:58 +00:00
parent 01725debbb
commit 7286af9c79

@ -18,9 +18,9 @@ type CommandMap struct {
// Instance's new min_id value
type RunningInstance struct {
Software string `json:"software"`
Min_id string
Status int `json:"status"`
LastRun string `json:"lastrun"`
CaptureType string `json:"capturetype"`
}
type ResponseBack struct {
@ -36,8 +36,6 @@ func main() {
resumePtr := flag.String("resume", "", "Instance to Resume")
addPtr := flag.String("add", "", "Instance to add")
statusPtr := flag.Bool("status", false, "Check status")
// usernamePtr := flag.String("username", "", "Set username")
// passwordPtr := flag.String("password", "", "Set password")
flag.Parse()
/* Condition verification */
@ -120,7 +118,7 @@ func main() {
case "add":
fmt.Println(responseback.Message)
case "status":
fmt.Println("Status\t\tLastRun\t\t\tEndpoint")
fmt.Println("Status\t\tLastRun\t\t\tCaptureType\tEndpoint")
for endpoint, runninginstance := range responseback.RunningInstances {
if runninginstance.Status == 0 {
fmt.Fprintf(os.Stdout, "New\t")
@ -147,6 +145,7 @@ func main() {
if runninginstance.LastRun == "Queued" {
fmt.Fprintf(os.Stdout, "\t\t")
}
fmt.Fprintf(os.Stdout, "\t%s\t", runninginstance.CaptureType)
fmt.Fprintf(os.Stdout, "%s\n", endpoint)
}
}