// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v3.20.1 // source: proto/dns.proto package dns import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( DnsCloudflare_List_FullMethodName = "/cloudflareApi.dns.DnsCloudflare/List" DnsCloudflare_Create_FullMethodName = "/cloudflareApi.dns.DnsCloudflare/Create" DnsCloudflare_Update_FullMethodName = "/cloudflareApi.dns.DnsCloudflare/Update" DnsCloudflare_Delete_FullMethodName = "/cloudflareApi.dns.DnsCloudflare/Delete" ) // DnsCloudflareClient is the client API for DnsCloudflare service. // // 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. type DnsCloudflareClient interface { List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*DnsRecordList, error) Create(ctx context.Context, in *DnsRecordRequest, opts ...grpc.CallOption) (*DnsRecord, error) Update(ctx context.Context, in *DnsRecordRequest, opts ...grpc.CallOption) (*Empty, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) } type dnsCloudflareClient struct { cc grpc.ClientConnInterface } func NewDnsCloudflareClient(cc grpc.ClientConnInterface) DnsCloudflareClient { return &dnsCloudflareClient{cc} } func (c *dnsCloudflareClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*DnsRecordList, error) { out := new(DnsRecordList) err := c.cc.Invoke(ctx, DnsCloudflare_List_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dnsCloudflareClient) Create(ctx context.Context, in *DnsRecordRequest, opts ...grpc.CallOption) (*DnsRecord, error) { out := new(DnsRecord) err := c.cc.Invoke(ctx, DnsCloudflare_Create_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dnsCloudflareClient) Update(ctx context.Context, in *DnsRecordRequest, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, DnsCloudflare_Update_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *dnsCloudflareClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) { out := new(Empty) err := c.cc.Invoke(ctx, DnsCloudflare_Delete_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // DnsCloudflareServer is the server API for DnsCloudflare service. // All implementations must embed UnimplementedDnsCloudflareServer // for forward compatibility type DnsCloudflareServer interface { List(context.Context, *ListRequest) (*DnsRecordList, error) Create(context.Context, *DnsRecordRequest) (*DnsRecord, error) Update(context.Context, *DnsRecordRequest) (*Empty, error) Delete(context.Context, *DeleteRequest) (*Empty, error) mustEmbedUnimplementedDnsCloudflareServer() } // UnimplementedDnsCloudflareServer must be embedded to have forward compatible implementations. type UnimplementedDnsCloudflareServer struct { } func (UnimplementedDnsCloudflareServer) List(context.Context, *ListRequest) (*DnsRecordList, error) { return nil, status.Errorf(codes.Unimplemented, "method List not implemented") } func (UnimplementedDnsCloudflareServer) Create(context.Context, *DnsRecordRequest) (*DnsRecord, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } func (UnimplementedDnsCloudflareServer) Update(context.Context, *DnsRecordRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Update not implemented") } func (UnimplementedDnsCloudflareServer) Delete(context.Context, *DeleteRequest) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") } func (UnimplementedDnsCloudflareServer) mustEmbedUnimplementedDnsCloudflareServer() {} // UnsafeDnsCloudflareServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DnsCloudflareServer will // result in compilation errors. type UnsafeDnsCloudflareServer interface { mustEmbedUnimplementedDnsCloudflareServer() } func RegisterDnsCloudflareServer(s grpc.ServiceRegistrar, srv DnsCloudflareServer) { s.RegisterService(&DnsCloudflare_ServiceDesc, srv) } func _DnsCloudflare_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DnsCloudflareServer).List(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DnsCloudflare_List_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DnsCloudflareServer).List(ctx, req.(*ListRequest)) } return interceptor(ctx, in, info, handler) } func _DnsCloudflare_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DnsRecordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DnsCloudflareServer).Create(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DnsCloudflare_Create_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DnsCloudflareServer).Create(ctx, req.(*DnsRecordRequest)) } return interceptor(ctx, in, info, handler) } func _DnsCloudflare_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DnsRecordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DnsCloudflareServer).Update(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DnsCloudflare_Update_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DnsCloudflareServer).Update(ctx, req.(*DnsRecordRequest)) } return interceptor(ctx, in, info, handler) } func _DnsCloudflare_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(DnsCloudflareServer).Delete(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: DnsCloudflare_Delete_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(DnsCloudflareServer).Delete(ctx, req.(*DeleteRequest)) } return interceptor(ctx, in, info, handler) } // DnsCloudflare_ServiceDesc is the grpc.ServiceDesc for DnsCloudflare service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var DnsCloudflare_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cloudflareApi.dns.DnsCloudflare", HandlerType: (*DnsCloudflareServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _DnsCloudflare_List_Handler, }, { MethodName: "Create", Handler: _DnsCloudflare_Create_Handler, }, { MethodName: "Update", Handler: _DnsCloudflare_Update_Handler, }, { MethodName: "Delete", Handler: _DnsCloudflare_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/dns.proto", }