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

Method PrintCollection

utils/printer.go:213–222  ·  view source on GitHub ↗

PrintCollection prints a collection of objects retrieved from the collection specified by the collection URL.

(collection *url.URL)

Source from the content-addressed store, hash-verified

211// PrintCollection prints a collection of objects retrieved from the collection
212// specified by the collection URL.
213func (p *Printer) PrintCollection(collection *url.URL) error {
214 it, err := p.client.Iterator(collection,
215 vt.IteratorLimit(viper.GetInt("limit")),
216 vt.IteratorCursor(viper.GetString("cursor")),
217 vt.IteratorFilter(viper.GetString("filter")))
218 if err != nil {
219 return err
220 }
221 return p.PrintIterator(it)
222}
223
224// PrintIterator prints the objects returned by an object iterator.
225func (p *Printer) PrintIterator(it *vt.Iterator) error {

Callers 9

NewRelationshipCmdFunction · 0.95
NewHuntingRulesetListCmdFunction · 0.95
NewIOCStreamListCmdFunction · 0.95
NewRetrohuntListCmdFunction · 0.95
NewRetrohuntMatchesCmdFunction · 0.95
NewMonitorItemsListCmdFunction · 0.95
NewThreatProfileListCmdFunction · 0.95

Calls 1

PrintIteratorMethod · 0.95

Tested by

no test coverage detected