# Functions
func Atof(x string) float64 {.
No description provided by the author
func CrowdsecCTI(ip string) (*cticlient.SmokeItem, error) {.
No description provided by the author
No description provided by the author
func Distance(lat1 string, long1 string, lat2 string, long2 string) (float64, error) {.
No description provided by the author
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.
No description provided by the author
func File(filename string) []string {.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
func Get(arr []string, index int) string {.
No description provided by the author
No description provided by the author
func GetDecisionsCount(value string) int {.
func GetDecisionsSinceCount(value string, since string) int {.
No description provided by the author
func GetFromStash(cacheName string, key string) (string, error) {.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
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.
No description provided by the author
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 {.
No description provided by the author
No description provided by the author
No description provided by the author
func LookupHost(value string) []string {.
func Lower(s string) string {.
func Match(pattern, name string) bool {.
No description provided by the author
parseQuery and parseQuery are copied net/url package, but allow semicolon in values.
No description provided by the author
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 {.
No description provided by the author
func RegexpInFile(data string, filename string) bool {.
No description provided by the author
No description provided by the author
No description provided by the author
TBD: Based on the level of the logger (ie.
func SetInStash(cacheName string, key string, value string, expiration *time.Duration) any {.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
func TimeNow() string {.
func ToJson(obj interface{}) string {.
func ToString(value interface{}) string {.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Func UnmarshalJSON(jsonBlob []byte, target interface{}) error {.
UpdateCacheMetrics is called directly by the prom handler.
func Upper(s string) string {.
No description provided by the author
func XMLGetAttributeValue(xmlString string, path string, attributeName string) string {.
func XMLGetNodeValue(xmlString string, path string) string {.
# Constants
No description provided by the author
# Variables
Cache for responses.
this is set for non-recoverable errors, such as 403 when querying API or empty API key.
No description provided by the author
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.
No description provided by the author
No description provided by the author
prometheus*/.
# Structs
No description provided by the author
we use this struct to store the output of the expr runtime.