refactor: centralize protobuf and remove go-zero
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: coupon.proto
|
||||
// - protoc-gen-go-grpc v1.6.2
|
||||
// - protoc v7.35.0
|
||||
// source: module/ec/order/proto/coupon.proto
|
||||
|
||||
package order
|
||||
|
||||
@@ -51,17 +51,16 @@ func (c *couponClient) ByStatus(ctx context.Context, in *Status, opts ...grpc.Ca
|
||||
}
|
||||
|
||||
// CouponServer is the server API for Coupon service.
|
||||
// All implementations must embed UnimplementedCouponServer
|
||||
// All implementations should embed UnimplementedCouponServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Order(订单)微服务-优惠卷
|
||||
type CouponServer interface {
|
||||
// 按状态获取优惠卷
|
||||
ByStatus(context.Context, *Status) (*CouponListReply, error)
|
||||
mustEmbedUnimplementedCouponServer()
|
||||
}
|
||||
|
||||
// UnimplementedCouponServer must be embedded to have
|
||||
// UnimplementedCouponServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
@@ -69,10 +68,9 @@ type CouponServer interface {
|
||||
type UnimplementedCouponServer struct{}
|
||||
|
||||
func (UnimplementedCouponServer) ByStatus(context.Context, *Status) (*CouponListReply, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ByStatus not implemented")
|
||||
return nil, status.Error(codes.Unimplemented, "method ByStatus not implemented")
|
||||
}
|
||||
func (UnimplementedCouponServer) mustEmbedUnimplementedCouponServer() {}
|
||||
func (UnimplementedCouponServer) testEmbeddedByValue() {}
|
||||
func (UnimplementedCouponServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeCouponServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to CouponServer will
|
||||
@@ -82,7 +80,7 @@ type UnsafeCouponServer interface {
|
||||
}
|
||||
|
||||
func RegisterCouponServer(s grpc.ServiceRegistrar, srv CouponServer) {
|
||||
// If the following call pancis, it indicates UnimplementedCouponServer was
|
||||
// If the following call panics, it indicates UnimplementedCouponServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
@@ -123,5 +121,5 @@ var Coupon_ServiceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "coupon.proto",
|
||||
Metadata: "module/ec/order/proto/coupon.proto",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user