Skip to content

digi1874/api.ys1994-user

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

用户接口

构建

依赖

  1. go 1.13+
  2. mysql (4.1+,本项目开发时使用5.7;库需要设置为utf8mb4)
  3. 项目根目录下创建文件db.json连接mysql数据库

./db.json

{
  "user": "用户名",
  "password": "密码",
  "localhost": "地址",
  "databaseName": "库名"
}

# 开发,开启http://localhost:8031/
$ go run main.go -env=dev

# 生产程序
$ go build

接口说明

  • response status code:
  1. 200: 确定
  2. 400: 错误
  3. 401: 无权限,token无效
  4. 404: 不存在
  • response data msg: 回应说明

  1. 获取