1 Star 0 Fork 0

爱哭的毛毛虫/tcc-protoc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
biz_goods_grpc.pb.go 3.97 KB
一键复制 编辑 原始数据 按行查看 历史
cat 提交于 2024-07-24 17:31 . 处理pb报名
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.19.1
// source: biz_goods/v1/biz_goods.proto
package v1
import (
context "context"
base "gitee.com/xiaoluo_1024/tcc-protoc/api/base"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// BizGoodsServiceClient is the client API for BizGoodsService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type BizGoodsServiceClient interface {
// 更新库存
UpdateInventory(ctx context.Context, in *UpdateInventoryRequest, opts ...grpc.CallOption) (*base.OperateReply, error)
}
type bizGoodsServiceClient struct {
cc grpc.ClientConnInterface
}
func NewBizGoodsServiceClient(cc grpc.ClientConnInterface) BizGoodsServiceClient {
return &bizGoodsServiceClient{cc}
}
func (c *bizGoodsServiceClient) UpdateInventory(ctx context.Context, in *UpdateInventoryRequest, opts ...grpc.CallOption) (*base.OperateReply, error) {
out := new(base.OperateReply)
err := c.cc.Invoke(ctx, "/biz_goods.v1.BizGoodsService/UpdateInventory", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// BizGoodsServiceServer is the server API for BizGoodsService service.
// All implementations must embed UnimplementedBizGoodsServiceServer
// for forward compatibility
type BizGoodsServiceServer interface {
// 更新库存
UpdateInventory(context.Context, *UpdateInventoryRequest) (*base.OperateReply, error)
mustEmbedUnimplementedBizGoodsServiceServer()
}
// UnimplementedBizGoodsServiceServer must be embedded to have forward compatible implementations.
type UnimplementedBizGoodsServiceServer struct {
}
func (UnimplementedBizGoodsServiceServer) UpdateInventory(context.Context, *UpdateInventoryRequest) (*base.OperateReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateInventory not implemented")
}
func (UnimplementedBizGoodsServiceServer) mustEmbedUnimplementedBizGoodsServiceServer() {}
// UnsafeBizGoodsServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to BizGoodsServiceServer will
// result in compilation errors.
type UnsafeBizGoodsServiceServer interface {
mustEmbedUnimplementedBizGoodsServiceServer()
}
func RegisterBizGoodsServiceServer(s grpc.ServiceRegistrar, srv BizGoodsServiceServer) {
s.RegisterService(&BizGoodsService_ServiceDesc, srv)
}
func _BizGoodsService_UpdateInventory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateInventoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(BizGoodsServiceServer).UpdateInventory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/biz_goods.v1.BizGoodsService/UpdateInventory",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BizGoodsServiceServer).UpdateInventory(ctx, req.(*UpdateInventoryRequest))
}
return interceptor(ctx, in, info, handler)
}
// BizGoodsService_ServiceDesc is the grpc.ServiceDesc for BizGoodsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BizGoodsService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "biz_goods.v1.BizGoodsService",
HandlerType: (*BizGoodsServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpdateInventory",
Handler: _BizGoodsService_UpdateInventory_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "biz_goods/v1/biz_goods.proto",
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiaoluo_1024/tcc-protoc.git
git@gitee.com:xiaoluo_1024/tcc-protoc.git
xiaoluo_1024
tcc-protoc
tcc-protoc
v1.1.0

搜索帮助

0d507c66 1850385 C8b1a773 1850385