add conn log

This commit is contained in:
ljw
2024-10-18 15:05:58 +08:00
parent 488fedf784
commit e142cc00c6
20 changed files with 1253 additions and 169 deletions

View File

@@ -121,40 +121,6 @@ const docTemplateapi = `{
}
}
},
"/ab/add": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "标签添加",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/peer/add/{guid}": {
"post": {
"security": [
@@ -176,8 +142,8 @@ const docTemplateapi = `{
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"description": "guid",
"name": "guid",
"in": "path",
"required": true
}
@@ -217,8 +183,8 @@ const docTemplateapi = `{
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"description": "guid",
"name": "guid",
"in": "path",
"required": true
}
@@ -260,8 +226,8 @@ const docTemplateapi = `{
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"description": "guid",
"name": "guid",
"in": "path",
"required": true
}
@@ -302,12 +268,22 @@ const docTemplateapi = `{
"summary": "地址列表",
"parameters": [
{
"description": "string valid",
"name": "string",
"in": "body",
"schema": {
"type": "string"
}
"type": "integer",
"description": "页码",
"name": "current",
"in": "query"
},
{
"type": "integer",
"description": "每页数量",
"name": "pageSize",
"in": "query"
},
{
"type": "string",
"description": "guid",
"name": "ab",
"in": "query"
}
],
"responses": {
@@ -434,12 +410,16 @@ const docTemplateapi = `{
"summary": "共享地址簿",
"parameters": [
{
"description": "string valid",
"name": "string",
"in": "body",
"schema": {
"type": "string"
}
"type": "integer",
"description": "页码",
"name": "current",
"in": "query"
},
{
"type": "integer",
"description": "每页数量",
"name": "pageSize",
"in": "query"
}
],
"responses": {
@@ -458,6 +438,49 @@ const docTemplateapi = `{
}
}
},
"/ab/tag/add/{guid}": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "标签",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"地址[Personal]"
],
"summary": "标签添加",
"parameters": [
{
"type": "string",
"description": "guid",
"name": "guid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.ErrorResponse"
}
}
}
}
},
"/ab/tag/rename/{guid}": {
"put": {
"security": [
@@ -476,6 +499,15 @@ const docTemplateapi = `{
"地址[Personal]"
],
"summary": "标签重命名",
"parameters": [
{
"type": "string",
"description": "guid",
"name": "guid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
@@ -510,6 +542,15 @@ const docTemplateapi = `{
"地址[Personal]"
],
"summary": "标签修改颜色",
"parameters": [
{
"type": "string",
"description": "guid",
"name": "guid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
@@ -544,6 +585,15 @@ const docTemplateapi = `{
"地址[Personal]"
],
"summary": "标签删除",
"parameters": [
{
"type": "string",
"description": "guid",
"name": "guid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
@@ -581,8 +631,8 @@ const docTemplateapi = `{
"parameters": [
{
"type": "string",
"description": "id",
"name": "id",
"description": "guid",
"name": "guid",
"in": "path",
"required": true
}
@@ -637,6 +687,46 @@ const docTemplateapi = `{
}
}
},
"/audit/conn": {
"post": {
"description": "审计连接",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"审计"
],
"summary": "审计连接",
"parameters": [
{
"description": "审计连接",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api.AuditConnForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/heartbeat": {
"post": {
"description": "心跳",
@@ -1137,6 +1227,38 @@ const docTemplateapi = `{
}
}
},
"api.AuditConnForm": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"conn_id": {
"type": "integer"
},
"id": {
"type": "string"
},
"ip": {
"type": "string"
},
"peer": {
"type": "array",
"items": {
"type": "string"
}
},
"session_id": {
"type": "number"
},
"type": {
"type": "integer"
},
"uuid": {
"type": "string"
}
}
},
"api.DeviceInfoInLogin": {
"type": "object",
"properties": {