Browse Source

update

master
dengbiao 4 months ago
parent
commit
1e4e211082
4 changed files with 676 additions and 3 deletions
  1. +12
    -3
      README.md
  2. +250
    -0
      docs/docs.go
  3. +250
    -0
      docs/swagger.json
  4. +164
    -0
      docs/swagger.yaml

+ 12
- 3
README.md View File

@@ -39,10 +39,19 @@


## swagger ## swagger



``` ```
// 参考:https://segmentfault.com/a/1190000013808421
// 安装命令行
> 参考:https://segmentfault.com/a/1190000013808421

> swagger 命令行工具
go get -u github.com/swaggo/swag/cmd/swag go get -u github.com/swaggo/swag/cmd/swag
// 生成
go install github.com/swaggo/swag/cmd/swag

> swagger 依赖
go get "github.com/swaggo/files"
go get "github.com/swaggo/gin-swagger"


> 生成
swag init swag init
``` ```

+ 250
- 0
docs/docs.go View File

@@ -25,6 +25,100 @@ const docTemplate = `{
"host": "{{.Host}}", "host": "{{.Host}}",
"basePath": "{{.BasePath}}", "basePath": "{{.BasePath}}",
"paths": { "paths": {
"/api/agentQualification/enterprise": {
"post": {
"description": "渠道资质-主体资质",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"渠道资质"
],
"summary": "主体资质",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.AgentQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/enterprise/audit": {
"post": {
"description": "渠道资质-主体资质审核",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"渠道资质"
],
"summary": "主体资质审核",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.AgentQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/login": { "/api/login": {
"post": { "post": {
"description": "登入", "description": "登入",
@@ -65,6 +159,100 @@ const docTemplate = `{
} }
} }
}, },
"/api/mediumQualification/enterprise": {
"post": {
"description": "渠道资质-主体资质",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"渠道资质"
],
"summary": "主体资质",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.MediumQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/enterprise/audit": {
"post": {
"description": "渠道资质-主体资质审核",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"渠道资质"
],
"summary": "主体资质审核",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/role/addAdmin": { "/api/role/addAdmin": {
"post": { "post": {
"description": "权限管理-新增管理员", "description": "权限管理-新增管理员",
@@ -706,6 +894,37 @@ const docTemplate = `{
} }
} }
}, },
"md.AgentQualificationEnterpriseAuditReq": {
"type": "object",
"properties": {
"agent_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"md.AgentQualificationEnterpriseReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"name": {
"type": "string"
},
"page": {
"type": "integer"
},
"state": {
"type": "string"
}
}
},
"md.BindAdminRoleReq": { "md.BindAdminRoleReq": {
"type": "object", "type": "object",
"required": [ "required": [
@@ -752,6 +971,37 @@ const docTemplate = `{
} }
} }
}, },
"md.MediumQualificationEnterpriseAuditReq": {
"type": "object",
"properties": {
"medium_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"md.MediumQualificationEnterpriseReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"name": {
"type": "string"
},
"page": {
"type": "integer"
},
"state": {
"type": "string"
}
}
},
"md.Response": { "md.Response": {
"type": "object", "type": "object",
"properties": { "properties": {


+ 250
- 0
docs/swagger.json View File

@@ -17,6 +17,100 @@
}, },
"host": "localhost:1001 or advertisement.dengbiao.top", "host": "localhost:1001 or advertisement.dengbiao.top",
"paths": { "paths": {
"/api/agentQualification/enterprise": {
"post": {
"description": "渠道资质-主体资质",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"渠道资质"
],
"summary": "主体资质",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.AgentQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/agentQualification/enterprise/audit": {
"post": {
"description": "渠道资质-主体资质审核",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"渠道资质"
],
"summary": "主体资质审核",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.AgentQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/login": { "/api/login": {
"post": { "post": {
"description": "登入", "description": "登入",
@@ -57,6 +151,100 @@
} }
} }
}, },
"/api/mediumQualification/enterprise": {
"post": {
"description": "渠道资质-主体资质",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"渠道资质"
],
"summary": "主体资质",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.MediumQualificationEnterpriseReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/mediumQualification/enterprise/audit": {
"post": {
"description": "渠道资质-主体资质审核",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"渠道资质"
],
"summary": "主体资质审核",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "请求参数",
"name": "args",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.MediumQualificationEnterpriseAuditReq"
}
}
],
"responses": {
"200": {
"description": "具体看返回内容",
"schema": {
"type": "string"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/role/addAdmin": { "/api/role/addAdmin": {
"post": { "post": {
"description": "权限管理-新增管理员", "description": "权限管理-新增管理员",
@@ -698,6 +886,37 @@
} }
} }
}, },
"md.AgentQualificationEnterpriseAuditReq": {
"type": "object",
"properties": {
"agent_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"md.AgentQualificationEnterpriseReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"name": {
"type": "string"
},
"page": {
"type": "integer"
},
"state": {
"type": "string"
}
}
},
"md.BindAdminRoleReq": { "md.BindAdminRoleReq": {
"type": "object", "type": "object",
"required": [ "required": [
@@ -744,6 +963,37 @@
} }
} }
}, },
"md.MediumQualificationEnterpriseAuditReq": {
"type": "object",
"properties": {
"medium_id": {
"type": "integer"
},
"memo": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"md.MediumQualificationEnterpriseReq": {
"type": "object",
"properties": {
"limit": {
"type": "integer"
},
"name": {
"type": "string"
},
"page": {
"type": "integer"
},
"state": {
"type": "string"
}
}
},
"md.Response": { "md.Response": {
"type": "object", "type": "object",
"properties": { "properties": {


+ 164
- 0
docs/swagger.yaml View File

@@ -32,6 +32,26 @@ definitions:
username: username:
type: string type: string
type: object type: object
md.AgentQualificationEnterpriseAuditReq:
properties:
agent_id:
type: integer
memo:
type: string
state:
type: string
type: object
md.AgentQualificationEnterpriseReq:
properties:
limit:
type: integer
name:
type: string
page:
type: integer
state:
type: string
type: object
md.BindAdminRoleReq: md.BindAdminRoleReq:
properties: properties:
adm_id: adm_id:
@@ -63,6 +83,26 @@ definitions:
token: token:
type: string type: string
type: object type: object
md.MediumQualificationEnterpriseAuditReq:
properties:
medium_id:
type: integer
memo:
type: string
state:
type: string
type: object
md.MediumQualificationEnterpriseReq:
properties:
limit:
type: integer
name:
type: string
page:
type: integer
state:
type: string
type: object
md.Response: md.Response:
properties: properties:
code: code:
@@ -147,6 +187,68 @@ info:
title: 广告联盟-总站长平台 title: 广告联盟-总站长平台
version: "1.0" version: "1.0"
paths: paths:
/api/agentQualification/enterprise:
post:
consumes:
- application/json
description: 渠道资质-主体资质
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.AgentQualificationEnterpriseReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 主体资质
tags:
- 渠道资质
/api/agentQualification/enterprise/audit:
post:
consumes:
- application/json
description: 渠道资质-主体资质审核
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.AgentQualificationEnterpriseAuditReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 主体资质审核
tags:
- 渠道资质
/api/login: /api/login:
post: post:
consumes: consumes:
@@ -173,6 +275,68 @@ paths:
summary: 登陆 summary: 登陆
tags: tags:
- 登录注册 - 登录注册
/api/mediumQualification/enterprise:
post:
consumes:
- application/json
description: 渠道资质-主体资质
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.MediumQualificationEnterpriseReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 主体资质
tags:
- 渠道资质
/api/mediumQualification/enterprise/audit:
post:
consumes:
- application/json
description: 渠道资质-主体资质审核
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 请求参数
in: body
name: args
required: true
schema:
$ref: '#/definitions/md.MediumQualificationEnterpriseAuditReq'
produces:
- application/json
responses:
"200":
description: 具体看返回内容
schema:
type: string
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 主体资质审核
tags:
- 渠道资质
/api/role/addAdmin: /api/role/addAdmin:
post: post:
consumes: consumes:


Loading…
Cancel
Save