MCPcopy Create free account
hub / github.com/VirusTotal/vt-cli / NewMonitorItemsListCmd

Function NewMonitorItemsListCmd

cmd/monitor.go:43–63  ·  view source on GitHub ↗

NewMonitorItemsListCmd returns a list or monitor_items according to a filter.

()

Source from the content-addressed store, hash-verified

41
42// NewMonitorItemsListCmd returns a list or monitor_items according to a filter.
43func NewMonitorItemsListCmd() *cobra.Command {
44 cmd := &cobra.Command{
45 Use: "list",
46 Short: "List monitor in your account",
47 Example: monitorItemsCmdExample,
48 RunE: func(cmd *cobra.Command, args []string) error {
49 p, err := NewPrinter(cmd)
50 if err != nil {
51 return err
52 }
53 return p.PrintCollection(vt.URL("monitor/items"))
54 },
55 }
56
57 addIncludeExcludeFlags(cmd.Flags())
58 addFilterFlag(cmd.Flags())
59 addLimitFlag(cmd.Flags())
60 addCursorFlag(cmd.Flags())
61
62 return cmd
63}
64
65// Monitor downloader, it implements the Doer interface. Retrieves the item
66// path to know the destination filename and downloads and save each individual

Callers 1

NewMonitorCmdFunction · 0.85

Calls 6

PrintCollectionMethod · 0.95
addIncludeExcludeFlagsFunction · 0.85
addFilterFlagFunction · 0.85
addLimitFlagFunction · 0.85
addCursorFlagFunction · 0.85
NewPrinterFunction · 0.70

Tested by

no test coverage detected