adm_task_service.pb.go 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: adm_task_service.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. v1 "adm-ods/pb/v1"
  7. context "context"
  8. fmt "fmt"
  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. math "math"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  24. func init() {
  25. proto.RegisterFile("adm_task_service.proto", fileDescriptor_b888879dea74b804)
  26. }
  27. var fileDescriptor_b888879dea74b804 = []byte{
  28. // 221 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4b, 0x4c, 0xc9, 0x8d,
  30. 0x2f, 0x49, 0x2c, 0xce, 0x8e, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca,
  31. 0x2f, 0xc9, 0x17, 0xe2, 0x2a, 0x48, 0xd2, 0x83, 0x8a, 0x48, 0xf1, 0x96, 0x19, 0xea, 0x83, 0x94,
  32. 0x40, 0xa4, 0x8c, 0xd6, 0x30, 0x71, 0xb1, 0x3b, 0xa6, 0xe4, 0x86, 0x24, 0x16, 0x67, 0x0b, 0x85,
  33. 0x72, 0x09, 0xbb, 0xa7, 0x96, 0x80, 0x98, 0x4e, 0x95, 0xc1, 0xf9, 0xa5, 0x45, 0xc9, 0xa9, 0xce,
  34. 0xf9, 0x29, 0xa9, 0x42, 0x72, 0x7a, 0x65, 0x86, 0x7a, 0x58, 0x24, 0x82, 0x52, 0x0b, 0x4b, 0x53,
  35. 0x8b, 0x4b, 0xa4, 0x64, 0x70, 0xca, 0x17, 0xe4, 0x54, 0x2a, 0x31, 0x08, 0xf9, 0x73, 0x09, 0x86,
  36. 0x16, 0xa4, 0x24, 0x96, 0xa4, 0xfa, 0xa7, 0xa5, 0xe5, 0x64, 0xe6, 0xa5, 0x82, 0xed, 0x02, 0x6b,
  37. 0xc2, 0x10, 0x86, 0x19, 0x29, 0x85, 0x43, 0x16, 0x62, 0xa0, 0x2d, 0x17, 0xb7, 0x73, 0x46, 0x6a,
  38. 0x72, 0xb6, 0x5b, 0x7e, 0x51, 0x6e, 0x62, 0x89, 0x90, 0x18, 0x48, 0x31, 0x92, 0x00, 0xcc, 0x10,
  39. 0x11, 0x0c, 0x71, 0x88, 0x76, 0x2b, 0x2e, 0x2e, 0xb7, 0xcc, 0xd4, 0x9c, 0x14, 0xb0, 0x94, 0x90,
  40. 0x28, 0x48, 0x15, 0x82, 0x0f, 0xd3, 0x2c, 0x8c, 0x2e, 0x0c, 0xd6, 0xeb, 0xc4, 0x13, 0xc5, 0x95,
  41. 0x98, 0x92, 0xab, 0x9b, 0x9f, 0x52, 0xac, 0x5f, 0x90, 0x94, 0xc4, 0x06, 0x0e, 0x43, 0x63, 0x40,
  42. 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0x90, 0xa4, 0x9a, 0x78, 0x01, 0x00, 0x00,
  43. }
  44. // Reference imports to suppress errors if they are not otherwise used.
  45. var _ context.Context
  46. var _ grpc.ClientConnInterface
  47. // This is a compile-time assertion to ensure that this generated file
  48. // is compatible with the grpc package it is being compiled against.
  49. const _ = grpc.SupportPackageIsVersion6
  50. // AdmTaskClient is the client API for AdmTask service.
  51. //
  52. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  53. type AdmTaskClient interface {
  54. // Sends a greeting
  55. GetTaskBySourceCode(ctx context.Context, in *v1.GetTaskBySourceCodeRequest, opts ...grpc.CallOption) (*v1.GetTaskBySourceCodeReply, error)
  56. UpdateOfflineTask(ctx context.Context, in *v1.UpdateOfflineTaskRequest, opts ...grpc.CallOption) (*v1.UpdateOfflineTaskReply, error)
  57. CheckFormat(ctx context.Context, in *v1.CheckFormatRequest, opts ...grpc.CallOption) (*v1.CheckFormatReply, error)
  58. FieldCheck(ctx context.Context, in *v1.FieldCheckRequest, opts ...grpc.CallOption) (*v1.FieldCheckReply, error)
  59. }
  60. type admTaskClient struct {
  61. cc grpc.ClientConnInterface
  62. }
  63. func NewAdmTaskClient(cc grpc.ClientConnInterface) AdmTaskClient {
  64. return &admTaskClient{cc}
  65. }
  66. func (c *admTaskClient) GetTaskBySourceCode(ctx context.Context, in *v1.GetTaskBySourceCodeRequest, opts ...grpc.CallOption) (*v1.GetTaskBySourceCodeReply, error) {
  67. out := new(v1.GetTaskBySourceCodeReply)
  68. err := c.cc.Invoke(ctx, "/pb.service.AdmTask/GetTaskBySourceCode", in, out, opts...)
  69. if err != nil {
  70. return nil, err
  71. }
  72. return out, nil
  73. }
  74. func (c *admTaskClient) UpdateOfflineTask(ctx context.Context, in *v1.UpdateOfflineTaskRequest, opts ...grpc.CallOption) (*v1.UpdateOfflineTaskReply, error) {
  75. out := new(v1.UpdateOfflineTaskReply)
  76. err := c.cc.Invoke(ctx, "/pb.service.AdmTask/UpdateOfflineTask", in, out, opts...)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return out, nil
  81. }
  82. func (c *admTaskClient) CheckFormat(ctx context.Context, in *v1.CheckFormatRequest, opts ...grpc.CallOption) (*v1.CheckFormatReply, error) {
  83. out := new(v1.CheckFormatReply)
  84. err := c.cc.Invoke(ctx, "/pb.service.AdmTask/CheckFormat", in, out, opts...)
  85. if err != nil {
  86. return nil, err
  87. }
  88. return out, nil
  89. }
  90. func (c *admTaskClient) FieldCheck(ctx context.Context, in *v1.FieldCheckRequest, opts ...grpc.CallOption) (*v1.FieldCheckReply, error) {
  91. out := new(v1.FieldCheckReply)
  92. err := c.cc.Invoke(ctx, "/pb.service.AdmTask/FieldCheck", in, out, opts...)
  93. if err != nil {
  94. return nil, err
  95. }
  96. return out, nil
  97. }
  98. // AdmTaskServer is the server API for AdmTask service.
  99. type AdmTaskServer interface {
  100. // Sends a greeting
  101. GetTaskBySourceCode(context.Context, *v1.GetTaskBySourceCodeRequest) (*v1.GetTaskBySourceCodeReply, error)
  102. UpdateOfflineTask(context.Context, *v1.UpdateOfflineTaskRequest) (*v1.UpdateOfflineTaskReply, error)
  103. CheckFormat(context.Context, *v1.CheckFormatRequest) (*v1.CheckFormatReply, error)
  104. FieldCheck(context.Context, *v1.FieldCheckRequest) (*v1.FieldCheckReply, error)
  105. }
  106. // UnimplementedAdmTaskServer can be embedded to have forward compatible implementations.
  107. type UnimplementedAdmTaskServer struct {
  108. }
  109. func (*UnimplementedAdmTaskServer) GetTaskBySourceCode(ctx context.Context, req *v1.GetTaskBySourceCodeRequest) (*v1.GetTaskBySourceCodeReply, error) {
  110. return nil, status.Errorf(codes.Unimplemented, "method GetTaskBySourceCode not implemented")
  111. }
  112. func (*UnimplementedAdmTaskServer) UpdateOfflineTask(ctx context.Context, req *v1.UpdateOfflineTaskRequest) (*v1.UpdateOfflineTaskReply, error) {
  113. return nil, status.Errorf(codes.Unimplemented, "method UpdateOfflineTask not implemented")
  114. }
  115. func (*UnimplementedAdmTaskServer) CheckFormat(ctx context.Context, req *v1.CheckFormatRequest) (*v1.CheckFormatReply, error) {
  116. return nil, status.Errorf(codes.Unimplemented, "method CheckFormat not implemented")
  117. }
  118. func (*UnimplementedAdmTaskServer) FieldCheck(ctx context.Context, req *v1.FieldCheckRequest) (*v1.FieldCheckReply, error) {
  119. return nil, status.Errorf(codes.Unimplemented, "method FieldCheck not implemented")
  120. }
  121. func RegisterAdmTaskServer(s *grpc.Server, srv AdmTaskServer) {
  122. s.RegisterService(&_AdmTask_serviceDesc, srv)
  123. }
  124. func _AdmTask_GetTaskBySourceCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  125. in := new(v1.GetTaskBySourceCodeRequest)
  126. if err := dec(in); err != nil {
  127. return nil, err
  128. }
  129. if interceptor == nil {
  130. return srv.(AdmTaskServer).GetTaskBySourceCode(ctx, in)
  131. }
  132. info := &grpc.UnaryServerInfo{
  133. Server: srv,
  134. FullMethod: "/pb.service.AdmTask/GetTaskBySourceCode",
  135. }
  136. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  137. return srv.(AdmTaskServer).GetTaskBySourceCode(ctx, req.(*v1.GetTaskBySourceCodeRequest))
  138. }
  139. return interceptor(ctx, in, info, handler)
  140. }
  141. func _AdmTask_UpdateOfflineTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  142. in := new(v1.UpdateOfflineTaskRequest)
  143. if err := dec(in); err != nil {
  144. return nil, err
  145. }
  146. if interceptor == nil {
  147. return srv.(AdmTaskServer).UpdateOfflineTask(ctx, in)
  148. }
  149. info := &grpc.UnaryServerInfo{
  150. Server: srv,
  151. FullMethod: "/pb.service.AdmTask/UpdateOfflineTask",
  152. }
  153. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  154. return srv.(AdmTaskServer).UpdateOfflineTask(ctx, req.(*v1.UpdateOfflineTaskRequest))
  155. }
  156. return interceptor(ctx, in, info, handler)
  157. }
  158. func _AdmTask_CheckFormat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  159. in := new(v1.CheckFormatRequest)
  160. if err := dec(in); err != nil {
  161. return nil, err
  162. }
  163. if interceptor == nil {
  164. return srv.(AdmTaskServer).CheckFormat(ctx, in)
  165. }
  166. info := &grpc.UnaryServerInfo{
  167. Server: srv,
  168. FullMethod: "/pb.service.AdmTask/CheckFormat",
  169. }
  170. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  171. return srv.(AdmTaskServer).CheckFormat(ctx, req.(*v1.CheckFormatRequest))
  172. }
  173. return interceptor(ctx, in, info, handler)
  174. }
  175. func _AdmTask_FieldCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  176. in := new(v1.FieldCheckRequest)
  177. if err := dec(in); err != nil {
  178. return nil, err
  179. }
  180. if interceptor == nil {
  181. return srv.(AdmTaskServer).FieldCheck(ctx, in)
  182. }
  183. info := &grpc.UnaryServerInfo{
  184. Server: srv,
  185. FullMethod: "/pb.service.AdmTask/FieldCheck",
  186. }
  187. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  188. return srv.(AdmTaskServer).FieldCheck(ctx, req.(*v1.FieldCheckRequest))
  189. }
  190. return interceptor(ctx, in, info, handler)
  191. }
  192. var _AdmTask_serviceDesc = grpc.ServiceDesc{
  193. ServiceName: "pb.service.AdmTask",
  194. HandlerType: (*AdmTaskServer)(nil),
  195. Methods: []grpc.MethodDesc{
  196. {
  197. MethodName: "GetTaskBySourceCode",
  198. Handler: _AdmTask_GetTaskBySourceCode_Handler,
  199. },
  200. {
  201. MethodName: "UpdateOfflineTask",
  202. Handler: _AdmTask_UpdateOfflineTask_Handler,
  203. },
  204. {
  205. MethodName: "CheckFormat",
  206. Handler: _AdmTask_CheckFormat_Handler,
  207. },
  208. {
  209. MethodName: "FieldCheck",
  210. Handler: _AdmTask_FieldCheck_Handler,
  211. },
  212. },
  213. Streams: []grpc.StreamDesc{},
  214. Metadata: "adm_task_service.proto",
  215. }