webtoy_gate

command module
v0.0.0-...-b1e5a9d Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MIT Imports: 10 Imported by: 0

README

webtoy-gate

后端网关服务

通用消息

每个普通回复消息都包含一个外层结构

{
    "code": int,  // 错误码, 为0或不存在时表示正确
    "msg": string, // 错误消息, 仅当code不为0时需要检查
    "data": object,  // 附带的回复消息
}

每个前端请求应包含的头部信息

字段 意义
uid 用户id
session 会话id
token 会话令牌

接口

用户会话检测

url: /api/v1/user/check desc: 检测用户会话是否可用 note: 无 payload

return

仅包含通用结构
用户登录

url: /api/v1/user/login desc: 用户登录 note: 无 payload

{
    "name": string,  // 用户名
    "email": string,  // 邮箱
    "phone": string,  // 手机号
    "passwd": string, // 密码
    "captcha_session": string, // 验证码session
    "captcha_value": string, // 验证码值
}

return

{
    "uid": string,  // 用户id
    "session": string, // 会话id
    "token": string,  // 会话令牌
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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