26 lines
1002 B
Go
26 lines
1002 B
Go
package usecase
|
|
|
|
import "context"
|
|
|
|
// AdminNotifierUseCase supports operations/admin retry of failed notifications.
|
|
type AdminNotifierUseCase interface {
|
|
ListDLQ(ctx context.Context, tenantID string, limit int64) ([]*DLQEntryDTO, error)
|
|
// RetryDLQ re-queues delivery; target must be supplied by the operator (not stored in DLQ for privacy).
|
|
RetryDLQ(ctx context.Context, tenantID, dlqID, target string) (*NotificationDTO, error)
|
|
}
|
|
|
|
// DLQEntryDTO is an admin view of a dead-letter record.
|
|
type DLQEntryDTO struct {
|
|
ID string `json:"id"`
|
|
NotificationID string `json:"notification_id"`
|
|
TenantID string `json:"tenant_id"`
|
|
UID string `json:"uid,omitempty"`
|
|
Channel string `json:"channel"`
|
|
Kind string `json:"kind"`
|
|
TargetHash string `json:"target_hash"`
|
|
LastError string `json:"last_error"`
|
|
Attempts int `json:"attempts"`
|
|
OccurredAt int64 `json:"occurred_at"`
|
|
HasRetryPayload bool `json:"has_retry_payload"`
|
|
}
|