repository

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationRepository

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

NotificationRepository handles database operations for notifications.

func NewNotificationRepository

func NewNotificationRepository(db *sql.DB) *NotificationRepository

NewNotificationRepository creates a new notification repository.

func (*NotificationRepository) Create

Create creates a new notification.

func (*NotificationRepository) GetByCorrelationID

func (r *NotificationRepository) GetByCorrelationID(ctx context.Context, correlationID string) (*models.Notification, *errors.Error)

GetByCorrelationID retrieves a notification by correlation ID (for idempotency check).

func (*NotificationRepository) GetByID

GetByID retrieves a notification by ID.

func (*NotificationRepository) GetQueuedNotifications

func (r *NotificationRepository) GetQueuedNotifications(ctx context.Context, limit int) ([]*models.Notification, *errors.Error)

GetQueuedNotifications retrieves queued notifications ordered by priority and creation time.

func (*NotificationRepository) GetStats

GetStats retrieves notification statistics.

func (*NotificationRepository) IncrementRetryCount

func (r *NotificationRepository) IncrementRetryCount(ctx context.Context, id string) *errors.Error

IncrementRetryCount increments the retry count for a notification.

func (*NotificationRepository) List

List retrieves notifications with optional filters.

func (*NotificationRepository) UpdateStatus

func (r *NotificationRepository) UpdateStatus(ctx context.Context, id string, status models.NotificationStatus, failureReason *string) *errors.Error

UpdateStatus updates the status of a notification.

type TemplateRepository

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

TemplateRepository handles database operations for notification templates.

func NewTemplateRepository

func NewTemplateRepository(db *sql.DB) *TemplateRepository

NewTemplateRepository creates a new template repository.

func (*TemplateRepository) Create

Create creates a new notification template.

func (*TemplateRepository) Delete

func (r *TemplateRepository) Delete(ctx context.Context, id string) *errors.Error

Delete deletes a notification template.

func (*TemplateRepository) GetByID

GetByID retrieves a template by ID.

func (*TemplateRepository) GetByName

GetByName retrieves a template by name.

func (*TemplateRepository) List

List retrieves all templates, optionally filtered by channel.

func (*TemplateRepository) Update

Update updates a notification template.

Jump to

Keyboard shortcuts

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