Documentation ¶
Index ¶
- Variables
- func CustomRecoveryWithWriter() gin.HandlerFunc
- func NewAPIC(config *csconfig.OnlineApiClientCfg, dbClient *database.Client, ...) (*apic, error)
- type APIServer
- func (s *APIServer) AttachPluginBroker(broker *csplugin.PluginBroker)
- func (s *APIServer) Close()
- func (s *APIServer) GetTLSConfig() (*tls.Config, error)
- func (s *APIServer) InitController() error
- func (s *APIServer) Router() (*gin.Engine, error)
- func (s *APIServer) Run(apiReady chan bool) error
- func (s *APIServer) Shutdown() error
Constants ¶
This section is empty.
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 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) GetTLSConfig ¶ added in v1.4.0
func (*APIServer) InitController ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.