----- observed tools & rules commands -----
(c *apiClient)
| 598 | // ----- observed tools & rules commands ----- |
| 599 | |
| 600 | func cmdObservedTools(c *apiClient) { |
| 601 | tools, err := c.getObservedTools() |
| 602 | if err != nil { |
| 603 | fmt.Printf(" error: %v\n", err) |
| 604 | return |
| 605 | } |
| 606 | if len(tools) == 0 { |
| 607 | fmt.Println(" No tools observed yet. Wait for an agent to send requests through the proxy.") |
| 608 | return |
| 609 | } |
| 610 | |
| 611 | fmt.Println() |
| 612 | fmt.Printf(" %-4s %-25s %-18s %s\n", "#", "Name", "Format", "Schema Keys") |
| 613 | printSep(70) |
| 614 | for i, t := range tools { |
| 615 | fmt.Printf(" %-4d %-25s %-18s %s\n", i+1, t.Name, t.Format, schemaKeys(t.Schema)) |
| 616 | } |
| 617 | fmt.Println() |
| 618 | } |
| 619 | |
| 620 | func cmdRules(c *apiClient) { |
| 621 | rules, err := c.getRules() |
no test coverage detected