Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Registry = []interface{}{&IdempotencyKey{}}
)
Functions ¶
Types ¶
type DB ¶
DB represents the database connection wrapper.
func (*DB) AutoMigrateAll ¶
AutoMigrate runs the GORM AutoMigrate for all registered models.
func (*DB) IsProcessed ¶
IsProcessed checks if an operation has already been completed.
func (*DB) MarkProcessed ¶
MarkProcessed records that an operation has been completed.
type IdempotencyKey ¶
type IdempotencyKey struct {
ID string `gorm:"primaryKey"`
Scope string `gorm:"index:idx_scope_key,unique"` // e.g. "workflow_step"
Key string `gorm:"index:idx_scope_key,unique"` // e.g. "wfID_stepID"
CreatedAt time.Time
}
IdempotencyKey prevents duplicate processing of the same operation.
Click to show internal directories.
Click to hide internal directories.