日志发送逻辑及测试消息发送接口
This commit is contained in:
91
docs/docs.go
91
docs/docs.go
@@ -3923,6 +3923,64 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/users/{id}/notifications/test": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "为指定用户发送一条特定渠道的测试消息,以验证其配置是否正确。",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"用户管理"
|
||||
],
|
||||
"summary": "发送测试通知",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "用户ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.SendTestNotificationRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功响应",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -5591,6 +5649,22 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SendTestNotificationRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"description": "Type 指定要测试的通知渠道\n@enum(smtp, wechat, lark, log)",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/notify.NotifierType"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SensorDataDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -6530,6 +6604,23 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/models.SensorType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notify.NotifierType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"smtp",
|
||||
"wechat",
|
||||
"lark",
|
||||
"sms",
|
||||
"log"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"NotifierTypeSMTP",
|
||||
"NotifierTypeWeChat",
|
||||
"NotifierTypeLark",
|
||||
"NotifierTypeSMS",
|
||||
"NotifierTypeLog"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
||||
@@ -3915,6 +3915,64 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/users/{id}/notifications/test": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "为指定用户发送一条特定渠道的测试消息,以验证其配置是否正确。",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"用户管理"
|
||||
],
|
||||
"summary": "发送测试通知",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "用户ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "请求体",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.SendTestNotificationRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "成功响应",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -5583,6 +5641,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SendTestNotificationRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
"description": "Type 指定要测试的通知渠道\n@enum(smtp, wechat, lark, log)",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/notify.NotifierType"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SensorDataDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -6522,6 +6596,23 @@
|
||||
"$ref": "#/definitions/models.SensorType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"notify.NotifierType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"smtp",
|
||||
"wechat",
|
||||
"lark",
|
||||
"sms",
|
||||
"log"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"NotifierTypeSMTP",
|
||||
"NotifierTypeWeChat",
|
||||
"NotifierTypeLark",
|
||||
"NotifierTypeSMS",
|
||||
"NotifierTypeLog"
|
||||
]
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
|
||||
@@ -1125,6 +1125,17 @@ definitions:
|
||||
- traderName
|
||||
- unitPrice
|
||||
type: object
|
||||
dto.SendTestNotificationRequest:
|
||||
properties:
|
||||
type:
|
||||
allOf:
|
||||
- $ref: '#/definitions/notify.NotifierType'
|
||||
description: |-
|
||||
Type 指定要测试的通知渠道
|
||||
@enum(smtp, wechat, lark, log)
|
||||
required:
|
||||
- type
|
||||
type: object
|
||||
dto.SensorDataDTO:
|
||||
properties:
|
||||
data:
|
||||
@@ -1816,6 +1827,20 @@ definitions:
|
||||
type:
|
||||
$ref: '#/definitions/models.SensorType'
|
||||
type: object
|
||||
notify.NotifierType:
|
||||
enum:
|
||||
- smtp
|
||||
- wechat
|
||||
- lark
|
||||
- sms
|
||||
- log
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- NotifierTypeSMTP
|
||||
- NotifierTypeWeChat
|
||||
- NotifierTypeLark
|
||||
- NotifierTypeSMS
|
||||
- NotifierTypeLog
|
||||
info:
|
||||
contact:
|
||||
email: divano@example.com
|
||||
@@ -4086,6 +4111,40 @@ paths:
|
||||
summary: 获取指定用户的操作历史
|
||||
tags:
|
||||
- 用户管理
|
||||
/api/v1/users/{id}/notifications/test:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 为指定用户发送一条特定渠道的测试消息,以验证其配置是否正确。
|
||||
parameters:
|
||||
- description: 用户ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 请求体
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.SendTestNotificationRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 成功响应
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: '#/definitions/controller.Response'
|
||||
- properties:
|
||||
data:
|
||||
type: string
|
||||
type: object
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 发送测试通知
|
||||
tags:
|
||||
- 用户管理
|
||||
/api/v1/users/login:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user