dengbiao pirms 4 mēnešiem
vecāks
revīzija
1e4e211082
4 mainītis faili ar 676 papildinājumiem un 3 dzēšanām
  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 Parādīt failu

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

## swagger


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

> swagger 命令行工具
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
```

+ 250
- 0
docs/docs.go Parādīt failu

@@ -25,6 +25,100 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"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": {
"post": {
"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": {
"post": {
"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": {
"type": "object",
"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": {
"type": "object",
"properties": {


+ 250
- 0
docs/swagger.json Parādīt failu

@@ -17,6 +17,100 @@
},
"host": "localhost:1001 or advertisement.dengbiao.top",
"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": {
"post": {
"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": {
"post": {
"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": {
"type": "object",
"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": {
"type": "object",
"properties": {


+ 164
- 0
docs/swagger.yaml Parādīt failu

@@ -32,6 +32,26 @@ definitions:
username:
type: string
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:
properties:
adm_id:
@@ -63,6 +83,26 @@ definitions:
token:
type: string
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:
properties:
code:
@@ -147,6 +187,68 @@ info:
title: 广告联盟-总站长平台
version: "1.0"
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:
post:
consumes:
@@ -173,6 +275,68 @@ paths:
summary: 登陆
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:
post:
consumes:


Notiek ielāde…
Atcelt
Saglabāt