domain

package
v0.0.0-...-4c581ce Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 4 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 {
	GetID() uuid.UUID
	IncrementVersion()
	UpdateUpdatedAt(time.Time)
	AggregateType() string
}

type BaseAggregate

type BaseAggregate struct {
	ID        uuid.UUID      `json:"id"`
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"updated_at"`
	DeletedAt *time.Time     `json:"deleted_at"`
	Version   uint64         `json:"version"`
	Events    []events.Event `json:"events"`
}

func (*BaseAggregate) GetID

func (agg *BaseAggregate) GetID() uuid.UUID

func (*BaseAggregate) IncrementVersion

func (agg *BaseAggregate) IncrementVersion()

func (*BaseAggregate) UpdateUpdatedAt

func (agg *BaseAggregate) UpdateUpdatedAt(t time.Time)

type EventBus

type EventBus interface {
	Publish(event dao.Event) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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