projection

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotificationOverview

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

This projection is a simple example of a projection that listens to all events and projects a list of the 10 most recent notifications.

func NewNotificationOverview

func NewNotificationOverview(
	storeManager fluxcore.StoreManager,
	register *eventsourcing.Register,
) *NotificationOverview

func (*NotificationOverview) Project

func (n *NotificationOverview) Project(ctx context.Context)

func (*NotificationOverview) RecentNotifications

func (n *NotificationOverview) RecentNotifications() []NotificationOverviewEntry

type NotificationOverviewEntry

type NotificationOverviewEntry struct {
	Id        string
	Title     string
	Servity   model.NotificationServity
	CreatedAt time.Time
}

type NotificationView

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

NotificationView is project that creates a query table that lists all notifications.

func NewNotificationView

func NewNotificationView(
	db *sql.DB,
	storeManager fluxcore.StoreManager,
	register *eventsourcing.Register,
) *NotificationView

func (*NotificationView) Project

func (v *NotificationView) Project(ctx context.Context)

type NotificationViewState

type NotificationViewState struct {
	LastVersion core.Version `json:"last_version"`
}

func (*NotificationViewState) Scan

func (s *NotificationViewState) Scan(value interface{}) error

Jump to

Keyboard shortcuts

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