card

package
v0.0.0-...-3f93e99 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregate

type Aggregate interface {
	Root() Entity
	Name(string) error
	Description(string) error
}

Aggregate interface

type CreatedEvent

type CreatedEvent struct {
	Entity
}

CreatedEvent type

type DeletedEvent

type DeletedEvent struct {
	Entity
}

DeletedEvent type

type DescriptionChangedEvent

type DescriptionChangedEvent struct {
	ID       kernel.MemberID
	OldValue string
	NewValue string
}

DescriptionChangedEvent type

type Entity

type Entity struct {
	ID          kernel.MemberID
	Name        string
	Description string
}

Entity type

type NameChangedEvent

type NameChangedEvent struct {
	ID       kernel.MemberID
	OldValue string
	NewValue string
}

NameChangedEvent type

type Service

type Service struct {
	event.Bus
}

Service - card domain service

func CreateService

func CreateService(bus event.Bus) *Service

CreateService - creates card domain service

func (*Service) Create

func (s *Service) Create(id kernel.MemberID) (*Entity, error)

Create card

func (*Service) Delete

func (s *Service) Delete(entity Entity) error

Delete card

func (*Service) Get

func (s *Service) Get(entity Entity) (Aggregate, error)

Get aggregate

Jump to

Keyboard shortcuts

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