Browse Source

增加GetCouponInfo方法

master
guzeng 3 years ago
parent
commit
8c110e8f6b
2 changed files with 9 additions and 5 deletions
  1. +7
    -3
      coupon.pb.go
  2. +2
    -2
      coupon.proto

+ 7
- 3
coupon.pb.go View File

@ -14,15 +14,15 @@ It has these top-level messages:
*/
package couponrpc
import "github.com/chai2010/protorpc/proto"
import "math"
import proto "github.com/chai2010/protorpc/proto"
import math "math"
import "io"
import "log"
import "net"
import "net/rpc"
import "time"
import "github.com/chai2010/protorpc"
import protorpc "github.com/chai2010/protorpc"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@ -100,6 +100,7 @@ func init() {
type CouponService interface {
IsAvailable(in *CouponRequest, out *CouponResponse) error
Use(in *CouponRequest, out *CouponResponse) error
GetCouponInfo(in *CouponRequest, out *CouponResponse) error
}
// AcceptCouponServiceClient accepts connections on the listener and serves requests
@ -177,6 +178,9 @@ func (c *CouponServiceClient) IsAvailable(in *CouponRequest, out *CouponResponse
func (c *CouponServiceClient) Use(in *CouponRequest, out *CouponResponse) error {
return c.Call("CouponService.Use", in, out)
}
func (c *CouponServiceClient) GetCouponInfo(in *CouponRequest, out *CouponResponse) error {
return c.Call("CouponService.GetCouponInfo", in, out)
}
// DialCouponService connects to an CouponService at the specified network address.
func DialCouponService(network, addr string) (*CouponServiceClient, *rpc.Client, error) {


+ 2
- 2
coupon.proto View File

@ -20,5 +20,5 @@ message CouponResponse {
service CouponService {
rpc isAvailable (CouponRequest) returns (CouponResponse); //
rpc use (CouponRequest) returns (CouponResponse); // 使
rpc GetCouponInfo (CouponRequest) returns (CouponResponse) //
}
rpc GetCouponInfo (CouponRequest) returns (CouponResponse); //
}

Loading…
Cancel
Save