sqlite

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventStoreSqlite

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

func NewEventStore

func NewEventStore(filepath string) (es EventStoreSqlite, err error)

func (*EventStoreSqlite) Next

func (es *EventStoreSqlite) Next(cursorID string) (eventMetadata *esam.EventMetadata, err error)

func (*EventStoreSqlite) Store

func (es *EventStoreSqlite) Store(eventName string, data interface{}, userId string, timestamp int64) (id string, err error)

type GormEvent

type GormEvent struct {
	gorm.Model
	EventID string `gorm:"column:event_id;index:event_id_idx" json:"event_id"`
	esam.EventMetadata
}

type GormProjection

type GormProjection struct {
	gorm.Model
	EventID string
}

type ProjectionSqlite

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

func NewProjection

func NewProjection(filepath string, es esam.EventStore) (p ProjectionSqlite, err error)

func (*ProjectionSqlite) Project

func (p *ProjectionSqlite) Project(ctx context.Context)

func (*ProjectionSqlite) RegisterEvent

func (p *ProjectionSqlite) RegisterEvent(eventName string, prObj esam.EventProjection) (err error)

Jump to

Keyboard shortcuts

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