// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.1
// source: module/base/passport/proto/forget.proto

package passport

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	Forget_Verify_FullMethodName = "/passport.Forget/Verify"
	Forget_Reset_FullMethodName  = "/passport.Forget/Reset"
)

// ForgetClient is the client API for Forget 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.
//
// Passport通行证模块-找回密码
type ForgetClient interface {
	// 验证手机号和验证码
	Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*StatusReply, error)
	// 重罢密码
	Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*StatusReply, error)
}

type forgetClient struct {
	cc grpc.ClientConnInterface
}

func NewForgetClient(cc grpc.ClientConnInterface) ForgetClient {
	return &forgetClient{cc}
}

func (c *forgetClient) Verify(ctx context.Context, in *ForgetVerifyRequest, opts ...grpc.CallOption) (*StatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(StatusReply)
	err := c.cc.Invoke(ctx, Forget_Verify_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *forgetClient) Reset(ctx context.Context, in *ForgetResetRequest, opts ...grpc.CallOption) (*StatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(StatusReply)
	err := c.cc.Invoke(ctx, Forget_Reset_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ForgetServer is the server API for Forget service.
// All implementations should embed UnimplementedForgetServer
// for forward compatibility.
//
// Passport通行证模块-找回密码
type ForgetServer interface {
	// 验证手机号和验证码
	Verify(context.Context, *ForgetVerifyRequest) (*StatusReply, error)
	// 重罢密码
	Reset(context.Context, *ForgetResetRequest) (*StatusReply, error)
}

// UnimplementedForgetServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedForgetServer struct{}

func (UnimplementedForgetServer) Verify(context.Context, *ForgetVerifyRequest) (*StatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Verify not implemented")
}
func (UnimplementedForgetServer) Reset(context.Context, *ForgetResetRequest) (*StatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Reset not implemented")
}
func (UnimplementedForgetServer) testEmbeddedByValue() {}

// UnsafeForgetServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ForgetServer will
// result in compilation errors.
type UnsafeForgetServer interface {
	mustEmbedUnimplementedForgetServer()
}

func RegisterForgetServer(s grpc.ServiceRegistrar, srv ForgetServer) {
	// If the following call panics, it indicates UnimplementedForgetServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&Forget_ServiceDesc, srv)
}

func _Forget_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ForgetVerifyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ForgetServer).Verify(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Forget_Verify_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ForgetServer).Verify(ctx, req.(*ForgetVerifyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Forget_Reset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ForgetResetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ForgetServer).Reset(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Forget_Reset_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ForgetServer).Reset(ctx, req.(*ForgetResetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Forget_ServiceDesc is the grpc.ServiceDesc for Forget service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Forget_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "passport.Forget",
	HandlerType: (*ForgetServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Verify",
			Handler:    _Forget_Verify_Handler,
		},
		{
			MethodName: "Reset",
			Handler:    _Forget_Reset_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module/base/passport/proto/forget.proto",
}
