messagelog

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 9 Imported by: 0

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 *command.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   *command.PrivateMessage
}

Jump to

Keyboard shortcuts

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