Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TypeID ¶
func TypeID(em EventManager) int64
Types ¶
type EventManager ¶
type EventManager struct { ID int64 `storm:"id,increment,index"` State string `json:"state"` // new, ongoing, trusted Type string `storm:"index" json:"type"` AttackerNetwork string `storm:"index"` AttackerIP string `storm:"index"` EventType interface{} Created time.Time `storm:"index"` // contains filtered or unexported fields }
func NewEventManager ¶
func NewEventManager(typ, network, ip string, et EventType) *EventManager
func NewSensorEventManager ¶
func NewSensorEventManager(network, ip string, e *EventSensor) *EventManager
func NewTokenEventManager ¶
func NewTokenEventManager(network, ip string, e *EventToken) *EventManager
func (*EventManager) AddMutex ¶
func (em *EventManager) AddMutex()
func (*EventManager) SendEvent ¶
func (em *EventManager) SendEvent(state, host, key string) error
func (EventManager) SetSensorID ¶
func (em EventManager) SetSensorID(i int64)
func (*EventManager) SetState ¶
func (em *EventManager) SetState(db *storm.DB)
type EventSensor ¶
type EventSensor struct { SensorID int64 `json:"sensor_id"` Type string `json:"type"` Port int `json:"port"` AttackerPort string `storm:"index" json:"attacker_port"` }
func MapToEventSensor ¶
func MapToEventSensor(em EventManager) EventSensor
func (*EventSensor) Is ¶
func (e *EventSensor) Is() string
type EventToken ¶
func (*EventToken) Is ¶
func (e *EventToken) Is() string
func (*EventToken) MyID ¶
func (e *EventToken) MyID() int64
Click to show internal directories.
Click to hide internal directories.