// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.23.0 // protoc v3.12.4 // source: fileText.proto //附件传输 package proto import ( context "context" proto "github.com/golang/protobuf/proto" 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" sync "sync" ) 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) ) // This is a compile-time assertion that a sufficiently up-to-date version // of the legacy proto package is being used. const _ = proto.ProtoPackageIsVersion4 type FileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Message []*Request `protobuf:"bytes,1,rep,name=message,proto3" json:"message,omitempty"` //文件名称 Other string `protobuf:"bytes,2,opt,name=Other,proto3" json:"Other,omitempty"` Topic string `protobuf:"bytes,3,opt,name=Topic,proto3" json:"Topic,omitempty"` } func (x *FileRequest) Reset() { *x = FileRequest{} if protoimpl.UnsafeEnabled { mi := &file_fileText_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FileRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileRequest) ProtoMessage() {} func (x *FileRequest) ProtoReflect() protoreflect.Message { mi := &file_fileText_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FileRequest.ProtoReflect.Descriptor instead. func (*FileRequest) Descriptor() ([]byte, []int) { return file_fileText_proto_rawDescGZIP(), []int{0} } func (x *FileRequest) GetMessage() []*Request { if x != nil { return x.Message } return nil } func (x *FileRequest) GetOther() string { if x != nil { return x.Other } return "" } func (x *FileRequest) GetTopic() string { if x != nil { return x.Topic } return "" } type Request struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` //文件名称 FileUrl string `protobuf:"bytes,2,opt,name=fileUrl,proto3" json:"fileUrl,omitempty"` //下载的url FileBytes []byte `protobuf:"bytes,3,opt,name=fileBytes,proto3" json:"fileBytes,omitempty"` //文件字节流 FileType string `protobuf:"bytes,4,opt,name=fileType,proto3" json:"fileType,omitempty"` //文件类型 pdf ,xls ,doc ReturnType int32 `protobuf:"varint,5,opt,name=returnType,proto3" json:"returnType,omitempty"` //文件类型 {0:url,1:content,2:url+content} 默认0 ExtractType int32 `protobuf:"varint,6,opt,name=extractType,proto3" json:"extractType,omitempty"` //解析文件类型{0:url,1:fileBytes,2:oss} 默认2 } func (x *Request) Reset() { *x = Request{} if protoimpl.UnsafeEnabled { mi := &file_fileText_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Request) String() string { return protoimpl.X.MessageStringOf(x) } func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { mi := &file_fileText_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Request.ProtoReflect.Descriptor instead. func (*Request) Descriptor() ([]byte, []int) { return file_fileText_proto_rawDescGZIP(), []int{1} } func (x *Request) GetFileName() string { if x != nil { return x.FileName } return "" } func (x *Request) GetFileUrl() string { if x != nil { return x.FileUrl } return "" } func (x *Request) GetFileBytes() []byte { if x != nil { return x.FileBytes } return nil } func (x *Request) GetFileType() string { if x != nil { return x.FileType } return "" } func (x *Request) GetReturnType() int32 { if x != nil { return x.ReturnType } return 0 } func (x *Request) GetExtractType() int32 { if x != nil { return x.ExtractType } return 0 } type FileResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Result []*Result `protobuf:"bytes,1,rep,name=result,proto3" json:"result,omitempty"` //返回结果 Other string `protobuf:"bytes,2,opt,name=Other,proto3" json:"Other,omitempty"` } func (x *FileResponse) Reset() { *x = FileResponse{} if protoimpl.UnsafeEnabled { mi := &file_fileText_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *FileResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileResponse) ProtoMessage() {} func (x *FileResponse) ProtoReflect() protoreflect.Message { mi := &file_fileText_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FileResponse.ProtoReflect.Descriptor instead. func (*FileResponse) Descriptor() ([]byte, []int) { return file_fileText_proto_rawDescGZIP(), []int{2} } func (x *FileResponse) GetResult() []*Result { if x != nil { return x.Result } return nil } func (x *FileResponse) GetOther() string { if x != nil { return x.Other } return "" } type Result struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` //文件名称 TextContent string `protobuf:"bytes,2,opt,name=textContent,proto3" json:"textContent,omitempty"` //文本内容 TextUrl string `protobuf:"bytes,3,opt,name=textUrl,proto3" json:"textUrl,omitempty"` //文本URL FilePath string `protobuf:"bytes,4,opt,name=filePath,proto3" json:"filePath,omitempty"` //文件路径 ErrorState string `protobuf:"bytes,5,opt,name=errorState,proto3" json:"errorState,omitempty"` //状态{200:解析成功,300:下载失败,400:解析失败} } func (x *Result) Reset() { *x = Result{} if protoimpl.UnsafeEnabled { mi := &file_fileText_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } func (x *Result) String() string { return protoimpl.X.MessageStringOf(x) } func (*Result) ProtoMessage() {} func (x *Result) ProtoReflect() protoreflect.Message { mi := &file_fileText_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use Result.ProtoReflect.Descriptor instead. func (*Result) Descriptor() ([]byte, []int) { return file_fileText_proto_rawDescGZIP(), []int{3} } func (x *Result) GetFileName() string { if x != nil { return x.FileName } return "" } func (x *Result) GetTextContent() string { if x != nil { return x.TextContent } return "" } func (x *Result) GetTextUrl() string { if x != nil { return x.TextUrl } return "" } func (x *Result) GetFilePath() string { if x != nil { return x.FilePath } return "" } func (x *Result) GetErrorState() string { if x != nil { return x.ErrorState } return "" } var File_fileText_proto protoreflect.FileDescriptor var file_fileText_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x22, 0xbb, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x0c, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x22, 0x9c, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x65, 0x78, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x78, 0x74, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x78, 0x74, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x32, 0x45, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x36, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( file_fileText_proto_rawDescOnce sync.Once file_fileText_proto_rawDescData = file_fileText_proto_rawDesc ) func file_fileText_proto_rawDescGZIP() []byte { file_fileText_proto_rawDescOnce.Do(func() { file_fileText_proto_rawDescData = protoimpl.X.CompressGZIP(file_fileText_proto_rawDescData) }) return file_fileText_proto_rawDescData } var file_fileText_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_fileText_proto_goTypes = []interface{}{ (*FileRequest)(nil), // 0: proto.FileRequest (*Request)(nil), // 1: proto.Request (*FileResponse)(nil), // 2: proto.FileResponse (*Result)(nil), // 3: proto.Result } var file_fileText_proto_depIdxs = []int32{ 1, // 0: proto.FileRequest.message:type_name -> proto.Request 3, // 1: proto.FileResponse.result:type_name -> proto.Result 0, // 2: proto.FileExtract.FileExtract:input_type -> proto.FileRequest 2, // 3: proto.FileExtract.FileExtract:output_type -> proto.FileResponse 3, // [3:4] is the sub-list for method output_type 2, // [2:3] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name } func init() { file_fileText_proto_init() } func file_fileText_proto_init() { if File_fileText_proto != nil { return } if !protoimpl.UnsafeEnabled { file_fileText_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileRequest); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_fileText_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Request); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_fileText_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileResponse); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } file_fileText_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Result); i { case 0: return &v.state case 1: return &v.sizeCache case 2: return &v.unknownFields default: return nil } } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_fileText_proto_rawDesc, NumEnums: 0, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_fileText_proto_goTypes, DependencyIndexes: file_fileText_proto_depIdxs, MessageInfos: file_fileText_proto_msgTypes, }.Build() File_fileText_proto = out.File file_fileText_proto_rawDesc = nil file_fileText_proto_goTypes = nil file_fileText_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 // FileExtractClient is the client API for FileExtract service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type FileExtractClient interface { FileExtract(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (*FileResponse, error) } type fileExtractClient struct { cc grpc.ClientConnInterface } func NewFileExtractClient(cc grpc.ClientConnInterface) FileExtractClient { return &fileExtractClient{cc} } func (c *fileExtractClient) FileExtract(ctx context.Context, in *FileRequest, opts ...grpc.CallOption) (*FileResponse, error) { out := new(FileResponse) err := c.cc.Invoke(ctx, "/proto.FileExtract/FileExtract", in, out, opts...) if err != nil { return nil, err } return out, nil } // FileExtractServer is the server API for FileExtract service. type FileExtractServer interface { FileExtract(context.Context, *FileRequest) (*FileResponse, error) } // UnimplementedFileExtractServer can be embedded to have forward compatible implementations. type UnimplementedFileExtractServer struct { } func (*UnimplementedFileExtractServer) FileExtract(context.Context, *FileRequest) (*FileResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method FileExtract not implemented") } func RegisterFileExtractServer(s *grpc.Server, srv FileExtractServer) { s.RegisterService(&_FileExtract_serviceDesc, srv) } func _FileExtract_FileExtract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FileRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(FileExtractServer).FileExtract(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/proto.FileExtract/FileExtract", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(FileExtractServer).FileExtract(ctx, req.(*FileRequest)) } return interceptor(ctx, in, info, handler) } var _FileExtract_serviceDesc = grpc.ServiceDesc{ ServiceName: "proto.FileExtract", HandlerType: (*FileExtractServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FileExtract", Handler: _FileExtract_FileExtract_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "fileText.proto", }