loadBalancer_grpc.pb.go 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
  2. // versions:
  3. // - protoc-gen-go-grpc v1.2.0
  4. // - protoc v3.21.4
  5. // source: proto/loadBalancer.proto
  6. package loadBalancer
  7. import (
  8. context "context"
  9. grpc "google.golang.org/grpc"
  10. codes "google.golang.org/grpc/codes"
  11. status "google.golang.org/grpc/status"
  12. )
  13. // This is a compile-time assertion to ensure that this generated file
  14. // is compatible with the grpc package it is being compiled against.
  15. // Requires gRPC-Go v1.32.0 or later.
  16. const _ = grpc.SupportPackageIsVersion7
  17. // LoadBalancerCloudflareClient is the client API for LoadBalancerCloudflare service.
  18. //
  19. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
  20. type LoadBalancerCloudflareClient interface {
  21. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*LoadBalancerList, error)
  22. Create(ctx context.Context, in *LoadBalancerRequest, opts ...grpc.CallOption) (*LoadBalancer, error)
  23. Update(ctx context.Context, in *LoadBalancerRequest, opts ...grpc.CallOption) (*LoadBalancer, error)
  24. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error)
  25. }
  26. type loadBalancerCloudflareClient struct {
  27. cc grpc.ClientConnInterface
  28. }
  29. func NewLoadBalancerCloudflareClient(cc grpc.ClientConnInterface) LoadBalancerCloudflareClient {
  30. return &loadBalancerCloudflareClient{cc}
  31. }
  32. func (c *loadBalancerCloudflareClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*LoadBalancerList, error) {
  33. out := new(LoadBalancerList)
  34. err := c.cc.Invoke(ctx, "/cloudflareApi.loadBalancer.LoadBalancerCloudflare/List", in, out, opts...)
  35. if err != nil {
  36. return nil, err
  37. }
  38. return out, nil
  39. }
  40. func (c *loadBalancerCloudflareClient) Create(ctx context.Context, in *LoadBalancerRequest, opts ...grpc.CallOption) (*LoadBalancer, error) {
  41. out := new(LoadBalancer)
  42. err := c.cc.Invoke(ctx, "/cloudflareApi.loadBalancer.LoadBalancerCloudflare/Create", in, out, opts...)
  43. if err != nil {
  44. return nil, err
  45. }
  46. return out, nil
  47. }
  48. func (c *loadBalancerCloudflareClient) Update(ctx context.Context, in *LoadBalancerRequest, opts ...grpc.CallOption) (*LoadBalancer, error) {
  49. out := new(LoadBalancer)
  50. err := c.cc.Invoke(ctx, "/cloudflareApi.loadBalancer.LoadBalancerCloudflare/Update", in, out, opts...)
  51. if err != nil {
  52. return nil, err
  53. }
  54. return out, nil
  55. }
  56. func (c *loadBalancerCloudflareClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) {
  57. out := new(Empty)
  58. err := c.cc.Invoke(ctx, "/cloudflareApi.loadBalancer.LoadBalancerCloudflare/Delete", in, out, opts...)
  59. if err != nil {
  60. return nil, err
  61. }
  62. return out, nil
  63. }
  64. // LoadBalancerCloudflareServer is the server API for LoadBalancerCloudflare service.
  65. // All implementations must embed UnimplementedLoadBalancerCloudflareServer
  66. // for forward compatibility
  67. type LoadBalancerCloudflareServer interface {
  68. List(context.Context, *ListRequest) (*LoadBalancerList, error)
  69. Create(context.Context, *LoadBalancerRequest) (*LoadBalancer, error)
  70. Update(context.Context, *LoadBalancerRequest) (*LoadBalancer, error)
  71. Delete(context.Context, *DeleteRequest) (*Empty, error)
  72. mustEmbedUnimplementedLoadBalancerCloudflareServer()
  73. }
  74. // UnimplementedLoadBalancerCloudflareServer must be embedded to have forward compatible implementations.
  75. type UnimplementedLoadBalancerCloudflareServer struct {
  76. }
  77. func (UnimplementedLoadBalancerCloudflareServer) List(context.Context, *ListRequest) (*LoadBalancerList, error) {
  78. return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
  79. }
  80. func (UnimplementedLoadBalancerCloudflareServer) Create(context.Context, *LoadBalancerRequest) (*LoadBalancer, error) {
  81. return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
  82. }
  83. func (UnimplementedLoadBalancerCloudflareServer) Update(context.Context, *LoadBalancerRequest) (*LoadBalancer, error) {
  84. return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
  85. }
  86. func (UnimplementedLoadBalancerCloudflareServer) Delete(context.Context, *DeleteRequest) (*Empty, error) {
  87. return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
  88. }
  89. func (UnimplementedLoadBalancerCloudflareServer) mustEmbedUnimplementedLoadBalancerCloudflareServer() {
  90. }
  91. // UnsafeLoadBalancerCloudflareServer may be embedded to opt out of forward compatibility for this service.
  92. // Use of this interface is not recommended, as added methods to LoadBalancerCloudflareServer will
  93. // result in compilation errors.
  94. type UnsafeLoadBalancerCloudflareServer interface {
  95. mustEmbedUnimplementedLoadBalancerCloudflareServer()
  96. }
  97. func RegisterLoadBalancerCloudflareServer(s grpc.ServiceRegistrar, srv LoadBalancerCloudflareServer) {
  98. s.RegisterService(&LoadBalancerCloudflare_ServiceDesc, srv)
  99. }
  100. func _LoadBalancerCloudflare_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  101. in := new(ListRequest)
  102. if err := dec(in); err != nil {
  103. return nil, err
  104. }
  105. if interceptor == nil {
  106. return srv.(LoadBalancerCloudflareServer).List(ctx, in)
  107. }
  108. info := &grpc.UnaryServerInfo{
  109. Server: srv,
  110. FullMethod: "/cloudflareApi.loadBalancer.LoadBalancerCloudflare/List",
  111. }
  112. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  113. return srv.(LoadBalancerCloudflareServer).List(ctx, req.(*ListRequest))
  114. }
  115. return interceptor(ctx, in, info, handler)
  116. }
  117. func _LoadBalancerCloudflare_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  118. in := new(LoadBalancerRequest)
  119. if err := dec(in); err != nil {
  120. return nil, err
  121. }
  122. if interceptor == nil {
  123. return srv.(LoadBalancerCloudflareServer).Create(ctx, in)
  124. }
  125. info := &grpc.UnaryServerInfo{
  126. Server: srv,
  127. FullMethod: "/cloudflareApi.loadBalancer.LoadBalancerCloudflare/Create",
  128. }
  129. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  130. return srv.(LoadBalancerCloudflareServer).Create(ctx, req.(*LoadBalancerRequest))
  131. }
  132. return interceptor(ctx, in, info, handler)
  133. }
  134. func _LoadBalancerCloudflare_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  135. in := new(LoadBalancerRequest)
  136. if err := dec(in); err != nil {
  137. return nil, err
  138. }
  139. if interceptor == nil {
  140. return srv.(LoadBalancerCloudflareServer).Update(ctx, in)
  141. }
  142. info := &grpc.UnaryServerInfo{
  143. Server: srv,
  144. FullMethod: "/cloudflareApi.loadBalancer.LoadBalancerCloudflare/Update",
  145. }
  146. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  147. return srv.(LoadBalancerCloudflareServer).Update(ctx, req.(*LoadBalancerRequest))
  148. }
  149. return interceptor(ctx, in, info, handler)
  150. }
  151. func _LoadBalancerCloudflare_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  152. in := new(DeleteRequest)
  153. if err := dec(in); err != nil {
  154. return nil, err
  155. }
  156. if interceptor == nil {
  157. return srv.(LoadBalancerCloudflareServer).Delete(ctx, in)
  158. }
  159. info := &grpc.UnaryServerInfo{
  160. Server: srv,
  161. FullMethod: "/cloudflareApi.loadBalancer.LoadBalancerCloudflare/Delete",
  162. }
  163. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  164. return srv.(LoadBalancerCloudflareServer).Delete(ctx, req.(*DeleteRequest))
  165. }
  166. return interceptor(ctx, in, info, handler)
  167. }
  168. // LoadBalancerCloudflare_ServiceDesc is the grpc.ServiceDesc for LoadBalancerCloudflare service.
  169. // It's only intended for direct use with grpc.RegisterService,
  170. // and not to be introspected or modified (even as a copy)
  171. var LoadBalancerCloudflare_ServiceDesc = grpc.ServiceDesc{
  172. ServiceName: "cloudflareApi.loadBalancer.LoadBalancerCloudflare",
  173. HandlerType: (*LoadBalancerCloudflareServer)(nil),
  174. Methods: []grpc.MethodDesc{
  175. {
  176. MethodName: "List",
  177. Handler: _LoadBalancerCloudflare_List_Handler,
  178. },
  179. {
  180. MethodName: "Create",
  181. Handler: _LoadBalancerCloudflare_Create_Handler,
  182. },
  183. {
  184. MethodName: "Update",
  185. Handler: _LoadBalancerCloudflare_Update_Handler,
  186. },
  187. {
  188. MethodName: "Delete",
  189. Handler: _LoadBalancerCloudflare_Delete_Handler,
  190. },
  191. },
  192. Streams: []grpc.StreamDesc{},
  193. Metadata: "proto/loadBalancer.proto",
  194. }