event

package
v0.0.0-...-882c073 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Types = []Type{
	ProjectCreated,
}

Functions

This section is empty.

Types

type AggregateType

type AggregateType string
const (
	Project AggregateType = "project"
)

func (AggregateType) String

func (t AggregateType) String() string

type Event

type Event interface {
	Type() Type
	AggregateType() AggregateType
	AggregateId() uuid.UUID
}

type ProjectCreatedEvent

type ProjectCreatedEvent struct {
	ProjectId uuid.UUID
	Name      string
}

func (ProjectCreatedEvent) AggregateId

func (e ProjectCreatedEvent) AggregateId() uuid.UUID

func (ProjectCreatedEvent) AggregateType

func (ProjectCreatedEvent) AggregateType() AggregateType

func (ProjectCreatedEvent) Type

func (ProjectCreatedEvent) Type() Type

type Type

type Type string
const (
	ProjectCreated Type = "project-created"
)

func TypeFromString

func TypeFromString(s string) (Type, error)

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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