Versions in this module Expand all Collapse all v0 v0.1.0 Nov 24, 2025 Changes in this version + var ErrMaxAttemptsExceeded = DomainError + var ErrNoRetryScheduled = DomainError + var ErrNotReadyForRetry = DomainError + var ErrQueueItemAlreadySent = DomainError + var ErrQueueItemExpired = DomainError + type Attributes map[string]string + type DLQStats struct + LastUpdated time.Time + NewestItemAge int64 + OldestItemAge int64 + ResolvedItems int + TopFailureReason string + TotalItems int + UnresolvedItems int + type DataMessage struct + Attributes Attributes + Data string + Identifier string + MessageID string + OrderingKey string + PublishTime time.Time + func NewDataMessage(messageID string, _ time.Time, identifier, data string) *DataMessage + func (d *DataMessage) FromString(_ string) error + func (d *DataMessage) ToBase64() string + func (d *DataMessage) ToString() string + type DeadLetterQueue struct + AttemptCount int + CallbackURL string + CreatedAt time.Time + FailureReason string + FirstAttemptAt time.Time + ID int64 + IsResolved bool + LastAttemptAt time.Time + LastError string + MessageData string + MessageID int64 + MovedToDLQAt time.Time + OriginalQueueID int64 + ResolutionNote string + ResolvedAt *time.Time + ResolvedBy string + SubscriptionID int64 + func NewDeadLetterQueue(subscriptionID, messageID, originalQueueID int64, attemptCount int, ...) DeadLetterQueue + func (d *DeadLetterQueue) GetAge() time.Duration + func (d *DeadLetterQueue) IsOld(threshold time.Duration) bool + func (d *DeadLetterQueue) Resolve(resolvedBy, note string) + func (d DeadLetterQueue) TableName() string + type DomainError struct + Code string + Message string + func (e DomainError) Error() string + type Message struct + CreatedAt time.Time + Data string + ID int64 + Identifier string + TopicID int64 + func NewMessage(topicID int64, identifier, data string) Message + func (t Message) TableName() string + type NotificationLog struct + CreatedAt time.Time + DeliveryMethod string + ID int64 + Identifier string + MessageID int64 + SentAt sql.NullTime + SkippedReason sql.NullString + Status string + SubscriberID int64 + SubscriberType string + SubscriptionID int64 + TopicCode string + func NewNotificationLog(subscriptionID int64, messageID int64, identifier string, topicCode string, ...) NotificationLog + func (t NotificationLog) TableName() string + type PublishResult struct + Result bool + type Publisher struct + Code string + CreatedAt time.Time + Description string + ID int64 + IsActive bool + Name string + func NewPublisher(code, name, description string) Publisher + func (t Publisher) TableName() string + type Queue struct + AttemptCount int + CompletedAt sql.NullTime + CreatedAt time.Time + ExpiresAt time.Time + ID int64 + IsComplete bool + LastAttemptAt sql.NullTime + LastError sql.NullString + MessageID int64 + NextRetryAt sql.NullTime + OperationTimestamp time.Time + RetryAt sql.NullTime + SequenceNumber int64 + Status QueueStatus + SubscriptionID int64 + func NewQueue(subscriptionID, messageID int64) Queue + func (t *Queue) CanAttemptDelivery(maxAttempts int) error + func (t *Queue) GetAge() time.Duration + func (t *Queue) GetTimeUntilExpiry() time.Duration + func (t *Queue) GetTimeUntilRetry() (time.Duration, error) + func (t *Queue) IsExpired() bool + func (t *Queue) MarkFailed(err error, retryAfter time.Duration) + func (t *Queue) MarkSent() + func (t *Queue) RecordAttemptStart() + func (t *Queue) SetComplete() + func (t *Queue) ShouldMoveToDLQ(dlqThreshold int) bool + func (t *Queue) ShouldRetry() bool + func (t *Queue) TableName() string + type QueueStatus string + const QueueStatusFailed + const QueueStatusPending + const QueueStatusSent + type QueueWithDetails struct + AttemptCount int + CallbackURL string + CreatedAt time.Time + Data []byte + ExpiresAt *time.Time + Identifier string + LastAttemptAt *time.Time + LastError string + MessageID int64 + NextRetryAt *time.Time + OperationTime time.Time + QueueID int64 + SequenceNumber int64 + Status string + SubscriberID int64 + SubscriptionID int64 + type Subscriber struct + ClientID int64 + CreatedAt time.Time + ID int64 + IsActive bool + Name string + WebhookURL string + func NewSubscriber(clientID int64, name, webhookURL string) Subscriber + func (t Subscriber) TableName() string + type Subscription struct + CreatedAt time.Time + DeletedAt sql.NullTime + ID int64 + Identifier string + IsActive bool + SubscriberID int64 + TopicID int64 + func NewSubscription(subscriberID, topicID int64, identifier, _ string) Subscription + func (m *Subscription) Deactivate() + func (m Subscription) TableName() string + type SubscriptionFull struct + CallbackURL string + Messages int + type SubscriptionV2 struct + CallbackURL string + CreatedAt time.Time + ID int64 + Identifier string + IsActive bool + LastNotificationAt *time.Time + SubscriberID int64 + TopicID int64 + TrackID string + type Topic struct + Code string + CreatedAt time.Time + Description string + ID int64 + IsActive bool + Name string + func NewTopic(code, name, description string) Topic + func (t Topic) TableName() string