system_service.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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-household/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. // 225 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, 0x04, 0xd7, 0x5d, 0x7b, 0xf4, 0x6e, 0x96, 0xd5, 0xb3,
  31. 0x60, 0xb5, 0x28, 0x82, 0x27, 0xc5, 0x8b, 0x97, 0xd2, 0x98, 0x91, 0x16, 0x62, 0x33, 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x01, 0x00,
  43. 0x00,
  44. }
  45. // Reference imports to suppress errors if they are not otherwise used.
  46. var _ context.Context
  47. var _ grpc.ClientConnInterface
  48. // This is a compile-time assertion to ensure that this generated file
  49. // is compatible with the grpc package it is being compiled against.
  50. const _ = grpc.SupportPackageIsVersion6
  51. // SystemClient is the client API for System service.
  52. //
  53. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  54. type SystemClient interface {
  55. GardenInfos(ctx context.Context, in *v1.GardenInfosRequest, opts ...grpc.CallOption) (*v1.GardenInfosReply, error)
  56. GardenList(ctx context.Context, in *v1.GardenListRequest, opts ...grpc.CallOption) (*v1.GardenListReply, error)
  57. GardenAdd(ctx context.Context, in *v1.GardenAddRequest, opts ...grpc.CallOption) (*v1.GardenAddReply, error)
  58. GardenUpdate(ctx context.Context, in *v1.GardenUpdateRequest, opts ...grpc.CallOption) (*v1.GardenUpdateReply, error)
  59. GardenDel(ctx context.Context, in *v1.GardenDelRequest, opts ...grpc.CallOption) (*v1.GardenDelReply, error)
  60. }
  61. type systemClient struct {
  62. cc grpc.ClientConnInterface
  63. }
  64. func NewSystemClient(cc grpc.ClientConnInterface) SystemClient {
  65. return &systemClient{cc}
  66. }
  67. func (c *systemClient) GardenInfos(ctx context.Context, in *v1.GardenInfosRequest, opts ...grpc.CallOption) (*v1.GardenInfosReply, error) {
  68. out := new(v1.GardenInfosReply)
  69. err := c.cc.Invoke(ctx, "/pb.service.System/GardenInfos", in, out, opts...)
  70. if err != nil {
  71. return nil, err
  72. }
  73. return out, nil
  74. }
  75. func (c *systemClient) GardenList(ctx context.Context, in *v1.GardenListRequest, opts ...grpc.CallOption) (*v1.GardenListReply, error) {
  76. out := new(v1.GardenListReply)
  77. err := c.cc.Invoke(ctx, "/pb.service.System/GardenList", in, out, opts...)
  78. if err != nil {
  79. return nil, err
  80. }
  81. return out, nil
  82. }
  83. func (c *systemClient) GardenAdd(ctx context.Context, in *v1.GardenAddRequest, opts ...grpc.CallOption) (*v1.GardenAddReply, error) {
  84. out := new(v1.GardenAddReply)
  85. err := c.cc.Invoke(ctx, "/pb.service.System/GardenAdd", in, out, opts...)
  86. if err != nil {
  87. return nil, err
  88. }
  89. return out, nil
  90. }
  91. func (c *systemClient) GardenUpdate(ctx context.Context, in *v1.GardenUpdateRequest, opts ...grpc.CallOption) (*v1.GardenUpdateReply, error) {
  92. out := new(v1.GardenUpdateReply)
  93. err := c.cc.Invoke(ctx, "/pb.service.System/GardenUpdate", in, out, opts...)
  94. if err != nil {
  95. return nil, err
  96. }
  97. return out, nil
  98. }
  99. func (c *systemClient) GardenDel(ctx context.Context, in *v1.GardenDelRequest, opts ...grpc.CallOption) (*v1.GardenDelReply, error) {
  100. out := new(v1.GardenDelReply)
  101. err := c.cc.Invoke(ctx, "/pb.service.System/GardenDel", in, out, opts...)
  102. if err != nil {
  103. return nil, err
  104. }
  105. return out, nil
  106. }
  107. // SystemServer is the server API for System service.
  108. type SystemServer interface {
  109. GardenInfos(context.Context, *v1.GardenInfosRequest) (*v1.GardenInfosReply, error)
  110. GardenList(context.Context, *v1.GardenListRequest) (*v1.GardenListReply, error)
  111. GardenAdd(context.Context, *v1.GardenAddRequest) (*v1.GardenAddReply, error)
  112. GardenUpdate(context.Context, *v1.GardenUpdateRequest) (*v1.GardenUpdateReply, error)
  113. GardenDel(context.Context, *v1.GardenDelRequest) (*v1.GardenDelReply, error)
  114. }
  115. // UnimplementedSystemServer can be embedded to have forward compatible implementations.
  116. type UnimplementedSystemServer struct {
  117. }
  118. func (*UnimplementedSystemServer) GardenInfos(ctx context.Context, req *v1.GardenInfosRequest) (*v1.GardenInfosReply, error) {
  119. return nil, status.Errorf(codes.Unimplemented, "method GardenInfos not implemented")
  120. }
  121. func (*UnimplementedSystemServer) GardenList(ctx context.Context, req *v1.GardenListRequest) (*v1.GardenListReply, error) {
  122. return nil, status.Errorf(codes.Unimplemented, "method GardenList not implemented")
  123. }
  124. func (*UnimplementedSystemServer) GardenAdd(ctx context.Context, req *v1.GardenAddRequest) (*v1.GardenAddReply, error) {
  125. return nil, status.Errorf(codes.Unimplemented, "method GardenAdd not implemented")
  126. }
  127. func (*UnimplementedSystemServer) GardenUpdate(ctx context.Context, req *v1.GardenUpdateRequest) (*v1.GardenUpdateReply, error) {
  128. return nil, status.Errorf(codes.Unimplemented, "method GardenUpdate not implemented")
  129. }
  130. func (*UnimplementedSystemServer) GardenDel(ctx context.Context, req *v1.GardenDelRequest) (*v1.GardenDelReply, error) {
  131. return nil, status.Errorf(codes.Unimplemented, "method GardenDel not implemented")
  132. }
  133. func RegisterSystemServer(s *grpc.Server, srv SystemServer) {
  134. s.RegisterService(&_System_serviceDesc, srv)
  135. }
  136. func _System_GardenInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  137. in := new(v1.GardenInfosRequest)
  138. if err := dec(in); err != nil {
  139. return nil, err
  140. }
  141. if interceptor == nil {
  142. return srv.(SystemServer).GardenInfos(ctx, in)
  143. }
  144. info := &grpc.UnaryServerInfo{
  145. Server: srv,
  146. FullMethod: "/pb.service.System/GardenInfos",
  147. }
  148. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  149. return srv.(SystemServer).GardenInfos(ctx, req.(*v1.GardenInfosRequest))
  150. }
  151. return interceptor(ctx, in, info, handler)
  152. }
  153. func _System_GardenList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  154. in := new(v1.GardenListRequest)
  155. if err := dec(in); err != nil {
  156. return nil, err
  157. }
  158. if interceptor == nil {
  159. return srv.(SystemServer).GardenList(ctx, in)
  160. }
  161. info := &grpc.UnaryServerInfo{
  162. Server: srv,
  163. FullMethod: "/pb.service.System/GardenList",
  164. }
  165. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  166. return srv.(SystemServer).GardenList(ctx, req.(*v1.GardenListRequest))
  167. }
  168. return interceptor(ctx, in, info, handler)
  169. }
  170. func _System_GardenAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  171. in := new(v1.GardenAddRequest)
  172. if err := dec(in); err != nil {
  173. return nil, err
  174. }
  175. if interceptor == nil {
  176. return srv.(SystemServer).GardenAdd(ctx, in)
  177. }
  178. info := &grpc.UnaryServerInfo{
  179. Server: srv,
  180. FullMethod: "/pb.service.System/GardenAdd",
  181. }
  182. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  183. return srv.(SystemServer).GardenAdd(ctx, req.(*v1.GardenAddRequest))
  184. }
  185. return interceptor(ctx, in, info, handler)
  186. }
  187. func _System_GardenUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  188. in := new(v1.GardenUpdateRequest)
  189. if err := dec(in); err != nil {
  190. return nil, err
  191. }
  192. if interceptor == nil {
  193. return srv.(SystemServer).GardenUpdate(ctx, in)
  194. }
  195. info := &grpc.UnaryServerInfo{
  196. Server: srv,
  197. FullMethod: "/pb.service.System/GardenUpdate",
  198. }
  199. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  200. return srv.(SystemServer).GardenUpdate(ctx, req.(*v1.GardenUpdateRequest))
  201. }
  202. return interceptor(ctx, in, info, handler)
  203. }
  204. func _System_GardenDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  205. in := new(v1.GardenDelRequest)
  206. if err := dec(in); err != nil {
  207. return nil, err
  208. }
  209. if interceptor == nil {
  210. return srv.(SystemServer).GardenDel(ctx, in)
  211. }
  212. info := &grpc.UnaryServerInfo{
  213. Server: srv,
  214. FullMethod: "/pb.service.System/GardenDel",
  215. }
  216. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  217. return srv.(SystemServer).GardenDel(ctx, req.(*v1.GardenDelRequest))
  218. }
  219. return interceptor(ctx, in, info, handler)
  220. }
  221. var _System_serviceDesc = grpc.ServiceDesc{
  222. ServiceName: "pb.service.System",
  223. HandlerType: (*SystemServer)(nil),
  224. Methods: []grpc.MethodDesc{
  225. {
  226. MethodName: "GardenInfos",
  227. Handler: _System_GardenInfos_Handler,
  228. },
  229. {
  230. MethodName: "GardenList",
  231. Handler: _System_GardenList_Handler,
  232. },
  233. {
  234. MethodName: "GardenAdd",
  235. Handler: _System_GardenAdd_Handler,
  236. },
  237. {
  238. MethodName: "GardenUpdate",
  239. Handler: _System_GardenUpdate_Handler,
  240. },
  241. {
  242. MethodName: "GardenDel",
  243. Handler: _System_GardenDel_Handler,
  244. },
  245. },
  246. Streams: []grpc.StreamDesc{},
  247. Metadata: "system_service.proto",
  248. }