ddd

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTimestamp

func NewTimestamp() int64

NewTimestamp gets the current timestamp

func NewUUID

func NewUUID() string

NewUUID gets a new UUID

Types

type Aggregate added in v0.4.0

type Aggregate interface {
	Destroyed() bool
	Events() []Event
	UUID() string
}

Aggregate represents common functionality for aggregates mostly for unmarshaling

type DestroyedError

type DestroyedError struct {
	Entity string
}

DestroyedError represents an error when subsequent commands are called on a destroyed cluster

func (DestroyedError) Error

func (err DestroyedError) Error() string

type Event

type Event interface {
	EventType() string
}

Event is the basic interface all events implement

type IDError

type IDError struct{}

IDError represents an error with id mismatches, not set, etc.

func (IDError) Error

func (err IDError) Error() string

type InvalidArgumentError

type InvalidArgumentError struct {
	Arg string
	Val string
}

InvalidArgumentError represents an error with an argument out of range, etc.

func (InvalidArgumentError) Error

func (err InvalidArgumentError) Error() string

type NotFoundError

type NotFoundError struct {
	Entity string
}

NotFoundError represents when a cluster cannot be found

func (NotFoundError) Error

func (err NotFoundError) Error() string

type RequiredArgumentError

type RequiredArgumentError struct {
	Arg string
}

RequiredArgumentError represents an invalid argument passed to a command

func (RequiredArgumentError) Error

func (err RequiredArgumentError) Error() string

type UnsupportedEventError

type UnsupportedEventError struct {
	EventType string
	Type      string
}

UnsupportedEventError represents an invalid event for the aggregate

func (UnsupportedEventError) Error

func (err UnsupportedEventError) Error() string

Jump to

Keyboard shortcuts

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