chore: get files from lab6

This commit is contained in:
Голиков Maximillian Антон
2026-11-24 22:32:11 +03:00
parent 20afc2c790
commit 9b88c6f0bd
118 changed files with 9682 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
package domain
import "time"
const (
OutboxAggregateAttachment = "attachment"
OutboxEventProcess = "attachment.process"
)
// OutboxEntry — намерение опубликовать сообщение, записанное
// в одной транзакции с бизнес-изменением (transactional outbox).
//
// Инварианты:
// - PublishedAt == nil => ещё не опубликовано, publisher обязан дослать;
// - PublishedAt != nil => RabbitMQ принял сообщение,
// а не «мы вызвали Publish». At-least-once: повторная доставка
// возможна и нормальна, гасится идемпотентностью consumer'а.
//
type OutboxEntry struct {
ID string
AggregateType string
AggregateID string
EventType string
Payload []byte
Headers map[string]string
CreatedAt time.Time
PublishedAt *time.Time
Attempts int
}