first
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
01c0fdb3a8
commit
6d4250f004
@ -0,0 +1,19 @@
|
||||
# ---> Go
|
||||
# Binaries for programs and plugins
|
||||
*.exe
|
||||
*.exe~
|
||||
*.dll
|
||||
*.so
|
||||
*.dylib
|
||||
|
||||
# Test binary, built with `go test -c`
|
||||
*.test
|
||||
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
logs
|
||||
.idea
|
||||
.DS_Store
|
||||
# Dependency directories (remove the comment below to include it)
|
||||
# vendor/
|
||||
|
@ -0,0 +1,104 @@
|
||||
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
||||
package docs
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
|
||||
const docTemplate = `{
|
||||
"schemes": {{ marshal .Schemes }},
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"description": "{{escape .Description}}",
|
||||
"title": "{{.Title}}",
|
||||
"contact": {},
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"host": "{{.Host}}",
|
||||
"basePath": "{{.BasePath}}",
|
||||
"paths": {
|
||||
"/api/v1/login/register": {
|
||||
"post": {
|
||||
"description": "该接口用于用户通过手机号和密码进行登录。如果登录失败,系统会记录错误信息并限制登录次数。",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"login"
|
||||
],
|
||||
"summary": "用户登录",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "用户手机号",
|
||||
"name": "mobile",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "用户密码",
|
||||
"name": "password",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "登录成功返回Token",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/login.SsoLoginResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"login.SsoLoginResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "返回Code 200 成功 其他是失败",
|
||||
"type": "integer"
|
||||
},
|
||||
"count": {
|
||||
"description": "条数",
|
||||
"type": "integer"
|
||||
},
|
||||
"data": {
|
||||
"description": "数据列表",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"description": "返回token",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"description": "返回信息"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||||
var SwaggerInfo = &swag.Spec{
|
||||
Version: "",
|
||||
Host: "",
|
||||
BasePath: "",
|
||||
Schemes: []string{},
|
||||
Title: "",
|
||||
Description: "",
|
||||
InfoInstanceName: "swagger",
|
||||
SwaggerTemplate: docTemplate,
|
||||
LeftDelim: "{{",
|
||||
RightDelim: "}}",
|
||||
}
|
||||
|
||||
func init() {
|
||||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"contact": {}
|
||||
},
|
||||
"paths": {
|
||||
"/api/v1/login/register": {
|
||||
"post": {
|
||||
"description": "该接口用于用户通过手机号和密码进行登录。如果登录失败,系统会记录错误信息并限制登录次数。",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"login"
|
||||
],
|
||||
"summary": "用户登录",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "用户手机号",
|
||||
"name": "mobile",
|
||||
"in": "query",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "用户密码",
|
||||
"name": "password",
|
||||
"in": "query",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "登录成功返回Token",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/login.SsoLoginResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"login.SsoLoginResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"description": "返回Code 200 成功 其他是失败",
|
||||
"type": "integer"
|
||||
},
|
||||
"count": {
|
||||
"description": "条数",
|
||||
"type": "integer"
|
||||
},
|
||||
"data": {
|
||||
"description": "数据列表",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"description": "返回token",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"description": "返回信息"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
definitions:
|
||||
login.SsoLoginResponse:
|
||||
properties:
|
||||
code:
|
||||
description: 返回Code 200 成功 其他是失败
|
||||
type: integer
|
||||
count:
|
||||
description: 条数
|
||||
type: integer
|
||||
data:
|
||||
description: 数据列表
|
||||
properties:
|
||||
token:
|
||||
description: 返回token
|
||||
type: string
|
||||
type: object
|
||||
message:
|
||||
description: 返回信息
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
paths:
|
||||
/api/v1/login/register:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 该接口用于用户通过手机号和密码进行登录。如果登录失败,系统会记录错误信息并限制登录次数。
|
||||
parameters:
|
||||
- description: 用户手机号
|
||||
in: query
|
||||
name: mobile
|
||||
required: true
|
||||
type: string
|
||||
- description: 用户密码
|
||||
in: query
|
||||
name: password
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 登录成功返回Token
|
||||
schema:
|
||||
$ref: '#/definitions/login.SsoLoginResponse'
|
||||
summary: 用户登录
|
||||
tags:
|
||||
- login
|
||||
swagger: "2.0"
|
Loading…
Reference in new issue