MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / PAPI

Function PAPI

cmd/crowdsec-cli/core/require/require.go:59–73  ·  view source on GitHub ↗
(c *csconfig.Config)

Source from the content-addressed store, hash-verified

57}
58
59func PAPI(c *csconfig.Config) error {
60 if err := CAPI(c); err != nil {
61 return err
62 }
63
64 if err := CAPIRegistered(c); err != nil {
65 return err
66 }
67
68 if c.API.Server.OnlineClient.Credentials.PapiURL == "" {
69 return errors.New("no PAPI URL in configuration")
70 }
71
72 return nil
73}
74
75func CAPIRegistered(c *csconfig.Config) error {
76 if c.API.Server.OnlineClient.Credentials == nil {

Callers 1

NewCommandMethod · 0.92

Calls 2

CAPIFunction · 0.85
CAPIRegisteredFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…