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

Method validate

cmd/crowdsec-cli/climachine/validate.go:13–21  ·  view source on GitHub ↗
(ctx context.Context, machineID string)

Source from the content-addressed store, hash-verified

11)
12
13func (cli *cliMachines) validate(ctx context.Context, machineID string) error {
14 if err := cli.db.ValidateMachine(ctx, machineID); err != nil {
15 return fmt.Errorf("unable to validate machine '%s': %w", machineID, err)
16 }
17
18 log.Infof("machine '%s' validated successfully", machineID)
19
20 return nil
21}
22
23func (cli *cliMachines) newValidateCmd() *cobra.Command {
24 cmd := &cobra.Command{

Callers 1

newValidateCmdMethod · 0.95

Calls 1

ValidateMachineMethod · 0.80

Tested by

no test coverage detected