Documentation
¶
Index ¶
- Constants
- func ConfigureRouter(e *echo.Echo, cfg *Config)
- func NewBanner(size int, banlist []string) *banner
- func NewRateLimiter(shared, all map[string]string) *rateLimiter
- func NewValidator(dv domainValidator, psdc *psd.Client) *validator
- func SentryTransaction() echo.MiddlewareFunc
- func SetFormHandlerSender(sender sub.Sender)
- type Config
- type FormHandler
Constants ¶
View Source
const DefaultFrequency = 1 * time.Minute
DefaultFrequency of the rate limiter
Variables ¶
This section is empty.
Functions ¶
func ConfigureRouter ¶
func ConfigureRouter(e *echo.Echo, cfg *Config)
ConfigureRouter configures echo router
func NewRateLimiter ¶
func NewValidator ¶
func NewValidator(dv domainValidator, psdc *psd.Client) *validator
func SentryTransaction ¶
func SentryTransaction() echo.MiddlewareFunc
SentryTransaction is a middleware that creates a new transaction for each request.
func SetFormHandlerSender ¶
SetFormHandlerSender sets sender for form handler it's a hack to avoid circular dependencies and allow setting matrix bot once it configured, while having HTTP server up & running, even if matrix part is down
Types ¶
type Config ¶
type Config struct { FormHandler FormHandler BanlistStatic []string BanlistSize int FormRLs map[string]string MetricsAuth echobasicauth.Auth Validator domainValidator PSD *psd.Client }
Click to show internal directories.
Click to hide internal directories.