loadBalancer_grpc.pb.go 8.6 KB

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