rpc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
460 B

3 years ago
  1. syntax = "proto3";
  2. package coupon;
  3. // 是否可用请求结构
  4. message CouponRequest {
  5. string data = 1;
  6. string time = 2;
  7. string sign = 3;
  8. }
  9. // 是否可用响应结构
  10. message CouponResponse {
  11. string data = 1;
  12. string time = 2;
  13. string sign = 3;
  14. }
  15. // rpc方法
  16. service CouponService {
  17. rpc isAvailable (CouponRequest) returns (CouponResponse); // 优惠券是否可用
  18. rpc use (CouponRequest) returns (CouponResponse); // 使用优惠券
  19. }