You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
dark 4f1aa63b1c api 1 week ago
..
docs init 2 weeks ago
todo init 2 weeks ago
usercenter api 1 week ago
utils api 1 week ago
go.mod api 1 week ago
go.sum api 1 week ago
modd.conf api 1 week ago
readme.md api 1 week ago

readme.md

backend 说明

主要包

  • go-zero 框架
go get github.com/zeromicro/go-zero
  • gorm 数据库
go get gorm.io/gorm
  • redis 缓存
go get github.com/redis/go-redis/v9
go get github.com/redis/go-redis/extra/redisotel/v9

工具包

  • bcrypt 密码加密
go get golang.org/x/crypto/bcrypt
  • jwt 认证
go get github.com/golang-jwt/jwt/v4
  • zap 日志
go get go.uber.org/zap
  • viper 配置
go get github.com/spf13/viper
  • copier 数据拷贝
go get github.com/jinzhu/copier/v2
  • strconv 字符串转换
go get strconv
  • time 时间
go get time
  • errors 错误
go get errors
  • regexp 正则
go get regexp
  • context 上下文
go get context
  • fmt 格式化
go get fmt
  • cast 类型转换
go get github.com/spf13/cast
  • carbon 时间
go get github.com/golang-module/carbon/v2
  • base64Captcha 验证码
go get github.com/mojocn/base64Captcha

常用命令

  • 生成 api 文件
goctl api new xxx -style go_zero
// 指定仓库地址,注意goctl版本
goctl api new xxx -remote https://gitea.gxxhygroup.com/dark/goctl184.git -style go_zero
  • api 生成 go 文件
goctl api go -api usercenter.api -dir . -style go_zero
// 指定仓库地址,注意goctl版本
goctl api go -api usercenter.api -dir . -remote https://gitea.gxxhygroup.com/dark/goctl184.git -style go_zero