aggregateaccess

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package aggregateaccess is the infrastructure side of package aggregate. It reaches the bookkeeping that aggregate.Base keeps unexported. Only eventstore and aggregatetest may import it (enforced by depguard).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init[I aggregate.ID](r aggregate.Root[I], id I)

Init sets the ID of a freshly allocated, zero-version Aggregate.

func MarkCommitted

func MarkCommitted[I aggregate.ID](r aggregate.Root[I])

MarkCommitted forgets the uncommitted events after a successful save.

func Replay

func Replay[I aggregate.ID](r aggregate.Root[I], e aggregate.Event)

Replay applies a historical event and increments the version without recording the event as uncommitted.

func UUID

func UUID[I aggregate.ID](r aggregate.Root[I]) uuid.UUID

UUID returns the stream ID of r.

func Uncommitted

func Uncommitted[I aggregate.ID](r aggregate.Root[I]) []aggregate.Event

Uncommitted returns a copy of the events raised since the last MarkCommitted, in raise order.

Types

This section is empty.

Directories

Path Synopsis
Package hook lets package aggregate hand its bookkeeping to internal/aggregateaccess without exporting it.
Package hook lets package aggregate hand its bookkeeping to internal/aggregateaccess without exporting it.

Jump to

Keyboard shortcuts

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