snapshots

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snapshotter

type Snapshotter[T es.Projection] struct {
	// contains filtered or unexported fields
}

func NewSnapshotter

func NewSnapshotter[T es.Projection](esClient esApi.EventStoreClient, projector es.Projector[T]) *Snapshotter[T]

func (*Snapshotter[T]) CreateSnapshot

func (s *Snapshotter[T]) CreateSnapshot(ctx context.Context, eventFilter *esApi.EventFilter) (T, error)

CreateSnapshot creates a snapshot based on an event-filter and the corresponding projector for the aggregate of which the id is to be specified in the filter.

type UserRoleBindingSnapshotter

type UserRoleBindingSnapshotter struct {
	*Snapshotter[*projections.UserRoleBinding]
}

func NewUserRoleBindingSnapshotter

func NewUserRoleBindingSnapshotter(esClient esApi.EventStoreClient) *UserRoleBindingSnapshotter

func (*UserRoleBindingSnapshotter) CreateAllSnapshots

func (s *UserRoleBindingSnapshotter) CreateAllSnapshots(ctx context.Context, userId uuid.UUID, timestamp time.Time) []*projections.UserRoleBinding

CreateAllSnapshots returns all userRoleBinding snapshots of the user specified by its id

Jump to

Keyboard shortcuts

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