17 lines
315 B
Go
17 lines
315 B
Go
package checkout
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
messages "git.k6n.net/go-cart-actor/proto/checkout"
|
|
)
|
|
|
|
func HandleInventoryReserved(g *CheckoutGrain, m *messages.InventoryReserved) error {
|
|
if m == nil {
|
|
return fmt.Errorf("HandleInventoryReserved: nil payload")
|
|
}
|
|
|
|
g.InventoryReserved = m.Status == "success"
|
|
return nil
|
|
}
|