winnerpredict.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.23.0
  4. // protoc v3.12.4
  5. // source: winnerpredict.proto
  6. //声明 包名
  7. package proto
  8. import (
  9. context "context"
  10. proto "github.com/golang/protobuf/proto"
  11. grpc "google.golang.org/grpc"
  12. codes "google.golang.org/grpc/codes"
  13. status "google.golang.org/grpc/status"
  14. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  15. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  16. reflect "reflect"
  17. sync "sync"
  18. )
  19. const (
  20. // Verify that this generated code is sufficiently up-to-date.
  21. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  22. // Verify that runtime/protoimpl is sufficiently up-to-date.
  23. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  24. )
  25. // This is a compile-time assertion that a sufficiently up-to-date version
  26. // of the legacy proto package is being used.
  27. const _ = proto.ProtoPackageIsVersion4
  28. //请求参数
  29. type PredictReq struct {
  30. state protoimpl.MessageState
  31. sizeCache protoimpl.SizeCache
  32. unknownFields protoimpl.UnknownFields
  33. ProjectName string `protobuf:"bytes,1,opt,name=ProjectName,proto3" json:"ProjectName,omitempty"` //项目名称
  34. Mount float32 `protobuf:"fixed32,2,opt,name=Mount,proto3" json:"Mount,omitempty"` //金额
  35. BidUnit string `protobuf:"bytes,3,opt,name=BidUnit,proto3" json:"BidUnit,omitempty"` //招标单位
  36. Area string `protobuf:"bytes,4,opt,name=Area,proto3" json:"Area,omitempty"` //地域
  37. City string `protobuf:"bytes,5,opt,name=City,proto3" json:"City,omitempty"` //城市
  38. Goods []string `protobuf:"bytes,6,rep,name=Goods,proto3" json:"Goods,omitempty"` //物品清单
  39. Winner string `protobuf:"bytes,7,opt,name=Winner,proto3" json:"Winner,omitempty"` //中标人
  40. WinnerOrder []string `protobuf:"bytes,8,rep,name=WinnerOrder,proto3" json:"WinnerOrder,omitempty"` //中标候选人
  41. }
  42. func (x *PredictReq) Reset() {
  43. *x = PredictReq{}
  44. if protoimpl.UnsafeEnabled {
  45. mi := &file_winnerpredict_proto_msgTypes[0]
  46. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  47. ms.StoreMessageInfo(mi)
  48. }
  49. }
  50. func (x *PredictReq) String() string {
  51. return protoimpl.X.MessageStringOf(x)
  52. }
  53. func (*PredictReq) ProtoMessage() {}
  54. func (x *PredictReq) ProtoReflect() protoreflect.Message {
  55. mi := &file_winnerpredict_proto_msgTypes[0]
  56. if protoimpl.UnsafeEnabled && x != nil {
  57. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  58. if ms.LoadMessageInfo() == nil {
  59. ms.StoreMessageInfo(mi)
  60. }
  61. return ms
  62. }
  63. return mi.MessageOf(x)
  64. }
  65. // Deprecated: Use PredictReq.ProtoReflect.Descriptor instead.
  66. func (*PredictReq) Descriptor() ([]byte, []int) {
  67. return file_winnerpredict_proto_rawDescGZIP(), []int{0}
  68. }
  69. func (x *PredictReq) GetProjectName() string {
  70. if x != nil {
  71. return x.ProjectName
  72. }
  73. return ""
  74. }
  75. func (x *PredictReq) GetMount() float32 {
  76. if x != nil {
  77. return x.Mount
  78. }
  79. return 0
  80. }
  81. func (x *PredictReq) GetBidUnit() string {
  82. if x != nil {
  83. return x.BidUnit
  84. }
  85. return ""
  86. }
  87. func (x *PredictReq) GetArea() string {
  88. if x != nil {
  89. return x.Area
  90. }
  91. return ""
  92. }
  93. func (x *PredictReq) GetCity() string {
  94. if x != nil {
  95. return x.City
  96. }
  97. return ""
  98. }
  99. func (x *PredictReq) GetGoods() []string {
  100. if x != nil {
  101. return x.Goods
  102. }
  103. return nil
  104. }
  105. func (x *PredictReq) GetWinner() string {
  106. if x != nil {
  107. return x.Winner
  108. }
  109. return ""
  110. }
  111. func (x *PredictReq) GetWinnerOrder() []string {
  112. if x != nil {
  113. return x.WinnerOrder
  114. }
  115. return nil
  116. }
  117. //返回结果
  118. type PredictResp struct {
  119. state protoimpl.MessageState
  120. sizeCache protoimpl.SizeCache
  121. unknownFields protoimpl.UnknownFields
  122. Item []*ResultEntiry `protobuf:"bytes,1,rep,name=Item,proto3" json:"Item,omitempty"`
  123. }
  124. func (x *PredictResp) Reset() {
  125. *x = PredictResp{}
  126. if protoimpl.UnsafeEnabled {
  127. mi := &file_winnerpredict_proto_msgTypes[1]
  128. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  129. ms.StoreMessageInfo(mi)
  130. }
  131. }
  132. func (x *PredictResp) String() string {
  133. return protoimpl.X.MessageStringOf(x)
  134. }
  135. func (*PredictResp) ProtoMessage() {}
  136. func (x *PredictResp) ProtoReflect() protoreflect.Message {
  137. mi := &file_winnerpredict_proto_msgTypes[1]
  138. if protoimpl.UnsafeEnabled && x != nil {
  139. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  140. if ms.LoadMessageInfo() == nil {
  141. ms.StoreMessageInfo(mi)
  142. }
  143. return ms
  144. }
  145. return mi.MessageOf(x)
  146. }
  147. // Deprecated: Use PredictResp.ProtoReflect.Descriptor instead.
  148. func (*PredictResp) Descriptor() ([]byte, []int) {
  149. return file_winnerpredict_proto_rawDescGZIP(), []int{1}
  150. }
  151. func (x *PredictResp) GetItem() []*ResultEntiry {
  152. if x != nil {
  153. return x.Item
  154. }
  155. return nil
  156. }
  157. //
  158. type ResultEntiry struct {
  159. state protoimpl.MessageState
  160. sizeCache protoimpl.SizeCache
  161. unknownFields protoimpl.UnknownFields
  162. EntName string `protobuf:"bytes,1,opt,name=EntName,proto3" json:"EntName,omitempty"` //
  163. Score float32 `protobuf:"fixed32,2,opt,name=Score,proto3" json:"Score,omitempty"`
  164. Weight float32 `protobuf:"fixed32,3,opt,name=Weight,proto3" json:"Weight,omitempty"`
  165. }
  166. func (x *ResultEntiry) Reset() {
  167. *x = ResultEntiry{}
  168. if protoimpl.UnsafeEnabled {
  169. mi := &file_winnerpredict_proto_msgTypes[2]
  170. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  171. ms.StoreMessageInfo(mi)
  172. }
  173. }
  174. func (x *ResultEntiry) String() string {
  175. return protoimpl.X.MessageStringOf(x)
  176. }
  177. func (*ResultEntiry) ProtoMessage() {}
  178. func (x *ResultEntiry) ProtoReflect() protoreflect.Message {
  179. mi := &file_winnerpredict_proto_msgTypes[2]
  180. if protoimpl.UnsafeEnabled && x != nil {
  181. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  182. if ms.LoadMessageInfo() == nil {
  183. ms.StoreMessageInfo(mi)
  184. }
  185. return ms
  186. }
  187. return mi.MessageOf(x)
  188. }
  189. // Deprecated: Use ResultEntiry.ProtoReflect.Descriptor instead.
  190. func (*ResultEntiry) Descriptor() ([]byte, []int) {
  191. return file_winnerpredict_proto_rawDescGZIP(), []int{2}
  192. }
  193. func (x *ResultEntiry) GetEntName() string {
  194. if x != nil {
  195. return x.EntName
  196. }
  197. return ""
  198. }
  199. func (x *ResultEntiry) GetScore() float32 {
  200. if x != nil {
  201. return x.Score
  202. }
  203. return 0
  204. }
  205. func (x *ResultEntiry) GetWeight() float32 {
  206. if x != nil {
  207. return x.Weight
  208. }
  209. return 0
  210. }
  211. var File_winnerpredict_proto protoreflect.FileDescriptor
  212. var file_winnerpredict_proto_rawDesc = []byte{
  213. 0x0a, 0x13, 0x77, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x2e,
  214. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x01, 0x0a,
  215. 0x0a, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x50,
  216. 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
  217. 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a,
  218. 0x05, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x4d, 0x6f,
  219. 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x69, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x18, 0x03,
  220. 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x42, 0x69, 0x64, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x12, 0x0a,
  221. 0x04, 0x41, 0x72, 0x65, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x41, 0x72, 0x65,
  222. 0x61, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
  223. 0x04, 0x43, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x06,
  224. 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x57,
  225. 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x57, 0x69, 0x6e,
  226. 0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x4f, 0x72, 0x64,
  227. 0x65, 0x72, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72,
  228. 0x4f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x0b, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74,
  229. 0x52, 0x65, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x03,
  230. 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c,
  231. 0x74, 0x45, 0x6e, 0x74, 0x69, 0x72, 0x79, 0x52, 0x04, 0x49, 0x74, 0x65, 0x6d, 0x22, 0x56, 0x0a,
  232. 0x0c, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x72, 0x79, 0x12, 0x18, 0x0a,
  233. 0x07, 0x45, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
  234. 0x45, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65,
  235. 0x18, 0x02, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a,
  236. 0x06, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x57,
  237. 0x65, 0x69, 0x67, 0x68, 0x74, 0x32, 0x4a, 0x0a, 0x14, 0x57, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x50,
  238. 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a,
  239. 0x07, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  240. 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x70, 0x72,
  241. 0x6f, 0x74, 0x6f, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22,
  242. 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  243. }
  244. var (
  245. file_winnerpredict_proto_rawDescOnce sync.Once
  246. file_winnerpredict_proto_rawDescData = file_winnerpredict_proto_rawDesc
  247. )
  248. func file_winnerpredict_proto_rawDescGZIP() []byte {
  249. file_winnerpredict_proto_rawDescOnce.Do(func() {
  250. file_winnerpredict_proto_rawDescData = protoimpl.X.CompressGZIP(file_winnerpredict_proto_rawDescData)
  251. })
  252. return file_winnerpredict_proto_rawDescData
  253. }
  254. var file_winnerpredict_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  255. var file_winnerpredict_proto_goTypes = []interface{}{
  256. (*PredictReq)(nil), // 0: proto.PredictReq
  257. (*PredictResp)(nil), // 1: proto.PredictResp
  258. (*ResultEntiry)(nil), // 2: proto.ResultEntiry
  259. }
  260. var file_winnerpredict_proto_depIdxs = []int32{
  261. 2, // 0: proto.PredictResp.Item:type_name -> proto.ResultEntiry
  262. 0, // 1: proto.WinnerPredictService.Predict:input_type -> proto.PredictReq
  263. 1, // 2: proto.WinnerPredictService.Predict:output_type -> proto.PredictResp
  264. 2, // [2:3] is the sub-list for method output_type
  265. 1, // [1:2] is the sub-list for method input_type
  266. 1, // [1:1] is the sub-list for extension type_name
  267. 1, // [1:1] is the sub-list for extension extendee
  268. 0, // [0:1] is the sub-list for field type_name
  269. }
  270. func init() { file_winnerpredict_proto_init() }
  271. func file_winnerpredict_proto_init() {
  272. if File_winnerpredict_proto != nil {
  273. return
  274. }
  275. if !protoimpl.UnsafeEnabled {
  276. file_winnerpredict_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  277. switch v := v.(*PredictReq); i {
  278. case 0:
  279. return &v.state
  280. case 1:
  281. return &v.sizeCache
  282. case 2:
  283. return &v.unknownFields
  284. default:
  285. return nil
  286. }
  287. }
  288. file_winnerpredict_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  289. switch v := v.(*PredictResp); i {
  290. case 0:
  291. return &v.state
  292. case 1:
  293. return &v.sizeCache
  294. case 2:
  295. return &v.unknownFields
  296. default:
  297. return nil
  298. }
  299. }
  300. file_winnerpredict_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  301. switch v := v.(*ResultEntiry); i {
  302. case 0:
  303. return &v.state
  304. case 1:
  305. return &v.sizeCache
  306. case 2:
  307. return &v.unknownFields
  308. default:
  309. return nil
  310. }
  311. }
  312. }
  313. type x struct{}
  314. out := protoimpl.TypeBuilder{
  315. File: protoimpl.DescBuilder{
  316. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  317. RawDescriptor: file_winnerpredict_proto_rawDesc,
  318. NumEnums: 0,
  319. NumMessages: 3,
  320. NumExtensions: 0,
  321. NumServices: 1,
  322. },
  323. GoTypes: file_winnerpredict_proto_goTypes,
  324. DependencyIndexes: file_winnerpredict_proto_depIdxs,
  325. MessageInfos: file_winnerpredict_proto_msgTypes,
  326. }.Build()
  327. File_winnerpredict_proto = out.File
  328. file_winnerpredict_proto_rawDesc = nil
  329. file_winnerpredict_proto_goTypes = nil
  330. file_winnerpredict_proto_depIdxs = nil
  331. }
  332. // Reference imports to suppress errors if they are not otherwise used.
  333. var _ context.Context
  334. var _ grpc.ClientConnInterface
  335. // This is a compile-time assertion to ensure that this generated file
  336. // is compatible with the grpc package it is being compiled against.
  337. const _ = grpc.SupportPackageIsVersion6
  338. // WinnerPredictServiceClient is the client API for WinnerPredictService service.
  339. //
  340. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  341. type WinnerPredictServiceClient interface {
  342. Predict(ctx context.Context, in *PredictReq, opts ...grpc.CallOption) (*PredictResp, error)
  343. }
  344. type winnerPredictServiceClient struct {
  345. cc grpc.ClientConnInterface
  346. }
  347. func NewWinnerPredictServiceClient(cc grpc.ClientConnInterface) WinnerPredictServiceClient {
  348. return &winnerPredictServiceClient{cc}
  349. }
  350. func (c *winnerPredictServiceClient) Predict(ctx context.Context, in *PredictReq, opts ...grpc.CallOption) (*PredictResp, error) {
  351. out := new(PredictResp)
  352. err := c.cc.Invoke(ctx, "/proto.WinnerPredictService/Predict", in, out, opts...)
  353. if err != nil {
  354. return nil, err
  355. }
  356. return out, nil
  357. }
  358. // WinnerPredictServiceServer is the server API for WinnerPredictService service.
  359. type WinnerPredictServiceServer interface {
  360. Predict(context.Context, *PredictReq) (*PredictResp, error)
  361. }
  362. // UnimplementedWinnerPredictServiceServer can be embedded to have forward compatible implementations.
  363. type UnimplementedWinnerPredictServiceServer struct {
  364. }
  365. func (*UnimplementedWinnerPredictServiceServer) Predict(context.Context, *PredictReq) (*PredictResp, error) {
  366. return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented")
  367. }
  368. func RegisterWinnerPredictServiceServer(s *grpc.Server, srv WinnerPredictServiceServer) {
  369. s.RegisterService(&_WinnerPredictService_serviceDesc, srv)
  370. }
  371. func _WinnerPredictService_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  372. in := new(PredictReq)
  373. if err := dec(in); err != nil {
  374. return nil, err
  375. }
  376. if interceptor == nil {
  377. return srv.(WinnerPredictServiceServer).Predict(ctx, in)
  378. }
  379. info := &grpc.UnaryServerInfo{
  380. Server: srv,
  381. FullMethod: "/proto.WinnerPredictService/Predict",
  382. }
  383. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  384. return srv.(WinnerPredictServiceServer).Predict(ctx, req.(*PredictReq))
  385. }
  386. return interceptor(ctx, in, info, handler)
  387. }
  388. var _WinnerPredictService_serviceDesc = grpc.ServiceDesc{
  389. ServiceName: "proto.WinnerPredictService",
  390. HandlerType: (*WinnerPredictServiceServer)(nil),
  391. Methods: []grpc.MethodDesc{
  392. {
  393. MethodName: "Predict",
  394. Handler: _WinnerPredictService_Predict_Handler,
  395. },
  396. },
  397. Streams: []grpc.StreamDesc{},
  398. Metadata: "winnerpredict.proto",
  399. }