dns_grpc.pb.go 7.8 KB

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