domain

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package domain defines the core outbox domain entities and types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutboxEvent

type OutboxEvent struct {
	ID          uuid.UUID         `db:"id"           json:"id"`
	EventType   string            `db:"event_type"   json:"event_type"             fieldtag:"insert,update"`
	Payload     string            `db:"payload"      json:"payload"                fieldtag:"insert,update"`
	Status      OutboxEventStatus `db:"status"       json:"status"                 fieldtag:"insert,update"`
	Retries     int               `db:"retries"      json:"retries"                fieldtag:"insert,update"`
	LastError   *string           `db:"last_error"   json:"last_error,omitempty"   fieldtag:"insert,update"`
	ProcessedAt *time.Time        `db:"processed_at" json:"processed_at,omitempty" fieldtag:"insert,update"`
	CreatedAt   time.Time         `db:"created_at"   json:"created_at"`
	UpdatedAt   time.Time         `db:"updated_at"   json:"updated_at"`
}

OutboxEvent represents an event in the transactional outbox pattern

type OutboxEventStatus

type OutboxEventStatus string

OutboxEventStatus represents the status of an outbox event

const (
	OutboxEventStatusPending   OutboxEventStatus = "pending"
	OutboxEventStatusProcessed OutboxEventStatus = "processed"
	OutboxEventStatusFailed    OutboxEventStatus = "failed"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL