purge_grpc.pb.go 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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/purge.proto
  6. package purge
  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. // PurgeCloudflareClient is the client API for PurgeCloudflare 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 PurgeCloudflareClient interface {
  21. // Sends a greeting
  22. PurgeCloudflare(ctx context.Context, in *PurgeRequestCloudflare, opts ...grpc.CallOption) (*PurgeReplyCloudflare, error)
  23. PurgeCloudflareByPrefix(ctx context.Context, in *PurgeRequestCloudflarePrefix, opts ...grpc.CallOption) (*PurgeReplyCloudflare, error)
  24. PurgeCloudflareEverything(ctx context.Context, in *PurgeRequestCloudflareEverything, opts ...grpc.CallOption) (*PurgeReplyCloudflare, error)
  25. }
  26. type purgeCloudflareClient struct {
  27. cc grpc.ClientConnInterface
  28. }
  29. func NewPurgeCloudflareClient(cc grpc.ClientConnInterface) PurgeCloudflareClient {
  30. return &purgeCloudflareClient{cc}
  31. }
  32. func (c *purgeCloudflareClient) PurgeCloudflare(ctx context.Context, in *PurgeRequestCloudflare, opts ...grpc.CallOption) (*PurgeReplyCloudflare, error) {
  33. out := new(PurgeReplyCloudflare)
  34. err := c.cc.Invoke(ctx, "/cloudflareApi.cache.purge.PurgeCloudflare/PurgeCloudflare", in, out, opts...)
  35. if err != nil {
  36. return nil, err
  37. }
  38. return out, nil
  39. }
  40. func (c *purgeCloudflareClient) PurgeCloudflareByPrefix(ctx context.Context, in *PurgeRequestCloudflarePrefix, opts ...grpc.CallOption) (*PurgeReplyCloudflare, error) {
  41. out := new(PurgeReplyCloudflare)
  42. err := c.cc.Invoke(ctx, "/cloudflareApi.cache.purge.PurgeCloudflare/PurgeCloudflareByPrefix", in, out, opts...)
  43. if err != nil {
  44. return nil, err
  45. }
  46. return out, nil
  47. }
  48. func (c *purgeCloudflareClient) PurgeCloudflareEverything(ctx context.Context, in *PurgeRequestCloudflareEverything, opts ...grpc.CallOption) (*PurgeReplyCloudflare, error) {
  49. out := new(PurgeReplyCloudflare)
  50. err := c.cc.Invoke(ctx, "/cloudflareApi.cache.purge.PurgeCloudflare/PurgeCloudflareEverything", in, out, opts...)
  51. if err != nil {
  52. return nil, err
  53. }
  54. return out, nil
  55. }
  56. // PurgeCloudflareServer is the server API for PurgeCloudflare service.
  57. // All implementations must embed UnimplementedPurgeCloudflareServer
  58. // for forward compatibility
  59. type PurgeCloudflareServer interface {
  60. // Sends a greeting
  61. PurgeCloudflare(context.Context, *PurgeRequestCloudflare) (*PurgeReplyCloudflare, error)
  62. PurgeCloudflareByPrefix(context.Context, *PurgeRequestCloudflarePrefix) (*PurgeReplyCloudflare, error)
  63. PurgeCloudflareEverything(context.Context, *PurgeRequestCloudflareEverything) (*PurgeReplyCloudflare, error)
  64. mustEmbedUnimplementedPurgeCloudflareServer()
  65. }
  66. // UnimplementedPurgeCloudflareServer must be embedded to have forward compatible implementations.
  67. type UnimplementedPurgeCloudflareServer struct {
  68. }
  69. func (UnimplementedPurgeCloudflareServer) PurgeCloudflare(context.Context, *PurgeRequestCloudflare) (*PurgeReplyCloudflare, error) {
  70. return nil, status.Errorf(codes.Unimplemented, "method PurgeCloudflare not implemented")
  71. }
  72. func (UnimplementedPurgeCloudflareServer) PurgeCloudflareByPrefix(context.Context, *PurgeRequestCloudflarePrefix) (*PurgeReplyCloudflare, error) {
  73. return nil, status.Errorf(codes.Unimplemented, "method PurgeCloudflareByPrefix not implemented")
  74. }
  75. func (UnimplementedPurgeCloudflareServer) PurgeCloudflareEverything(context.Context, *PurgeRequestCloudflareEverything) (*PurgeReplyCloudflare, error) {
  76. return nil, status.Errorf(codes.Unimplemented, "method PurgeCloudflareEverything not implemented")
  77. }
  78. func (UnimplementedPurgeCloudflareServer) mustEmbedUnimplementedPurgeCloudflareServer() {}
  79. // UnsafePurgeCloudflareServer may be embedded to opt out of forward compatibility for this service.
  80. // Use of this interface is not recommended, as added methods to PurgeCloudflareServer will
  81. // result in compilation errors.
  82. type UnsafePurgeCloudflareServer interface {
  83. mustEmbedUnimplementedPurgeCloudflareServer()
  84. }
  85. func RegisterPurgeCloudflareServer(s grpc.ServiceRegistrar, srv PurgeCloudflareServer) {
  86. s.RegisterService(&PurgeCloudflare_ServiceDesc, srv)
  87. }
  88. func _PurgeCloudflare_PurgeCloudflare_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  89. in := new(PurgeRequestCloudflare)
  90. if err := dec(in); err != nil {
  91. return nil, err
  92. }
  93. if interceptor == nil {
  94. return srv.(PurgeCloudflareServer).PurgeCloudflare(ctx, in)
  95. }
  96. info := &grpc.UnaryServerInfo{
  97. Server: srv,
  98. FullMethod: "/cloudflareApi.cache.purge.PurgeCloudflare/PurgeCloudflare",
  99. }
  100. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  101. return srv.(PurgeCloudflareServer).PurgeCloudflare(ctx, req.(*PurgeRequestCloudflare))
  102. }
  103. return interceptor(ctx, in, info, handler)
  104. }
  105. func _PurgeCloudflare_PurgeCloudflareByPrefix_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  106. in := new(PurgeRequestCloudflarePrefix)
  107. if err := dec(in); err != nil {
  108. return nil, err
  109. }
  110. if interceptor == nil {
  111. return srv.(PurgeCloudflareServer).PurgeCloudflareByPrefix(ctx, in)
  112. }
  113. info := &grpc.UnaryServerInfo{
  114. Server: srv,
  115. FullMethod: "/cloudflareApi.cache.purge.PurgeCloudflare/PurgeCloudflareByPrefix",
  116. }
  117. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  118. return srv.(PurgeCloudflareServer).PurgeCloudflareByPrefix(ctx, req.(*PurgeRequestCloudflarePrefix))
  119. }
  120. return interceptor(ctx, in, info, handler)
  121. }
  122. func _PurgeCloudflare_PurgeCloudflareEverything_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  123. in := new(PurgeRequestCloudflareEverything)
  124. if err := dec(in); err != nil {
  125. return nil, err
  126. }
  127. if interceptor == nil {
  128. return srv.(PurgeCloudflareServer).PurgeCloudflareEverything(ctx, in)
  129. }
  130. info := &grpc.UnaryServerInfo{
  131. Server: srv,
  132. FullMethod: "/cloudflareApi.cache.purge.PurgeCloudflare/PurgeCloudflareEverything",
  133. }
  134. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  135. return srv.(PurgeCloudflareServer).PurgeCloudflareEverything(ctx, req.(*PurgeRequestCloudflareEverything))
  136. }
  137. return interceptor(ctx, in, info, handler)
  138. }
  139. // PurgeCloudflare_ServiceDesc is the grpc.ServiceDesc for PurgeCloudflare service.
  140. // It's only intended for direct use with grpc.RegisterService,
  141. // and not to be introspected or modified (even as a copy)
  142. var PurgeCloudflare_ServiceDesc = grpc.ServiceDesc{
  143. ServiceName: "cloudflareApi.cache.purge.PurgeCloudflare",
  144. HandlerType: (*PurgeCloudflareServer)(nil),
  145. Methods: []grpc.MethodDesc{
  146. {
  147. MethodName: "PurgeCloudflare",
  148. Handler: _PurgeCloudflare_PurgeCloudflare_Handler,
  149. },
  150. {
  151. MethodName: "PurgeCloudflareByPrefix",
  152. Handler: _PurgeCloudflare_PurgeCloudflareByPrefix_Handler,
  153. },
  154. {
  155. MethodName: "PurgeCloudflareEverything",
  156. Handler: _PurgeCloudflare_PurgeCloudflareEverything_Handler,
  157. },
  158. },
  159. Streams: []grpc.StreamDesc{},
  160. Metadata: "proto/purge.proto",
  161. }