types

package
v1.8.2-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 5 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ApiKeyAuthType   = "api-key"
	TlsAuthType      = "tls"
	PasswordAuthType = "password"
)
View Source
const (
	CscliOrigin                       = "cscli"
	CrowdSecOrigin                    = "crowdsec"
	ConsoleOrigin                     = "console"
	CscliImportOrigin                 = "cscli-import"
	ListOrigin                        = "lists"
	CAPIOrigin                        = "CAPI"
	CommunityBlocklistPullSourceScope = "crowdsecurity/community-blocklist"
	RemediationSyncOrigin             = "remediation_sync"
)
View Source
const (
	Undefined = ""
	Ip        = "Ip"
	Range     = "Range"
	Filter    = "Filter"
	Country   = "Country"
	AS        = "AS"
)

Move in leakybuckets

View Source
const DecisionTypeBan = "ban"

Variables

This section is empty.

Functions

func Addr2Ints added in v1.0.3

func Addr2Ints(anyIP string) (int, int64, int64, int64, int64, error)

returns a range for any ip or range

func GetAlertKinds added in v1.7.7

func GetAlertKinds() []string

func GetOrigins added in v1.5.0

func GetOrigins() []string

func IP2Ints added in v1.0.3

func IP2Ints(pip net.IP) (int, int64, int64, error)

size (16|4), network, suffix, error

func LastAddress

func LastAddress(n net.IPNet) net.IP

LastAddress returns the last address of a network

func NormalizeScope added in v1.6.3

func NormalizeScope(scope string) string

func Range2Ints added in v1.0.3

func Range2Ints(network net.IPNet) (int, int64, int64, int64, int64, error)

size (16|4), nw_start, suffix_start, nw_end, suffix_end, error

Types

type AlertKind added in v1.7.7

type AlertKind string
const (
	CrowdsecAlertKind     AlertKind = "crowdsec"      // for alerts created from logs
	WAFAlertKind          AlertKind = "waf"           // for alerts generated by the WAF
	BotDetectionAlertKind AlertKind = "bot-detection" // for alerts generated by the AppSec bot-detection challenge
	CAPIAlertKind         AlertKind = "capi"          // Alert created from a CAPI pull
	PAPIAlertKind         AlertKind = "papi"          // Alert created from a PAPI order
	CscliAlertKind        AlertKind = "cscli"         // Alert created from a cscli command
)

func (AlertKind) String added in v1.7.7

func (k AlertKind) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL