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

package server

import (
	"context"

	"github.com/cherish-chat/xxim-server/app/third/internal/logic/captchaservice"
	"github.com/cherish-chat/xxim-server/app/third/internal/svc"
	"github.com/cherish-chat/xxim-server/common/pb"
)

type CaptchaServiceServer struct {
	svcCtx *svc.ServiceContext
	pb.UnimplementedCaptchaServiceServer
}

func NewCaptchaServiceServer(svcCtx *svc.ServiceContext) *CaptchaServiceServer {
	return &CaptchaServiceServer{
		svcCtx: svcCtx,
	}
}

// GetCaptcha 获取图形验证码
func (s *CaptchaServiceServer) GetCaptcha(ctx context.Context, in *pb.GetCaptchaReq) (*pb.GetCaptchaResp, error) {
	l := captchaservicelogic.NewGetCaptchaLogic(ctx, s.svcCtx)
	return l.GetCaptcha(in)
}

// CaptchaVerify 验证图形验证码
func (s *CaptchaServiceServer) CaptchaVerify(ctx context.Context, in *pb.CaptchaVerifyReq) (*pb.CaptchaVerifyResp, error) {
	l := captchaservicelogic.NewCaptchaVerifyLogic(ctx, s.svcCtx)
	return l.CaptchaVerify(in)
}
