Documentation
¶
Index ¶
- Constants
- func NewHouseholdAggregate(aggregateContext es.AggregateContext) es.AggregateRoot
- type AddRoomCommand
- type CreateHouseholdCommand
- type DeleteHouseholdCommand
- type DeleteRoomCommand
- type HouseholdAgregate
- type HouseholdCreatedEvent
- type HouseholdDeletedEvent
- type HouseholdDescription
- type HouseholdLocation
- type HouseholdName
- type HouseholdUpdatedEvent
- type Room
- type RoomAddedEvent
- type RoomDeletedEvent
- type RoomID
- type RoomName
- type RoomUpdatedEvent
- type Rooms
- type UpdateHouseholdCommand
- type UpdateRoomCommand
Constants ¶
View Source
const ( EventTypeHouseholdCreated es.EventType = "HouseholdCreatedEvent" EventTypeHouseholdUpdated es.EventType = "HouseholdUpdatedEvent" EventTypeHouseholdDeleted es.EventType = "HouseholdDeletedEvent" EventTypeRoomAdded es.EventType = "RoomAddedEvent" EventTypeRoomUpdated es.EventType = "RoomUpdatedEvent" EventTypeRoomDeleted es.EventType = "RoomDeletedEvent" )
View Source
const ( MinHouseholdNameLength = 3 MaxHouseholdNameLength = 50 MinHouseholdLocationLength = 3 MaxHouseholdLocationLength = 50 MaxHouseholdDescriptionLength = 200 MinRoomNameLength = 3 MaxRoomNameLength = 50 )
View Source
const (
HouseholdAggregateType es.AggregateType = "HouseholdAggregate"
)
Variables ¶
This section is empty.
Functions ¶
func NewHouseholdAggregate ¶
func NewHouseholdAggregate(aggregateContext es.AggregateContext) es.AggregateRoot
Types ¶
type AddRoomCommand ¶
func (AddRoomCommand) AggregateID ¶
func (c AddRoomCommand) AggregateID() es.AggregateID
func (AddRoomCommand) AggregateType ¶
func (c AddRoomCommand) AggregateType() es.AggregateType
type CreateHouseholdCommand ¶
type CreateHouseholdCommand struct { HouseholdID string UserID string Name string Location string Description string Order uint }
func (CreateHouseholdCommand) AggregateID ¶
func (c CreateHouseholdCommand) AggregateID() es.AggregateID
func (CreateHouseholdCommand) AggregateType ¶
func (c CreateHouseholdCommand) AggregateType() es.AggregateType
type DeleteHouseholdCommand ¶
func (DeleteHouseholdCommand) AggregateID ¶
func (c DeleteHouseholdCommand) AggregateID() es.AggregateID
func (DeleteHouseholdCommand) AggregateType ¶
func (c DeleteHouseholdCommand) AggregateType() es.AggregateType
type DeleteRoomCommand ¶
func (DeleteRoomCommand) AggregateID ¶
func (c DeleteRoomCommand) AggregateID() es.AggregateID
func (DeleteRoomCommand) AggregateType ¶
func (c DeleteRoomCommand) AggregateType() es.AggregateType
type HouseholdAgregate ¶
type HouseholdAgregate struct { es.AggregateContext UserID c.UserID Name HouseholdName Location HouseholdLocation Description HouseholdDescription Order uint Rooms Rooms Deleted bool }
func (*HouseholdAgregate) ApplyEvent ¶
func (a *HouseholdAgregate) ApplyEvent(event es.EventData)
func (*HouseholdAgregate) HandleCommand ¶
type HouseholdCreatedEvent ¶
type HouseholdCreatedEvent struct { HouseholdID string `json:"householdId"` UserID string `json:"userId"` Name string `json:"name"` Location string `json:"location"` Description string `json:"description"` Order uint `json:"order"` Timestamp int64 `json:"timestamp"` }
func (HouseholdCreatedEvent) EventType ¶
func (e HouseholdCreatedEvent) EventType() es.EventType
type HouseholdDeletedEvent ¶
type HouseholdDeletedEvent struct { HouseholdID string `json:"householdId"` UserID string `json:"userId"` }
func (HouseholdDeletedEvent) EventType ¶
func (e HouseholdDeletedEvent) EventType() es.EventType
type HouseholdDescription ¶
type HouseholdDescription string
func NewHouseholdDescription ¶
func NewHouseholdDescription(description string) (HouseholdDescription, error)
func (HouseholdDescription) String ¶
func (d HouseholdDescription) String() string
type HouseholdLocation ¶
type HouseholdLocation string
func NewHouseholdLocation ¶
func NewHouseholdLocation(location string) (HouseholdLocation, error)
func (HouseholdLocation) String ¶
func (l HouseholdLocation) String() string
type HouseholdName ¶
type HouseholdName string
func NewHouseholdName ¶
func NewHouseholdName(name string) (HouseholdName, error)
func (HouseholdName) String ¶
func (n HouseholdName) String() string
type HouseholdUpdatedEvent ¶
type HouseholdUpdatedEvent struct { HouseholdID string `json:"householdId"` UserID string `json:"userId"` Name string `json:"name"` Location string `json:"location"` Description string `json:"description"` Timestamp int64 `json:"timestamp"` }
func (HouseholdUpdatedEvent) EventType ¶
func (e HouseholdUpdatedEvent) EventType() es.EventType
type RoomAddedEvent ¶
type RoomAddedEvent struct { HouseholdID string `json:"householdId"` UserID string `json:"userId"` RoomID string `json:"roomId"` Name string `json:"name"` Order uint `json:"order"` Timestamp int64 `json:"timestamp"` }
func (RoomAddedEvent) EventType ¶
func (e RoomAddedEvent) EventType() es.EventType
type RoomDeletedEvent ¶
type RoomDeletedEvent struct { HouseholdID string `json:"householdId"` UserID string `json:"userId"` RoomID string `json:"roomId"` }
func (RoomDeletedEvent) EventType ¶
func (e RoomDeletedEvent) EventType() es.EventType
type RoomUpdatedEvent ¶
type RoomUpdatedEvent struct { HouseholdID string `json:"householdId"` UserID string `json:"userId"` RoomID string `json:"roomId"` Name string `json:"name"` Order uint `json:"order"` Timestamp int64 `json:"timestamp"` }
func (RoomUpdatedEvent) EventType ¶
func (e RoomUpdatedEvent) EventType() es.EventType
type UpdateHouseholdCommand ¶
type UpdateHouseholdCommand struct { HouseholdID string UserID string Name string Location string Description string }
func (UpdateHouseholdCommand) AggregateID ¶
func (c UpdateHouseholdCommand) AggregateID() es.AggregateID
func (UpdateHouseholdCommand) AggregateType ¶
func (c UpdateHouseholdCommand) AggregateType() es.AggregateType
type UpdateRoomCommand ¶
func (UpdateRoomCommand) AggregateID ¶
func (c UpdateRoomCommand) AggregateID() es.AggregateID
func (UpdateRoomCommand) AggregateType ¶
func (c UpdateRoomCommand) AggregateType() es.AggregateType
Click to show internal directories.
Click to hide internal directories.