store

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDbFileLocation

func GetDbFileLocation() string

Types

type DatabaseConnection

type DatabaseConnection struct {
	// contains filtered or unexported fields
}

func (*DatabaseConnection) GetDbConnection

func (d *DatabaseConnection) GetDbConnection() (*sql.DB, error)

func (*DatabaseConnection) IsInitialized

func (d *DatabaseConnection) IsInitialized() bool

func (*DatabaseConnection) SetUp

func (d *DatabaseConnection) SetUp()

func (*DatabaseConnection) Teardown

func (d *DatabaseConnection) Teardown() error

type EventRepository

type EventRepository struct {
	// contains filtered or unexported fields
}

EventRepository handles the storage of events.

func NewEventRepository

func NewEventRepository(db *sql.DB) *EventRepository

NewEventRepository creates a new EventRepository.

func (*EventRepository) AddEvents

func (e *EventRepository) AddEvents(events []models.Event) error

AddEvents adds multiple events to the repository.

func (*EventRepository) GetEventsForAggregate

func (e *EventRepository) GetEventsForAggregate(aggregateId string) ([]models.Event, error)

GetEventsForAggregate retrieves all events for a given aggregate ID.

func (*EventRepository) GetEventsSinceEvent

func (repo *EventRepository) GetEventsSinceEvent(eventId string, limit int) ([]models.Event, error)

GetEventsSinceEvent retrieves events since a given event ID with a limit.

Jump to

Keyboard shortcuts

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