opcotech/elemo

View on GitHub
internal/repository/notification.go

Summary

Maintainability
A
0 mins
Test Coverage
package repository

import (
    "context"

    "github.com/opcotech/elemo/internal/model"
)

// NotificationRepository is a repository for managing notifications.
type NotificationRepository interface {
    Create(ctx context.Context, notification *model.Notification) error
    Get(ctx context.Context, id, recipient model.ID) (*model.Notification, error)
    GetAllByRecipient(ctx context.Context, recipient model.ID, offset, limit int) ([]*model.Notification, error)
    Update(ctx context.Context, id, recipient model.ID, read bool) (*model.Notification, error)
    Delete(ctx context.Context, id, recipient model.ID) error
}