hubpostoverflow.go 1.3 KB

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