safe.pb.go 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0
  4. // protoc v3.9.0
  5. // source: safe.proto
  6. package proto
  7. import (
  8. context "context"
  9. proto "github.com/golang/protobuf/proto"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  14. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  15. reflect "reflect"
  16. sync "sync"
  17. )
  18. const (
  19. // Verify that this generated code is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  21. // Verify that runtime/protoimpl is sufficiently up-to-date.
  22. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  23. )
  24. // This is a compile-time assertion that a sufficiently up-to-date version
  25. // of the legacy proto package is being used.
  26. const _ = proto.ProtoPackageIsVersion4
  27. // The request message containing the user's name.
  28. type SafeGetRequest struct {
  29. state protoimpl.MessageState
  30. sizeCache protoimpl.SizeCache
  31. unknownFields protoimpl.UnknownFields
  32. Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  33. }
  34. func (x *SafeGetRequest) Reset() {
  35. *x = SafeGetRequest{}
  36. if protoimpl.UnsafeEnabled {
  37. mi := &file_safe_proto_msgTypes[0]
  38. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  39. ms.StoreMessageInfo(mi)
  40. }
  41. }
  42. func (x *SafeGetRequest) String() string {
  43. return protoimpl.X.MessageStringOf(x)
  44. }
  45. func (*SafeGetRequest) ProtoMessage() {}
  46. func (x *SafeGetRequest) ProtoReflect() protoreflect.Message {
  47. mi := &file_safe_proto_msgTypes[0]
  48. if protoimpl.UnsafeEnabled && x != nil {
  49. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  50. if ms.LoadMessageInfo() == nil {
  51. ms.StoreMessageInfo(mi)
  52. }
  53. return ms
  54. }
  55. return mi.MessageOf(x)
  56. }
  57. // Deprecated: Use SafeGetRequest.ProtoReflect.Descriptor instead.
  58. func (*SafeGetRequest) Descriptor() ([]byte, []int) {
  59. return file_safe_proto_rawDescGZIP(), []int{0}
  60. }
  61. func (x *SafeGetRequest) GetId() int32 {
  62. if x != nil {
  63. return x.Id
  64. }
  65. return 0
  66. }
  67. type SafePostRequest struct {
  68. state protoimpl.MessageState
  69. sizeCache protoimpl.SizeCache
  70. unknownFields protoimpl.UnknownFields
  71. BidsectionId int32 `protobuf:"varint,1,opt,name=bidsection_id,json=bidsectionId,proto3" json:"bidsection_id,omitempty"`
  72. Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
  73. Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"`
  74. CreateTime string `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
  75. Inspection string `protobuf:"bytes,5,opt,name=inspection,proto3" json:"inspection,omitempty"`
  76. }
  77. func (x *SafePostRequest) Reset() {
  78. *x = SafePostRequest{}
  79. if protoimpl.UnsafeEnabled {
  80. mi := &file_safe_proto_msgTypes[1]
  81. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  82. ms.StoreMessageInfo(mi)
  83. }
  84. }
  85. func (x *SafePostRequest) String() string {
  86. return protoimpl.X.MessageStringOf(x)
  87. }
  88. func (*SafePostRequest) ProtoMessage() {}
  89. func (x *SafePostRequest) ProtoReflect() protoreflect.Message {
  90. mi := &file_safe_proto_msgTypes[1]
  91. if protoimpl.UnsafeEnabled && x != nil {
  92. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  93. if ms.LoadMessageInfo() == nil {
  94. ms.StoreMessageInfo(mi)
  95. }
  96. return ms
  97. }
  98. return mi.MessageOf(x)
  99. }
  100. // Deprecated: Use SafePostRequest.ProtoReflect.Descriptor instead.
  101. func (*SafePostRequest) Descriptor() ([]byte, []int) {
  102. return file_safe_proto_rawDescGZIP(), []int{1}
  103. }
  104. func (x *SafePostRequest) GetBidsectionId() int32 {
  105. if x != nil {
  106. return x.BidsectionId
  107. }
  108. return 0
  109. }
  110. func (x *SafePostRequest) GetCode() string {
  111. if x != nil {
  112. return x.Code
  113. }
  114. return ""
  115. }
  116. func (x *SafePostRequest) GetPosition() string {
  117. if x != nil {
  118. return x.Position
  119. }
  120. return ""
  121. }
  122. func (x *SafePostRequest) GetCreateTime() string {
  123. if x != nil {
  124. return x.CreateTime
  125. }
  126. return ""
  127. }
  128. func (x *SafePostRequest) GetInspection() string {
  129. if x != nil {
  130. return x.Inspection
  131. }
  132. return ""
  133. }
  134. // The response message containing the greetings
  135. type SafeReply struct {
  136. state protoimpl.MessageState
  137. sizeCache protoimpl.SizeCache
  138. unknownFields protoimpl.UnknownFields
  139. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  140. Data string `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  141. Msg string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
  142. }
  143. func (x *SafeReply) Reset() {
  144. *x = SafeReply{}
  145. if protoimpl.UnsafeEnabled {
  146. mi := &file_safe_proto_msgTypes[2]
  147. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  148. ms.StoreMessageInfo(mi)
  149. }
  150. }
  151. func (x *SafeReply) String() string {
  152. return protoimpl.X.MessageStringOf(x)
  153. }
  154. func (*SafeReply) ProtoMessage() {}
  155. func (x *SafeReply) ProtoReflect() protoreflect.Message {
  156. mi := &file_safe_proto_msgTypes[2]
  157. if protoimpl.UnsafeEnabled && x != nil {
  158. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  159. if ms.LoadMessageInfo() == nil {
  160. ms.StoreMessageInfo(mi)
  161. }
  162. return ms
  163. }
  164. return mi.MessageOf(x)
  165. }
  166. // Deprecated: Use SafeReply.ProtoReflect.Descriptor instead.
  167. func (*SafeReply) Descriptor() ([]byte, []int) {
  168. return file_safe_proto_rawDescGZIP(), []int{2}
  169. }
  170. func (x *SafeReply) GetCode() int32 {
  171. if x != nil {
  172. return x.Code
  173. }
  174. return 0
  175. }
  176. func (x *SafeReply) GetData() string {
  177. if x != nil {
  178. return x.Data
  179. }
  180. return ""
  181. }
  182. func (x *SafeReply) GetMsg() string {
  183. if x != nil {
  184. return x.Msg
  185. }
  186. return ""
  187. }
  188. var File_safe_proto protoreflect.FileDescriptor
  189. var file_safe_proto_rawDesc = []byte{
  190. 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72,
  191. 0x6f, 0x74, 0x6f, 0x22, 0x20, 0x0a, 0x0e, 0x53, 0x61, 0x66, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65,
  192. 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
  193. 0x05, 0x52, 0x02, 0x69, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x0f, 0x53, 0x61, 0x66, 0x65, 0x50, 0x6f,
  194. 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x69, 0x64,
  195. 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
  196. 0x52, 0x0c, 0x62, 0x69, 0x64, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12,
  197. 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
  198. 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
  199. 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f,
  200. 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20,
  201. 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
  202. 0x1e, 0x0a, 0x0a, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
  203. 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22,
  204. 0x45, 0x0a, 0x09, 0x53, 0x61, 0x66, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04,
  205. 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
  206. 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
  207. 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28,
  208. 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0x78, 0x0a, 0x04, 0x53, 0x61, 0x66, 0x65, 0x12, 0x38,
  209. 0x0a, 0x0b, 0x67, 0x65, 0x74, 0x53, 0x61, 0x66, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x15, 0x2e,
  210. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x61, 0x66, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71,
  211. 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x61, 0x66,
  212. 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x74,
  213. 0x53, 0x61, 0x66, 0x65, 0x12, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x61, 0x66,
  214. 0x65, 0x50, 0x6f, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x70,
  215. 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x61, 0x66, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00,
  216. 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  217. }
  218. var (
  219. file_safe_proto_rawDescOnce sync.Once
  220. file_safe_proto_rawDescData = file_safe_proto_rawDesc
  221. )
  222. func file_safe_proto_rawDescGZIP() []byte {
  223. file_safe_proto_rawDescOnce.Do(func() {
  224. file_safe_proto_rawDescData = protoimpl.X.CompressGZIP(file_safe_proto_rawDescData)
  225. })
  226. return file_safe_proto_rawDescData
  227. }
  228. var file_safe_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
  229. var file_safe_proto_goTypes = []interface{}{
  230. (*SafeGetRequest)(nil), // 0: proto.SafeGetRequest
  231. (*SafePostRequest)(nil), // 1: proto.SafePostRequest
  232. (*SafeReply)(nil), // 2: proto.SafeReply
  233. }
  234. var file_safe_proto_depIdxs = []int32{
  235. 0, // 0: proto.Safe.getSafeList:input_type -> proto.SafeGetRequest
  236. 1, // 1: proto.Safe.postSafe:input_type -> proto.SafePostRequest
  237. 2, // 2: proto.Safe.getSafeList:output_type -> proto.SafeReply
  238. 2, // 3: proto.Safe.postSafe:output_type -> proto.SafeReply
  239. 2, // [2:4] is the sub-list for method output_type
  240. 0, // [0:2] is the sub-list for method input_type
  241. 0, // [0:0] is the sub-list for extension type_name
  242. 0, // [0:0] is the sub-list for extension extendee
  243. 0, // [0:0] is the sub-list for field type_name
  244. }
  245. func init() { file_safe_proto_init() }
  246. func file_safe_proto_init() {
  247. if File_safe_proto != nil {
  248. return
  249. }
  250. if !protoimpl.UnsafeEnabled {
  251. file_safe_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  252. switch v := v.(*SafeGetRequest); i {
  253. case 0:
  254. return &v.state
  255. case 1:
  256. return &v.sizeCache
  257. case 2:
  258. return &v.unknownFields
  259. default:
  260. return nil
  261. }
  262. }
  263. file_safe_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  264. switch v := v.(*SafePostRequest); i {
  265. case 0:
  266. return &v.state
  267. case 1:
  268. return &v.sizeCache
  269. case 2:
  270. return &v.unknownFields
  271. default:
  272. return nil
  273. }
  274. }
  275. file_safe_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  276. switch v := v.(*SafeReply); i {
  277. case 0:
  278. return &v.state
  279. case 1:
  280. return &v.sizeCache
  281. case 2:
  282. return &v.unknownFields
  283. default:
  284. return nil
  285. }
  286. }
  287. }
  288. type x struct{}
  289. out := protoimpl.TypeBuilder{
  290. File: protoimpl.DescBuilder{
  291. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  292. RawDescriptor: file_safe_proto_rawDesc,
  293. NumEnums: 0,
  294. NumMessages: 3,
  295. NumExtensions: 0,
  296. NumServices: 1,
  297. },
  298. GoTypes: file_safe_proto_goTypes,
  299. DependencyIndexes: file_safe_proto_depIdxs,
  300. MessageInfos: file_safe_proto_msgTypes,
  301. }.Build()
  302. File_safe_proto = out.File
  303. file_safe_proto_rawDesc = nil
  304. file_safe_proto_goTypes = nil
  305. file_safe_proto_depIdxs = nil
  306. }
  307. // Reference imports to suppress errors if they are not otherwise used.
  308. var _ context.Context
  309. var _ grpc.ClientConnInterface
  310. // This is a compile-time assertion to ensure that this generated file
  311. // is compatible with the grpc package it is being compiled against.
  312. const _ = grpc.SupportPackageIsVersion6
  313. // SafeClient is the client API for Safe service.
  314. //
  315. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  316. type SafeClient interface {
  317. // Sends a greeting
  318. GetSafeList(ctx context.Context, in *SafeGetRequest, opts ...grpc.CallOption) (*SafeReply, error)
  319. PostSafe(ctx context.Context, in *SafePostRequest, opts ...grpc.CallOption) (*SafeReply, error)
  320. }
  321. type safeClient struct {
  322. cc grpc.ClientConnInterface
  323. }
  324. func NewSafeClient(cc grpc.ClientConnInterface) SafeClient {
  325. return &safeClient{cc}
  326. }
  327. func (c *safeClient) GetSafeList(ctx context.Context, in *SafeGetRequest, opts ...grpc.CallOption) (*SafeReply, error) {
  328. out := new(SafeReply)
  329. err := c.cc.Invoke(ctx, "/proto.Safe/getSafeList", in, out, opts...)
  330. if err != nil {
  331. return nil, err
  332. }
  333. return out, nil
  334. }
  335. func (c *safeClient) PostSafe(ctx context.Context, in *SafePostRequest, opts ...grpc.CallOption) (*SafeReply, error) {
  336. out := new(SafeReply)
  337. err := c.cc.Invoke(ctx, "/proto.Safe/postSafe", in, out, opts...)
  338. if err != nil {
  339. return nil, err
  340. }
  341. return out, nil
  342. }
  343. // SafeServer is the server API for Safe service.
  344. type SafeServer interface {
  345. // Sends a greeting
  346. GetSafeList(context.Context, *SafeGetRequest) (*SafeReply, error)
  347. PostSafe(context.Context, *SafePostRequest) (*SafeReply, error)
  348. }
  349. // UnimplementedSafeServer can be embedded to have forward compatible implementations.
  350. type UnimplementedSafeServer struct {
  351. }
  352. func (*UnimplementedSafeServer) GetSafeList(context.Context, *SafeGetRequest) (*SafeReply, error) {
  353. return nil, status.Errorf(codes.Unimplemented, "method GetSafeList not implemented")
  354. }
  355. func (*UnimplementedSafeServer) PostSafe(context.Context, *SafePostRequest) (*SafeReply, error) {
  356. return nil, status.Errorf(codes.Unimplemented, "method PostSafe not implemented")
  357. }
  358. func RegisterSafeServer(s *grpc.Server, srv SafeServer) {
  359. s.RegisterService(&_Safe_serviceDesc, srv)
  360. }
  361. func _Safe_GetSafeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  362. in := new(SafeGetRequest)
  363. if err := dec(in); err != nil {
  364. return nil, err
  365. }
  366. if interceptor == nil {
  367. return srv.(SafeServer).GetSafeList(ctx, in)
  368. }
  369. info := &grpc.UnaryServerInfo{
  370. Server: srv,
  371. FullMethod: "/proto.Safe/GetSafeList",
  372. }
  373. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  374. return srv.(SafeServer).GetSafeList(ctx, req.(*SafeGetRequest))
  375. }
  376. return interceptor(ctx, in, info, handler)
  377. }
  378. func _Safe_PostSafe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  379. in := new(SafePostRequest)
  380. if err := dec(in); err != nil {
  381. return nil, err
  382. }
  383. if interceptor == nil {
  384. return srv.(SafeServer).PostSafe(ctx, in)
  385. }
  386. info := &grpc.UnaryServerInfo{
  387. Server: srv,
  388. FullMethod: "/proto.Safe/PostSafe",
  389. }
  390. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  391. return srv.(SafeServer).PostSafe(ctx, req.(*SafePostRequest))
  392. }
  393. return interceptor(ctx, in, info, handler)
  394. }
  395. var _Safe_serviceDesc = grpc.ServiceDesc{
  396. ServiceName: "proto.Safe",
  397. HandlerType: (*SafeServer)(nil),
  398. Methods: []grpc.MethodDesc{
  399. {
  400. MethodName: "getSafeList",
  401. Handler: _Safe_GetSafeList_Handler,
  402. },
  403. {
  404. MethodName: "postSafe",
  405. Handler: _Safe_PostSafe_Handler,
  406. },
  407. },
  408. Streams: []grpc.StreamDesc{},
  409. Metadata: "safe.proto",
  410. }