softplayer-go-proto/pkg/email/email_v1_grpc.pb.go

139 lines
5.1 KiB
Go
Raw Normal View History

2024-03-21 15:11:13 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package email
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// 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
// EmailValidationClient is the client API for EmailValidation 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 EmailValidationClient interface {
SendRequest(ctx context.Context, in *RequestValidation, opts ...grpc.CallOption) (*emptypb.Empty, error)
ValidateEmail(ctx context.Context, in *ConfirmValidation, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type emailValidationClient struct {
cc grpc.ClientConnInterface
}
func NewEmailValidationClient(cc grpc.ClientConnInterface) EmailValidationClient {
return &emailValidationClient{cc}
}
func (c *emailValidationClient) SendRequest(ctx context.Context, in *RequestValidation, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/email.EmailValidation/SendRequest", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *emailValidationClient) ValidateEmail(ctx context.Context, in *ConfirmValidation, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/email.EmailValidation/ValidateEmail", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EmailValidationServer is the server API for EmailValidation service.
// All implementations must embed UnimplementedEmailValidationServer
// for forward compatibility
type EmailValidationServer interface {
SendRequest(context.Context, *RequestValidation) (*emptypb.Empty, error)
ValidateEmail(context.Context, *ConfirmValidation) (*emptypb.Empty, error)
mustEmbedUnimplementedEmailValidationServer()
}
// UnimplementedEmailValidationServer must be embedded to have forward compatible implementations.
type UnimplementedEmailValidationServer struct {
}
func (UnimplementedEmailValidationServer) SendRequest(context.Context, *RequestValidation) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SendRequest not implemented")
}
func (UnimplementedEmailValidationServer) ValidateEmail(context.Context, *ConfirmValidation) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ValidateEmail not implemented")
}
func (UnimplementedEmailValidationServer) mustEmbedUnimplementedEmailValidationServer() {}
// UnsafeEmailValidationServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to EmailValidationServer will
// result in compilation errors.
type UnsafeEmailValidationServer interface {
mustEmbedUnimplementedEmailValidationServer()
}
func RegisterEmailValidationServer(s grpc.ServiceRegistrar, srv EmailValidationServer) {
s.RegisterService(&EmailValidation_ServiceDesc, srv)
}
func _EmailValidation_SendRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RequestValidation)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EmailValidationServer).SendRequest(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/email.EmailValidation/SendRequest",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EmailValidationServer).SendRequest(ctx, req.(*RequestValidation))
}
return interceptor(ctx, in, info, handler)
}
func _EmailValidation_ValidateEmail_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConfirmValidation)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EmailValidationServer).ValidateEmail(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/email.EmailValidation/ValidateEmail",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EmailValidationServer).ValidateEmail(ctx, req.(*ConfirmValidation))
}
return interceptor(ctx, in, info, handler)
}
// EmailValidation_ServiceDesc is the grpc.ServiceDesc for EmailValidation service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var EmailValidation_ServiceDesc = grpc.ServiceDesc{
ServiceName: "email.EmailValidation",
HandlerType: (*EmailValidationServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SendRequest",
Handler: _EmailValidation_SendRequest_Handler,
},
{
MethodName: "ValidateEmail",
Handler: _EmailValidation_ValidateEmail_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "email/email_v1.proto",
}