Documentation ¶
Overview ¶
Package client holds client domain logic
Package client holds client domain logic
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StreamName = fmt.Sprintf("%T", Client{})
StreamName for client domain
Functions ¶
func OnCreate ¶
func OnCreate(repository Repository, db *sql.DB) commandbus.CommandHandler
OnCreate creates command handler
func OnRemove ¶
func OnRemove(repository Repository, db *sql.DB) commandbus.CommandHandler
OnRemove creates command handler
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client aggregate root
func FromHistory ¶
FromHistory loads current aggregate root state by applying all events in order
type Repository ¶
Repository allows to get/save events from/to event store
type WasCreated ¶
type WasCreated struct { ID uuid.UUID `json:"id"` UserID uuid.UUID `json:"userId"` Secret string Domain string Data json.RawMessage `json:"data"` }
WasCreated event
type WasRemoved ¶
WasRemoved event
Click to show internal directories.
Click to hide internal directories.