diff --git a/cmd/bank/main.go b/cmd/bank/main.go index 96f7266..7c8a152 100644 --- a/cmd/bank/main.go +++ b/cmd/bank/main.go @@ -28,7 +28,7 @@ func main() { panic(err) } - messages := []dogma.Message{ + commands := []dogma.Command{ commands.OpenAccountForNewCustomer{ CustomerID: "cust1", CustomerName: "Anna Smith", @@ -68,7 +68,7 @@ func main() { }, } - for _, m := range messages { + for _, m := range commands { err := en.Dispatch( context.Background(), m, diff --git a/domain/account.go b/domain/account.go index 313ac75..2e68d84 100644 --- a/domain/account.go +++ b/domain/account.go @@ -62,7 +62,7 @@ func (a *account) hasSufficientFunds(amount int64) bool { return a.Balance >= amount } -func (a *account) ApplyEvent(m dogma.Message) { +func (a *account) ApplyEvent(m dogma.Event) { switch x := m.(type) { case events.AccountOpened: a.Opened = true @@ -102,7 +102,7 @@ func (AccountHandler) Configure(c dogma.AggregateConfigurer) { // RouteCommandToInstance returns the ID of the aggregate instance that is // targetted by m. -func (AccountHandler) RouteCommandToInstance(m dogma.Message) string { +func (AccountHandler) RouteCommandToInstance(m dogma.Command) string { switch x := m.(type) { case commands.OpenAccount: return x.AccountID @@ -119,7 +119,7 @@ func (AccountHandler) RouteCommandToInstance(m dogma.Message) string { func (AccountHandler) HandleCommand( r dogma.AggregateRoot, s dogma.AggregateCommandScope, - m dogma.Message, + m dogma.Command, ) { a := r.(*account) diff --git a/domain/customer.go b/domain/customer.go index 638436a..8f9a48f 100644 --- a/domain/customer.go +++ b/domain/customer.go @@ -26,7 +26,7 @@ func (c *customer) Acquire(s dogma.AggregateCommandScope, m commands.OpenAccount }) } -func (c *customer) ApplyEvent(m dogma.Message) { +func (c *customer) ApplyEvent(m dogma.Event) { switch m.(type) { case events.CustomerAcquired: c.Acquired = true @@ -54,7 +54,7 @@ func (CustomerHandler) New() dogma.AggregateRoot { // RouteCommandToInstance returns the ID of the aggregate instance that is // targetted by m. -func (CustomerHandler) RouteCommandToInstance(m dogma.Message) string { +func (CustomerHandler) RouteCommandToInstance(m dogma.Command) string { switch x := m.(type) { case commands.OpenAccountForNewCustomer: return x.CustomerID @@ -67,7 +67,7 @@ func (CustomerHandler) RouteCommandToInstance(m dogma.Message) string { func (CustomerHandler) HandleCommand( r dogma.AggregateRoot, s dogma.AggregateCommandScope, - m dogma.Message, + m dogma.Command, ) { c := r.(*customer) diff --git a/domain/dailydebitlimit.go b/domain/dailydebitlimit.go index 80c0014..5331461 100644 --- a/domain/dailydebitlimit.go +++ b/domain/dailydebitlimit.go @@ -46,7 +46,7 @@ func (d *dailyDebitLimit) wouldExceedLimit(amount int64) bool { return d.TotalDebitsForDay+amount > maximumDailyDebitLimit } -func (d *dailyDebitLimit) ApplyEvent(m dogma.Message) { +func (d *dailyDebitLimit) ApplyEvent(m dogma.Event) { switch x := m.(type) { case events.DailyDebitLimitConsumed: d.TotalDebitsForDay = x.Amount @@ -79,7 +79,7 @@ func (DailyDebitLimitHandler) Configure(c dogma.AggregateConfigurer) { // RouteCommandToInstance returns the ID of the aggregate instance that is // targetted by m. -func (DailyDebitLimitHandler) RouteCommandToInstance(m dogma.Message) string { +func (DailyDebitLimitHandler) RouteCommandToInstance(m dogma.Command) string { switch x := m.(type) { case commands.ConsumeDailyDebitLimit: return fmt.Sprintf("%s:%s", x.Date, x.AccountID) @@ -92,7 +92,7 @@ func (DailyDebitLimitHandler) RouteCommandToInstance(m dogma.Message) string { func (DailyDebitLimitHandler) HandleCommand( r dogma.AggregateRoot, s dogma.AggregateCommandScope, - m dogma.Message, + m dogma.Command, ) { d := r.(*dailyDebitLimit) diff --git a/domain/deposit.go b/domain/deposit.go index e8fa4e3..70f6720 100644 --- a/domain/deposit.go +++ b/domain/deposit.go @@ -14,7 +14,6 @@ import ( type DepositProcessHandler struct { dogma.StatelessProcessBehavior dogma.NoTimeoutMessagesBehavior - dogma.NoTimeoutHintBehavior } // Configure configures the behavior of the engine as it relates to this @@ -33,7 +32,10 @@ func (DepositProcessHandler) Configure(c dogma.ProcessConfigurer) { // RouteEventToInstance returns the ID of the process instance that is targetted // by m. -func (DepositProcessHandler) RouteEventToInstance(_ context.Context, m dogma.Message) (string, bool, error) { +func (DepositProcessHandler) RouteEventToInstance( + _ context.Context, + m dogma.Event, +) (string, bool, error) { switch x := m.(type) { case events.DepositStarted: return x.TransactionID, true, nil @@ -49,9 +51,9 @@ func (DepositProcessHandler) RouteEventToInstance(_ context.Context, m dogma.Mes // HandleEvent handles an event message that has been routed to this handler. func (DepositProcessHandler) HandleEvent( _ context.Context, - r dogma.ProcessRoot, + _ dogma.ProcessRoot, s dogma.ProcessEventScope, - m dogma.Message, + m dogma.Event, ) error { switch x := m.(type) { case events.DepositStarted: diff --git a/domain/openaccount.go b/domain/openaccount.go index bf49205..b63da1d 100644 --- a/domain/openaccount.go +++ b/domain/openaccount.go @@ -13,7 +13,6 @@ import ( type OpenAccountForNewCustomerProcessHandler struct { dogma.StatelessProcessBehavior dogma.NoTimeoutMessagesBehavior - dogma.NoTimeoutHintBehavior } // Configure configures the behavior of the engine as it relates to this @@ -29,7 +28,10 @@ func (OpenAccountForNewCustomerProcessHandler) Configure(c dogma.ProcessConfigur // RouteEventToInstance returns the ID of the process instance that is targetted // by m. -func (OpenAccountForNewCustomerProcessHandler) RouteEventToInstance(_ context.Context, m dogma.Message) (string, bool, error) { +func (OpenAccountForNewCustomerProcessHandler) RouteEventToInstance( + _ context.Context, + m dogma.Event, +) (string, bool, error) { switch x := m.(type) { case events.CustomerAcquired: return x.CustomerID, true, nil @@ -41,9 +43,9 @@ func (OpenAccountForNewCustomerProcessHandler) RouteEventToInstance(_ context.Co // HandleEvent handles an event message that has been routed to this handler. func (OpenAccountForNewCustomerProcessHandler) HandleEvent( _ context.Context, - r dogma.ProcessRoot, + _ dogma.ProcessRoot, s dogma.ProcessEventScope, - m dogma.Message, + m dogma.Event, ) error { switch x := m.(type) { case events.CustomerAcquired: diff --git a/domain/transaction.go b/domain/transaction.go index b97d498..3800520 100644 --- a/domain/transaction.go +++ b/domain/transaction.go @@ -103,7 +103,7 @@ func (t *transaction) DeclineTransfer(s dogma.AggregateCommandScope, m commands. }) } -func (t *transaction) ApplyEvent(m dogma.Message) { +func (t *transaction) ApplyEvent(m dogma.Event) { switch m.(type) { case events.DepositStarted: t.Started = true @@ -152,7 +152,7 @@ func (TransactionHandler) Configure(c dogma.AggregateConfigurer) { // RouteCommandToInstance returns the ID of the aggregate instance that is // targetted by m. -func (TransactionHandler) RouteCommandToInstance(m dogma.Message) string { +func (TransactionHandler) RouteCommandToInstance(m dogma.Command) string { switch x := m.(type) { case commands.Deposit: return x.TransactionID @@ -180,7 +180,7 @@ func (TransactionHandler) RouteCommandToInstance(m dogma.Message) string { func (TransactionHandler) HandleCommand( r dogma.AggregateRoot, s dogma.AggregateCommandScope, - m dogma.Message, + m dogma.Command, ) { t := r.(*transaction) diff --git a/domain/transfer.go b/domain/transfer.go index 1052d0d..acadcda 100644 --- a/domain/transfer.go +++ b/domain/transfer.go @@ -21,9 +21,7 @@ type transferProcess struct { // TransferProcessHandler manages the process of transferring funds between // accounts. -type TransferProcessHandler struct { - dogma.NoTimeoutHintBehavior -} +type TransferProcessHandler struct{} // New returns a new transfer instance. func (TransferProcessHandler) New() dogma.ProcessRoot { @@ -54,7 +52,10 @@ func (TransferProcessHandler) Configure(c dogma.ProcessConfigurer) { // RouteEventToInstance returns the ID of the process instance that is targetted // by m. -func (TransferProcessHandler) RouteEventToInstance(_ context.Context, m dogma.Message) (string, bool, error) { +func (TransferProcessHandler) RouteEventToInstance( + _ context.Context, + m dogma.Event, +) (string, bool, error) { switch x := m.(type) { case events.TransferStarted: return x.TransactionID, true, nil @@ -82,7 +83,7 @@ func (TransferProcessHandler) HandleEvent( _ context.Context, r dogma.ProcessRoot, s dogma.ProcessEventScope, - m dogma.Message, + m dogma.Event, ) error { t := r.(*transferProcess) @@ -157,8 +158,7 @@ func (TransferProcessHandler) HandleEvent( }) } - case events.TransferApproved, - events.TransferDeclined: + case events.TransferApproved, events.TransferDeclined: s.End() default: @@ -170,10 +170,10 @@ func (TransferProcessHandler) HandleEvent( // HandleTimeout handles a timeout message that has been routed to this handler. func (TransferProcessHandler) HandleTimeout( - ctx context.Context, + _ context.Context, r dogma.ProcessRoot, s dogma.ProcessTimeoutScope, - m dogma.Message, + m dogma.Timeout, ) error { t := r.(*transferProcess) diff --git a/domain/withdrawal.go b/domain/withdrawal.go index 72dcf4b..fbc708e 100644 --- a/domain/withdrawal.go +++ b/domain/withdrawal.go @@ -14,7 +14,6 @@ import ( type WithdrawalProcessHandler struct { dogma.StatelessProcessBehavior dogma.NoTimeoutMessagesBehavior - dogma.NoTimeoutHintBehavior } // Configure configures the behavior of the engine as it relates to this @@ -41,7 +40,10 @@ func (WithdrawalProcessHandler) Configure(c dogma.ProcessConfigurer) { // RouteEventToInstance returns the ID of the process instance that is targetted // by m. -func (WithdrawalProcessHandler) RouteEventToInstance(_ context.Context, m dogma.Message) (string, bool, error) { +func (WithdrawalProcessHandler) RouteEventToInstance( + _ context.Context, + m dogma.Event, +) (string, bool, error) { switch x := m.(type) { case events.WithdrawalStarted: return x.TransactionID, true, nil @@ -67,9 +69,9 @@ func (WithdrawalProcessHandler) RouteEventToInstance(_ context.Context, m dogma. // HandleEvent handles an event message that has been routed to this handler. func (WithdrawalProcessHandler) HandleEvent( _ context.Context, - r dogma.ProcessRoot, + _ dogma.ProcessRoot, s dogma.ProcessEventScope, - m dogma.Message, + m dogma.Event, ) error { switch x := m.(type) { case events.WithdrawalStarted: diff --git a/go.mod b/go.mod index 9a3d00c..b0b1242 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,15 @@ module github.com/dogmatiq/example -go 1.21 +go 1.23 + +toolchain go1.23.0 require ( - github.com/dogmatiq/configkit v0.13.2 - github.com/dogmatiq/dogma v0.13.1 - github.com/dogmatiq/projectionkit v0.7.3 + github.com/dogmatiq/configkit v0.13.6 + github.com/dogmatiq/dogma v0.14.0 + github.com/dogmatiq/projectionkit v0.7.4 github.com/dogmatiq/sqltest v0.3.0 - github.com/dogmatiq/testkit v0.15.2 + github.com/dogmatiq/testkit v0.16.0 github.com/mattn/go-sqlite3 v1.14.22 ) @@ -15,6 +17,7 @@ require ( github.com/dogmatiq/cosyne v0.2.0 // indirect github.com/dogmatiq/dapper v0.5.3 // indirect github.com/dogmatiq/iago v0.4.0 // indirect + github.com/dogmatiq/interopspec v0.5.4 // indirect github.com/dogmatiq/jumble v0.1.0 // indirect github.com/dogmatiq/linger v1.1.0 // indirect github.com/go-sql-driver/mysql v1.5.0 // indirect @@ -30,7 +33,11 @@ require ( github.com/lib/pq v1.10.2 // indirect github.com/sergi/go-diff v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.22.0 // indirect + golang.org/x/crypto v0.26.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.23.0 // indirect golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/go.sum b/go.sum index e8c3549..e01a672 100644 --- a/go.sum +++ b/go.sum @@ -9,33 +9,37 @@ github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7Do github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dogmatiq/configkit v0.13.2 h1:L6fbZXJj2P/285ephW6HTw//HL63G2yjEiVV8ZYe4kY= -github.com/dogmatiq/configkit v0.13.2/go.mod h1:bYOmBjNx2Xu+cI6+4jYl2mN9tcKvXLshZknvBRVQUeA= +github.com/dogmatiq/configkit v0.13.6 h1:tgMl55VC9ra1NjMfZJIyHTInTi/mTh8AScTpasIJKDs= +github.com/dogmatiq/configkit v0.13.6/go.mod h1:wjuets0+wsD/7pYFE9bX2YvZ6LlrEx330yBG1nXoDSw= github.com/dogmatiq/cosyne v0.2.0 h1:tO957BpS4I9kqSw31ds6Ef4CXvV8zPAqWzbXKElsGWg= github.com/dogmatiq/cosyne v0.2.0/go.mod h1:dD8EZjbRX7FFw9t6P7l1nwoZbA7YxtOCfl9ZZAHPucU= github.com/dogmatiq/dapper v0.5.3 h1:DZkitO0TiokaiZt+9J7UNnagW2ezSYmJUlDTXLWGf8g= github.com/dogmatiq/dapper v0.5.3/go.mod h1:lrBXvNri2wXkk1T0muaTUqd5lVDwIBRKeOzVRU46XI0= -github.com/dogmatiq/dogma v0.13.1 h1:b1nsqYNmICEG2egvZ43K8w04Jma+MWYL6yF5Ad12y9o= -github.com/dogmatiq/dogma v0.13.1/go.mod h1:9lyVA+6V2+E/exV0IrBOrkUiyFwIATEhv+b0vnB2umQ= +github.com/dogmatiq/dogma v0.14.0 h1:hY4iMX4QskZpP+ksJbw+WLwz0JAUyWgz2Aoof6qjz44= +github.com/dogmatiq/dogma v0.14.0/go.mod h1:9lyVA+6V2+E/exV0IrBOrkUiyFwIATEhv+b0vnB2umQ= github.com/dogmatiq/iago v0.4.0 h1:57nZqVT34IZxtCZEW/RFif7DNUEjMXgevfr/Mmd0N8I= github.com/dogmatiq/iago v0.4.0/go.mod h1:fishMWBtzYcjgis6d873VTv9kFm/wHYLOzOyO9ECBDc= +github.com/dogmatiq/interopspec v0.5.4 h1:klyGPy16zUKJartJIJOBZ4JrQ4LxFiY3wgzFTTiNlDk= +github.com/dogmatiq/interopspec v0.5.4/go.mod h1:JL0QFXBTRGH+RgQqExhEUdhtv5Vn802w43RxKQbk8Co= github.com/dogmatiq/jumble v0.1.0 h1:Cb3ExfxY+AoUP4G9/sOwoOdYX8o+kOLK8+dhXAry+QA= github.com/dogmatiq/jumble v0.1.0/go.mod h1:FCGV2ImXu8zvThxhd4QLstiEdu74vbIVw9bFJSBcKr4= github.com/dogmatiq/linger v1.1.0 h1:kGL9sL79qRa6Cr8PhadeJ/ptbum+b48pAaNWWlyVVKg= github.com/dogmatiq/linger v1.1.0/go.mod h1:OOWJUwTxNkFolhuVdaTYjO4FmFLjZHZ8EMc5H5qOJ7Q= github.com/dogmatiq/projectionkit v0.7.3 h1:vQR1rJjs2oZaHIPZ7jlDBVGMpADsFs4vuq0NrCi/UQU= github.com/dogmatiq/projectionkit v0.7.3/go.mod h1:pTfwWRa0zD1oQ/M6zxELUXpHFhYYCrL+0WI8z4LUgA4= +github.com/dogmatiq/projectionkit v0.7.4 h1:VsHWN5jBm4ap5Knr8h/3Gt1xtHwBL4jKSF4otpgLJUA= +github.com/dogmatiq/projectionkit v0.7.4/go.mod h1:D7tEHVb/lZTORHqukABqfwjgCE8ZPmQPav3IuV8am60= github.com/dogmatiq/sqltest v0.3.0 h1:DCwyLWfVk/ZHsqq5Itq3H/Lqsh/CIQ6nIRwI4YLywFc= github.com/dogmatiq/sqltest v0.3.0/go.mod h1:a8Da8NhU4m3lq5Sybhiv+ZQowSnGHWTIJHFNInVtffg= -github.com/dogmatiq/testkit v0.15.2 h1:TxjnN76zGbNImS9XeKatBCT7Xk5e1zDEzKFKgYDzHx0= -github.com/dogmatiq/testkit v0.15.2/go.mod h1:WAUmjRy5nakD1FOkmU4/yhi+nadoLk4NeU5aNtYG/A4= +github.com/dogmatiq/testkit v0.16.0 h1:Ik9WagGnXXbsCE3QpiL8eAn8uK1Ne9Obtxc/swLCEU8= +github.com/dogmatiq/testkit v0.16.0/go.mod h1:7KKzK8ZkOReybhcYeL0AehyqvSCDDNJwSWcg1VitKu0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= @@ -56,8 +60,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 h1:FKHo8hFI3A+7w0aUQuYXQ+6EN5stWmeY/AZqtM8xk9k= +github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -158,8 +162,8 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= -github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= +github.com/onsi/ginkgo/v2 v2.20.0 h1:PE84V2mHqoT1sglvHc8ZdQtPcwmvvt29WLEEO3xmdZw= +github.com/onsi/ginkgo/v2 v2.20.0/go.mod h1:lG9ey2Z29hR41WMVthyJBGUBcBhGOtoPF2VFMvBXFCI= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -221,8 +225,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -287,6 +291,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/projections/account.go b/projections/account.go index b767e36..af8046e 100644 --- a/projections/account.go +++ b/projections/account.go @@ -12,7 +12,6 @@ import ( // AccountProjectionHandler is a projection that builds a report of accounts // managed by the bank. type AccountProjectionHandler struct { - dogma.NoTimeoutHintBehavior sqlprojection.NoCompactBehavior } @@ -31,8 +30,8 @@ func (h *AccountProjectionHandler) Configure(c dogma.ProjectionConfigurer) { func (h *AccountProjectionHandler) HandleEvent( ctx context.Context, tx *sql.Tx, - s dogma.ProjectionEventScope, - m dogma.Message, + _ dogma.ProjectionEventScope, + m dogma.Event, ) error { switch x := m.(type) { case events.AccountOpened: diff --git a/projections/customer.go b/projections/customer.go index 0cd9099..774c5c3 100644 --- a/projections/customer.go +++ b/projections/customer.go @@ -12,7 +12,6 @@ import ( // CustomerProjectionHandler is a projection that builds a report of customers // acquired by the bank. type CustomerProjectionHandler struct { - dogma.NoTimeoutHintBehavior sqlprojection.NoCompactBehavior } @@ -29,8 +28,8 @@ func (h *CustomerProjectionHandler) Configure(c dogma.ProjectionConfigurer) { func (h *CustomerProjectionHandler) HandleEvent( ctx context.Context, tx *sql.Tx, - s dogma.ProjectionEventScope, - m dogma.Message, + _ dogma.ProjectionEventScope, + m dogma.Event, ) error { switch x := m.(type) { case events.CustomerAcquired: