Skip to content

Commit

Permalink
New API's (#94)
Browse files Browse the repository at this point in the history
* Added Handler

* created slowResponse, 500Response, 408Response API.

* Updated as per the review points.

* Updated endpoints and related code

* changed endpoint names.

* Added comments for APIs.

* Update src/checkoutservice/main.go

commit for change suggested

Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>

* Updated GenerateSalesTax as per review point.

* Updated code for timeout handling

Co-authored-by: sonu0610 <sonu.jain@crestsysdata.com>
Co-authored-by: Dmitrii Anoshin <anoshindx@gmail.com>
  • Loading branch information
3 people authored Mar 21, 2022
1 parent f82d187 commit 85ffdba
Show file tree
Hide file tree
Showing 7 changed files with 734 additions and 10 deletions.
16 changes: 16 additions & 0 deletions pb/demo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,22 @@ message SendOrderConfirmationRequest {

service CheckoutService {
rpc PlaceOrder(PlaceOrderRequest) returns (PlaceOrderResponse) {}
rpc GeneratePayment(GeneratePaymentRequest) returns (Empty) {}
rpc GenerateSalesTax(GenerateSalesTaxRequest) returns (Empty) {}
rpc GenerateCartEmpty(GenerateCartEmptyRequest) returns (Empty) {}
}

message GeneratePaymentRequest {
string product_id = 1;
int32 quantity = 2;
}

message GenerateSalesTaxRequest {
string country = 1;
}

message GenerateCartEmptyRequest {
uint32 delay = 1;
}

message PlaceOrderRequest {
Expand Down
242 changes: 237 additions & 5 deletions src/checkoutservice/genproto/demo.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 85ffdba

Please sign in to comment.