Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateTimestampUUID() (string, error)
- func GenerateUUID() (string, error)
- func LogBannedIPs(dataStorage *storage.GenericStorage) error
- func RetrieveEventsForIP(dataStorage *storage.GenericStorage, ip string) (map[string]*Event, error)
- func RetrieveIPs(dataStorage *storage.GenericStorage) ([]string, error)
- func RunCommandGetOutput(command string) (string, error)
- func StoreBannedIP(dataStorage *storage.GenericStorage, event *Event, ttl int64) error
- type Event
- type Fail2BanData
Constants ¶
View Source
const FAILED_EVENTS_TABLE = "failedEvents"
View Source
const FAILED_IPS_TABLE = "failedIPs"
Variables ¶
View Source
var BinSh = "/bin/sh"
View Source
var C = "-c"
View Source
var LAST_TIME_LOGGED = map[string]int64{}
Functions ¶
func GenerateTimestampUUID ¶
func GenerateUUID ¶
func LogBannedIPs ¶
func LogBannedIPs(dataStorage *storage.GenericStorage) error
func RetrieveEventsForIP ¶
func RetrieveIPs ¶
func RetrieveIPs(dataStorage *storage.GenericStorage) ([]string, error)
func RunCommandGetOutput ¶
func StoreBannedIP ¶
func StoreBannedIP(dataStorage *storage.GenericStorage, event *Event, ttl int64) error
Types ¶
type Event ¶
func CreateSimpleEvent ¶
type Fail2BanData ¶
type Fail2BanData struct { DataStorage *storage.GenericStorage RemoteAddress string TTL int64 }
Click to show internal directories.
Click to hide internal directories.