dns_grpc.pb.go 7.5 KB

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