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

package server

import (
	"context"

	"go-cms/app/basic/cmd/rpc/internal/logic"
	"go-cms/app/basic/cmd/rpc/internal/svc"
	"go-cms/app/basic/cmd/rpc/pb"
)

type BasicServer struct {
	svcCtx *svc.ServiceContext
	pb.UnimplementedBasicServer
}

func NewBasicServer(svcCtx *svc.ServiceContext) *BasicServer {
	return &BasicServer{
		svcCtx: svcCtx,
	}
}

// 图形码
func (s *BasicServer) Captcha(ctx context.Context, in *pb.CaptchaReq) (*pb.CaptchaResp, error) {
	l := logic.NewCaptchaLogic(ctx, s.svcCtx)
	return l.Captcha(in)
}

// 验证码
func (s *BasicServer) SendCode(ctx context.Context, in *pb.SendCodeReq) (*pb.SendCodeResp, error) {
	l := logic.NewSendCodeLogic(ctx, s.svcCtx)
	return l.SendCode(in)
}

// 图形码
func (s *BasicServer) VerifyCaptcha(ctx context.Context, in *pb.VerifyCodeReq) (*pb.VerifyCodeResp, error) {
	l := logic.NewVerifyCaptchaLogic(ctx, s.svcCtx)
	return l.VerifyCaptcha(in)
}

// 图形码
func (s *BasicServer) VerifyCode(ctx context.Context, in *pb.VerifyCodeReq) (*pb.VerifyCodeResp, error) {
	l := logic.NewVerifyCodeLogic(ctx, s.svcCtx)
	return l.VerifyCode(in)
}

// FileDetail //文件详情
func (s *BasicServer) FileDetail(ctx context.Context, in *pb.FileDetailReq) (*pb.FileDetailResp, error) {
	l := logic.NewFileDetailLogic(ctx, s.svcCtx)
	return l.FileDetail(in)
}

// FileList 文件列表
func (s *BasicServer) FileList(ctx context.Context, in *pb.FileListReq) (*pb.FileListResp, error) {
	l := logic.NewFileListLogic(ctx, s.svcCtx)
	return l.FileList(in)
}

// addFile 新增文件
func (s *BasicServer) AddFile(ctx context.Context, in *pb.AddFileReq) (*pb.AddFileResp, error) {
	l := logic.NewAddFileLogic(ctx, s.svcCtx)
	return l.AddFile(in)
}
