@@ -19,7 +19,7 @@ import ( | |||||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | // @param Authorization header string true "验证参数Bearer和token空格拼接" | ||||
// @Success 200 {string} "许可链接" | // @Success 200 {string} "许可链接" | ||||
// @Failure 400 {object} md.Response "具体错误" | // @Failure 400 {object} md.Response "具体错误" | ||||
// @Router /api/comm/getOssUrl [get] | |||||
// @Router /api/v1/comm/getOssUrl [get] | |||||
func GetOssUrl(c *gin.Context) { | func GetOssUrl(c *gin.Context) { | ||||
redisConn := cache.GetPool().Get() | redisConn := cache.GetPool().Get() | ||||
sysCfgDb := implement.NewSysCfgDb(db.Db, redisConn) | sysCfgDb := implement.NewSysCfgDb(db.Db, redisConn) | ||||
@@ -23,7 +23,7 @@ import ( | |||||
// @Param req body interface{} true "用户名密码" | // @Param req body interface{} true "用户名密码" | ||||
// @Success 200 {object} map[string]interface{} "token" | // @Success 200 {object} map[string]interface{} "token" | ||||
// @Failure 400 {object} md.Response "具体错误" | // @Failure 400 {object} md.Response "具体错误" | ||||
// @Router /api/demo [post] | |||||
// @Router /api/v1/demo [post] | |||||
func Demo(c *gin.Context) { | func Demo(c *gin.Context) { | ||||
var args interface{} | var args interface{} | ||||
if c.Request.Method == "GET" { | if c.Request.Method == "GET" { | ||||
@@ -24,7 +24,7 @@ const docTemplate = `{ | |||||
"host": "{{.Host}}", | "host": "{{.Host}}", | ||||
"basePath": "{{.BasePath}}", | "basePath": "{{.BasePath}}", | ||||
"paths": { | "paths": { | ||||
"/api/comm/getOssUrl": { | |||||
"/api/v1/comm/getOssUrl": { | |||||
"get": { | "get": { | ||||
"description": "上传许可链接(获取)", | "description": "上传许可链接(获取)", | ||||
"consumes": [ | "consumes": [ | ||||
@@ -62,7 +62,7 @@ const docTemplate = `{ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"/api/demo": { | |||||
"/api/v1/demo": { | |||||
"post": { | "post": { | ||||
"description": "Demo样例测试", | "description": "Demo样例测试", | ||||
"consumes": [ | "consumes": [ | ||||
@@ -277,8 +277,8 @@ const docTemplate = `{ | |||||
// SwaggerInfo holds exported Swagger Info so clients can modify it | // SwaggerInfo holds exported Swagger Info so clients can modify it | ||||
var SwaggerInfo = &swag.Spec{ | var SwaggerInfo = &swag.Spec{ | ||||
Version: "1.0", | Version: "1.0", | ||||
Host: "mp.xbkai.com", | |||||
BasePath: "/api", | |||||
Host: "ddxq.izhim.com", | |||||
BasePath: "/api/v1", | |||||
Schemes: []string{}, | Schemes: []string{}, | ||||
Title: "蛋蛋星球-APP客户端", | Title: "蛋蛋星球-APP客户端", | ||||
Description: "APP客户端-Api接口", | Description: "APP客户端-Api接口", | ||||
@@ -15,10 +15,10 @@ | |||||
}, | }, | ||||
"version": "1.0" | "version": "1.0" | ||||
}, | }, | ||||
"host": "mp.xbkai.com", | |||||
"basePath": "/api", | |||||
"host": "ddxq.izhim.com", | |||||
"basePath": "/api/v1", | |||||
"paths": { | "paths": { | ||||
"/api/comm/getOssUrl": { | |||||
"/api/v1/comm/getOssUrl": { | |||||
"get": { | "get": { | ||||
"description": "上传许可链接(获取)", | "description": "上传许可链接(获取)", | ||||
"consumes": [ | "consumes": [ | ||||
@@ -56,7 +56,7 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"/api/demo": { | |||||
"/api/v1/demo": { | |||||
"post": { | "post": { | ||||
"description": "Demo样例测试", | "description": "Demo样例测试", | ||||
"consumes": [ | "consumes": [ | ||||
@@ -1,4 +1,4 @@ | |||||
basePath: /api | |||||
basePath: /api/v1 | |||||
definitions: | definitions: | ||||
md.LoginReq: | md.LoginReq: | ||||
properties: | properties: | ||||
@@ -62,7 +62,7 @@ definitions: | |||||
example: 具体错误原因 | example: 具体错误原因 | ||||
type: string | type: string | ||||
type: object | type: object | ||||
host: mp.xbkai.com | |||||
host: ddxq.izhim.com | |||||
info: | info: | ||||
contact: | contact: | ||||
email: 1239118001@qq.com | email: 1239118001@qq.com | ||||
@@ -76,7 +76,7 @@ info: | |||||
title: 蛋蛋星球-APP客户端 | title: 蛋蛋星球-APP客户端 | ||||
version: "1.0" | version: "1.0" | ||||
paths: | paths: | ||||
/api/comm/getOssUrl: | |||||
/api/v1/comm/getOssUrl: | |||||
get: | get: | ||||
consumes: | consumes: | ||||
- application/json | - application/json | ||||
@@ -101,7 +101,7 @@ paths: | |||||
summary: 通用请求-对象存储-上传许可链接(获取) | summary: 通用请求-对象存储-上传许可链接(获取) | ||||
tags: | tags: | ||||
- 对象存储 | - 对象存储 | ||||
/api/demo: | |||||
/api/v1/demo: | |||||
post: | post: | ||||
consumes: | consumes: | ||||
- application/json | - application/json | ||||
@@ -1,17 +1,17 @@ | |||||
kind: Ingress | kind: Ingress | ||||
apiVersion: extensions/v1beta1 | apiVersion: extensions/v1beta1 | ||||
metadata: | metadata: | ||||
name: egg-admin # ingress名称 | |||||
name: egg-app # ingress名称 | |||||
namespace: egg | namespace: egg | ||||
annotations: | annotations: | ||||
kubesphere.io/creator: dengbiao | kubesphere.io/creator: dengbiao | ||||
spec: | spec: | ||||
rules: | rules: | ||||
- host: ddstar.izhim.cn # 使用的域名 | |||||
- host: ddxq.izhim.com # 使用的域名 | |||||
http: | http: | ||||
paths: | paths: | ||||
- path: / | - path: / | ||||
pathType: ImplementationSpecific | pathType: ImplementationSpecific | ||||
backend: | backend: | ||||
serviceName: egg-admin # 流量转发到的服务 | |||||
servicePort: 80 | |||||
serviceName: egg-app # 流量转发到的服务 | |||||
servicePort: 4011 |
@@ -42,7 +42,7 @@ func init() { | |||||
// @license.name Apache 2.0 | // @license.name Apache 2.0 | ||||
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html | // @license.url http://www.apache.org/licenses/LICENSE-2.0.html | ||||
// @host ddxq.izhim.com | // @host ddxq.izhim.com | ||||
// @BasePath /api | |||||
// @BasePath /api/v1 | |||||
func main() { | func main() { | ||||
r := router.Init() // 创建路由 | r := router.Init() // 创建路由 | ||||