Documentation ¶
Index ¶
- Constants
- func AccountCommandTypes() *accountCommandTypes
- func AccountEventTypes() *accountEventTypes
- type Account
- type AccountAggregateInitializer
- func (o *AccountAggregateInitializer) RegisterForLogged(handler eventhorizon.EventHandler)
- func (o *AccountAggregateInitializer) RegisterForSendCreatedConfirmationed(handler eventhorizon.EventHandler)
- func (o *AccountAggregateInitializer) RegisterForSendDisabledConfirmationed(handler eventhorizon.EventHandler)
- func (o *AccountAggregateInitializer) RegisterForSendEnabledConfirmationed(handler eventhorizon.EventHandler)
- type AccountCommandHandler
- func (o *AccountCommandHandler) AddCreatePreparer(preparer func(*CreateAccount, *Account) (err error))
- func (o *AccountCommandHandler) AddDeletePreparer(preparer func(*DeleteAccount, *Account) (err error))
- func (o *AccountCommandHandler) AddDisablePreparer(preparer func(*DisableAccount, *Account) (err error))
- func (o *AccountCommandHandler) AddEnablePreparer(preparer func(*EnableAccount, *Account) (err error))
- func (o *AccountCommandHandler) AddLoginPreparer(preparer func(*LoginAccount, *Account) (err error))
- func (o *AccountCommandHandler) AddSendCreatedConfirmationPreparer(preparer func(*SendAccountCreatedConfirmation, *Account) (err error))
- func (o *AccountCommandHandler) AddSendDisabledConfirmationPreparer(preparer func(*SendAccountDisabledConfirmation, *Account) (err error))
- func (o *AccountCommandHandler) AddSendEnabledConfirmationPreparer(preparer func(*SendAccountEnabledConfirmation, *Account) (err error))
- func (o *AccountCommandHandler) AddUpdatePreparer(preparer func(*UpdateAccount, *Account) (err error))
- func (o *AccountCommandHandler) Execute(cmd eventhorizon.Command, entity eventhorizon.Entity, ...) (err error)
- func (o *AccountCommandHandler) SetupCommandHandler() (err error)
- type AccountCommandType
- func (o AccountCommandType) GetBSON() (ret interface{}, err error)
- func (o *AccountCommandType) IsCreateAccount() bool
- func (o *AccountCommandType) IsDeleteAccount() bool
- func (o *AccountCommandType) IsDisableAccount() bool
- func (o *AccountCommandType) IsEnableAccount() bool
- func (o *AccountCommandType) IsLoginAccount() bool
- func (o *AccountCommandType) IsSendAccountCreatedConfirmation() bool
- func (o *AccountCommandType) IsSendAccountDisabledConfirmation() bool
- func (o *AccountCommandType) IsSendAccountEnabledConfirmation() bool
- func (o *AccountCommandType) IsUpdateAccount() bool
- func (o AccountCommandType) MarshalJSON() (ret []byte, err error)
- func (o *AccountCommandType) Name() string
- func (o *AccountCommandType) Ordinal() int
- func (o *AccountCommandType) SetBSON(raw bson.Raw) (err error)
- func (o *AccountCommandType) UnmarshalJSON(data []byte) (err error)
- type AccountConfirmationDisabledExecutor
- type AccountConfirmationDisabledHandler
- type AccountConfirmationEnabledExecutor
- type AccountConfirmationEnabledHandler
- type AccountConfirmationExecutors
- type AccountConfirmationHandlers
- type AccountConfirmationInitialExecutor
- type AccountConfirmationInitialHandler
- type AccountCreated
- type AccountDeleted
- type AccountDeletedExecutor
- type AccountDeletedHandler
- type AccountDisabled
- type AccountDisabledExecutor
- type AccountDisabledHandler
- type AccountEnabled
- type AccountEnabledExecutor
- type AccountEnabledHandler
- type AccountEventHandler
- type AccountEventType
- func (o AccountEventType) GetBSON() (ret interface{}, err error)
- func (o *AccountEventType) IsAccountCreated() bool
- func (o *AccountEventType) IsAccountDeleted() bool
- func (o *AccountEventType) IsAccountDisabled() bool
- func (o *AccountEventType) IsAccountEnabled() bool
- func (o *AccountEventType) IsAccountLogged() bool
- func (o *AccountEventType) IsAccountUpdated() bool
- func (o *AccountEventType) IsSendCreatedAccountConfirmationed() bool
- func (o *AccountEventType) IsSendDisabledAccountConfirmationed() bool
- func (o *AccountEventType) IsSendEnabledAccountConfirmationed() bool
- func (o AccountEventType) MarshalJSON() (ret []byte, err error)
- func (o *AccountEventType) Name() string
- func (o *AccountEventType) Ordinal() int
- func (o *AccountEventType) SetBSON(raw bson.Raw) (err error)
- func (o *AccountEventType) UnmarshalJSON(data []byte) (err error)
- type AccountExecutors
- type AccountExistExecutor
- type AccountExistHandler
- type AccountHandlers
- type AccountHttpCommandHandler
- func (o *AccountHttpCommandHandler) Create(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpCommandHandler) Delete(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpCommandHandler) Disable(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpCommandHandler) Enable(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpCommandHandler) Login(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpCommandHandler) SendCreatedConfirmation(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpCommandHandler) SendDisabledConfirmation(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpCommandHandler) SendEnabledConfirmation(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpCommandHandler) Update(w http.ResponseWriter, r *http.Request)
- type AccountHttpQueryHandler
- func (o *AccountHttpQueryHandler) CountAll(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpQueryHandler) CountById(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpQueryHandler) ExistAll(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpQueryHandler) ExistById(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpQueryHandler) FindAll(w http.ResponseWriter, r *http.Request)
- func (o *AccountHttpQueryHandler) FindById(w http.ResponseWriter, r *http.Request)
- type AccountInitialExecutor
- type AccountInitialHandler
- type AccountLogged
- type AccountQueryRepository
- func (o *AccountQueryRepository) CountAll() (ret int, err error)
- func (o *AccountQueryRepository) CountById(id uuid.UUID) (ret int, err error)
- func (o *AccountQueryRepository) ExistAll() (ret bool, err error)
- func (o *AccountQueryRepository) ExistById(id uuid.UUID) (ret bool, err error)
- func (o *AccountQueryRepository) FindAll() (ret []*Account, err error)
- func (o *AccountQueryRepository) FindById(id uuid.UUID) (ret *Account, err error)
- type AccountRouter
- type AccountUpdated
- type AuthEventhorizonInitializer
- type AuthRouter
- type CreateAccount
- type DeleteAccount
- type DisableAccount
- type EnableAccount
- type LoginAccount
- type PersonName
- type SendAccountCreatedConfirmation
- type SendAccountDisabledConfirmation
- type SendAccountEnabledConfirmation
- type SendCreatedAccountConfirmationed
- type SendDisabledAccountConfirmationed
- type SendEnabledAccountConfirmationed
- type UpdateAccount
- type UserCredentials
Constants ¶
View Source
const ( SendAccountEnabledConfirmationCommand eventhorizon.CommandType = "SendAccountEnabledConfirmation" SendAccountDisabledConfirmationCommand eventhorizon.CommandType = "SendAccountDisabledConfirmation" LoginAccountCommand eventhorizon.CommandType = "LoginAccount" SendAccountCreatedConfirmationCommand eventhorizon.CommandType = "SendAccountCreatedConfirmation" CreateAccountCommand eventhorizon.CommandType = "CreateAccount" DeleteAccountCommand eventhorizon.CommandType = "DeleteAccount" EnableAccountCommand eventhorizon.CommandType = "EnableAccount" DisableAccountCommand eventhorizon.CommandType = "DisableAccount" UpdateAccountCommand eventhorizon.CommandType = "UpdateAccount" )
View Source
const ( AccountCreatedEvent eventhorizon.EventType = "AccountCreated" AccountUpdatedEvent eventhorizon.EventType = "AccountUpdated" AccountDeletedEvent eventhorizon.EventType = "AccountDeleted" AccountEnabledEvent eventhorizon.EventType = "AccountEnabled" AccountDisabledEvent eventhorizon.EventType = "AccountDisabled" SendEnabledAccountConfirmationedEvent eventhorizon.EventType = "SendEnabledAccountConfirmationed" SendDisabledAccountConfirmationedEvent eventhorizon.EventType = "SendDisabledAccountConfirmationed" AccountLoggedEvent eventhorizon.EventType = "AccountLogged" SendCreatedAccountConfirmationedEvent eventhorizon.EventType = "SendCreatedAccountConfirmationed" )
View Source
const AccountAggregateType eventhorizon.AggregateType = "Account"
Variables ¶
This section is empty.
Functions ¶
func AccountCommandTypes ¶
func AccountCommandTypes() *accountCommandTypes
func AccountEventTypes ¶
func AccountEventTypes() *accountEventTypes
Types ¶
type Account ¶
type Account struct { Name *PersonName `json:"name" eh:"optional"` Username string `json:"username" eh:"optional"` Password string `json:"password" eh:"optional"` Email string `json:"email" eh:"optional"` Roles []string `json:"roles" eh:"optional"` Disabled bool `json:"disabled" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func NewAccount ¶
func NewAccount() (ret *Account)
func (*Account) AddToRoles ¶
type AccountAggregateInitializer ¶
type AccountAggregateInitializer struct { *eh.AggregateInitializer *AccountCommandHandler *AccountEventHandler ProjectorHandler *AccountEventHandler `json:"projectorHandler" eh:"optional"` }
func NewAccountAggregateInitializer ¶
func NewAccountAggregateInitializer(eventStore eventhorizon.EventStore, eventBus eventhorizon.EventBus, commandBus *bus.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *AccountAggregateInitializer)
func (*AccountAggregateInitializer) RegisterForLogged ¶
func (o *AccountAggregateInitializer) RegisterForLogged(handler eventhorizon.EventHandler)
func (*AccountAggregateInitializer) RegisterForSendCreatedConfirmationed ¶
func (o *AccountAggregateInitializer) RegisterForSendCreatedConfirmationed(handler eventhorizon.EventHandler)
func (*AccountAggregateInitializer) RegisterForSendDisabledConfirmationed ¶
func (o *AccountAggregateInitializer) RegisterForSendDisabledConfirmationed(handler eventhorizon.EventHandler)
func (*AccountAggregateInitializer) RegisterForSendEnabledConfirmationed ¶
func (o *AccountAggregateInitializer) RegisterForSendEnabledConfirmationed(handler eventhorizon.EventHandler)
type AccountCommandHandler ¶
type AccountCommandHandler struct { SendEnabledConfirmationHandler func(*SendAccountEnabledConfirmation, *Account, eh.AggregateStoreEvent) (err error) `json:"sendEnabledConfirmationHandler" eh:"optional"` SendDisabledConfirmationHandler func(*SendAccountDisabledConfirmation, *Account, eh.AggregateStoreEvent) (err error) `json:"sendDisabledConfirmationHandler" eh:"optional"` LoginHandler func(*LoginAccount, *Account, eh.AggregateStoreEvent) (err error) `json:"loginHandler" eh:"optional"` SendCreatedConfirmationHandler func(*SendAccountCreatedConfirmation, *Account, eh.AggregateStoreEvent) (err error) `json:"sendCreatedConfirmationHandler" eh:"optional"` CreateHandler func(*CreateAccount, *Account, eh.AggregateStoreEvent) (err error) `json:"createHandler" eh:"optional"` DeleteHandler func(*DeleteAccount, *Account, eh.AggregateStoreEvent) (err error) `json:"deleteHandler" eh:"optional"` EnableHandler func(*EnableAccount, *Account, eh.AggregateStoreEvent) (err error) `json:"enableHandler" eh:"optional"` DisableHandler func(*DisableAccount, *Account, eh.AggregateStoreEvent) (err error) `json:"disableHandler" eh:"optional"` UpdateHandler func(*UpdateAccount, *Account, eh.AggregateStoreEvent) (err error) `json:"updateHandler" eh:"optional"` }
func (*AccountCommandHandler) AddCreatePreparer ¶
func (o *AccountCommandHandler) AddCreatePreparer(preparer func(*CreateAccount, *Account) (err error))
func (*AccountCommandHandler) AddDeletePreparer ¶
func (o *AccountCommandHandler) AddDeletePreparer(preparer func(*DeleteAccount, *Account) (err error))
func (*AccountCommandHandler) AddDisablePreparer ¶
func (o *AccountCommandHandler) AddDisablePreparer(preparer func(*DisableAccount, *Account) (err error))
func (*AccountCommandHandler) AddEnablePreparer ¶
func (o *AccountCommandHandler) AddEnablePreparer(preparer func(*EnableAccount, *Account) (err error))
func (*AccountCommandHandler) AddLoginPreparer ¶
func (o *AccountCommandHandler) AddLoginPreparer(preparer func(*LoginAccount, *Account) (err error))
func (*AccountCommandHandler) AddSendCreatedConfirmationPreparer ¶
func (o *AccountCommandHandler) AddSendCreatedConfirmationPreparer(preparer func(*SendAccountCreatedConfirmation, *Account) (err error))
func (*AccountCommandHandler) AddSendDisabledConfirmationPreparer ¶
func (o *AccountCommandHandler) AddSendDisabledConfirmationPreparer(preparer func(*SendAccountDisabledConfirmation, *Account) (err error))
func (*AccountCommandHandler) AddSendEnabledConfirmationPreparer ¶
func (o *AccountCommandHandler) AddSendEnabledConfirmationPreparer(preparer func(*SendAccountEnabledConfirmation, *Account) (err error))
func (*AccountCommandHandler) AddUpdatePreparer ¶
func (o *AccountCommandHandler) AddUpdatePreparer(preparer func(*UpdateAccount, *Account) (err error))
func (*AccountCommandHandler) Execute ¶
func (o *AccountCommandHandler) Execute(cmd eventhorizon.Command, entity eventhorizon.Entity, store eh.AggregateStoreEvent) (err error)
func (*AccountCommandHandler) SetupCommandHandler ¶
func (o *AccountCommandHandler) SetupCommandHandler() (err error)
type AccountCommandType ¶
type AccountCommandType struct {
// contains filtered or unexported fields
}
func (AccountCommandType) GetBSON ¶
func (o AccountCommandType) GetBSON() (ret interface{}, err error)
func (*AccountCommandType) IsCreateAccount ¶
func (o *AccountCommandType) IsCreateAccount() bool
func (*AccountCommandType) IsDeleteAccount ¶
func (o *AccountCommandType) IsDeleteAccount() bool
func (*AccountCommandType) IsDisableAccount ¶
func (o *AccountCommandType) IsDisableAccount() bool
func (*AccountCommandType) IsEnableAccount ¶
func (o *AccountCommandType) IsEnableAccount() bool
func (*AccountCommandType) IsLoginAccount ¶
func (o *AccountCommandType) IsLoginAccount() bool
func (*AccountCommandType) IsSendAccountCreatedConfirmation ¶
func (o *AccountCommandType) IsSendAccountCreatedConfirmation() bool
func (*AccountCommandType) IsSendAccountDisabledConfirmation ¶
func (o *AccountCommandType) IsSendAccountDisabledConfirmation() bool
func (*AccountCommandType) IsSendAccountEnabledConfirmation ¶
func (o *AccountCommandType) IsSendAccountEnabledConfirmation() bool
func (*AccountCommandType) IsUpdateAccount ¶
func (o *AccountCommandType) IsUpdateAccount() bool
func (AccountCommandType) MarshalJSON ¶
func (o AccountCommandType) MarshalJSON() (ret []byte, err error)
func (*AccountCommandType) Name ¶
func (o *AccountCommandType) Name() string
func (*AccountCommandType) Ordinal ¶
func (o *AccountCommandType) Ordinal() int
func (*AccountCommandType) UnmarshalJSON ¶
func (o *AccountCommandType) UnmarshalJSON(data []byte) (err error)
type AccountConfirmationDisabledExecutor ¶
type AccountConfirmationDisabledExecutor struct { }
func NewAccountConfirmationDisabledExecutor ¶
func NewAccountConfirmationDisabledExecutor() (ret *AccountConfirmationDisabledExecutor)
type AccountConfirmationDisabledHandler ¶
type AccountConfirmationDisabledHandler struct {
EnabledHandler func(*AccountEnabled, *Account) (err error) `json:"enabledHandler" eh:"optional"`
}
func NewAccountConfirmationDisabledHandler ¶
func NewAccountConfirmationDisabledHandler() (ret *AccountConfirmationDisabledHandler)
func (*AccountConfirmationDisabledHandler) Apply ¶
func (o *AccountConfirmationDisabledHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountConfirmationDisabledHandler) SetupEventHandler ¶
func (o *AccountConfirmationDisabledHandler) SetupEventHandler() (err error)
type AccountConfirmationEnabledExecutor ¶
type AccountConfirmationEnabledExecutor struct { }
func NewAccountConfirmationEnabledExecutor ¶
func NewAccountConfirmationEnabledExecutor() (ret *AccountConfirmationEnabledExecutor)
type AccountConfirmationEnabledHandler ¶
type AccountConfirmationEnabledHandler struct {
DisabledHandler func(*AccountDisabled, *Account) (err error) `json:"disabledHandler" eh:"optional"`
}
func NewAccountConfirmationEnabledHandler ¶
func NewAccountConfirmationEnabledHandler() (ret *AccountConfirmationEnabledHandler)
func (*AccountConfirmationEnabledHandler) Apply ¶
func (o *AccountConfirmationEnabledHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountConfirmationEnabledHandler) SetupEventHandler ¶
func (o *AccountConfirmationEnabledHandler) SetupEventHandler() (err error)
type AccountConfirmationExecutors ¶
type AccountConfirmationExecutors struct { Disabled *AccountConfirmationDisabledExecutor `json:"disabled" eh:"optional"` Enabled *AccountConfirmationEnabledExecutor `json:"enabled" eh:"optional"` Initial *AccountConfirmationInitialExecutor `json:"initial" eh:"optional"` }
func NewAccountConfirmationExecutors ¶
func NewAccountConfirmationExecutors() (ret *AccountConfirmationExecutors)
type AccountConfirmationHandlers ¶
type AccountConfirmationHandlers struct { Disabled *AccountConfirmationDisabledHandler `json:"disabled" eh:"optional"` Enabled *AccountConfirmationEnabledHandler `json:"enabled" eh:"optional"` Initial *AccountConfirmationInitialHandler `json:"initial" eh:"optional"` }
func NewAccountConfirmationHandlers ¶
func NewAccountConfirmationHandlers() (ret *AccountConfirmationHandlers)
type AccountConfirmationInitialExecutor ¶
type AccountConfirmationInitialExecutor struct { }
func NewAccountConfirmationInitialExecutor ¶
func NewAccountConfirmationInitialExecutor() (ret *AccountConfirmationInitialExecutor)
type AccountConfirmationInitialHandler ¶
type AccountConfirmationInitialHandler struct {
CreatedHandler func(*AccountCreated, *Account) (err error) `json:"createdHandler" eh:"optional"`
}
func NewAccountConfirmationInitialHandler ¶
func NewAccountConfirmationInitialHandler() (ret *AccountConfirmationInitialHandler)
func (*AccountConfirmationInitialHandler) Apply ¶
func (o *AccountConfirmationInitialHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountConfirmationInitialHandler) SetupEventHandler ¶
func (o *AccountConfirmationInitialHandler) SetupEventHandler() (err error)
type AccountCreated ¶
type AccountCreated struct { Name *PersonName `json:"name" eh:"optional"` Username string `json:"username" eh:"optional"` Password string `json:"password" eh:"optional"` Email string `json:"email" eh:"optional"` Roles []string `json:"roles" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*AccountCreated) AddToRoles ¶
func (o *AccountCreated) AddToRoles(item string) string
type AccountDeleted ¶
type AccountDeletedExecutor ¶
type AccountDeletedExecutor struct { }
func NewAccountDeletedExecutor ¶
func NewAccountDeletedExecutor() (ret *AccountDeletedExecutor)
type AccountDeletedHandler ¶
type AccountDeletedHandler struct { }
func NewAccountDeletedHandler ¶
func NewAccountDeletedHandler() (ret *AccountDeletedHandler)
func (*AccountDeletedHandler) Apply ¶
func (o *AccountDeletedHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountDeletedHandler) SetupEventHandler ¶
func (o *AccountDeletedHandler) SetupEventHandler() (err error)
type AccountDisabled ¶
type AccountDisabledExecutor ¶
type AccountDisabledExecutor struct { }
func NewAccountDisabledExecutor ¶
func NewAccountDisabledExecutor() (ret *AccountDisabledExecutor)
type AccountDisabledHandler ¶
type AccountDisabledHandler struct {
EnabledHandler func(*AccountEnabled, *Account) (err error) `json:"enabledHandler" eh:"optional"`
}
func NewAccountDisabledHandler ¶
func NewAccountDisabledHandler() (ret *AccountDisabledHandler)
func (*AccountDisabledHandler) Apply ¶
func (o *AccountDisabledHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountDisabledHandler) SetupEventHandler ¶
func (o *AccountDisabledHandler) SetupEventHandler() (err error)
type AccountEnabled ¶
type AccountEnabledExecutor ¶
type AccountEnabledExecutor struct { }
func NewAccountEnabledExecutor ¶
func NewAccountEnabledExecutor() (ret *AccountEnabledExecutor)
type AccountEnabledHandler ¶
type AccountEnabledHandler struct {
DisabledHandler func(*AccountDisabled, *Account) (err error) `json:"disabledHandler" eh:"optional"`
}
func NewAccountEnabledHandler ¶
func NewAccountEnabledHandler() (ret *AccountEnabledHandler)
func (*AccountEnabledHandler) Apply ¶
func (o *AccountEnabledHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountEnabledHandler) SetupEventHandler ¶
func (o *AccountEnabledHandler) SetupEventHandler() (err error)
type AccountEventHandler ¶
type AccountEventHandler struct { CreatedHandler func(*AccountCreated, *Account) (err error) `json:"createdHandler" eh:"optional"` DeletedHandler func(*AccountDeleted, *Account) (err error) `json:"deletedHandler" eh:"optional"` DisabledHandler func(*AccountDisabled, *Account) (err error) `json:"disabledHandler" eh:"optional"` EnabledHandler func(*AccountEnabled, *Account) (err error) `json:"enabledHandler" eh:"optional"` LoggedHandler func(*AccountLogged, *Account) (err error) `json:"loggedHandler" eh:"optional"` SendCreatedConfirmationedHandler func(*SendCreatedAccountConfirmationed, *Account) (err error) `json:"sendCreatedConfirmationedHandler" eh:"optional"` SendDisabledConfirmationedHandler func(*SendDisabledAccountConfirmationed, *Account) (err error) `json:"sendDisabledConfirmationedHandler" eh:"optional"` SendEnabledConfirmationedHandler func(*SendEnabledAccountConfirmationed, *Account) (err error) `json:"sendEnabledConfirmationedHandler" eh:"optional"` UpdatedHandler func(*AccountUpdated, *Account) (err error) `json:"updatedHandler" eh:"optional"` }
func (*AccountEventHandler) Apply ¶
func (o *AccountEventHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountEventHandler) SetupEventHandler ¶
func (o *AccountEventHandler) SetupEventHandler() (err error)
type AccountEventType ¶
type AccountEventType struct {
// contains filtered or unexported fields
}
func (AccountEventType) GetBSON ¶
func (o AccountEventType) GetBSON() (ret interface{}, err error)
func (*AccountEventType) IsAccountCreated ¶
func (o *AccountEventType) IsAccountCreated() bool
func (*AccountEventType) IsAccountDeleted ¶
func (o *AccountEventType) IsAccountDeleted() bool
func (*AccountEventType) IsAccountDisabled ¶
func (o *AccountEventType) IsAccountDisabled() bool
func (*AccountEventType) IsAccountEnabled ¶
func (o *AccountEventType) IsAccountEnabled() bool
func (*AccountEventType) IsAccountLogged ¶
func (o *AccountEventType) IsAccountLogged() bool
func (*AccountEventType) IsAccountUpdated ¶
func (o *AccountEventType) IsAccountUpdated() bool
func (*AccountEventType) IsSendCreatedAccountConfirmationed ¶
func (o *AccountEventType) IsSendCreatedAccountConfirmationed() bool
func (*AccountEventType) IsSendDisabledAccountConfirmationed ¶
func (o *AccountEventType) IsSendDisabledAccountConfirmationed() bool
func (*AccountEventType) IsSendEnabledAccountConfirmationed ¶
func (o *AccountEventType) IsSendEnabledAccountConfirmationed() bool
func (AccountEventType) MarshalJSON ¶
func (o AccountEventType) MarshalJSON() (ret []byte, err error)
func (*AccountEventType) Name ¶
func (o *AccountEventType) Name() string
func (*AccountEventType) Ordinal ¶
func (o *AccountEventType) Ordinal() int
func (*AccountEventType) UnmarshalJSON ¶
func (o *AccountEventType) UnmarshalJSON(data []byte) (err error)
type AccountExecutors ¶
type AccountExecutors struct { Deleted *AccountDeletedExecutor `json:"deleted" eh:"optional"` Disabled *AccountDisabledExecutor `json:"disabled" eh:"optional"` Enabled *AccountEnabledExecutor `json:"enabled" eh:"optional"` Exist *AccountExistExecutor `json:"exist" eh:"optional"` Initial *AccountInitialExecutor `json:"initial" eh:"optional"` }
func NewAccountExecutors ¶
func NewAccountExecutors() (ret *AccountExecutors)
type AccountExistExecutor ¶
type AccountExistExecutor struct { }
func NewAccountExistExecutor ¶
func NewAccountExistExecutor() (ret *AccountExistExecutor)
type AccountExistHandler ¶
type AccountExistHandler struct { DeletedHandler func(*AccountDeleted, *Account) (err error) `json:"deletedHandler" eh:"optional"` UpdatedHandler func(*AccountUpdated, *Account) (err error) `json:"updatedHandler" eh:"optional"` }
func NewAccountExistHandler ¶
func NewAccountExistHandler() (ret *AccountExistHandler)
func (*AccountExistHandler) Apply ¶
func (o *AccountExistHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountExistHandler) SetupEventHandler ¶
func (o *AccountExistHandler) SetupEventHandler() (err error)
type AccountHandlers ¶
type AccountHandlers struct { Deleted *AccountDeletedHandler `json:"deleted" eh:"optional"` Disabled *AccountDisabledHandler `json:"disabled" eh:"optional"` Enabled *AccountEnabledHandler `json:"enabled" eh:"optional"` Exist *AccountExistHandler `json:"exist" eh:"optional"` Initial *AccountInitialHandler `json:"initial" eh:"optional"` }
func NewAccountHandlers ¶
func NewAccountHandlers() (ret *AccountHandlers)
type AccountHttpCommandHandler ¶
type AccountHttpCommandHandler struct {
*eh.HttpCommandHandler
}
func NewAccountHttpCommandHandler ¶
func NewAccountHttpCommandHandler(context context.Context, commandBus eventhorizon.CommandHandler) (ret *AccountHttpCommandHandler)
func (*AccountHttpCommandHandler) Create ¶
func (o *AccountHttpCommandHandler) Create(w http.ResponseWriter, r *http.Request)
func (*AccountHttpCommandHandler) Delete ¶
func (o *AccountHttpCommandHandler) Delete(w http.ResponseWriter, r *http.Request)
func (*AccountHttpCommandHandler) Disable ¶
func (o *AccountHttpCommandHandler) Disable(w http.ResponseWriter, r *http.Request)
func (*AccountHttpCommandHandler) Enable ¶
func (o *AccountHttpCommandHandler) Enable(w http.ResponseWriter, r *http.Request)
func (*AccountHttpCommandHandler) Login ¶
func (o *AccountHttpCommandHandler) Login(w http.ResponseWriter, r *http.Request)
func (*AccountHttpCommandHandler) SendCreatedConfirmation ¶
func (o *AccountHttpCommandHandler) SendCreatedConfirmation(w http.ResponseWriter, r *http.Request)
func (*AccountHttpCommandHandler) SendDisabledConfirmation ¶
func (o *AccountHttpCommandHandler) SendDisabledConfirmation(w http.ResponseWriter, r *http.Request)
func (*AccountHttpCommandHandler) SendEnabledConfirmation ¶
func (o *AccountHttpCommandHandler) SendEnabledConfirmation(w http.ResponseWriter, r *http.Request)
func (*AccountHttpCommandHandler) Update ¶
func (o *AccountHttpCommandHandler) Update(w http.ResponseWriter, r *http.Request)
type AccountHttpQueryHandler ¶
type AccountHttpQueryHandler struct { *eh.HttpQueryHandler QueryRepository *AccountQueryRepository `json:"queryRepository" eh:"optional"` }
func NewAccountHttpQueryHandler ¶
func NewAccountHttpQueryHandler(queryRepository *AccountQueryRepository) (ret *AccountHttpQueryHandler)
func (*AccountHttpQueryHandler) CountAll ¶
func (o *AccountHttpQueryHandler) CountAll(w http.ResponseWriter, r *http.Request)
func (*AccountHttpQueryHandler) CountById ¶
func (o *AccountHttpQueryHandler) CountById(w http.ResponseWriter, r *http.Request)
func (*AccountHttpQueryHandler) ExistAll ¶
func (o *AccountHttpQueryHandler) ExistAll(w http.ResponseWriter, r *http.Request)
func (*AccountHttpQueryHandler) ExistById ¶
func (o *AccountHttpQueryHandler) ExistById(w http.ResponseWriter, r *http.Request)
func (*AccountHttpQueryHandler) FindAll ¶
func (o *AccountHttpQueryHandler) FindAll(w http.ResponseWriter, r *http.Request)
func (*AccountHttpQueryHandler) FindById ¶
func (o *AccountHttpQueryHandler) FindById(w http.ResponseWriter, r *http.Request)
type AccountInitialExecutor ¶
type AccountInitialExecutor struct { }
func NewAccountInitialExecutor ¶
func NewAccountInitialExecutor() (ret *AccountInitialExecutor)
type AccountInitialHandler ¶
type AccountInitialHandler struct {
CreatedHandler func(*AccountCreated, *Account) (err error) `json:"createdHandler" eh:"optional"`
}
func NewAccountInitialHandler ¶
func NewAccountInitialHandler() (ret *AccountInitialHandler)
func (*AccountInitialHandler) Apply ¶
func (o *AccountInitialHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*AccountInitialHandler) SetupEventHandler ¶
func (o *AccountInitialHandler) SetupEventHandler() (err error)
type AccountLogged ¶
type AccountQueryRepository ¶
type AccountQueryRepository struct {
// contains filtered or unexported fields
}
func NewAccountQueryRepository ¶
func NewAccountQueryRepository(repo eventhorizon.ReadRepo, context context.Context) (ret *AccountQueryRepository)
func (*AccountQueryRepository) CountAll ¶
func (o *AccountQueryRepository) CountAll() (ret int, err error)
func (*AccountQueryRepository) CountById ¶
func (o *AccountQueryRepository) CountById(id uuid.UUID) (ret int, err error)
func (*AccountQueryRepository) ExistAll ¶
func (o *AccountQueryRepository) ExistAll() (ret bool, err error)
func (*AccountQueryRepository) ExistById ¶
func (o *AccountQueryRepository) ExistById(id uuid.UUID) (ret bool, err error)
func (*AccountQueryRepository) FindAll ¶
func (o *AccountQueryRepository) FindAll() (ret []*Account, err error)
type AccountRouter ¶
type AccountRouter struct { PathPrefix string `json:"pathPrefix" eh:"optional"` QueryHandler *AccountHttpQueryHandler `json:"queryHandler" eh:"optional"` CommandHandler *AccountHttpCommandHandler `json:"commandHandler" eh:"optional"` Router *mux.Router `json:"router" eh:"optional"` }
func NewAccountRouter ¶
func NewAccountRouter(pathPrefix string, context context.Context, commandBus eventhorizon.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *AccountRouter)
type AccountUpdated ¶
type AccountUpdated struct { Name *PersonName `json:"name" eh:"optional"` Username string `json:"username" eh:"optional"` Password string `json:"password" eh:"optional"` Email string `json:"email" eh:"optional"` Roles []string `json:"roles" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*AccountUpdated) AddToRoles ¶
func (o *AccountUpdated) AddToRoles(item string) string
type AuthEventhorizonInitializer ¶
type AuthEventhorizonInitializer struct { AccountAggregateInitializer *AccountAggregateInitializer `json:"accountAggregateInitializer" eh:"optional"` // contains filtered or unexported fields }
func NewAuthEventhorizonInitializer ¶
func NewAuthEventhorizonInitializer(eventStore eventhorizon.EventStore, eventBus eventhorizon.EventBus, commandBus *bus.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *AuthEventhorizonInitializer)
func (*AuthEventhorizonInitializer) ActivatePasswordEncryption ¶
func (o *AuthEventhorizonInitializer) ActivatePasswordEncryption()
func (*AuthEventhorizonInitializer) Setup ¶
func (o *AuthEventhorizonInitializer) Setup() (err error)
type AuthRouter ¶
type AuthRouter struct { PathPrefix string `json:"pathPrefix" eh:"optional"` AccountRouter *AccountRouter `json:"accountRouter" eh:"optional"` Router *mux.Router `json:"router" eh:"optional"` }
func NewAuthRouter ¶
func NewAuthRouter(pathPrefix string, context context.Context, commandBus *bus.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *AuthRouter)
type CreateAccount ¶
type CreateAccount struct { Name *PersonName `json:"name" eh:"optional"` Username string `json:"username" eh:"optional"` Password string `json:"password" eh:"optional"` Email string `json:"email" eh:"optional"` Roles []string `json:"roles" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*CreateAccount) AddToRoles ¶
func (o *CreateAccount) AddToRoles(item string) string
func (*CreateAccount) AggregateID ¶
func (o *CreateAccount) AggregateID() uuid.UUID
func (*CreateAccount) AggregateType ¶
func (o *CreateAccount) AggregateType() eventhorizon.AggregateType
func (*CreateAccount) CommandType ¶
func (o *CreateAccount) CommandType() eventhorizon.CommandType
type DeleteAccount ¶
func (*DeleteAccount) AggregateID ¶
func (o *DeleteAccount) AggregateID() uuid.UUID
func (*DeleteAccount) AggregateType ¶
func (o *DeleteAccount) AggregateType() eventhorizon.AggregateType
func (*DeleteAccount) CommandType ¶
func (o *DeleteAccount) CommandType() eventhorizon.CommandType
type DisableAccount ¶
func (*DisableAccount) AggregateID ¶
func (o *DisableAccount) AggregateID() uuid.UUID
func (*DisableAccount) AggregateType ¶
func (o *DisableAccount) AggregateType() eventhorizon.AggregateType
func (*DisableAccount) CommandType ¶
func (o *DisableAccount) CommandType() eventhorizon.CommandType
type EnableAccount ¶
func (*EnableAccount) AggregateID ¶
func (o *EnableAccount) AggregateID() uuid.UUID
func (*EnableAccount) AggregateType ¶
func (o *EnableAccount) AggregateType() eventhorizon.AggregateType
func (*EnableAccount) CommandType ¶
func (o *EnableAccount) CommandType() eventhorizon.CommandType
type LoginAccount ¶
type LoginAccount struct { Username string `json:"username" eh:"optional"` Email string `json:"email" eh:"optional"` Password string `json:"password" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*LoginAccount) AggregateID ¶
func (o *LoginAccount) AggregateID() uuid.UUID
func (*LoginAccount) AggregateType ¶
func (o *LoginAccount) AggregateType() eventhorizon.AggregateType
func (*LoginAccount) CommandType ¶
func (o *LoginAccount) CommandType() eventhorizon.CommandType
type PersonName ¶
type PersonName struct { First string `json:"first" eh:"optional"` Last string `json:"last" eh:"optional"` }
func NewPersonName ¶
func NewPersonName() (ret *PersonName)
type SendAccountCreatedConfirmation ¶
func (*SendAccountCreatedConfirmation) AggregateID ¶
func (o *SendAccountCreatedConfirmation) AggregateID() uuid.UUID
func (*SendAccountCreatedConfirmation) AggregateType ¶
func (o *SendAccountCreatedConfirmation) AggregateType() eventhorizon.AggregateType
func (*SendAccountCreatedConfirmation) CommandType ¶
func (o *SendAccountCreatedConfirmation) CommandType() eventhorizon.CommandType
type SendAccountDisabledConfirmation ¶
func (*SendAccountDisabledConfirmation) AggregateID ¶
func (o *SendAccountDisabledConfirmation) AggregateID() uuid.UUID
func (*SendAccountDisabledConfirmation) AggregateType ¶
func (o *SendAccountDisabledConfirmation) AggregateType() eventhorizon.AggregateType
func (*SendAccountDisabledConfirmation) CommandType ¶
func (o *SendAccountDisabledConfirmation) CommandType() eventhorizon.CommandType
type SendAccountEnabledConfirmation ¶
func (*SendAccountEnabledConfirmation) AggregateID ¶
func (o *SendAccountEnabledConfirmation) AggregateID() uuid.UUID
func (*SendAccountEnabledConfirmation) AggregateType ¶
func (o *SendAccountEnabledConfirmation) AggregateType() eventhorizon.AggregateType
func (*SendAccountEnabledConfirmation) CommandType ¶
func (o *SendAccountEnabledConfirmation) CommandType() eventhorizon.CommandType
type UpdateAccount ¶
type UpdateAccount struct { Name *PersonName `json:"name" eh:"optional"` Username string `json:"username" eh:"optional"` Password string `json:"password" eh:"optional"` Email string `json:"email" eh:"optional"` Roles []string `json:"roles" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*UpdateAccount) AddToRoles ¶
func (o *UpdateAccount) AddToRoles(item string) string
func (*UpdateAccount) AggregateID ¶
func (o *UpdateAccount) AggregateID() uuid.UUID
func (*UpdateAccount) AggregateType ¶
func (o *UpdateAccount) AggregateType() eventhorizon.AggregateType
func (*UpdateAccount) CommandType ¶
func (o *UpdateAccount) CommandType() eventhorizon.CommandType
type UserCredentials ¶
type UserCredentials struct { Username string `json:"username" eh:"optional"` Password string `json:"password" eh:"optional"` }
func NewUserCredentials ¶
func NewUserCredentials() (ret *UserCredentials)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.