repository

package
v0.0.0-...-8e5e344 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID      int    `db:"id"`
	Content string `db:"content"`
	Status  string `db:"status"`
}

type Repository

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

func NewRepository

func NewRepository(db *sqlx.DB, logger *zap.Logger) *Repository

func (*Repository) GetProcessedMessagesCount

func (r *Repository) GetProcessedMessagesCount(ctx context.Context) (int, error)

func (*Repository) SaveMessage

func (r *Repository) SaveMessage(ctx context.Context, msg *Message) error

func (*Repository) UpdateMessageStatus

func (r *Repository) UpdateMessageStatus(ctx context.Context, id int, status string) error

type RepositoryMock

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

func NewRepositoryMock

func NewRepositoryMock() *RepositoryMock

func (*RepositoryMock) GetProcessedMessageCount

func (r *RepositoryMock) GetProcessedMessageCount() (int, error)

func (*RepositoryMock) MarkMessageAsProcessed

func (r *RepositoryMock) MarkMessageAsProcessed(id int) error

func (*RepositoryMock) SaveMessage

func (r *RepositoryMock) SaveMessage(content string) (int, error)

Jump to

Keyboard shortcuts

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