Skip to content

Commit

Permalink
Checkout service is a service
Browse files Browse the repository at this point in the history
  • Loading branch information
jackkleeman committed Aug 16, 2024
1 parent ca4764c commit b23fb19
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tutorials/tour-of-restate-go/app/checkoutservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type CheckoutRequest struct {
Tickets []string `json:"tickets"`
}

func (CheckoutService) Handle(ctx restate.ObjectContext, request CheckoutRequest) (bool, error) {
func (CheckoutService) Handle(ctx restate.Context, request CheckoutRequest) (bool, error) {
ctx.Log().Info("Hello")
return true, nil
}
2 changes: 1 addition & 1 deletion tutorials/tour-of-restate-go/part1/checkoutservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type CheckoutRequest struct {
Tickets []string `json:"tickets"`
}

func (CheckoutService) Handle(ctx restate.ObjectContext, request CheckoutRequest) (bool, error) {
func (CheckoutService) Handle(ctx restate.Context, request CheckoutRequest) (bool, error) {
return true, nil
}

Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour-of-restate-go/part2/checkoutservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type CheckoutRequest struct {
Tickets []string `json:"tickets"`
}

func (CheckoutService) Handle(ctx restate.ObjectContext, request CheckoutRequest) (bool, error) {
func (CheckoutService) Handle(ctx restate.Context, request CheckoutRequest) (bool, error) {
return true, nil
}

Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour-of-restate-go/part3/checkoutservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type CheckoutRequest struct {
Tickets []string `json:"tickets"`
}

func (CheckoutService) Handle(ctx restate.ObjectContext, request CheckoutRequest) (bool, error) {
func (CheckoutService) Handle(ctx restate.Context, request CheckoutRequest) (bool, error) {
return true, nil
}

Expand Down
2 changes: 1 addition & 1 deletion tutorials/tour-of-restate-go/part4/checkoutservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type CheckoutRequest struct {
Tickets []string `json:"tickets"`
}

func (CheckoutService) Handle(ctx restate.ObjectContext, request CheckoutRequest) (bool, error) {
func (CheckoutService) Handle(ctx restate.Context, request CheckoutRequest) (bool, error) {
totalPrice := len(request.Tickets) * 40

idempotencyKey := ctx.Rand().UUID().String()
Expand Down

0 comments on commit b23fb19

Please sign in to comment.