|
|
- syntax = "proto3";
- package couponrpc;
-
- // 是否可用请求结构
- message CouponRequest {
- string data = 1;
- string time = 2;
- string sign = 3;
- }
-
- // 是否可用响应结构
- message CouponResponse {
- string data = 1;
- string time = 2;
- string sign = 3;
- }
-
-
- // rpc方法
- service CouponService {
- rpc isAvailable (CouponRequest) returns (CouponResponse); // 优惠券是否可用
- rpc use (CouponRequest) returns (CouponResponse); // 使用优惠券
- }
|