types

package
v1.7.4-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 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 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

This section is empty.

Jump to

Keyboard shortcuts

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