Documentation ¶
Index ¶
- Constants
- Variables
- func AlertToSignal(alert *models.Alert, scenarioTrust string) *models.AddSignalsRequestItem
- func CustomRecoveryWithWriter() gin.HandlerFunc
- func IsInSlice(a string, b []string) bool
- func NewAPIC(config *csconfig.OnlineApiClientCfg, dbClient *database.Client, ...) (*apic, error)
- type APIServer
Constants ¶
View Source
const ( PullInterval = "2h" PushInterval = "30s" MetricsInterval = "30m" )
Variables ¶
View Source
var SCOPE_CAPI string = "CAPI"
View Source
var SCOPE_CAPI_ALIAS string = "crowdsecurity/community-blocklist" //we don't use "CAPI" directly, to make it less confusing for the user
View Source
var SCOPE_LISTS string = "lists"
Functions ¶
func AlertToSignal ¶
func AlertToSignal(alert *models.Alert, scenarioTrust string) *models.AddSignalsRequestItem
func CustomRecoveryWithWriter ¶ added in v1.0.12
func CustomRecoveryWithWriter() gin.HandlerFunc
RecoveryWithWriter returns a middleware for a given writer that recovers from any panics and writes a 500 if there was one.
func NewAPIC ¶
func NewAPIC(config *csconfig.OnlineApiClientCfg, dbClient *database.Client, consoleConfig *csconfig.ConsoleConfig) (*apic, error)
Types ¶
type APIServer ¶
func (*APIServer) AttachPluginBroker ¶ added in v1.2.0
func (s *APIServer) AttachPluginBroker(broker *csplugin.PluginBroker)
func (*APIServer) InitController ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.