// 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{}) }