|
|
// 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": "53766543@qq.com"
|
|
|
},
|
|
|
"license": {
|
|
|
"name": "Apache 2.0",
|
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
|
},
|
|
|
"version": "{{.Version}}"
|
|
|
},
|
|
|
"host": "{{.Host}}",
|
|
|
"basePath": "{{.BasePath}}",
|
|
|
"paths": {
|
|
|
"/dataex/dataex/DataexCollect": {
|
|
|
"post": {
|
|
|
"description": "【数据交换平台】用户行为数据汇集服务接口,支持用户事件批量入库,一个批次少于100个事件数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"dataex"
|
|
|
],
|
|
|
"summary": "汇集数据",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "汇集数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataCollect"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Result"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Result"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/dataex/DataexGet": {
|
|
|
"post": {
|
|
|
"description": "【数据交换平台】获取数据服务接口。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"dataex"
|
|
|
],
|
|
|
"summary": "获取数据",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "获取数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataGet"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataGetResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Result"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/dataex/DataexPage": {
|
|
|
"post": {
|
|
|
"description": "【数据交换平台】分页查询数据服务接口,支持分页查询,支持数据变更时间查询,一个批次返回100条数据【query_page从0开始计数,query_time可以为空】。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"dataex"
|
|
|
],
|
|
|
"summary": "分页查询数据",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "分页查询数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataPage"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataGetResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Result"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/dataex/DataexQuery": {
|
|
|
"post": {
|
|
|
"description": "【数据交换平台】条件查询数据服务接口,支持组合条件查询,支持分页查询,一个批次返回100条数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"dataex"
|
|
|
],
|
|
|
"summary": "条件查询数据",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "条件查询数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataQuery"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataGetResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Result"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/dataex/DataexSet": {
|
|
|
"post": {
|
|
|
"description": "【数据交换平台】修改数据服务接口,支持批量修改,一个批次少于100条数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"dataex"
|
|
|
],
|
|
|
"summary": "修改数据",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "修改数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataIn"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataInResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Result"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/dataex/SystemAuth": {
|
|
|
"post": {
|
|
|
"description": "【数据交换平台】接入系统鉴权服务接口,使用数据交换平台提供的接入系统id和key,验证成功返回系统票据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"dataex"
|
|
|
],
|
|
|
"summary": "接入系统鉴权",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "接入系统ID、系统生成验证Token和验证时间,备注:system_token = MD5.hash(MD5.hash(system_id+auth_time)+system_key)",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Auth"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Result"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.Result"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/hyper_ypt/Query": {
|
|
|
"post": {
|
|
|
"description": "【超融合服务】超融合数据查询接口,使用自定义的查询,返回查询结果数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"hyper"
|
|
|
],
|
|
|
"summary": "超融合数据查询(后台)",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "查询参数",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperQuery"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperGetResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperGetResult"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/hyper_ypt/QueryByID": {
|
|
|
"post": {
|
|
|
"description": "【超融合服务】超融合数据详情查询接口,使用自定义的查询,返回查询详情数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"hyper"
|
|
|
],
|
|
|
"summary": "超融合数据详情查询(后台)",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "查询参数",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperQueryByID"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperGet"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperGet"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/hyper_ypt/QueryFE": {
|
|
|
"post": {
|
|
|
"description": "【超融合服务】超融合数据查询接口,使用自定义的查询,返回查询结果数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"hyper"
|
|
|
],
|
|
|
"summary": "超融合数据查询(前端)",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "查询参数",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperQueryFE"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperGetResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperGetResult"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/hyper_ypt/QueryFEByID": {
|
|
|
"post": {
|
|
|
"description": "【超融合服务】超融合数据详情查询接口,使用自定义的查询,返回查询详情数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"hyper"
|
|
|
],
|
|
|
"summary": "超融合数据详情查询(前端)",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "查询参数",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperQueryFEByID"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperGet"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DatahyperGet"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/report/QueryJoin": {
|
|
|
"post": {
|
|
|
"description": "【统计分析平台】ES-SQL数据关联查询接口,使用接入系统自定义的查询,与基础数据关联后【左关联】,返回查询结果数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"report"
|
|
|
],
|
|
|
"summary": "ES-SQL数据关联查询",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "关联查询数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.QueryJoin"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataResult"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/report/QuerySimple": {
|
|
|
"post": {
|
|
|
"description": "【统计分析平台】ES-SQL数据简单查询接口,使用接入系统自定义的查询,返回查询结果数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"report"
|
|
|
],
|
|
|
"summary": "ES-SQL数据查询",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "简单查询数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.QuerySimple"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataResult"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/report/QuerySimpleGP": {
|
|
|
"post": {
|
|
|
"description": "【统计分析平台】GP-SQL数据简单查询接口,使用接入系统自定义的查询,返回查询结果数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"report"
|
|
|
],
|
|
|
"summary": "GP-SQL数据查询",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "简单查询数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.QuerySimpleGP"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataResult"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"/dataex/report/QueryUnion": {
|
|
|
"post": {
|
|
|
"description": "【统计分析平台】ES-SQL数据合并查询接口,使用接入系统自定义的查询【支持多个查询】,与基础数据关联后【支持多次左关联】,返回查询结果数据。",
|
|
|
"consumes": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"produces": [
|
|
|
"application/json"
|
|
|
],
|
|
|
"tags": [
|
|
|
"report"
|
|
|
],
|
|
|
"summary": "ES-SQL数据合并查询",
|
|
|
"parameters": [
|
|
|
{
|
|
|
"description": "合并查询数据",
|
|
|
"name": "input",
|
|
|
"in": "body",
|
|
|
"required": true,
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.QueryUnion"
|
|
|
}
|
|
|
}
|
|
|
],
|
|
|
"responses": {
|
|
|
"200": {
|
|
|
"description": "OK",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataResult"
|
|
|
}
|
|
|
},
|
|
|
"400": {
|
|
|
"description": "Bad Request",
|
|
|
"schema": {
|
|
|
"$ref": "#/definitions/MySwagger.DataResult"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"definitions": {
|
|
|
"MySwagger.Auth": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"auth_time": {
|
|
|
"type": "string",
|
|
|
"example": "2020/01/02 03:04:05"
|
|
|
},
|
|
|
"system_id": {
|
|
|
"type": "string",
|
|
|
"example": "SYS-200201"
|
|
|
},
|
|
|
"system_token": {
|
|
|
"type": "string",
|
|
|
"example": "a6ce11eab94df48a6ce11eab94df48e38f73cf7e38f73cf7"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.Data": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"data": {
|
|
|
"type": "string",
|
|
|
"example": "{id:12300,name:zhangj,org_id:123001}"
|
|
|
},
|
|
|
"data_id": {
|
|
|
"type": "string",
|
|
|
"example": "202008080008"
|
|
|
},
|
|
|
"del_flag": {
|
|
|
"type": "integer",
|
|
|
"example": 0
|
|
|
},
|
|
|
"org_id": {
|
|
|
"type": "string",
|
|
|
"example": "200201"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DataCollect": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"data_source": {
|
|
|
"type": "string",
|
|
|
"example": "log_login"
|
|
|
},
|
|
|
"event_datas": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/MySwagger.Event"
|
|
|
}
|
|
|
},
|
|
|
"user_datas": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/MySwagger.User"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DataGet": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"auth_token": {
|
|
|
"type": "string",
|
|
|
"example": "DATAEX-TOKEN-a6ce-11ea-b94df48e38f73cf7"
|
|
|
},
|
|
|
"data_id": {
|
|
|
"type": "string",
|
|
|
"example": "202008080008"
|
|
|
},
|
|
|
"data_source": {
|
|
|
"type": "string",
|
|
|
"example": "org_school"
|
|
|
},
|
|
|
"org_id": {
|
|
|
"type": "string",
|
|
|
"example": "-1"
|
|
|
},
|
|
|
"system_id": {
|
|
|
"type": "string",
|
|
|
"example": "SYS-200201"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DataGetResult": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"datas": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/MySwagger.Data"
|
|
|
}
|
|
|
},
|
|
|
"message": {
|
|
|
"type": "string",
|
|
|
"example": "操作成功"
|
|
|
},
|
|
|
"success": {
|
|
|
"type": "boolean",
|
|
|
"example": true
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DataIn": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"auth_token": {
|
|
|
"type": "string",
|
|
|
"example": "DATAEX-TOKEN-a6ce-11ea-b94df48e38f73cf7"
|
|
|
},
|
|
|
"data_source": {
|
|
|
"type": "string",
|
|
|
"example": "ORG"
|
|
|
},
|
|
|
"datas": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/MySwagger.Data"
|
|
|
}
|
|
|
},
|
|
|
"system_id": {
|
|
|
"type": "string",
|
|
|
"example": "SYS-200201"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DataInResult": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"fail_results": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/MySwagger.FailResult"
|
|
|
}
|
|
|
},
|
|
|
"message": {
|
|
|
"type": "string",
|
|
|
"example": "操作成功"
|
|
|
},
|
|
|
"success": {
|
|
|
"type": "boolean",
|
|
|
"example": true
|
|
|
},
|
|
|
"success_ids": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"202008080008",
|
|
|
"202008080009",
|
|
|
"202008080010"
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DataPage": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"auth_token": {
|
|
|
"type": "string",
|
|
|
"example": "DATAEX-TOKEN-a6ce-11ea-b94df48e38f73cf7"
|
|
|
},
|
|
|
"data_source": {
|
|
|
"type": "string",
|
|
|
"example": "org_school"
|
|
|
},
|
|
|
"org_id": {
|
|
|
"type": "string",
|
|
|
"example": "-1"
|
|
|
},
|
|
|
"query_page": {
|
|
|
"type": "integer",
|
|
|
"example": 0
|
|
|
},
|
|
|
"query_time": {
|
|
|
"type": "string",
|
|
|
"example": "2020/01/01 02:03:04"
|
|
|
},
|
|
|
"system_id": {
|
|
|
"type": "string",
|
|
|
"example": "SYS-200201"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DataQuery": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"auth_token": {
|
|
|
"type": "string",
|
|
|
"example": "DATAEX-TOKEN-a6ce-11ea-b94df48e38f73cf7"
|
|
|
},
|
|
|
"data_source": {
|
|
|
"type": "string",
|
|
|
"example": "org_school"
|
|
|
},
|
|
|
"org_id": {
|
|
|
"type": "string",
|
|
|
"example": "-1"
|
|
|
},
|
|
|
"query_conditions": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"subject_code=22",
|
|
|
" subject_name=aa"
|
|
|
]
|
|
|
},
|
|
|
"query_page": {
|
|
|
"type": "integer",
|
|
|
"example": 0
|
|
|
},
|
|
|
"system_id": {
|
|
|
"type": "string",
|
|
|
"example": "SYS-200201"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DataResult": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"message": {
|
|
|
"type": "string",
|
|
|
"example": "查询成功"
|
|
|
},
|
|
|
"result": {
|
|
|
"type": "string",
|
|
|
"example": "根据查询请求的format格式,返回查询结果数据"
|
|
|
},
|
|
|
"success": {
|
|
|
"type": "boolean",
|
|
|
"example": true
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DatahyperGet": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"message": {
|
|
|
"description": "消息",
|
|
|
"type": "string",
|
|
|
"example": "操作成功"
|
|
|
},
|
|
|
"result": {
|
|
|
"description": "结果数据",
|
|
|
"type": "object",
|
|
|
"additionalProperties": true,
|
|
|
"example": "{id:12300 name:zhangj org_id:123001}"
|
|
|
},
|
|
|
"success": {
|
|
|
"description": "成功",
|
|
|
"type": "boolean",
|
|
|
"example": true
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DatahyperGetResult": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"message": {
|
|
|
"description": "消息",
|
|
|
"type": "string",
|
|
|
"example": "操作成功"
|
|
|
},
|
|
|
"result": {
|
|
|
"description": "结果数据",
|
|
|
"type": "string",
|
|
|
"example": "[{id:12300,name:zhangj,org_id:123001}]"
|
|
|
},
|
|
|
"success": {
|
|
|
"description": "成功",
|
|
|
"type": "boolean",
|
|
|
"example": true
|
|
|
},
|
|
|
"total": {
|
|
|
"description": "总条数",
|
|
|
"type": "integer",
|
|
|
"example": 50
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DatahyperQuery": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"description": "接入系统票据",
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"query_cols": {
|
|
|
"description": "字段筛选",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"id",
|
|
|
"name",
|
|
|
"time"
|
|
|
]
|
|
|
},
|
|
|
"query_combinations": {
|
|
|
"description": "组合条件查询",
|
|
|
"type": "string",
|
|
|
"example": "subject_code='22' AND a='1' AND b='2'"
|
|
|
},
|
|
|
"query_conditions": {
|
|
|
"description": "条件查询",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"22",
|
|
|
"33"
|
|
|
]
|
|
|
},
|
|
|
"query_format": {
|
|
|
"description": "数据格式",
|
|
|
"type": "string",
|
|
|
"example": "json/model"
|
|
|
},
|
|
|
"query_id": {
|
|
|
"description": "查询ID",
|
|
|
"type": "string",
|
|
|
"example": "test002"
|
|
|
},
|
|
|
"query_order": {
|
|
|
"description": "排序",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"id ASC",
|
|
|
"name DESC"
|
|
|
]
|
|
|
},
|
|
|
"query_page": {
|
|
|
"description": "当前页数",
|
|
|
"type": "integer",
|
|
|
"example": 1
|
|
|
},
|
|
|
"query_perpage": {
|
|
|
"description": "每页数量",
|
|
|
"type": "integer",
|
|
|
"example": 20
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DatahyperQueryByID": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"description": "接入系统票据",
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"data_id": {
|
|
|
"description": "数据ID",
|
|
|
"type": "string",
|
|
|
"example": "ABC123"
|
|
|
},
|
|
|
"query_cols": {
|
|
|
"description": "字段筛选",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"id",
|
|
|
"name",
|
|
|
"time"
|
|
|
]
|
|
|
},
|
|
|
"query_format": {
|
|
|
"description": "数据格式",
|
|
|
"type": "string",
|
|
|
"example": "json/model"
|
|
|
},
|
|
|
"query_id": {
|
|
|
"description": "查询ID",
|
|
|
"type": "string",
|
|
|
"example": "test001"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DatahyperQueryFE": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"description": "接入系统票据",
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"query_cols": {
|
|
|
"description": "字段筛选",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"id",
|
|
|
"name",
|
|
|
"time"
|
|
|
]
|
|
|
},
|
|
|
"query_combinations": {
|
|
|
"description": "组合条件查询",
|
|
|
"type": "string",
|
|
|
"example": "subject_code='22' AND a='1' AND b='2'"
|
|
|
},
|
|
|
"query_conditions": {
|
|
|
"description": "条件查询",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"22",
|
|
|
"33"
|
|
|
]
|
|
|
},
|
|
|
"query_format": {
|
|
|
"description": "数据格式",
|
|
|
"type": "string",
|
|
|
"example": "json/model"
|
|
|
},
|
|
|
"query_id": {
|
|
|
"description": "查询ID",
|
|
|
"type": "string",
|
|
|
"example": "test002"
|
|
|
},
|
|
|
"query_order": {
|
|
|
"description": "排序",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"id ASC",
|
|
|
"name DESC"
|
|
|
]
|
|
|
},
|
|
|
"query_page": {
|
|
|
"description": "当前页数",
|
|
|
"type": "integer",
|
|
|
"example": 1
|
|
|
},
|
|
|
"query_perpage": {
|
|
|
"description": "每页数量",
|
|
|
"type": "integer",
|
|
|
"example": 20
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.DatahyperQueryFEByID": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"description": "接入系统票据",
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"data_id": {
|
|
|
"description": "数据ID",
|
|
|
"type": "string",
|
|
|
"example": "ABC123"
|
|
|
},
|
|
|
"query_cols": {
|
|
|
"description": "字段筛选",
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"id",
|
|
|
"name",
|
|
|
"time"
|
|
|
]
|
|
|
},
|
|
|
"query_format": {
|
|
|
"description": "数据格式",
|
|
|
"type": "string",
|
|
|
"example": "json/model"
|
|
|
},
|
|
|
"query_id": {
|
|
|
"description": "查询ID",
|
|
|
"type": "string",
|
|
|
"example": "test001"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.Event": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"event_name": {
|
|
|
"type": "string",
|
|
|
"example": "在线提交作业"
|
|
|
},
|
|
|
"event_seqno": {
|
|
|
"type": "string",
|
|
|
"example": "事件顺序号:1/2/3"
|
|
|
},
|
|
|
"event_time": {
|
|
|
"type": "string",
|
|
|
"example": "2020/08/08 18:19:20"
|
|
|
},
|
|
|
"event_type": {
|
|
|
"type": "string",
|
|
|
"example": "1001"
|
|
|
},
|
|
|
"event_uri": {
|
|
|
"type": "string",
|
|
|
"example": "https://edusoa.com/cloud/study/do_homework"
|
|
|
},
|
|
|
"event_userid": {
|
|
|
"type": "string",
|
|
|
"example": "用户ID"
|
|
|
},
|
|
|
"properties": {
|
|
|
"type": "string",
|
|
|
"example": "{res_id:12300,res_name:初一语文一单元作业,teacher_id:123001,time_spend:100s}"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.FailResult": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"fail_id": {
|
|
|
"type": "string",
|
|
|
"example": "202006060001"
|
|
|
},
|
|
|
"fail_reason": {
|
|
|
"type": "string",
|
|
|
"example": "数据ORG_ID访问权限验证失败,无法修改数据"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.Join": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"join_id": {
|
|
|
"type": "string",
|
|
|
"example": "org_area"
|
|
|
},
|
|
|
"join_param": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"220100"
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.QueryJoin": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"query": {
|
|
|
"type": "object",
|
|
|
"$ref": "#/definitions/MySwagger.Simple"
|
|
|
},
|
|
|
"query_count": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"total",
|
|
|
"total2"
|
|
|
]
|
|
|
},
|
|
|
"query_format": {
|
|
|
"type": "string",
|
|
|
"example": "table/json/echarts/antd"
|
|
|
},
|
|
|
"query_group": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"area_code",
|
|
|
"school_type"
|
|
|
]
|
|
|
},
|
|
|
"query_join": {
|
|
|
"type": "object",
|
|
|
"$ref": "#/definitions/MySwagger.Join"
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.QuerySimple": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"query": {
|
|
|
"type": "object",
|
|
|
"$ref": "#/definitions/MySwagger.Simple"
|
|
|
},
|
|
|
"query_count": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"total",
|
|
|
"total2"
|
|
|
]
|
|
|
},
|
|
|
"query_format": {
|
|
|
"type": "string",
|
|
|
"example": "table/json/echarts/antd"
|
|
|
},
|
|
|
"query_group": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"area_code",
|
|
|
"school_type"
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.QuerySimpleGP": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"query": {
|
|
|
"type": "object",
|
|
|
"$ref": "#/definitions/MySwagger.Simple"
|
|
|
},
|
|
|
"query_cache": {
|
|
|
"type": "integer"
|
|
|
},
|
|
|
"query_count": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"total",
|
|
|
"total2"
|
|
|
]
|
|
|
},
|
|
|
"query_format": {
|
|
|
"type": "string",
|
|
|
"example": "table/json/echarts/antd"
|
|
|
},
|
|
|
"query_group": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"area_code",
|
|
|
"school_type"
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.QueryUnion": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_token": {
|
|
|
"type": "string",
|
|
|
"example": "system_01##20200102030405##a6ce11eab94df48a6ce11eab"
|
|
|
},
|
|
|
"join_list": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/MySwagger.Join"
|
|
|
}
|
|
|
},
|
|
|
"query_count": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"total",
|
|
|
"total2"
|
|
|
]
|
|
|
},
|
|
|
"query_format": {
|
|
|
"type": "string",
|
|
|
"example": "table/json/echarts/antd"
|
|
|
},
|
|
|
"query_group": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"area_code",
|
|
|
"school_type"
|
|
|
]
|
|
|
},
|
|
|
"query_list": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"$ref": "#/definitions/MySwagger.Simple"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.Result": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"message": {
|
|
|
"type": "string",
|
|
|
"example": "接入系统票据验证失败"
|
|
|
},
|
|
|
"success": {
|
|
|
"type": "boolean",
|
|
|
"example": false
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.Simple": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"query_id": {
|
|
|
"type": "string",
|
|
|
"example": "org_school_aggs"
|
|
|
},
|
|
|
"query_param": {
|
|
|
"type": "array",
|
|
|
"items": {
|
|
|
"type": "string"
|
|
|
},
|
|
|
"example": [
|
|
|
"100",
|
|
|
"test",
|
|
|
"2020/07/08"
|
|
|
]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"MySwagger.User": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
"access_id": {
|
|
|
"type": "string",
|
|
|
"example": "访客ID(用户未登录)"
|
|
|
},
|
|
|
"access_ip": {
|
|
|
"type": "string",
|
|
|
"example": "10.10.8.88"
|
|
|
},
|
|
|
"access_way": {
|
|
|
"type": "string",
|
|
|
"example": "app/web/weixin/dingding"
|
|
|
},
|
|
|
"identity": {
|
|
|
"type": "string",
|
|
|
"example": "用户身份(1:教师,2:学生,3:家长,4:管理员,5:访客)"
|
|
|
},
|
|
|
"properties": {
|
|
|
"type": "string",
|
|
|
"example": "{group_id:12300,group_name:课外学习一组,user_level:2,login_time:2020/08/08 12:13:14}"
|
|
|
},
|
|
|
"user_id": {
|
|
|
"type": "string",
|
|
|
"example": "用户ID"
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
"securityDefinitions": {
|
|
|
"BasicAuth": {
|
|
|
"type": "basic"
|
|
|
}
|
|
|
}
|
|
|
}`
|
|
|
|
|
|
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: "127.0.0.1:9009",
|
|
|
BasePath: "/",
|
|
|
Schemes: []string{},
|
|
|
Title: "DataEX",
|
|
|
Description: "DataEX Service using GO!!! create by zhangjun 2020-06-03",
|
|
|
}
|
|
|
|
|
|
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{})
|
|
|
}
|