MCPcopy
hub / github.com/crowdsecurity/crowdsec / DownloadCommand

Struct DownloadCommand

pkg/hubops/download.go:28–32  ·  view source on GitHub ↗

DownloadCommand handles the downloading of hub items. It ensures that items are fetched from the hub (or from the index file if it also has content) managing dependencies and verifying the integrity of downloaded content. This is used by "cscli install" and "cscli upgrade". Tainted items require the

Source from the content-addressed store, hash-verified

26// This is used by "cscli install" and "cscli upgrade".
27// Tainted items require the force parameter, local items are skipped.
28type DownloadCommand struct {
29 Item *cwhub.Item
30 Force bool
31 contentProvider cwhub.ContentProvider
32}
33
34func NewDownloadCommand(item *cwhub.Item, contentProvider cwhub.ContentProvider, force bool) *DownloadCommand {
35 return &DownloadCommand{Item: item, Force: force, contentProvider: contentProvider}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected