types

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	Run()
	RegisterNotificationHandler(Notifier)
	GetTemplateData() map[string]string
}

type BaseEvent

type BaseEvent struct {
	RemoteAddr       string
	RemotePortNumber int
	UserAgentString  string
	RawData          []byte
}

func (*BaseEvent) Data

func (e *BaseEvent) Data() string

func (*BaseEvent) Details

func (e *BaseEvent) Details() string

func (*BaseEvent) Dispatch

func (e *BaseEvent) Dispatch(cc chan InteractionEvent)

func (*BaseEvent) RemoteIP

func (e *BaseEvent) RemoteIP() string

func (*BaseEvent) RemotePort

func (e *BaseEvent) RemotePort() int

func (*BaseEvent) UserAgent

func (e *BaseEvent) UserAgent() string

type Handler

type Handler interface {
	Name() string
	Start(App, chan InteractionEvent) error
}

type InteractionEvent

type InteractionEvent interface {
	Details() string
	RemoteIP() string
	RemotePort() int
	UserAgent() string
	Data() string
	Dispatch(cc chan InteractionEvent)
}

type Notifier

type Notifier interface {
	Name() string
	Send(InteractionEvent) error
	Filter() *regexp.Regexp
}

type NotifierBase

type NotifierBase struct {
	Name   string
	Filter string
}

type NotifierChat

type NotifierChat struct {
	NotifierWebhook
	Channel   string
	User      string
	UserImage string
}

type NotifierWebhook

type NotifierWebhook struct {
	NotifierBase
	URL string
}

Jump to

Keyboard shortcuts

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