-
Notifications
You must be signed in to change notification settings - Fork 12
/
commands_service.go
23 lines (20 loc) · 1.09 KB
/
commands_service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package command_handler
import (
"github.com/openline-ai/openline-customer-os/packages/server/events-processing-platform/config"
"github.com/openline-ai/openline-customer-os/packages/server/events-processing-platform/eventstore"
"github.com/openline-ai/openline-customer-os/packages/server/events-processing-platform/logger"
)
type CommandHandlers struct {
UpsertPhoneNumber UpsertPhoneNumberCommandHandler
FailedPhoneNumberValidation FailedPhoneNumberValidationCommandHandler
SkipPhoneNumberValidation SkippedPhoneNumberValidationCommandHandler
PhoneNumberValidated PhoneNumberValidatedCommandHandler
}
func NewCommandHandlers(log logger.Logger, cfg *config.Config, es eventstore.AggregateStore) *CommandHandlers {
return &CommandHandlers{
UpsertPhoneNumber: NewUpsertPhoneNumberHandler(log, cfg, es),
FailedPhoneNumberValidation: NewFailedPhoneNumberValidationCommandHandler(log, cfg, es),
SkipPhoneNumberValidation: NewSkippedPhoneNumberValidationCommandHandler(log, cfg, es),
PhoneNumberValidated: NewPhoneNumberValidatedCommandHandler(log, cfg, es),
}
}