github.com/crowdsecurity/crowdsec@v1.6.1/cmd/crowdsec-cli/hubcollection.go (about)

     1  package main
     2  
     3  import (
     4  	"github.com/crowdsecurity/crowdsec/pkg/cwhub"
     5  )
     6  
     7  func NewCLICollection() *cliItem {
     8  	return &cliItem{
     9  		name:      cwhub.COLLECTIONS,
    10  		singular:  "collection",
    11  		oneOrMore: "collection(s)",
    12  		help: cliHelp{
    13  			example: `cscli collections list -a
    14  cscli collections install crowdsecurity/http-cve crowdsecurity/iptables
    15  cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables
    16  cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables
    17  cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables
    18  `,
    19  		},
    20  		installHelp: cliHelp{
    21  			example: `cscli collections install crowdsecurity/http-cve crowdsecurity/iptables`,
    22  		},
    23  		removeHelp: cliHelp{
    24  			example: `cscli collections remove crowdsecurity/http-cve crowdsecurity/iptables`,
    25  		},
    26  		upgradeHelp: cliHelp{
    27  			example: `cscli collections upgrade crowdsecurity/http-cve crowdsecurity/iptables`,
    28  		},
    29  		inspectHelp: cliHelp{
    30  			example: `cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables`,
    31  		},
    32  		listHelp: cliHelp{
    33  			example: `cscli collections list
    34  cscli collections list -a
    35  cscli collections list crowdsecurity/http-cve crowdsecurity/iptables
    36  
    37  List only enabled collections unless "-a" or names are specified.`,
    38  		},
    39  	}
    40  }