bdkeeper

package
v0.0.0-...-d3f719c Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BDKeeper

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

func NewBDKeeper

func NewBDKeeper(dsn func() string, log Log, userUpdateInterval func() string) *BDKeeper

func (*BDKeeper) Close

func (kp *BDKeeper) Close() bool

func (*BDKeeper) GetMessages

func (kp *BDKeeper) GetMessages(ctx context.Context, filter models.Filter, pagination models.Pagination) ([]models.Message, error)

GetMessages retrieves processed messages from the database based on the provided filter and pagination

func (*BDKeeper) InsertMessage

func (kp *BDKeeper) InsertMessage(ctx context.Context, message models.Message) (int, error)

InsertMessage inserts a new message into the database

func (*BDKeeper) LoadMessages

func (kp *BDKeeper) LoadMessages(ctx context.Context) (storage.StorageMessage, error)

LoadMessages loads messages from the database

func (*BDKeeper) Ping

func (kp *BDKeeper) Ping(ctx context.Context) bool

func (*BDKeeper) UpdateMessagesProcessed

func (kp *BDKeeper) UpdateMessagesProcessed(ctx context.Context, ids []int) error

UpdateMessagesProcessed updates the processed status of messages in the database

type Log

type Log interface {
	Info(string, ...zap.Field)
}

Jump to

Keyboard shortcuts

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