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

Method NewCommand

cmd/crowdsec-cli/clicapi/capi.go:39–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func (cli *cliCapi) NewCommand() *cobra.Command {
40 cmd := &cobra.Command{
41 Use: "capi [action]",
42 Short: "Manage interaction with Central API (CAPI)",
43 DisableAutoGenTag: true,
44 Args: args.NoArgs,
45 RunE: func(cmd *cobra.Command, _ []string) error {
46 return cmd.Usage()
47 },
48 }
49
50 cmd.AddCommand(cli.newRegisterCmd())
51 cmd.AddCommand(cli.newStatusCmd())
52
53 return cmd
54}
55
56func (cli *cliCapi) register(ctx context.Context, capiUserPrefix string, outputFile string) error {
57 cfg := cli.cfg()

Callers

nothing calls this directly

Calls 3

newRegisterCmdMethod · 0.95
newStatusCmdMethod · 0.95
AddCommandMethod · 0.80

Tested by

no test coverage detected