messagelog

package
v0.0.0-develop Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchedMessageLogger

type BatchedMessageLogger struct {
	// contains filtered or unexported fields
}

func NewBatchedMessageLogger

func NewBatchedMessageLogger(logger zerolog.Logger, db DB, roDB DB, includeChannels []string, excludeChannels []string) *BatchedMessageLogger

func (*BatchedMessageLogger) LogMessages

func (b *BatchedMessageLogger) LogMessages(twitchMsgChan <-chan *twitchirc.PrivateMessage) error

func (*BatchedMessageLogger) MessagesFromUserInChannel added in v0.5.0

func (b *BatchedMessageLogger) MessagesFromUserInChannel(username string, broadcasterChannel string) ([]LogEntry, error)

func (*BatchedMessageLogger) PrepareDatabase

func (b *BatchedMessageLogger) PrepareDatabase() error

type DB

type DB interface {
	Exec(query string, args ...any) (sql.Result, error)
	Query(query string, args ...any) (*sql.Rows, error)
}

type LogEntry added in v0.5.0

type LogEntry struct {
	ID               string
	BroadCastID      int
	UserID           int
	BroadcastChannel string
	SentAt           time.Time
	SenderDisplay    string
	PrivateMessage   *twitchirc.PrivateMessage
}

Jump to

Keyboard shortcuts

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