dsg

package module
v0.9.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 8 Imported by: 1

README

数据库

  1. 数据库:COLLATE=utf8mb4_0900_ai_ci
  2. 建表:ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
  3. 项目启动时,会检测当前数据库无user表情况下,创建user表,并在models文件夹生成表对应结构体文件model.go
  4. 生成model.go使用models下cmd/gen.go,可根据genModel.go进行配置

功能

1. gRPC

  • 通过id查询用户
  • 通过id列表查询用户
  • 通过Token查询用户id和openID
  • 通过手机号查询用户id
  • 发送短信
  • 校验验证码
  • 登录(手机号未注册则自动注册
    • 参数:手机号,验证码,设备信息,登录方式(电脑web和app、公众号和小程序),其中token时效暂定web为2小时,其他为90天
  • 刷新token
  • 微信
    • 登录
      • 参数:系统标识编码、code、appID
      • 返回值:token,可以根据token获取用户id和openID,如果userID=0,说明该用户未绑定手机号
    • 绑定手机号
      • 小程序直接绑定,给公众号需要验证码校验

缓存

  • 默认缓存(非Redis
    • 系统版本
    • RSA秘钥

gRPC

go install google.golang.org/protobuf/cmd/remote-gen-go@v1.26
go install google.golang.org/grpc/cmd/remote-gen-go-grpc@v1.1

Documentation

Overview

Package dsg @Author: asus @Description: $ @File: New @Data: 2022/2/2118:09

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service added in v0.8.0

type Service struct {
	App *iris.Application
}

func New

func New(paths ...string) *Service

func (*Service) Start added in v0.8.0

func (app *Service) Start()

Start 启动监听

Directories

Path Synopsis
render
Package render @Author: asus @Description: $ @File: category_render @Data: 2022/2/2816:48
Package render @Author: asus @Description: $ @File: category_render @Data: 2022/2/2816:48
cond
Package cond @Author: asus @Description: $ @File: cond @Data: 2022/4/129:54
Package cond @Author: asus @Description: $ @File: cond @Data: 2022/4/129:54
service
aesService/ecb_aes
Package ecb_aes @Author: asus @Description: $ @File: aes_decrypt @Data: 2022/8/1917:12
Package ecb_aes @Author: asus @Description: $ @File: aes_decrypt @Data: 2022/8/1917:12
fileService
Package fileService @Author: asus @Description: $ @File: router.go @Data: 2022/4/1116:51
Package fileService @Author: asus @Description: $ @File: router.go @Data: 2022/4/1116:51
grpcService/userCard
Package userCard @Author: asus @Description: $ @File: userCard @Data: 2022/4/116:46
Package userCard @Author: asus @Description: $ @File: userCard @Data: 2022/4/116:46
grpcService/userHistory
Package userHistory @Author: asus @Description: $ @File: userHistory @Data: 2022/4/116:53
Package userHistory @Author: asus @Description: $ @File: userHistory @Data: 2022/4/116:53
validatorService
Package frame @Author: asus @Description: $ @File: registerValidation @Data: 2021/12/311:16
Package frame @Author: asus @Description: $ @File: registerValidation @Data: 2021/12/311:16
Package service @Author: asus @Description: $ @File: random @Data: 2021/12/2318:44
Package service @Author: asus @Description: $ @File: random @Data: 2021/12/2318:44
guzzle
Package guzzle @Author: asus @Description: $ @File: client @Data: 2022/1/2016:41
Package guzzle @Author: asus @Description: $ @File: client @Data: 2022/1/2016:41

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL