97e6588a45
* cscli hub items: avoid global * lint (whitespace, errors) * lint
41 lines
1.3 KiB
Go
41 lines
1.3 KiB
Go
package main
|
|
|
|
import (
|
|
"github.com/crowdsecurity/crowdsec/pkg/cwhub"
|
|
)
|
|
|
|
func NewCLICollection(cfg configGetter) *cliItem {
|
|
return &cliItem{
|
|
cfg: cfg,
|
|
name: cwhub.COLLECTIONS,
|
|
singular: "collection",
|
|
oneOrMore: "collection(s)",
|
|
help: cliHelp{
|
|
example: `cscli collections list -a
|
|
cscli collections install crowdsecurity/http-cve crowdsecurity/iptables
|
|
cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables
|
|
cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables
|
|
cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables
|
|
`,
|
|
},
|
|
installHelp: cliHelp{
|
|
example: `cscli collections install crowdsecurity/http-cve crowdsecurity/iptables`,
|
|
},
|
|
removeHelp: cliHelp{
|
|
example: `cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables`,
|
|
},
|
|
upgradeHelp: cliHelp{
|
|
example: `cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables`,
|
|
},
|
|
inspectHelp: cliHelp{
|
|
example: `cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables`,
|
|
},
|
|
listHelp: cliHelp{
|
|
example: `cscli collections list
|
|
cscli collections list -a
|
|
cscli collections list crowdsecurity/http-cve crowdsecurity/iptables
|
|
|
|
List only enabled collections unless "-a" or names are specified.`,
|
|
},
|
|
}
|
|
}
|