Documentation ¶
Index ¶
- Constants
- func ChurchCommandTypes() *churchCommandTypes
- func ChurchEventTypes() *churchEventTypes
- func Genders() *genders
- func GraduationCommandTypes() *graduationCommandTypes
- func GraduationEventTypes() *graduationEventTypes
- func GraduationLevels() *graduationLevels
- func MaritalStates() *maritalStates
- func PersonNameParse(value string) (ret *auth.PersonName, ok bool)
- func ProfileCommandTypes() *profileCommandTypes
- func ProfileEventTypes() *profileEventTypes
- type Address
- type Church
- type ChurchAggregateInitializer
- type ChurchCli
- type ChurchClient
- type ChurchCommandHandler
- func (o *ChurchCommandHandler) AddCreatePreparer(preparer func(*CreateChurch, *Church) (err error))
- func (o *ChurchCommandHandler) AddDeletePreparer(preparer func(*DeleteChurch, *Church) (err error))
- func (o *ChurchCommandHandler) AddUpdatePreparer(preparer func(*UpdateChurch, *Church) (err error))
- func (o *ChurchCommandHandler) Execute(cmd eventhorizon.Command, entity eventhorizon.Entity, ...) (err error)
- func (o *ChurchCommandHandler) SetupCommandHandler() (err error)
- type ChurchCommandType
- func (o ChurchCommandType) GetBSON() (ret interface{}, err error)
- func (o *ChurchCommandType) IsCreateChurch() bool
- func (o *ChurchCommandType) IsDeleteChurch() bool
- func (o *ChurchCommandType) IsUpdateChurch() bool
- func (o ChurchCommandType) MarshalJSON() (ret []byte, err error)
- func (o *ChurchCommandType) Name() string
- func (o *ChurchCommandType) Ordinal() int
- func (o *ChurchCommandType) SetBSON(raw bson.Raw) (err error)
- func (o *ChurchCommandType) UnmarshalJSON(data []byte) (err error)
- type ChurchCreated
- type ChurchDeleted
- type ChurchEventHandler
- type ChurchEventType
- func (o ChurchEventType) GetBSON() (ret interface{}, err error)
- func (o *ChurchEventType) IsChurchCreated() bool
- func (o *ChurchEventType) IsChurchDeleted() bool
- func (o *ChurchEventType) IsChurchUpdated() bool
- func (o ChurchEventType) MarshalJSON() (ret []byte, err error)
- func (o *ChurchEventType) Name() string
- func (o *ChurchEventType) Ordinal() int
- func (o *ChurchEventType) SetBSON(raw bson.Raw) (err error)
- func (o *ChurchEventType) UnmarshalJSON(data []byte) (err error)
- type ChurchExecutors
- type ChurchHandlers
- type ChurchHttpCommandHandler
- type ChurchHttpQueryHandler
- func (o *ChurchHttpQueryHandler) CountAll(w http.ResponseWriter, r *http.Request)
- func (o *ChurchHttpQueryHandler) CountById(w http.ResponseWriter, r *http.Request)
- func (o *ChurchHttpQueryHandler) ExistAll(w http.ResponseWriter, r *http.Request)
- func (o *ChurchHttpQueryHandler) ExistById(w http.ResponseWriter, r *http.Request)
- func (o *ChurchHttpQueryHandler) FindAll(w http.ResponseWriter, r *http.Request)
- func (o *ChurchHttpQueryHandler) FindById(w http.ResponseWriter, r *http.Request)
- type ChurchInfo
- type ChurchInitialExecutor
- type ChurchInitialHandler
- type ChurchQueryRepository
- func (o *ChurchQueryRepository) CountAll() (ret int, err error)
- func (o *ChurchQueryRepository) CountById(id uuid.UUID) (ret int, err error)
- func (o *ChurchQueryRepository) ExistAll() (ret bool, err error)
- func (o *ChurchQueryRepository) ExistById(id uuid.UUID) (ret bool, err error)
- func (o *ChurchQueryRepository) FindAll() (ret []*Church, err error)
- func (o *ChurchQueryRepository) FindById(id uuid.UUID) (ret *Church, err error)
- type ChurchRouter
- type ChurchUpdated
- type Contact
- type CreateChurch
- type CreateGraduation
- type CreateProfile
- type DeleteChurch
- type DeleteGraduation
- type DeleteProfile
- type Education
- type Family
- type Gender
- func (o Gender) GetBSON() (ret interface{}, err error)
- func (o *Gender) IsFemale() bool
- func (o *Gender) IsMale() bool
- func (o *Gender) IsUnknown() bool
- func (o Gender) MarshalJSON() (ret []byte, err error)
- func (o *Gender) Name() string
- func (o *Gender) Ordinal() int
- func (o *Gender) SetBSON(raw bson.Raw) (err error)
- func (o *Gender) UnmarshalJSON(data []byte) (err error)
- type Graduation
- type GraduationAggregateInitializer
- type GraduationCli
- type GraduationClient
- type GraduationCommandHandler
- func (o *GraduationCommandHandler) AddCreatePreparer(preparer func(*CreateGraduation, *Graduation) (err error))
- func (o *GraduationCommandHandler) AddDeletePreparer(preparer func(*DeleteGraduation, *Graduation) (err error))
- func (o *GraduationCommandHandler) AddUpdatePreparer(preparer func(*UpdateGraduation, *Graduation) (err error))
- func (o *GraduationCommandHandler) Execute(cmd eventhorizon.Command, entity eventhorizon.Entity, ...) (err error)
- func (o *GraduationCommandHandler) SetupCommandHandler() (err error)
- type GraduationCommandType
- func (o GraduationCommandType) GetBSON() (ret interface{}, err error)
- func (o *GraduationCommandType) IsCreateGraduation() bool
- func (o *GraduationCommandType) IsDeleteGraduation() bool
- func (o *GraduationCommandType) IsUpdateGraduation() bool
- func (o GraduationCommandType) MarshalJSON() (ret []byte, err error)
- func (o *GraduationCommandType) Name() string
- func (o *GraduationCommandType) Ordinal() int
- func (o *GraduationCommandType) SetBSON(raw bson.Raw) (err error)
- func (o *GraduationCommandType) UnmarshalJSON(data []byte) (err error)
- type GraduationCreated
- type GraduationDeleted
- type GraduationEventHandler
- type GraduationEventType
- func (o GraduationEventType) GetBSON() (ret interface{}, err error)
- func (o *GraduationEventType) IsGraduationCreated() bool
- func (o *GraduationEventType) IsGraduationDeleted() bool
- func (o *GraduationEventType) IsGraduationUpdated() bool
- func (o GraduationEventType) MarshalJSON() (ret []byte, err error)
- func (o *GraduationEventType) Name() string
- func (o *GraduationEventType) Ordinal() int
- func (o *GraduationEventType) SetBSON(raw bson.Raw) (err error)
- func (o *GraduationEventType) UnmarshalJSON(data []byte) (err error)
- type GraduationExecutors
- type GraduationHandlers
- type GraduationHttpCommandHandler
- type GraduationHttpQueryHandler
- func (o *GraduationHttpQueryHandler) CountAll(w http.ResponseWriter, r *http.Request)
- func (o *GraduationHttpQueryHandler) CountById(w http.ResponseWriter, r *http.Request)
- func (o *GraduationHttpQueryHandler) ExistAll(w http.ResponseWriter, r *http.Request)
- func (o *GraduationHttpQueryHandler) ExistById(w http.ResponseWriter, r *http.Request)
- func (o *GraduationHttpQueryHandler) FindAll(w http.ResponseWriter, r *http.Request)
- func (o *GraduationHttpQueryHandler) FindById(w http.ResponseWriter, r *http.Request)
- type GraduationInitialExecutor
- type GraduationInitialHandler
- type GraduationLevel
- func (o GraduationLevel) GetBSON() (ret interface{}, err error)
- func (o *GraduationLevel) IsCollege() bool
- func (o *GraduationLevel) IsHighSchool() bool
- func (o *GraduationLevel) IsMiddleSchool() bool
- func (o *GraduationLevel) IsSecondarySchool() bool
- func (o *GraduationLevel) IsTechnicalCollege() bool
- func (o *GraduationLevel) IsUnknown() bool
- func (o GraduationLevel) MarshalJSON() (ret []byte, err error)
- func (o *GraduationLevel) Name() string
- func (o *GraduationLevel) Ordinal() int
- func (o *GraduationLevel) SetBSON(raw bson.Raw) (err error)
- func (o *GraduationLevel) UnmarshalJSON(data []byte) (err error)
- type GraduationQueryRepository
- func (o *GraduationQueryRepository) CountAll() (ret int, err error)
- func (o *GraduationQueryRepository) CountById(id uuid.UUID) (ret int, err error)
- func (o *GraduationQueryRepository) ExistAll() (ret bool, err error)
- func (o *GraduationQueryRepository) ExistById(id uuid.UUID) (ret bool, err error)
- func (o *GraduationQueryRepository) FindAll() (ret []*Graduation, err error)
- func (o *GraduationQueryRepository) FindById(id uuid.UUID) (ret *Graduation, err error)
- type GraduationRouter
- type GraduationUpdated
- type MaritalState
- func (o MaritalState) GetBSON() (ret interface{}, err error)
- func (o *MaritalState) IsDivorced() bool
- func (o *MaritalState) IsMarried() bool
- func (o *MaritalState) IsSeparated() bool
- func (o *MaritalState) IsSingle() bool
- func (o *MaritalState) IsUnknown() bool
- func (o *MaritalState) IsWidowed() bool
- func (o MaritalState) MarshalJSON() (ret []byte, err error)
- func (o *MaritalState) Name() string
- func (o *MaritalState) Ordinal() int
- func (o *MaritalState) SetBSON(raw bson.Raw) (err error)
- func (o *MaritalState) UnmarshalJSON(data []byte) (err error)
- type PersonCli
- type PersonClient
- type PersonEventhorizonInitializer
- type PersonName
- type PersonRouter
- type Profile
- type ProfileAggregateInitializer
- type ProfileCli
- type ProfileClient
- type ProfileCommandHandler
- func (o *ProfileCommandHandler) AddCreatePreparer(preparer func(*CreateProfile, *Profile) (err error))
- func (o *ProfileCommandHandler) AddDeletePreparer(preparer func(*DeleteProfile, *Profile) (err error))
- func (o *ProfileCommandHandler) AddUpdatePreparer(preparer func(*UpdateProfile, *Profile) (err error))
- func (o *ProfileCommandHandler) Execute(cmd eventhorizon.Command, entity eventhorizon.Entity, ...) (err error)
- func (o *ProfileCommandHandler) SetupCommandHandler() (err error)
- type ProfileCommandType
- func (o ProfileCommandType) GetBSON() (ret interface{}, err error)
- func (o *ProfileCommandType) IsCreateProfile() bool
- func (o *ProfileCommandType) IsDeleteProfile() bool
- func (o *ProfileCommandType) IsUpdateProfile() bool
- func (o ProfileCommandType) MarshalJSON() (ret []byte, err error)
- func (o *ProfileCommandType) Name() string
- func (o *ProfileCommandType) Ordinal() int
- func (o *ProfileCommandType) SetBSON(raw bson.Raw) (err error)
- func (o *ProfileCommandType) UnmarshalJSON(data []byte) (err error)
- type ProfileCreated
- type ProfileDeleted
- type ProfileEventHandler
- type ProfileEventType
- func (o ProfileEventType) GetBSON() (ret interface{}, err error)
- func (o *ProfileEventType) IsProfileCreated() bool
- func (o *ProfileEventType) IsProfileDeleted() bool
- func (o *ProfileEventType) IsProfileUpdated() bool
- func (o ProfileEventType) MarshalJSON() (ret []byte, err error)
- func (o *ProfileEventType) Name() string
- func (o *ProfileEventType) Ordinal() int
- func (o *ProfileEventType) SetBSON(raw bson.Raw) (err error)
- func (o *ProfileEventType) UnmarshalJSON(data []byte) (err error)
- type ProfileExecutors
- type ProfileHandlers
- type ProfileHttpCommandHandler
- type ProfileHttpQueryHandler
- func (o *ProfileHttpQueryHandler) CountAll(w http.ResponseWriter, r *http.Request)
- func (o *ProfileHttpQueryHandler) CountById(w http.ResponseWriter, r *http.Request)
- func (o *ProfileHttpQueryHandler) ExistAll(w http.ResponseWriter, r *http.Request)
- func (o *ProfileHttpQueryHandler) ExistById(w http.ResponseWriter, r *http.Request)
- func (o *ProfileHttpQueryHandler) FindAll(w http.ResponseWriter, r *http.Request)
- func (o *ProfileHttpQueryHandler) FindByEmail(w http.ResponseWriter, r *http.Request)
- func (o *ProfileHttpQueryHandler) FindById(w http.ResponseWriter, r *http.Request)
- func (o *ProfileHttpQueryHandler) FindByPhone(w http.ResponseWriter, r *http.Request)
- type ProfileInitialExecutor
- type ProfileInitialHandler
- type ProfileQueryRepository
- func (o *ProfileQueryRepository) CountAll() (ret int, err error)
- func (o *ProfileQueryRepository) CountById(id uuid.UUID) (ret int, err error)
- func (o *ProfileQueryRepository) ExistAll() (ret bool, err error)
- func (o *ProfileQueryRepository) ExistById(id uuid.UUID) (ret bool, err error)
- func (o *ProfileQueryRepository) FindAll() (ret []*Profile, err error)
- func (o *ProfileQueryRepository) FindByEmail(email string) (ret *Profile, err error)
- func (o *ProfileQueryRepository) FindById(id uuid.UUID) (ret *Profile, err error)
- func (o *ProfileQueryRepository) FindByPhone(phone string) (ret *Profile, err error)
- type ProfileRouter
- type ProfileUpdated
- type UpdateChurch
- type UpdateGraduation
- type UpdateProfile
Constants ¶
View Source
const ( CreateChurchCommand eventhorizon.CommandType = "CreateChurch" DeleteChurchCommand eventhorizon.CommandType = "DeleteChurch" UpdateChurchCommand eventhorizon.CommandType = "UpdateChurch" )
View Source
const ( CreateGraduationCommand eventhorizon.CommandType = "CreateGraduation" DeleteGraduationCommand eventhorizon.CommandType = "DeleteGraduation" UpdateGraduationCommand eventhorizon.CommandType = "UpdateGraduation" )
View Source
const ( CreateProfileCommand eventhorizon.CommandType = "CreateProfile" DeleteProfileCommand eventhorizon.CommandType = "DeleteProfile" UpdateProfileCommand eventhorizon.CommandType = "UpdateProfile" )
View Source
const ( ChurchCreatedEvent eventhorizon.EventType = "ChurchCreated" ChurchDeletedEvent eventhorizon.EventType = "ChurchDeleted" ChurchUpdatedEvent eventhorizon.EventType = "ChurchUpdated" )
View Source
const ( GraduationCreatedEvent eventhorizon.EventType = "GraduationCreated" GraduationDeletedEvent eventhorizon.EventType = "GraduationDeleted" GraduationUpdatedEvent eventhorizon.EventType = "GraduationUpdated" )
View Source
const ( ProfileCreatedEvent eventhorizon.EventType = "ProfileCreated" ProfileDeletedEvent eventhorizon.EventType = "ProfileDeleted" ProfileUpdatedEvent eventhorizon.EventType = "ProfileUpdated" )
View Source
const ChurchAggregateType eventhorizon.AggregateType = "Church"
View Source
const GraduationAggregateType eventhorizon.AggregateType = "Graduation"
View Source
const ProfileAggregateType eventhorizon.AggregateType = "Profile"
Variables ¶
This section is empty.
Functions ¶
func ChurchCommandTypes ¶
func ChurchCommandTypes() *churchCommandTypes
func ChurchEventTypes ¶
func ChurchEventTypes() *churchEventTypes
func GraduationCommandTypes ¶
func GraduationCommandTypes() *graduationCommandTypes
func GraduationEventTypes ¶
func GraduationEventTypes() *graduationEventTypes
func GraduationLevels ¶
func GraduationLevels() *graduationLevels
func MaritalStates ¶
func MaritalStates() *maritalStates
func PersonNameParse ¶
func PersonNameParse(value string) (ret *auth.PersonName, ok bool)
func ProfileCommandTypes ¶
func ProfileCommandTypes() *profileCommandTypes
func ProfileEventTypes ¶
func ProfileEventTypes() *profileEventTypes
Types ¶
type Address ¶
type Address struct { Street string `json:"street" eh:"optional"` Suite string `json:"suite" eh:"optional"` City string `json:"city" eh:"optional"` Code string `json:"code" eh:"optional"` Country string `json:"country" eh:"optional"` }
func NewAddress ¶
func NewAddress() (ret *Address)
func NewAddressByPropNames ¶
func NewAddresssByPropNames ¶
type Church ¶
type Church struct { Name string `json:"name" eh:"optional"` Address *Address `json:"address" eh:"optional"` Pastor *PersonName `json:"pastor" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` Association string `json:"association" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func NewChurchByPropNames ¶
func NewChurchesByPropNames ¶
type ChurchAggregateInitializer ¶
type ChurchAggregateInitializer struct { *eh.AggregateInitializer *ChurchCommandHandler *ChurchEventHandler ProjectorHandler *ChurchEventHandler `json:"projectorHandler" eh:"optional"` }
func NewChurchAggregateInitializer ¶
func NewChurchAggregateInitializer(eventStore eventhorizon.EventStore, eventBus eventhorizon.EventBus, commandBus *bus.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *ChurchAggregateInitializer)
type ChurchClient ¶
type ChurchClient struct { Url string `json:"url" eh:"optional"` Client *http.Client `json:"client" eh:"optional"` }
func NewChurchClient ¶
func NewChurchClient(url string, client *http.Client) (ret *ChurchClient)
func (*ChurchClient) Create ¶
func (o *ChurchClient) Create(items []*Church) (err error)
func (*ChurchClient) ImportJSON ¶
func (o *ChurchClient) ImportJSON(fileJSON string) (err error)
func (*ChurchClient) ReadFileJSON ¶
func (o *ChurchClient) ReadFileJSON(fileJSON string) (ret []*Church, err error)
type ChurchCommandHandler ¶
type ChurchCommandHandler struct { CreateHandler func(*CreateChurch, *Church, eh.AggregateStoreEvent) (err error) `json:"createHandler" eh:"optional"` DeleteHandler func(*DeleteChurch, *Church, eh.AggregateStoreEvent) (err error) `json:"deleteHandler" eh:"optional"` UpdateHandler func(*UpdateChurch, *Church, eh.AggregateStoreEvent) (err error) `json:"updateHandler" eh:"optional"` }
func (*ChurchCommandHandler) AddCreatePreparer ¶
func (o *ChurchCommandHandler) AddCreatePreparer(preparer func(*CreateChurch, *Church) (err error))
func (*ChurchCommandHandler) AddDeletePreparer ¶
func (o *ChurchCommandHandler) AddDeletePreparer(preparer func(*DeleteChurch, *Church) (err error))
func (*ChurchCommandHandler) AddUpdatePreparer ¶
func (o *ChurchCommandHandler) AddUpdatePreparer(preparer func(*UpdateChurch, *Church) (err error))
func (*ChurchCommandHandler) Execute ¶
func (o *ChurchCommandHandler) Execute(cmd eventhorizon.Command, entity eventhorizon.Entity, store eh.AggregateStoreEvent) (err error)
func (*ChurchCommandHandler) SetupCommandHandler ¶
func (o *ChurchCommandHandler) SetupCommandHandler() (err error)
type ChurchCommandType ¶
type ChurchCommandType struct {
// contains filtered or unexported fields
}
func (ChurchCommandType) GetBSON ¶
func (o ChurchCommandType) GetBSON() (ret interface{}, err error)
func (*ChurchCommandType) IsCreateChurch ¶
func (o *ChurchCommandType) IsCreateChurch() bool
func (*ChurchCommandType) IsDeleteChurch ¶
func (o *ChurchCommandType) IsDeleteChurch() bool
func (*ChurchCommandType) IsUpdateChurch ¶
func (o *ChurchCommandType) IsUpdateChurch() bool
func (ChurchCommandType) MarshalJSON ¶
func (o ChurchCommandType) MarshalJSON() (ret []byte, err error)
func (*ChurchCommandType) Name ¶
func (o *ChurchCommandType) Name() string
func (*ChurchCommandType) Ordinal ¶
func (o *ChurchCommandType) Ordinal() int
func (*ChurchCommandType) UnmarshalJSON ¶
func (o *ChurchCommandType) UnmarshalJSON(data []byte) (err error)
type ChurchCreated ¶
type ChurchCreated struct { Name string `json:"name" eh:"optional"` Address *Address `json:"address" eh:"optional"` Pastor *PersonName `json:"pastor" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` Association string `json:"association" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
type ChurchDeleted ¶
type ChurchEventHandler ¶
type ChurchEventHandler struct { CreatedHandler func(*ChurchCreated, *Church) (err error) `json:"createdHandler" eh:"optional"` DeletedHandler func(*ChurchDeleted, *Church) (err error) `json:"deletedHandler" eh:"optional"` UpdatedHandler func(*ChurchUpdated, *Church) (err error) `json:"updatedHandler" eh:"optional"` }
func (*ChurchEventHandler) Apply ¶
func (o *ChurchEventHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*ChurchEventHandler) SetupEventHandler ¶
func (o *ChurchEventHandler) SetupEventHandler() (err error)
type ChurchEventType ¶
type ChurchEventType struct {
// contains filtered or unexported fields
}
func (ChurchEventType) GetBSON ¶
func (o ChurchEventType) GetBSON() (ret interface{}, err error)
func (*ChurchEventType) IsChurchCreated ¶
func (o *ChurchEventType) IsChurchCreated() bool
func (*ChurchEventType) IsChurchDeleted ¶
func (o *ChurchEventType) IsChurchDeleted() bool
func (*ChurchEventType) IsChurchUpdated ¶
func (o *ChurchEventType) IsChurchUpdated() bool
func (ChurchEventType) MarshalJSON ¶
func (o ChurchEventType) MarshalJSON() (ret []byte, err error)
func (*ChurchEventType) Name ¶
func (o *ChurchEventType) Name() string
func (*ChurchEventType) Ordinal ¶
func (o *ChurchEventType) Ordinal() int
func (*ChurchEventType) UnmarshalJSON ¶
func (o *ChurchEventType) UnmarshalJSON(data []byte) (err error)
type ChurchExecutors ¶
type ChurchExecutors struct {
Initial *ChurchInitialExecutor `json:"initial" eh:"optional"`
}
func NewChurchExecutors ¶
func NewChurchExecutors() (ret *ChurchExecutors)
type ChurchHandlers ¶
type ChurchHandlers struct {
Initial *ChurchInitialHandler `json:"initial" eh:"optional"`
}
func NewChurchHandlers ¶
func NewChurchHandlers() (ret *ChurchHandlers)
type ChurchHttpCommandHandler ¶
type ChurchHttpCommandHandler struct {
*eh.HttpCommandHandler
}
func NewChurchHttpCommandHandler ¶
func NewChurchHttpCommandHandler(context context.Context, commandBus eventhorizon.CommandHandler) (ret *ChurchHttpCommandHandler)
func (*ChurchHttpCommandHandler) Create ¶
func (o *ChurchHttpCommandHandler) Create(w http.ResponseWriter, r *http.Request)
func (*ChurchHttpCommandHandler) Delete ¶
func (o *ChurchHttpCommandHandler) Delete(w http.ResponseWriter, r *http.Request)
func (*ChurchHttpCommandHandler) Update ¶
func (o *ChurchHttpCommandHandler) Update(w http.ResponseWriter, r *http.Request)
type ChurchHttpQueryHandler ¶
type ChurchHttpQueryHandler struct { *eh.HttpQueryHandler QueryRepository *ChurchQueryRepository `json:"queryRepository" eh:"optional"` }
func NewChurchHttpQueryHandler ¶
func NewChurchHttpQueryHandler(queryRepository *ChurchQueryRepository) (ret *ChurchHttpQueryHandler)
func (*ChurchHttpQueryHandler) CountAll ¶
func (o *ChurchHttpQueryHandler) CountAll(w http.ResponseWriter, r *http.Request)
func (*ChurchHttpQueryHandler) CountById ¶
func (o *ChurchHttpQueryHandler) CountById(w http.ResponseWriter, r *http.Request)
func (*ChurchHttpQueryHandler) ExistAll ¶
func (o *ChurchHttpQueryHandler) ExistAll(w http.ResponseWriter, r *http.Request)
func (*ChurchHttpQueryHandler) ExistById ¶
func (o *ChurchHttpQueryHandler) ExistById(w http.ResponseWriter, r *http.Request)
func (*ChurchHttpQueryHandler) FindAll ¶
func (o *ChurchHttpQueryHandler) FindAll(w http.ResponseWriter, r *http.Request)
func (*ChurchHttpQueryHandler) FindById ¶
func (o *ChurchHttpQueryHandler) FindById(w http.ResponseWriter, r *http.Request)
type ChurchInfo ¶
type ChurchInfo struct { Church string `json:"church" eh:"optional"` Member bool `json:"member" eh:"optional"` Services string `json:"services" eh:"optional"` }
func NewChurchInfo ¶
func NewChurchInfo() (ret *ChurchInfo)
func NewChurchInfoByPropNames ¶
func NewChurchInfoByPropNames(intSalt int) (ret *ChurchInfo)
func NewChurchInfosByPropNames ¶
func NewChurchInfosByPropNames(count int) []*ChurchInfo
type ChurchInitialExecutor ¶
type ChurchInitialExecutor struct { }
func NewChurchInitialExecutor ¶
func NewChurchInitialExecutor() (ret *ChurchInitialExecutor)
type ChurchInitialHandler ¶
type ChurchInitialHandler struct { }
func NewChurchInitialHandler ¶
func NewChurchInitialHandler() (ret *ChurchInitialHandler)
func (*ChurchInitialHandler) Apply ¶
func (o *ChurchInitialHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*ChurchInitialHandler) SetupEventHandler ¶
func (o *ChurchInitialHandler) SetupEventHandler() (err error)
type ChurchQueryRepository ¶
type ChurchQueryRepository struct {
// contains filtered or unexported fields
}
func NewChurchQueryRepository ¶
func NewChurchQueryRepository(repo eventhorizon.ReadRepo, context context.Context) (ret *ChurchQueryRepository)
func (*ChurchQueryRepository) CountAll ¶
func (o *ChurchQueryRepository) CountAll() (ret int, err error)
func (*ChurchQueryRepository) CountById ¶
func (o *ChurchQueryRepository) CountById(id uuid.UUID) (ret int, err error)
func (*ChurchQueryRepository) ExistAll ¶
func (o *ChurchQueryRepository) ExistAll() (ret bool, err error)
func (*ChurchQueryRepository) ExistById ¶
func (o *ChurchQueryRepository) ExistById(id uuid.UUID) (ret bool, err error)
func (*ChurchQueryRepository) FindAll ¶
func (o *ChurchQueryRepository) FindAll() (ret []*Church, err error)
type ChurchRouter ¶
type ChurchRouter struct { PathPrefix string `json:"pathPrefix" eh:"optional"` QueryHandler *ChurchHttpQueryHandler `json:"queryHandler" eh:"optional"` CommandHandler *ChurchHttpCommandHandler `json:"commandHandler" eh:"optional"` Router *mux.Router `json:"router" eh:"optional"` }
func NewChurchRouter ¶
func NewChurchRouter(pathPrefix string, context context.Context, commandBus eventhorizon.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *ChurchRouter)
type ChurchUpdated ¶
type ChurchUpdated struct { Name string `json:"name" eh:"optional"` Address *Address `json:"address" eh:"optional"` Pastor *PersonName `json:"pastor" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` Association string `json:"association" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
type Contact ¶
type Contact struct { Phone string `json:"phone" eh:"optional"` Email string `json:"email" eh:"optional"` Cellphone string `json:"cellphone" eh:"optional"` }
func NewContact ¶
func NewContact() (ret *Contact)
func NewContactByPropNames ¶
func NewContactsByPropNames ¶
type CreateChurch ¶
type CreateChurch struct { Name string `json:"name" eh:"optional"` Address *Address `json:"address" eh:"optional"` Pastor *PersonName `json:"pastor" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` Association string `json:"association" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*CreateChurch) AggregateID ¶
func (o *CreateChurch) AggregateID() uuid.UUID
func (*CreateChurch) AggregateType ¶
func (o *CreateChurch) AggregateType() eventhorizon.AggregateType
func (*CreateChurch) CommandType ¶
func (o *CreateChurch) CommandType() eventhorizon.CommandType
type CreateGraduation ¶
type CreateGraduation struct { Name string `json:"name" eh:"optional"` Level *GraduationLevel `json:"level" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*CreateGraduation) AggregateID ¶
func (o *CreateGraduation) AggregateID() uuid.UUID
func (*CreateGraduation) AggregateType ¶
func (o *CreateGraduation) AggregateType() eventhorizon.AggregateType
func (*CreateGraduation) CommandType ¶
func (o *CreateGraduation) CommandType() eventhorizon.CommandType
type CreateProfile ¶
type CreateProfile struct { Gender *Gender `json:"gender" eh:"optional"` Name *PersonName `json:"name" eh:"optional"` BirthName string `json:"birthName" eh:"optional"` Birthday *time.Time `json:"birthday" eh:"optional"` Address *Address `json:"address" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` PhotoData []byte `json:"photoData" eh:"optional"` Photo string `json:"photo" eh:"optional"` Family *Family `json:"family" eh:"optional"` Church *ChurchInfo `json:"church" eh:"optional"` Education *Education `json:"education" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*CreateProfile) AggregateID ¶
func (o *CreateProfile) AggregateID() uuid.UUID
func (*CreateProfile) AggregateType ¶
func (o *CreateProfile) AggregateType() eventhorizon.AggregateType
func (*CreateProfile) CommandType ¶
func (o *CreateProfile) CommandType() eventhorizon.CommandType
type DeleteChurch ¶
func (*DeleteChurch) AggregateID ¶
func (o *DeleteChurch) AggregateID() uuid.UUID
func (*DeleteChurch) AggregateType ¶
func (o *DeleteChurch) AggregateType() eventhorizon.AggregateType
func (*DeleteChurch) CommandType ¶
func (o *DeleteChurch) CommandType() eventhorizon.CommandType
type DeleteGraduation ¶
func (*DeleteGraduation) AggregateID ¶
func (o *DeleteGraduation) AggregateID() uuid.UUID
func (*DeleteGraduation) AggregateType ¶
func (o *DeleteGraduation) AggregateType() eventhorizon.AggregateType
func (*DeleteGraduation) CommandType ¶
func (o *DeleteGraduation) CommandType() eventhorizon.CommandType
type DeleteProfile ¶
func (*DeleteProfile) AggregateID ¶
func (o *DeleteProfile) AggregateID() uuid.UUID
func (*DeleteProfile) AggregateType ¶
func (o *DeleteProfile) AggregateType() eventhorizon.AggregateType
func (*DeleteProfile) CommandType ¶
func (o *DeleteProfile) CommandType() eventhorizon.CommandType
type Education ¶
type Education struct { Graduation *Graduation `json:"graduation" eh:"optional"` Other string `json:"other" eh:"optional"` Profession string `json:"profession" eh:"optional"` }
func NewEducation ¶
func NewEducation() (ret *Education)
func NewEducationByPropNames ¶
type Family ¶
type Family struct { MaritalState *MaritalState `json:"maritalState" eh:"optional"` ChildrenCount int `json:"childrenCount" eh:"optional"` Partner *PersonName `json:"partner" eh:"optional"` }
func NewFamilyByPropNames ¶
func NewFamilysByPropNames ¶
type Gender ¶
type Gender struct {
// contains filtered or unexported fields
}
func (Gender) MarshalJSON ¶
func (*Gender) UnmarshalJSON ¶
type Graduation ¶
type Graduation struct { Name string `json:"name" eh:"optional"` Level *GraduationLevel `json:"level" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func NewGraduation ¶
func NewGraduation() (ret *Graduation)
func NewGraduationByPropNames ¶
func NewGraduationByPropNames(intSalt int) (ret *Graduation)
func NewGraduationsByPropNames ¶
func NewGraduationsByPropNames(count int) []*Graduation
func (*Graduation) EntityID ¶
func (o *Graduation) EntityID() uuid.UUID
type GraduationAggregateInitializer ¶
type GraduationAggregateInitializer struct { *eh.AggregateInitializer *GraduationCommandHandler *GraduationEventHandler ProjectorHandler *GraduationEventHandler `json:"projectorHandler" eh:"optional"` }
func NewGraduationAggregateInitializer ¶
func NewGraduationAggregateInitializer(eventStore eventhorizon.EventStore, eventBus eventhorizon.EventBus, commandBus *bus.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *GraduationAggregateInitializer)
type GraduationCli ¶
type GraduationCli struct { }
func NewGraduationCli ¶
func NewGraduationCli() (ret *GraduationCli)
type GraduationClient ¶
type GraduationClient struct { Url string `json:"url" eh:"optional"` Client *http.Client `json:"client" eh:"optional"` }
func NewGraduationClient ¶
func NewGraduationClient(url string, client *http.Client) (ret *GraduationClient)
func (*GraduationClient) Create ¶
func (o *GraduationClient) Create(items []*Graduation) (err error)
func (*GraduationClient) ImportJSON ¶
func (o *GraduationClient) ImportJSON(fileJSON string) (err error)
func (*GraduationClient) ReadFileJSON ¶
func (o *GraduationClient) ReadFileJSON(fileJSON string) (ret []*Graduation, err error)
type GraduationCommandHandler ¶
type GraduationCommandHandler struct { CreateHandler func(*CreateGraduation, *Graduation, eh.AggregateStoreEvent) (err error) `json:"createHandler" eh:"optional"` DeleteHandler func(*DeleteGraduation, *Graduation, eh.AggregateStoreEvent) (err error) `json:"deleteHandler" eh:"optional"` UpdateHandler func(*UpdateGraduation, *Graduation, eh.AggregateStoreEvent) (err error) `json:"updateHandler" eh:"optional"` }
func (*GraduationCommandHandler) AddCreatePreparer ¶
func (o *GraduationCommandHandler) AddCreatePreparer(preparer func(*CreateGraduation, *Graduation) (err error))
func (*GraduationCommandHandler) AddDeletePreparer ¶
func (o *GraduationCommandHandler) AddDeletePreparer(preparer func(*DeleteGraduation, *Graduation) (err error))
func (*GraduationCommandHandler) AddUpdatePreparer ¶
func (o *GraduationCommandHandler) AddUpdatePreparer(preparer func(*UpdateGraduation, *Graduation) (err error))
func (*GraduationCommandHandler) Execute ¶
func (o *GraduationCommandHandler) Execute(cmd eventhorizon.Command, entity eventhorizon.Entity, store eh.AggregateStoreEvent) (err error)
func (*GraduationCommandHandler) SetupCommandHandler ¶
func (o *GraduationCommandHandler) SetupCommandHandler() (err error)
type GraduationCommandType ¶
type GraduationCommandType struct {
// contains filtered or unexported fields
}
func (GraduationCommandType) GetBSON ¶
func (o GraduationCommandType) GetBSON() (ret interface{}, err error)
func (*GraduationCommandType) IsCreateGraduation ¶
func (o *GraduationCommandType) IsCreateGraduation() bool
func (*GraduationCommandType) IsDeleteGraduation ¶
func (o *GraduationCommandType) IsDeleteGraduation() bool
func (*GraduationCommandType) IsUpdateGraduation ¶
func (o *GraduationCommandType) IsUpdateGraduation() bool
func (GraduationCommandType) MarshalJSON ¶
func (o GraduationCommandType) MarshalJSON() (ret []byte, err error)
func (*GraduationCommandType) Name ¶
func (o *GraduationCommandType) Name() string
func (*GraduationCommandType) Ordinal ¶
func (o *GraduationCommandType) Ordinal() int
func (*GraduationCommandType) SetBSON ¶
func (o *GraduationCommandType) SetBSON(raw bson.Raw) (err error)
func (*GraduationCommandType) UnmarshalJSON ¶
func (o *GraduationCommandType) UnmarshalJSON(data []byte) (err error)
type GraduationCreated ¶
type GraduationCreated struct { Name string `json:"name" eh:"optional"` Level *GraduationLevel `json:"level" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
type GraduationDeleted ¶
type GraduationEventHandler ¶
type GraduationEventHandler struct { CreatedHandler func(*GraduationCreated, *Graduation) (err error) `json:"createdHandler" eh:"optional"` DeletedHandler func(*GraduationDeleted, *Graduation) (err error) `json:"deletedHandler" eh:"optional"` UpdatedHandler func(*GraduationUpdated, *Graduation) (err error) `json:"updatedHandler" eh:"optional"` }
func (*GraduationEventHandler) Apply ¶
func (o *GraduationEventHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*GraduationEventHandler) SetupEventHandler ¶
func (o *GraduationEventHandler) SetupEventHandler() (err error)
type GraduationEventType ¶
type GraduationEventType struct {
// contains filtered or unexported fields
}
func (GraduationEventType) GetBSON ¶
func (o GraduationEventType) GetBSON() (ret interface{}, err error)
func (*GraduationEventType) IsGraduationCreated ¶
func (o *GraduationEventType) IsGraduationCreated() bool
func (*GraduationEventType) IsGraduationDeleted ¶
func (o *GraduationEventType) IsGraduationDeleted() bool
func (*GraduationEventType) IsGraduationUpdated ¶
func (o *GraduationEventType) IsGraduationUpdated() bool
func (GraduationEventType) MarshalJSON ¶
func (o GraduationEventType) MarshalJSON() (ret []byte, err error)
func (*GraduationEventType) Name ¶
func (o *GraduationEventType) Name() string
func (*GraduationEventType) Ordinal ¶
func (o *GraduationEventType) Ordinal() int
func (*GraduationEventType) SetBSON ¶
func (o *GraduationEventType) SetBSON(raw bson.Raw) (err error)
func (*GraduationEventType) UnmarshalJSON ¶
func (o *GraduationEventType) UnmarshalJSON(data []byte) (err error)
type GraduationExecutors ¶
type GraduationExecutors struct {
Initial *GraduationInitialExecutor `json:"initial" eh:"optional"`
}
func NewGraduationExecutors ¶
func NewGraduationExecutors() (ret *GraduationExecutors)
type GraduationHandlers ¶
type GraduationHandlers struct {
Initial *GraduationInitialHandler `json:"initial" eh:"optional"`
}
func NewGraduationHandlers ¶
func NewGraduationHandlers() (ret *GraduationHandlers)
type GraduationHttpCommandHandler ¶
type GraduationHttpCommandHandler struct {
*eh.HttpCommandHandler
}
func NewGraduationHttpCommandHandler ¶
func NewGraduationHttpCommandHandler(context context.Context, commandBus eventhorizon.CommandHandler) (ret *GraduationHttpCommandHandler)
func (*GraduationHttpCommandHandler) Create ¶
func (o *GraduationHttpCommandHandler) Create(w http.ResponseWriter, r *http.Request)
func (*GraduationHttpCommandHandler) Delete ¶
func (o *GraduationHttpCommandHandler) Delete(w http.ResponseWriter, r *http.Request)
func (*GraduationHttpCommandHandler) Update ¶
func (o *GraduationHttpCommandHandler) Update(w http.ResponseWriter, r *http.Request)
type GraduationHttpQueryHandler ¶
type GraduationHttpQueryHandler struct { *eh.HttpQueryHandler QueryRepository *GraduationQueryRepository `json:"queryRepository" eh:"optional"` }
func NewGraduationHttpQueryHandler ¶
func NewGraduationHttpQueryHandler(queryRepository *GraduationQueryRepository) (ret *GraduationHttpQueryHandler)
func (*GraduationHttpQueryHandler) CountAll ¶
func (o *GraduationHttpQueryHandler) CountAll(w http.ResponseWriter, r *http.Request)
func (*GraduationHttpQueryHandler) CountById ¶
func (o *GraduationHttpQueryHandler) CountById(w http.ResponseWriter, r *http.Request)
func (*GraduationHttpQueryHandler) ExistAll ¶
func (o *GraduationHttpQueryHandler) ExistAll(w http.ResponseWriter, r *http.Request)
func (*GraduationHttpQueryHandler) ExistById ¶
func (o *GraduationHttpQueryHandler) ExistById(w http.ResponseWriter, r *http.Request)
func (*GraduationHttpQueryHandler) FindAll ¶
func (o *GraduationHttpQueryHandler) FindAll(w http.ResponseWriter, r *http.Request)
func (*GraduationHttpQueryHandler) FindById ¶
func (o *GraduationHttpQueryHandler) FindById(w http.ResponseWriter, r *http.Request)
type GraduationInitialExecutor ¶
type GraduationInitialExecutor struct { }
func NewGraduationInitialExecutor ¶
func NewGraduationInitialExecutor() (ret *GraduationInitialExecutor)
type GraduationInitialHandler ¶
type GraduationInitialHandler struct { }
func NewGraduationInitialHandler ¶
func NewGraduationInitialHandler() (ret *GraduationInitialHandler)
func (*GraduationInitialHandler) Apply ¶
func (o *GraduationInitialHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*GraduationInitialHandler) SetupEventHandler ¶
func (o *GraduationInitialHandler) SetupEventHandler() (err error)
type GraduationLevel ¶
type GraduationLevel struct {
// contains filtered or unexported fields
}
func (GraduationLevel) GetBSON ¶
func (o GraduationLevel) GetBSON() (ret interface{}, err error)
func (*GraduationLevel) IsCollege ¶
func (o *GraduationLevel) IsCollege() bool
func (*GraduationLevel) IsHighSchool ¶
func (o *GraduationLevel) IsHighSchool() bool
func (*GraduationLevel) IsMiddleSchool ¶
func (o *GraduationLevel) IsMiddleSchool() bool
func (*GraduationLevel) IsSecondarySchool ¶
func (o *GraduationLevel) IsSecondarySchool() bool
func (*GraduationLevel) IsTechnicalCollege ¶
func (o *GraduationLevel) IsTechnicalCollege() bool
func (*GraduationLevel) IsUnknown ¶
func (o *GraduationLevel) IsUnknown() bool
func (GraduationLevel) MarshalJSON ¶
func (o GraduationLevel) MarshalJSON() (ret []byte, err error)
func (*GraduationLevel) Name ¶
func (o *GraduationLevel) Name() string
func (*GraduationLevel) Ordinal ¶
func (o *GraduationLevel) Ordinal() int
func (*GraduationLevel) UnmarshalJSON ¶
func (o *GraduationLevel) UnmarshalJSON(data []byte) (err error)
type GraduationQueryRepository ¶
type GraduationQueryRepository struct {
// contains filtered or unexported fields
}
func NewGraduationQueryRepository ¶
func NewGraduationQueryRepository(repo eventhorizon.ReadRepo, context context.Context) (ret *GraduationQueryRepository)
func (*GraduationQueryRepository) CountAll ¶
func (o *GraduationQueryRepository) CountAll() (ret int, err error)
func (*GraduationQueryRepository) CountById ¶
func (o *GraduationQueryRepository) CountById(id uuid.UUID) (ret int, err error)
func (*GraduationQueryRepository) ExistAll ¶
func (o *GraduationQueryRepository) ExistAll() (ret bool, err error)
func (*GraduationQueryRepository) ExistById ¶
func (o *GraduationQueryRepository) ExistById(id uuid.UUID) (ret bool, err error)
func (*GraduationQueryRepository) FindAll ¶
func (o *GraduationQueryRepository) FindAll() (ret []*Graduation, err error)
func (*GraduationQueryRepository) FindById ¶
func (o *GraduationQueryRepository) FindById(id uuid.UUID) (ret *Graduation, err error)
type GraduationRouter ¶
type GraduationRouter struct { PathPrefix string `json:"pathPrefix" eh:"optional"` QueryHandler *GraduationHttpQueryHandler `json:"queryHandler" eh:"optional"` CommandHandler *GraduationHttpCommandHandler `json:"commandHandler" eh:"optional"` Router *mux.Router `json:"router" eh:"optional"` }
func NewGraduationRouter ¶
func NewGraduationRouter(pathPrefix string, context context.Context, commandBus eventhorizon.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *GraduationRouter)
type GraduationUpdated ¶
type GraduationUpdated struct { Name string `json:"name" eh:"optional"` Level *GraduationLevel `json:"level" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
type MaritalState ¶
type MaritalState struct {
// contains filtered or unexported fields
}
func (MaritalState) GetBSON ¶
func (o MaritalState) GetBSON() (ret interface{}, err error)
func (*MaritalState) IsDivorced ¶
func (o *MaritalState) IsDivorced() bool
func (*MaritalState) IsMarried ¶
func (o *MaritalState) IsMarried() bool
func (*MaritalState) IsSeparated ¶
func (o *MaritalState) IsSeparated() bool
func (*MaritalState) IsSingle ¶
func (o *MaritalState) IsSingle() bool
func (*MaritalState) IsUnknown ¶
func (o *MaritalState) IsUnknown() bool
func (*MaritalState) IsWidowed ¶
func (o *MaritalState) IsWidowed() bool
func (MaritalState) MarshalJSON ¶
func (o MaritalState) MarshalJSON() (ret []byte, err error)
func (*MaritalState) Name ¶
func (o *MaritalState) Name() string
func (*MaritalState) Ordinal ¶
func (o *MaritalState) Ordinal() int
func (*MaritalState) UnmarshalJSON ¶
func (o *MaritalState) UnmarshalJSON(data []byte) (err error)
type PersonCli ¶
type PersonCli struct { ChurchCli *ChurchCli `json:"churchCli" eh:"optional"` GraduationCli *GraduationCli `json:"graduationCli" eh:"optional"` ProfileCli *ProfileCli `json:"profileCli" eh:"optional"` }
func NewPersonCli ¶
func NewPersonCli() (ret *PersonCli)
type PersonClient ¶
type PersonClient struct { Url string `json:"url" eh:"optional"` Client *http.Client `json:"client" eh:"optional"` ChurchClient *ChurchClient `json:"churchClient" eh:"optional"` GraduationClient *GraduationClient `json:"graduationClient" eh:"optional"` ProfileClient *ProfileClient `json:"profileClient" eh:"optional"` }
func NewPersonClient ¶
func NewPersonClient(url string, client *http.Client) (ret *PersonClient)
type PersonEventhorizonInitializer ¶
type PersonEventhorizonInitializer struct { ChurchAggregateInitializer *ChurchAggregateInitializer `json:"churchAggregateInitializer" eh:"optional"` GraduationAggregateInitializer *GraduationAggregateInitializer `json:"graduationAggregateInitializer" eh:"optional"` ProfileAggregateInitializer *ProfileAggregateInitializer `json:"profileAggregateInitializer" eh:"optional"` // contains filtered or unexported fields }
func NewPersonEventhorizonInitializer ¶
func NewPersonEventhorizonInitializer(eventStore eventhorizon.EventStore, eventBus eventhorizon.EventBus, commandBus *bus.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *PersonEventhorizonInitializer)
func (*PersonEventhorizonInitializer) Setup ¶
func (o *PersonEventhorizonInitializer) Setup() (err error)
type PersonName ¶
type PersonName struct { First string `json:"first" eh:"optional"` Last string `json:"last" eh:"optional"` }
func NewPersonName ¶
func NewPersonName() (ret *PersonName)
func NewPersonNameByPropNames ¶
func NewPersonNameByPropNames(intSalt int) (ret *PersonName)
func NewPersonNamesByPropNames ¶
func NewPersonNamesByPropNames(count int) []*PersonName
type PersonRouter ¶
type PersonRouter struct { PathPrefix string `json:"pathPrefix" eh:"optional"` ChurchRouter *ChurchRouter `json:"churchRouter" eh:"optional"` GraduationRouter *GraduationRouter `json:"graduationRouter" eh:"optional"` ProfileRouter *ProfileRouter `json:"profileRouter" eh:"optional"` Router *mux.Router `json:"router" eh:"optional"` }
func NewPersonRouter ¶
func NewPersonRouter(pathPrefix string, context context.Context, commandBus *bus.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *PersonRouter)
type Profile ¶
type Profile struct { Gender *Gender `json:"gender" eh:"optional"` Name *PersonName `json:"name" eh:"optional"` BirthName string `json:"birthName" eh:"optional"` Birthday *time.Time `json:"birthday" eh:"optional"` Address *Address `json:"address" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` PhotoData []byte `json:"photoData" eh:"optional"` Photo string `json:"photo" eh:"optional"` Family *Family `json:"family" eh:"optional"` Church *ChurchInfo `json:"church" eh:"optional"` Education *Education `json:"education" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func NewProfile ¶
func NewProfile() (ret *Profile)
func NewProfileByPropNames ¶
func NewProfilesByPropNames ¶
type ProfileAggregateInitializer ¶
type ProfileAggregateInitializer struct { *eh.AggregateInitializer *ProfileCommandHandler *ProfileEventHandler ProjectorHandler *ProfileEventHandler `json:"projectorHandler" eh:"optional"` }
func NewProfileAggregateInitializer ¶
func NewProfileAggregateInitializer(eventStore eventhorizon.EventStore, eventBus eventhorizon.EventBus, commandBus *bus.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *ProfileAggregateInitializer)
type ProfileCli ¶
type ProfileCli struct { }
func NewProfileCli ¶
func NewProfileCli() (ret *ProfileCli)
type ProfileClient ¶
type ProfileClient struct { Url string `json:"url" eh:"optional"` Client *http.Client `json:"client" eh:"optional"` }
func NewProfileClient ¶
func NewProfileClient(url string, client *http.Client) (ret *ProfileClient)
func (*ProfileClient) Create ¶
func (o *ProfileClient) Create(items []*Profile) (err error)
func (*ProfileClient) ImportJSON ¶
func (o *ProfileClient) ImportJSON(fileJSON string) (err error)
func (*ProfileClient) ReadFileJSON ¶
func (o *ProfileClient) ReadFileJSON(fileJSON string) (ret []*Profile, err error)
type ProfileCommandHandler ¶
type ProfileCommandHandler struct { CreateHandler func(*CreateProfile, *Profile, eh.AggregateStoreEvent) (err error) `json:"createHandler" eh:"optional"` DeleteHandler func(*DeleteProfile, *Profile, eh.AggregateStoreEvent) (err error) `json:"deleteHandler" eh:"optional"` UpdateHandler func(*UpdateProfile, *Profile, eh.AggregateStoreEvent) (err error) `json:"updateHandler" eh:"optional"` }
func (*ProfileCommandHandler) AddCreatePreparer ¶
func (o *ProfileCommandHandler) AddCreatePreparer(preparer func(*CreateProfile, *Profile) (err error))
func (*ProfileCommandHandler) AddDeletePreparer ¶
func (o *ProfileCommandHandler) AddDeletePreparer(preparer func(*DeleteProfile, *Profile) (err error))
func (*ProfileCommandHandler) AddUpdatePreparer ¶
func (o *ProfileCommandHandler) AddUpdatePreparer(preparer func(*UpdateProfile, *Profile) (err error))
func (*ProfileCommandHandler) Execute ¶
func (o *ProfileCommandHandler) Execute(cmd eventhorizon.Command, entity eventhorizon.Entity, store eh.AggregateStoreEvent) (err error)
func (*ProfileCommandHandler) SetupCommandHandler ¶
func (o *ProfileCommandHandler) SetupCommandHandler() (err error)
type ProfileCommandType ¶
type ProfileCommandType struct {
// contains filtered or unexported fields
}
func (ProfileCommandType) GetBSON ¶
func (o ProfileCommandType) GetBSON() (ret interface{}, err error)
func (*ProfileCommandType) IsCreateProfile ¶
func (o *ProfileCommandType) IsCreateProfile() bool
func (*ProfileCommandType) IsDeleteProfile ¶
func (o *ProfileCommandType) IsDeleteProfile() bool
func (*ProfileCommandType) IsUpdateProfile ¶
func (o *ProfileCommandType) IsUpdateProfile() bool
func (ProfileCommandType) MarshalJSON ¶
func (o ProfileCommandType) MarshalJSON() (ret []byte, err error)
func (*ProfileCommandType) Name ¶
func (o *ProfileCommandType) Name() string
func (*ProfileCommandType) Ordinal ¶
func (o *ProfileCommandType) Ordinal() int
func (*ProfileCommandType) UnmarshalJSON ¶
func (o *ProfileCommandType) UnmarshalJSON(data []byte) (err error)
type ProfileCreated ¶
type ProfileCreated struct { Gender *Gender `json:"gender" eh:"optional"` Name *PersonName `json:"name" eh:"optional"` BirthName string `json:"birthName" eh:"optional"` Birthday *time.Time `json:"birthday" eh:"optional"` Address *Address `json:"address" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` PhotoData []byte `json:"photoData" eh:"optional"` Photo string `json:"photo" eh:"optional"` Family *Family `json:"family" eh:"optional"` Church *ChurchInfo `json:"church" eh:"optional"` Education *Education `json:"education" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
type ProfileDeleted ¶
type ProfileEventHandler ¶
type ProfileEventHandler struct { CreatedHandler func(*ProfileCreated, *Profile) (err error) `json:"createdHandler" eh:"optional"` DeletedHandler func(*ProfileDeleted, *Profile) (err error) `json:"deletedHandler" eh:"optional"` UpdatedHandler func(*ProfileUpdated, *Profile) (err error) `json:"updatedHandler" eh:"optional"` }
func (*ProfileEventHandler) Apply ¶
func (o *ProfileEventHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*ProfileEventHandler) SetupEventHandler ¶
func (o *ProfileEventHandler) SetupEventHandler() (err error)
type ProfileEventType ¶
type ProfileEventType struct {
// contains filtered or unexported fields
}
func (ProfileEventType) GetBSON ¶
func (o ProfileEventType) GetBSON() (ret interface{}, err error)
func (*ProfileEventType) IsProfileCreated ¶
func (o *ProfileEventType) IsProfileCreated() bool
func (*ProfileEventType) IsProfileDeleted ¶
func (o *ProfileEventType) IsProfileDeleted() bool
func (*ProfileEventType) IsProfileUpdated ¶
func (o *ProfileEventType) IsProfileUpdated() bool
func (ProfileEventType) MarshalJSON ¶
func (o ProfileEventType) MarshalJSON() (ret []byte, err error)
func (*ProfileEventType) Name ¶
func (o *ProfileEventType) Name() string
func (*ProfileEventType) Ordinal ¶
func (o *ProfileEventType) Ordinal() int
func (*ProfileEventType) UnmarshalJSON ¶
func (o *ProfileEventType) UnmarshalJSON(data []byte) (err error)
type ProfileExecutors ¶
type ProfileExecutors struct {
Initial *ProfileInitialExecutor `json:"initial" eh:"optional"`
}
func NewProfileExecutors ¶
func NewProfileExecutors() (ret *ProfileExecutors)
type ProfileHandlers ¶
type ProfileHandlers struct {
Initial *ProfileInitialHandler `json:"initial" eh:"optional"`
}
func NewProfileHandlers ¶
func NewProfileHandlers() (ret *ProfileHandlers)
type ProfileHttpCommandHandler ¶
type ProfileHttpCommandHandler struct {
*eh.HttpCommandHandler
}
func NewProfileHttpCommandHandler ¶
func NewProfileHttpCommandHandler(context context.Context, commandBus eventhorizon.CommandHandler) (ret *ProfileHttpCommandHandler)
func (*ProfileHttpCommandHandler) Create ¶
func (o *ProfileHttpCommandHandler) Create(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpCommandHandler) Delete ¶
func (o *ProfileHttpCommandHandler) Delete(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpCommandHandler) Update ¶
func (o *ProfileHttpCommandHandler) Update(w http.ResponseWriter, r *http.Request)
type ProfileHttpQueryHandler ¶
type ProfileHttpQueryHandler struct { *eh.HttpQueryHandler QueryRepository *ProfileQueryRepository `json:"queryRepository" eh:"optional"` }
func NewProfileHttpQueryHandler ¶
func NewProfileHttpQueryHandler(queryRepository *ProfileQueryRepository) (ret *ProfileHttpQueryHandler)
func (*ProfileHttpQueryHandler) CountAll ¶
func (o *ProfileHttpQueryHandler) CountAll(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpQueryHandler) CountById ¶
func (o *ProfileHttpQueryHandler) CountById(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpQueryHandler) ExistAll ¶
func (o *ProfileHttpQueryHandler) ExistAll(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpQueryHandler) ExistById ¶
func (o *ProfileHttpQueryHandler) ExistById(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpQueryHandler) FindAll ¶
func (o *ProfileHttpQueryHandler) FindAll(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpQueryHandler) FindByEmail ¶
func (o *ProfileHttpQueryHandler) FindByEmail(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpQueryHandler) FindById ¶
func (o *ProfileHttpQueryHandler) FindById(w http.ResponseWriter, r *http.Request)
func (*ProfileHttpQueryHandler) FindByPhone ¶
func (o *ProfileHttpQueryHandler) FindByPhone(w http.ResponseWriter, r *http.Request)
type ProfileInitialExecutor ¶
type ProfileInitialExecutor struct { }
func NewProfileInitialExecutor ¶
func NewProfileInitialExecutor() (ret *ProfileInitialExecutor)
type ProfileInitialHandler ¶
type ProfileInitialHandler struct { }
func NewProfileInitialHandler ¶
func NewProfileInitialHandler() (ret *ProfileInitialHandler)
func (*ProfileInitialHandler) Apply ¶
func (o *ProfileInitialHandler) Apply(event eventhorizon.Event, entity eventhorizon.Entity) (err error)
func (*ProfileInitialHandler) SetupEventHandler ¶
func (o *ProfileInitialHandler) SetupEventHandler() (err error)
type ProfileQueryRepository ¶
type ProfileQueryRepository struct {
// contains filtered or unexported fields
}
func NewProfileQueryRepository ¶
func NewProfileQueryRepository(repo eventhorizon.ReadRepo, context context.Context) (ret *ProfileQueryRepository)
func (*ProfileQueryRepository) CountAll ¶
func (o *ProfileQueryRepository) CountAll() (ret int, err error)
func (*ProfileQueryRepository) CountById ¶
func (o *ProfileQueryRepository) CountById(id uuid.UUID) (ret int, err error)
func (*ProfileQueryRepository) ExistAll ¶
func (o *ProfileQueryRepository) ExistAll() (ret bool, err error)
func (*ProfileQueryRepository) ExistById ¶
func (o *ProfileQueryRepository) ExistById(id uuid.UUID) (ret bool, err error)
func (*ProfileQueryRepository) FindAll ¶
func (o *ProfileQueryRepository) FindAll() (ret []*Profile, err error)
func (*ProfileQueryRepository) FindByEmail ¶
func (o *ProfileQueryRepository) FindByEmail(email string) (ret *Profile, err error)
func (*ProfileQueryRepository) FindById ¶
func (o *ProfileQueryRepository) FindById(id uuid.UUID) (ret *Profile, err error)
func (*ProfileQueryRepository) FindByPhone ¶
func (o *ProfileQueryRepository) FindByPhone(phone string) (ret *Profile, err error)
type ProfileRouter ¶
type ProfileRouter struct { PathPrefix string `json:"pathPrefix" eh:"optional"` QueryHandler *ProfileHttpQueryHandler `json:"queryHandler" eh:"optional"` CommandHandler *ProfileHttpCommandHandler `json:"commandHandler" eh:"optional"` Router *mux.Router `json:"router" eh:"optional"` }
func NewProfileRouter ¶
func NewProfileRouter(pathPrefix string, context context.Context, commandBus eventhorizon.CommandHandler, readRepos func(string, func() (ret eventhorizon.Entity)) (ret eventhorizon.ReadWriteRepo)) (ret *ProfileRouter)
type ProfileUpdated ¶
type ProfileUpdated struct { Gender *Gender `json:"gender" eh:"optional"` Name *PersonName `json:"name" eh:"optional"` BirthName string `json:"birthName" eh:"optional"` Birthday *time.Time `json:"birthday" eh:"optional"` Address *Address `json:"address" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` PhotoData []byte `json:"photoData" eh:"optional"` Photo string `json:"photo" eh:"optional"` Family *Family `json:"family" eh:"optional"` Church *ChurchInfo `json:"church" eh:"optional"` Education *Education `json:"education" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
type UpdateChurch ¶
type UpdateChurch struct { Name string `json:"name" eh:"optional"` Address *Address `json:"address" eh:"optional"` Pastor *PersonName `json:"pastor" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` Association string `json:"association" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*UpdateChurch) AggregateID ¶
func (o *UpdateChurch) AggregateID() uuid.UUID
func (*UpdateChurch) AggregateType ¶
func (o *UpdateChurch) AggregateType() eventhorizon.AggregateType
func (*UpdateChurch) CommandType ¶
func (o *UpdateChurch) CommandType() eventhorizon.CommandType
type UpdateGraduation ¶
type UpdateGraduation struct { Name string `json:"name" eh:"optional"` Level *GraduationLevel `json:"level" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*UpdateGraduation) AggregateID ¶
func (o *UpdateGraduation) AggregateID() uuid.UUID
func (*UpdateGraduation) AggregateType ¶
func (o *UpdateGraduation) AggregateType() eventhorizon.AggregateType
func (*UpdateGraduation) CommandType ¶
func (o *UpdateGraduation) CommandType() eventhorizon.CommandType
type UpdateProfile ¶
type UpdateProfile struct { Gender *Gender `json:"gender" eh:"optional"` Name *PersonName `json:"name" eh:"optional"` BirthName string `json:"birthName" eh:"optional"` Birthday *time.Time `json:"birthday" eh:"optional"` Address *Address `json:"address" eh:"optional"` Contact *Contact `json:"contact" eh:"optional"` PhotoData []byte `json:"photoData" eh:"optional"` Photo string `json:"photo" eh:"optional"` Family *Family `json:"family" eh:"optional"` Church *ChurchInfo `json:"church" eh:"optional"` Education *Education `json:"education" eh:"optional"` Id uuid.UUID `json:"id" eh:"optional"` }
func (*UpdateProfile) AggregateID ¶
func (o *UpdateProfile) AggregateID() uuid.UUID
func (*UpdateProfile) AggregateType ¶
func (o *UpdateProfile) AggregateType() eventhorizon.AggregateType
func (*UpdateProfile) CommandType ¶
func (o *UpdateProfile) CommandType() eventhorizon.CommandType
Click to show internal directories.
Click to hide internal directories.