1 Star 0 Fork 0

micro-tools / wf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
order.pb.go 8.73 KB
一键复制 编辑 原始数据 按行查看 历史
545403892 提交于 2023-09-27 22:16 . 升级go-ole
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.17.2
// source: order.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_order_proto protoreflect.FileDescriptor
var file_order_proto_rawDesc = []byte{
0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x1a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x32, 0xa6, 0x01, 0x0a, 0x05, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a,
0x06, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
0x6f, 0x6c, 0x2e, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65,
0x73, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x12, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71,
0x1a, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x51, 0x75, 0x65, 0x72,
0x79, 0x52, 0x65, 0x73, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x22, 0x00, 0x42, 0x0d, 0x5a, 0x0b,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var file_order_proto_goTypes = []interface{}{
(*InsertReq)(nil), // 0: protocol.InsertReq
(*QueryReq)(nil), // 1: protocol.QueryReq
(*DeleteReq)(nil), // 2: protocol.DeleteReq
(*InsertRes)(nil), // 3: protocol.InsertRes
(*QueryRes)(nil), // 4: protocol.QueryRes
(*DeleteRes)(nil), // 5: protocol.DeleteRes
}
var file_order_proto_depIdxs = []int32{
0, // 0: protocol.Order.Insert:input_type -> protocol.InsertReq
1, // 1: protocol.Order.Query:input_type -> protocol.QueryReq
2, // 2: protocol.Order.Delete:input_type -> protocol.DeleteReq
3, // 3: protocol.Order.Insert:output_type -> protocol.InsertRes
4, // 4: protocol.Order.Query:output_type -> protocol.QueryRes
5, // 5: protocol.Order.Delete:output_type -> protocol.DeleteRes
3, // [3:6] is the sub-list for method output_type
0, // [0:3] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_order_proto_init() }
func file_order_proto_init() {
if File_order_proto != nil {
return
}
file_user_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_order_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_order_proto_goTypes,
DependencyIndexes: file_order_proto_depIdxs,
}.Build()
File_order_proto = out.File
file_order_proto_rawDesc = nil
file_order_proto_goTypes = nil
file_order_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// OrderClient is the client API for Order service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OrderClient interface {
Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*InsertRes, error)
Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*QueryRes, error)
Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*DeleteRes, error)
}
type orderClient struct {
cc grpc.ClientConnInterface
}
func NewOrderClient(cc grpc.ClientConnInterface) OrderClient {
return &orderClient{cc}
}
func (c *orderClient) Insert(ctx context.Context, in *InsertReq, opts ...grpc.CallOption) (*InsertRes, error) {
out := new(InsertRes)
err := c.cc.Invoke(ctx, "/protocol.Order/Insert", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *orderClient) Query(ctx context.Context, in *QueryReq, opts ...grpc.CallOption) (*QueryRes, error) {
out := new(QueryRes)
err := c.cc.Invoke(ctx, "/protocol.Order/Query", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *orderClient) Delete(ctx context.Context, in *DeleteReq, opts ...grpc.CallOption) (*DeleteRes, error) {
out := new(DeleteRes)
err := c.cc.Invoke(ctx, "/protocol.Order/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OrderServer is the server API for Order service.
type OrderServer interface {
Insert(context.Context, *InsertReq) (*InsertRes, error)
Query(context.Context, *QueryReq) (*QueryRes, error)
Delete(context.Context, *DeleteReq) (*DeleteRes, error)
}
// UnimplementedOrderServer can be embedded to have forward compatible implementations.
type UnimplementedOrderServer struct {
}
func (*UnimplementedOrderServer) Insert(context.Context, *InsertReq) (*InsertRes, error) {
return nil, status.Errorf(codes.Unimplemented, "method Insert not implemented")
}
func (*UnimplementedOrderServer) Query(context.Context, *QueryReq) (*QueryRes, error) {
return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
}
func (*UnimplementedOrderServer) Delete(context.Context, *DeleteReq) (*DeleteRes, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func RegisterOrderServer(s *grpc.Server, srv OrderServer) {
s.RegisterService(&_Order_serviceDesc, srv)
}
func _Order_Insert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InsertReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrderServer).Insert(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protocol.Order/Insert",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrderServer).Insert(ctx, req.(*InsertReq))
}
return interceptor(ctx, in, info, handler)
}
func _Order_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrderServer).Query(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protocol.Order/Query",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrderServer).Query(ctx, req.(*QueryReq))
}
return interceptor(ctx, in, info, handler)
}
func _Order_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OrderServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protocol.Order/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OrderServer).Delete(ctx, req.(*DeleteReq))
}
return interceptor(ctx, in, info, handler)
}
var _Order_serviceDesc = grpc.ServiceDesc{
ServiceName: "protocol.Order",
HandlerType: (*OrderServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Insert",
Handler: _Order_Insert_Handler,
},
{
MethodName: "Query",
Handler: _Order_Query_Handler,
},
{
MethodName: "Delete",
Handler: _Order_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "order.proto",
}
Go
1
https://gitee.com/micro-tools/wf.git
git@gitee.com:micro-tools/wf.git
micro-tools
wf
wf
v1.0.2

搜索帮助