| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497 |
- // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
- // This file was generated by swaggo/swag
- package docs
- import (
- "bytes"
- "encoding/json"
- "strings"
- "github.com/alecthomas/template"
- "github.com/swaggo/swag"
- )
- var doc = `{
- "schemes": {{ marshal .Schemes }},
- "swagger": "2.0",
- "info": {
- "description": "{{.Description}}",
- "title": "{{.Title}}",
- "termsOfService": "http://swagger.io/terms/",
- "contact": {
- "name": "API Support",
- "url": "http://www.swagger.io/support",
- "email": "support@swagger.io"
- },
- "license": {
- "name": "Apache 2.0",
- "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
- },
- "version": "{{.Version}}"
- },
- "host": "{{.Host}}",
- "basePath": "{{.BasePath}}",
- "paths": {
- "/Auth/GenVerifyPic": {
- "post": {
- "description": "获取验证图片和验证id",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Auth"
- ],
- "summary": "获取验证图片",
- "parameters": [
- {
- "type": "string",
- "description": "高",
- "name": "height",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "宽",
- "name": "width",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "噪点数量",
- "name": "noiseCount",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "验证码字数",
- "name": "length",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "验证码取值范围 比如 1234567890 或者 abcdef等",
- "name": "source",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.ResponseVerifyPic"
- }
- }
- }
- }
- },
- "/Auth/GetPhoneVFCode": {
- "post": {
- "description": "手机获取验证码",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Auth"
- ],
- "summary": "手机获取验证码",
- "parameters": [
- {
- "type": "string",
- "description": "图形验证码,目前不起作用",
- "name": "picCode",
- "in": "formData"
- },
- {
- "type": "string",
- "description": "手机号",
- "name": "phone",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "验证码类型 1:登录",
- "name": "codeType",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.ResponseBase"
- }
- }
- }
- }
- },
- "/Auth/PhoneSignIn": {
- "post": {
- "description": "手机验证码登录",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "Auth"
- ],
- "summary": "手机验证码登录",
- "parameters": [
- {
- "type": "string",
- "description": "手机号",
- "name": "phone",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "验证码",
- "name": "smsCode",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.ResponseBase"
- }
- }
- }
- }
- },
- "/HrSensors/AddAppHeartRate": {
- "post": {
- "description": "App心率数据上报",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "HrSensors"
- ],
- "summary": "App心率数据上报",
- "parameters": [
- {
- "type": "string",
- "description": "Token",
- "name": "token",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "duId",
- "name": "duId",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "sn",
- "name": "sn",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "心率带id",
- "name": "hrId",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "心跳",
- "name": "heartRate",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "时间戳毫秒",
- "name": "rcvTime",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "卡路里",
- "name": "calories",
- "in": "formData",
- "required": true
- },
- {
- "type": "integer",
- "description": "运动卡路里",
- "name": "pureCalories",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.AddHRRtn"
- }
- }
- }
- }
- },
- "/HrSensors/HrSensorsUpdate": {
- "post": {
- "description": "心率带信息查询和更新",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "HrSensors"
- ],
- "summary": "心率带信息查询和更新",
- "parameters": [
- {
- "type": "string",
- "description": "Token",
- "name": "token",
- "in": "formData",
- "required": true
- },
- {
- "type": "string",
- "description": "心率带编号",
- "name": "sn",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.ResponseBase"
- }
- }
- }
- }
- },
- "/User/GetDuInfoAndUserInfoByUserMd5": {
- "post": {
- "description": "查询用户当前显示单元和对应身体信息",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User"
- ],
- "summary": "查询用户是否正在上课接口",
- "parameters": [
- {
- "type": "string",
- "description": "Token",
- "name": "token",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.ResponseBase"
- }
- }
- }
- }
- },
- "/User/UserSelfQuery": {
- "post": {
- "description": "会员自身信息查询",
- "consumes": [
- "application/x-www-form-urlencoded"
- ],
- "produces": [
- "application/json"
- ],
- "tags": [
- "User"
- ],
- "summary": "会员自身信息查询",
- "parameters": [
- {
- "type": "string",
- "description": "Token",
- "name": "token",
- "in": "formData",
- "required": true
- }
- ],
- "responses": {
- "200": {
- "description": "OK",
- "schema": {
- "$ref": "#/definitions/controller.ResponseBase"
- }
- }
- }
- }
- }
- },
- "definitions": {
- "controller.AddHRRtn": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "inClass": {
- "type": "integer"
- },
- "memo": {
- "type": "string"
- }
- }
- },
- "controller.ResponseBase": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "memo": {
- "type": "string"
- }
- }
- },
- "controller.ResponseVerifyPic": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "pic": {
- "type": "string"
- }
- }
- }
- },
- "securityDefinitions": {
- "ApiKeyAuth": {
- "type": "apiKey",
- "name": "Authorization",
- "in": "header"
- },
- "BasicAuth": {
- "type": "basic"
- },
- "OAuth2AccessCode": {
- "type": "oauth2",
- "flow": "accessCode",
- "authorizationUrl": "https://example.com/oauth/authorize",
- "tokenUrl": "https://example.com/oauth/token",
- "scopes": {
- "admin": " Grants read and write access to administrative information"
- }
- },
- "OAuth2Application": {
- "type": "oauth2",
- "flow": "application",
- "tokenUrl": "https://example.com/oauth/token",
- "scopes": {
- "admin": " Grants read and write access to administrative information",
- "write": " Grants write access"
- }
- },
- "OAuth2Implicit": {
- "type": "oauth2",
- "flow": "implicit",
- "authorizationUrl": "https://example.com/oauth/authorize",
- "scopes": {
- "admin": " Grants read and write access to administrative information",
- "write": " Grants write access"
- }
- },
- "OAuth2Password": {
- "type": "oauth2",
- "flow": "password",
- "tokenUrl": "https://example.com/oauth/token",
- "scopes": {
- "admin": " Grants read and write access to administrative information",
- "read": " Grants read access",
- "write": " Grants write access"
- }
- }
- }
- }`
- type swaggerInfo struct {
- Version string
- Host string
- BasePath string
- Schemes []string
- Title string
- Description string
- }
- // SwaggerInfo holds exported Swagger Info so clients can modify it
- var SwaggerInfo = swaggerInfo{
- Version: "1.0",
- Host: "",
- BasePath: "/v1",
- Schemes: []string{},
- Title: "Video Course框架",
- Description: "Video Course框架 API 文档",
- }
- type s struct{}
- func (s *s) ReadDoc() string {
- sInfo := SwaggerInfo
- sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
- t, err := template.New("swagger_info").Funcs(template.FuncMap{
- "marshal": func(v interface{}) string {
- a, _ := json.Marshal(v)
- return string(a)
- },
- }).Parse(doc)
- if err != nil {
- return doc
- }
- var tpl bytes.Buffer
- if err := t.Execute(&tpl, sInfo); err != nil {
- return doc
- }
- return tpl.String()
- }
- func init() {
- swag.Register(swag.Name, &s{})
- }
|