Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageCallback ¶
type MessageCallback func(twitch.PrivateMessage)
MessageCallback type used in go-twitch-irc for hadling private messages
type MessageMiddleware ¶
type MessageMiddleware func(MessageCallback) MessageCallback
MessageMiddleware middleware for processing MessageCallback
func DatabaseMessageMiddleware ¶
func DatabaseMessageMiddleware(db *gorm.DB) MessageMiddleware
DatabaseMessageMiddleware stores message and 2 users in DB
func InstrumentingMessagesCounterMiddleware ¶
func InstrumentingMessagesCounterMiddleware(cv *prometheus.CounterVec) MessageMiddleware
InstrumentingMessagesCounterMiddleware increments message counter
func LoggingMessageMiddleware ¶
func LoggingMessageMiddleware(logger *zap.Logger) MessageMiddleware
LoggingMessageMiddleware prints user and message
func RecoverMessagesMiddleware ¶
func RecoverMessagesMiddleware(logger *zap.Logger) MessageMiddleware
RecoverMessagesMiddleware recovers from panic and report to logger
Click to show internal directories.
Click to hide internal directories.