mixins

package
v0.11.7 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventMigrationsFor

func EventMigrationsFor(schema, table string) []migrate.Migration

EventMigrationsFor returns a set of migrations to get the current event stream table schema. You should wrap this in WithPrefix to assign a unique prefix to these migrations for each event stream.

Types

type EventMutation

type EventMutation interface {
	ID() (uuid.UUID, bool)
	SetScopeType(string)
	SetScopeId(string)
	SetEventType(string)
	SetHappenedAt(time.Time)
	SetData(json.RawMessage)
}

type EventStream

type EventStream struct {
	mixin.Schema
}

EventStream is a mixin that provides the standard schema for the sixriver event sourcing data model. While it is possible to add extra fields to this schema, you should not do so. Every field in this mixin is declared as Immutable as events should never be modified after saving.

func (EventStream) Fields

func (EventStream) Fields() []ent.Field

func (EventStream) Hooks

func (EventStream) Hooks() []ent.Hook

func (EventStream) Indexes

func (EventStream) Indexes() []ent.Index

Jump to

Keyboard shortcuts

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