package
1.6.8
Repository: https://github.com/crowdsecurity/crowdsec.git
Documentation: pkg.go.dev

# Functions

func Atof(x string) float64 {.
func CrowdsecCTI(ip string) (*cticlient.SmokeItem, error) {.
func Distance(lat1 string, long1 string, lat2 string, long2 string) (float64, error) {.
just a expr wrapper for ExtractQueryParam.
just a expr wrapper for ParseQuery.
ExtractQueryParam extracts values for a given query parameter from a raw URI string.
func File(filename string) []string {.
func Get(arr []string, index int) string {.
func GetDecisionsCount(value string) int {.
func GetDecisionsSinceCount(value string, since string) int {.
func GetFromStash(cacheName string, key string) (string, error) {.
func IpInRange(ip string, ipRange string) bool {.
func IpToRange(ip string, cidr string) string {.
func IsIP(ip string) bool {.
func IsIPV4(ip string) bool {.
func IsIPV6(ip string) bool {.
JA4H(req *http.Request) string.
func JsonExtract(jsblob string, target string) string {.
func JsonExtractLib(jsblob string, target ...string) string {.
func JsonExtractObject(jsblob string, target string) map[string]interface{} {.
func JsonExtractSlice(jsblob string, target string) []interface{} {.
func JsonExtractUnescape(jsblob string, target ...string) string {.
func KeyExists(key string, dict map[string]interface{}) bool {.
func LookupHost(value string) []string {.
func Lower(s string) string {.
func Match(pattern, name string) bool {.
parseQuery and parseQuery are copied net/url package, but allow semicolon in values.
func ParseUnix(value string) string {.
func ParseUnixTime(value string) (time.Time, error) {.
func ParseUri(uri string) map[string][]string {.
func PathEscape(s string) string {.
func PathUnescape(s string) string {.
func QueryEscape(s string) string {.
func QueryUnescape(s string) string {.
func RegexpInFile(data string, filename string) bool {.
TBD: Based on the level of the logger (ie.
func SetInStash(cacheName string, key string, value string, expiration *time.Duration) any {.
func TimeNow() string {.
func ToJson(obj interface{}) string {.
func ToString(value interface{}) string {.
Func UnmarshalJSON(jsonBlob []byte, target interface{}) error {.
UpdateCacheMetrics is called directly by the prom handler.
func Upper(s string) string {.
func XMLGetAttributeValue(xmlString string, path string, attributeName string) string {.
func XMLGetNodeValue(xmlString string, path string) string {.

# Constants

# Variables

Cache for responses.
this is set for non-recoverable errors, such as 403 when querying API or empty API key.
when hitting quotas or auth errors, we temporarily disable the API.
when hitting quotas or auth errors, we temporarily disable the API.
Cache for responses.
prometheus*/.

# Structs

we use this struct to store the output of the expr runtime.