system_service.pb.go 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: system_service.proto
  3. // package声明符,用来防止不同的消息类型有命名冲突
  4. package pb
  5. import (
  6. context "context"
  7. fmt "fmt"
  8. proto "github.com/golang/protobuf/proto"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. math "math"
  13. v1 "property-company/pb/v1"
  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("system_service.proto", fileDescriptor_5d35c01297e407e4)
  26. }
  27. var fileDescriptor_5d35c01297e407e4 = []byte{
  28. // 223 bytes of a gzipped FileDescriptorProto
  29. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x41, 0x4b, 0xc4, 0x30,
  30. 0x10, 0x85, 0xc5, 0xc3, 0x82, 0xa3, 0x20, 0x44, 0x57, 0xd7, 0x1e, 0xbd, 0x9b, 0xa5, 0x7a, 0x16,
  31. 0xac, 0x16, 0x45, 0xf0, 0xa4, 0x78, 0xf1, 0x52, 0x9a, 0x66, 0x84, 0x42, 0xdb, 0x8c, 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 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. // SystemClient is the client API for System 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 SystemClient interface {
  54. GardenInfos(ctx context.Context, in *v1.GardenInfosRequest, opts ...grpc.CallOption) (*v1.GardenInfosReply, error)
  55. GardenList(ctx context.Context, in *v1.GardenListRequest, opts ...grpc.CallOption) (*v1.GardenListReply, error)
  56. GardenAdd(ctx context.Context, in *v1.GardenAddRequest, opts ...grpc.CallOption) (*v1.GardenAddReply, error)
  57. GardenUpdate(ctx context.Context, in *v1.GardenUpdateRequest, opts ...grpc.CallOption) (*v1.GardenUpdateReply, error)
  58. GardenDel(ctx context.Context, in *v1.GardenDelRequest, opts ...grpc.CallOption) (*v1.GardenDelReply, error)
  59. }
  60. type systemClient struct {
  61. cc grpc.ClientConnInterface
  62. }
  63. func NewSystemClient(cc grpc.ClientConnInterface) SystemClient {
  64. return &systemClient{cc}
  65. }
  66. func (c *systemClient) GardenInfos(ctx context.Context, in *v1.GardenInfosRequest, opts ...grpc.CallOption) (*v1.GardenInfosReply, error) {
  67. out := new(v1.GardenInfosReply)
  68. err := c.cc.Invoke(ctx, "/pb.service.System/GardenInfos", in, out, opts...)
  69. if err != nil {
  70. return nil, err
  71. }
  72. return out, nil
  73. }
  74. func (c *systemClient) GardenList(ctx context.Context, in *v1.GardenListRequest, opts ...grpc.CallOption) (*v1.GardenListReply, error) {
  75. out := new(v1.GardenListReply)
  76. err := c.cc.Invoke(ctx, "/pb.service.System/GardenList", in, out, opts...)
  77. if err != nil {
  78. return nil, err
  79. }
  80. return out, nil
  81. }
  82. func (c *systemClient) GardenAdd(ctx context.Context, in *v1.GardenAddRequest, opts ...grpc.CallOption) (*v1.GardenAddReply, error) {
  83. out := new(v1.GardenAddReply)
  84. err := c.cc.Invoke(ctx, "/pb.service.System/GardenAdd", in, out, opts...)
  85. if err != nil {
  86. return nil, err
  87. }
  88. return out, nil
  89. }
  90. func (c *systemClient) GardenUpdate(ctx context.Context, in *v1.GardenUpdateRequest, opts ...grpc.CallOption) (*v1.GardenUpdateReply, error) {
  91. out := new(v1.GardenUpdateReply)
  92. err := c.cc.Invoke(ctx, "/pb.service.System/GardenUpdate", in, out, opts...)
  93. if err != nil {
  94. return nil, err
  95. }
  96. return out, nil
  97. }
  98. func (c *systemClient) GardenDel(ctx context.Context, in *v1.GardenDelRequest, opts ...grpc.CallOption) (*v1.GardenDelReply, error) {
  99. out := new(v1.GardenDelReply)
  100. err := c.cc.Invoke(ctx, "/pb.service.System/GardenDel", in, out, opts...)
  101. if err != nil {
  102. return nil, err
  103. }
  104. return out, nil
  105. }
  106. // SystemServer is the server API for System service.
  107. type SystemServer interface {
  108. GardenInfos(context.Context, *v1.GardenInfosRequest) (*v1.GardenInfosReply, error)
  109. GardenList(context.Context, *v1.GardenListRequest) (*v1.GardenListReply, error)
  110. GardenAdd(context.Context, *v1.GardenAddRequest) (*v1.GardenAddReply, error)
  111. GardenUpdate(context.Context, *v1.GardenUpdateRequest) (*v1.GardenUpdateReply, error)
  112. GardenDel(context.Context, *v1.GardenDelRequest) (*v1.GardenDelReply, error)
  113. }
  114. // UnimplementedSystemServer can be embedded to have forward compatible implementations.
  115. type UnimplementedSystemServer struct {
  116. }
  117. func (*UnimplementedSystemServer) GardenInfos(ctx context.Context, req *v1.GardenInfosRequest) (*v1.GardenInfosReply, error) {
  118. return nil, status.Errorf(codes.Unimplemented, "method GardenInfos not implemented")
  119. }
  120. func (*UnimplementedSystemServer) GardenList(ctx context.Context, req *v1.GardenListRequest) (*v1.GardenListReply, error) {
  121. return nil, status.Errorf(codes.Unimplemented, "method GardenList not implemented")
  122. }
  123. func (*UnimplementedSystemServer) GardenAdd(ctx context.Context, req *v1.GardenAddRequest) (*v1.GardenAddReply, error) {
  124. return nil, status.Errorf(codes.Unimplemented, "method GardenAdd not implemented")
  125. }
  126. func (*UnimplementedSystemServer) GardenUpdate(ctx context.Context, req *v1.GardenUpdateRequest) (*v1.GardenUpdateReply, error) {
  127. return nil, status.Errorf(codes.Unimplemented, "method GardenUpdate not implemented")
  128. }
  129. func (*UnimplementedSystemServer) GardenDel(ctx context.Context, req *v1.GardenDelRequest) (*v1.GardenDelReply, error) {
  130. return nil, status.Errorf(codes.Unimplemented, "method GardenDel not implemented")
  131. }
  132. func RegisterSystemServer(s *grpc.Server, srv SystemServer) {
  133. s.RegisterService(&_System_serviceDesc, srv)
  134. }
  135. func _System_GardenInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  136. in := new(v1.GardenInfosRequest)
  137. if err := dec(in); err != nil {
  138. return nil, err
  139. }
  140. if interceptor == nil {
  141. return srv.(SystemServer).GardenInfos(ctx, in)
  142. }
  143. info := &grpc.UnaryServerInfo{
  144. Server: srv,
  145. FullMethod: "/pb.service.System/GardenInfos",
  146. }
  147. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  148. return srv.(SystemServer).GardenInfos(ctx, req.(*v1.GardenInfosRequest))
  149. }
  150. return interceptor(ctx, in, info, handler)
  151. }
  152. func _System_GardenList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  153. in := new(v1.GardenListRequest)
  154. if err := dec(in); err != nil {
  155. return nil, err
  156. }
  157. if interceptor == nil {
  158. return srv.(SystemServer).GardenList(ctx, in)
  159. }
  160. info := &grpc.UnaryServerInfo{
  161. Server: srv,
  162. FullMethod: "/pb.service.System/GardenList",
  163. }
  164. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  165. return srv.(SystemServer).GardenList(ctx, req.(*v1.GardenListRequest))
  166. }
  167. return interceptor(ctx, in, info, handler)
  168. }
  169. func _System_GardenAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  170. in := new(v1.GardenAddRequest)
  171. if err := dec(in); err != nil {
  172. return nil, err
  173. }
  174. if interceptor == nil {
  175. return srv.(SystemServer).GardenAdd(ctx, in)
  176. }
  177. info := &grpc.UnaryServerInfo{
  178. Server: srv,
  179. FullMethod: "/pb.service.System/GardenAdd",
  180. }
  181. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  182. return srv.(SystemServer).GardenAdd(ctx, req.(*v1.GardenAddRequest))
  183. }
  184. return interceptor(ctx, in, info, handler)
  185. }
  186. func _System_GardenUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  187. in := new(v1.GardenUpdateRequest)
  188. if err := dec(in); err != nil {
  189. return nil, err
  190. }
  191. if interceptor == nil {
  192. return srv.(SystemServer).GardenUpdate(ctx, in)
  193. }
  194. info := &grpc.UnaryServerInfo{
  195. Server: srv,
  196. FullMethod: "/pb.service.System/GardenUpdate",
  197. }
  198. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  199. return srv.(SystemServer).GardenUpdate(ctx, req.(*v1.GardenUpdateRequest))
  200. }
  201. return interceptor(ctx, in, info, handler)
  202. }
  203. func _System_GardenDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  204. in := new(v1.GardenDelRequest)
  205. if err := dec(in); err != nil {
  206. return nil, err
  207. }
  208. if interceptor == nil {
  209. return srv.(SystemServer).GardenDel(ctx, in)
  210. }
  211. info := &grpc.UnaryServerInfo{
  212. Server: srv,
  213. FullMethod: "/pb.service.System/GardenDel",
  214. }
  215. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  216. return srv.(SystemServer).GardenDel(ctx, req.(*v1.GardenDelRequest))
  217. }
  218. return interceptor(ctx, in, info, handler)
  219. }
  220. var _System_serviceDesc = grpc.ServiceDesc{
  221. ServiceName: "pb.service.System",
  222. HandlerType: (*SystemServer)(nil),
  223. Methods: []grpc.MethodDesc{
  224. {
  225. MethodName: "GardenInfos",
  226. Handler: _System_GardenInfos_Handler,
  227. },
  228. {
  229. MethodName: "GardenList",
  230. Handler: _System_GardenList_Handler,
  231. },
  232. {
  233. MethodName: "GardenAdd",
  234. Handler: _System_GardenAdd_Handler,
  235. },
  236. {
  237. MethodName: "GardenUpdate",
  238. Handler: _System_GardenUpdate_Handler,
  239. },
  240. {
  241. MethodName: "GardenDel",
  242. Handler: _System_GardenDel_Handler,
  243. },
  244. },
  245. Streams: []grpc.StreamDesc{},
  246. Metadata: "system_service.proto",
  247. }