domain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package domain defines the core domain entities and types for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutboxEvent

type OutboxEvent struct {
	ID          int64             `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"
)

type User

type User struct {
	ID        int64     `db:"id" json:"id"`
	Name      string    `db:"name" json:"name" fieldtag:"insert,update"`
	Email     string    `db:"email" json:"email" fieldtag:"insert,update"`
	Password  string    `db:"password" json:"-" fieldtag:"insert,update"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`
	UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
}

User represents a user in the system

Jump to

Keyboard shortcuts

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