purge_grpc.pb.go 7.7 KB

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