Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct {
Title string
Body string
State NotificationState
Hidden bool
Servity NotificationServity
}
type NotificationAggregate ¶
type NotificationAggregate struct {
eventsourcing.AggregateRoot
Notification
}
func CreateNotification ¶
func CreateNotification( title string, body string, servity NotificationServity, metadata map[string][]string, ) (*NotificationAggregate, error)
func (*NotificationAggregate) Register ¶
func (n *NotificationAggregate) Register(r eventsourcing.RegisterFunc)
func (*NotificationAggregate) Transition ¶
func (n *NotificationAggregate) Transition(event eventsourcing.Event)
type NotificationCreated ¶
type NotificationCreated struct {
Title string
Body string
Servity NotificationServity
Metadata map[string][]string
}
Events
type NotificationHidden ¶
type NotificationHidden struct {
}
type NotificationRead ¶
type NotificationRead struct {
}
type NotificationServity ¶
type NotificationServity int
const ( NotificationServityInfo NotificationServity = iota NotificationServityWarning NotificationServityError )
func NotificationServityFromString ¶
func NotificationServityFromString(s string) (NotificationServity, error)
func (NotificationServity) MarshalJSON ¶
func (s NotificationServity) MarshalJSON() ([]byte, error)
func (NotificationServity) String ¶
func (s NotificationServity) String() string
func (*NotificationServity) UnmarshalJSON ¶
func (s *NotificationServity) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.