Code Monkey home page Code Monkey logo

cloud-disk's Introduction

CloudDisk

轻量级云盘系统,基于go-zero、xorm实现。

B站视频链接:https://www.bilibili.com/video/BV1cr4y1s7H4/

使用到的命令

# 创建API服务
goctl api new core
# 启动服务
go run core.go -f etc/core-api.yaml
# 使用api文件生成代码
goctl api go -api core.api -dir . -style go_zero

腾讯云COS后台地址:https://console.cloud.tencent.com/cos/bucket

腾讯云COS帮助文档:https://cloud.tencent.com/document/product/436/31215

系统模块

  • 用户模块
    • 密码登录
    • 刷新Authorization
    • 邮箱注册
    • 用户详情
    • 用户容量
  • 存储池模块
    • 中心存储池资源管理
      • 文件上传
      • 文件秒传
      • 文件分片上传
      • 对接 MinIO
      • 对接阿里对象存储
    • 个人存储池资源管理
      • 文件关联存储
      • 文件列表
      • 文件名称修改
      • 文件夹创建
      • 文件删除
      • 文件移动
  • 文件分享模块
    • 创建分享记录
    • 获取资源详情
    • 资源保存

cloud-disk's People

Contributors

getcharzp avatar rhines-liao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cloud-disk's Issues

In MailCodeSendRegister,consider the need to include advance verification of the validity of the verification code

       // 2) 校验验证码是否在有效期内
	codeTTL, _ := l.svcCtx.RDB.TTL(l.ctx, req.Email).Result()
	logx.Debugf("codeTTL is %v", codeTTL.Seconds())
	if codeTTL.Seconds() > 0 || codeTTL.Seconds() == -1 {
		return nil, errors.New("the verify code has not expired")
	}
	// 3) 生成随机验证码
	verifyCode := expand.RandCode()
	// 4) 缓存验证码
	err = l.svcCtx.RDB.Set(l.ctx, req.Email, verifyCode, time.Second*time.Duration(constant.CodeExpire)).Err()


实现有效期内不重复发送验证码的逻辑

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.