-
Notifications
You must be signed in to change notification settings - Fork 12
/
commands_service.go
23 lines (20 loc) · 1.04 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 {
UpsertLocation UpsertLocationCommandHandler
FailedLocationValidation FailedLocationValidationCommandHandler
SkipLocationValidation SkippedLocationValidationCommandHandler
LocationValidated LocationValidatedCommandHandler
}
func NewCommandHandlers(log logger.Logger, cfg *config.Config, es eventstore.AggregateStore) *CommandHandlers {
return &CommandHandlers{
UpsertLocation: NewUpsertLocationHandler(log, cfg, es),
FailedLocationValidation: NewFailedLocationValidationCommandHandler(log, cfg, es),
SkipLocationValidation: NewSkippedLocationValidationCommandHandler(log, cfg, es),
LocationValidated: NewLocationValidatedCommandHandler(log, cfg, es),
}
}