// Code generated by goctl. DO NOT EDIT.
// Source: third.proto

package smsservice

import (
	"context"

	"github.com/cherish-chat/xxim-server/common/pb"

	"github.com/zeromicro/go-zero/zrpc"
	"google.golang.org/grpc"
)

type (
	CaptchaVerifyReq    = pb.CaptchaVerifyReq
	CaptchaVerifyResp   = pb.CaptchaVerifyResp
	EmailCodeSendReq    = pb.EmailCodeSendReq
	EmailCodeSendResp   = pb.EmailCodeSendResp
	EmailCodeVerifyReq  = pb.EmailCodeVerifyReq
	EmailCodeVerifyResp = pb.EmailCodeVerifyResp
	GetCaptchaReq       = pb.GetCaptchaReq
	GetCaptchaResp      = pb.GetCaptchaResp
	SmsCodeSendReq      = pb.SmsCodeSendReq
	SmsCodeSendResp     = pb.SmsCodeSendResp
	SmsCodeVerifyReq    = pb.SmsCodeVerifyReq
	SmsCodeVerifyResp   = pb.SmsCodeVerifyResp

	SmsService interface {
		// SmsCodeSend 发送短信
		SmsCodeSend(ctx context.Context, in *SmsCodeSendReq, opts ...grpc.CallOption) (*SmsCodeSendResp, error)
		// SmsCodeVerify 验证短信
		SmsCodeVerify(ctx context.Context, in *SmsCodeVerifyReq, opts ...grpc.CallOption) (*SmsCodeVerifyResp, error)
	}

	defaultSmsService struct {
		cli zrpc.Client
	}
)

func NewSmsService(cli zrpc.Client) SmsService {
	return &defaultSmsService{
		cli: cli,
	}
}

// SmsCodeSend 发送短信
func (m *defaultSmsService) SmsCodeSend(ctx context.Context, in *SmsCodeSendReq, opts ...grpc.CallOption) (*SmsCodeSendResp, error) {
	client := pb.NewSmsServiceClient(m.cli.Conn())
	return client.SmsCodeSend(ctx, in, opts...)
}

// SmsCodeVerify 验证短信
func (m *defaultSmsService) SmsCodeVerify(ctx context.Context, in *SmsCodeVerifyReq, opts ...grpc.CallOption) (*SmsCodeVerifyResp, error) {
	client := pb.NewSmsServiceClient(m.cli.Conn())
	return client.SmsCodeVerify(ctx, in, opts...)
}
