Documentation ¶
Overview ¶
Package token holds token domain logic
Package token holds token domain logic
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StreamName = fmt.Sprintf("%T", Token{})
StreamName for token 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 Repository ¶
Repository allows to get/save events from/to event store
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
Token aggregate root
func FromHistory ¶
FromHistory loads current aggregate root state by applying all events in order
type WasCreated ¶
type WasCreated struct { ID uuid.UUID `json:"id"` ClientID uuid.UUID `json:"clientId"` UserID uuid.UUID `json:"userId"` Code string `json:"code"` Scope string `json:"scope"` Access string `json:"access"` Refresh string `json:"refresh"` Data json.RawMessage `json:"data"` }
WasCreated event
type WasRemoved ¶
WasRemoved event
Click to show internal directories.
Click to hide internal directories.