Files

24 lines
937 B
Go

package outbound
import (
"context"
"github.com/google/uuid"
"lincodex/backend/internal/domain"
)
// NotificationRightsReader reads the standing that the rights checks of
// product notifications need. It runs inside the caller's transaction, in
// the same transaction that holds the delivery lock, and it locks nothing
// itself. It returns the facts of one record only, never an address, a
// contact, or the content of a notification.
type NotificationRightsReader interface {
// InvitationNoticeStanding reads the standing of an invitation notice: the
// recipient account, the invitation the recipient is addressed by, the
// hiding of the sending organization, and the current publication. A
// missing account or invitation is reported as not found, not as an
// error.
InvitationNoticeStanding(ctx context.Context, recipientUserID, invitationID, organizationID uuid.UUID) (domain.InvitationNoticeStanding, error)
}