mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2026-01-29 10:20:37 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9aad62d1e4 | ||
|
|
867eab40f8 | ||
|
|
eb5c7efc4c | ||
|
|
857abc16e7 | ||
|
|
a27deb0a41 |
128
.github/workflows/build.yml
vendored
128
.github/workflows/build.yml
vendored
@@ -2,6 +2,31 @@ name: Build
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
BASE_IMAGE_NAMESPACE:
|
||||||
|
description: 'Base image namespace (Default: Your Github username)'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
DOCKERHUB_IMAGE_NAMESPACE:
|
||||||
|
description: 'Docker Hub image namespace (Default: Your Github username)'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
GHCR_IMAGE_NAMESPACE:
|
||||||
|
description: 'GitHub Container Registry image namespace (Default: Your Github username)'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
SKIP_DOCKER_HUB:
|
||||||
|
description: 'Set to true to skip pushing to Docker Hub (default: false)'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
SKIP_GHCR:
|
||||||
|
description: 'Set to true to skip pushing to GHCR (default: false)'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
WEBCLIENT_SOURCE_LOCATION:
|
||||||
|
description: 'Web Client API Repository'
|
||||||
|
required: true
|
||||||
|
default: 'https://github.com/lejianwen/rustdesk-api-web'
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*' # 当推送带有版本号的 tag(例如 v1.0.0)时触发工作流
|
- 'v*.*.*' # 当推送带有版本号的 tag(例如 v1.0.0)时触发工作流
|
||||||
@@ -9,6 +34,12 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
LATEST_TAG: latest
|
LATEST_TAG: latest
|
||||||
|
WEBCLIENT_SOURCE_LOCATION: ${{ github.event.inputs.WEBCLIENT_SOURCE_LOCATION || 'https://github.com/lejianwen/rustdesk-api-web' }}
|
||||||
|
BASE_IMAGE_NAMESPACE: ${{ github.event.inputs.BASE_IMAGE_NAMESPACE || github.actor }}
|
||||||
|
DOCKERHUB_IMAGE_NAMESPACE: ${{ github.event.inputs.DOCKERHUB_IMAGE_NAMESPACE || github.actor }}
|
||||||
|
GHCR_IMAGE_NAMESPACE: ${{ github.event.inputs.GHCR_IMAGE_NAMESPACE || github.actor }}
|
||||||
|
SKIP_DOCKER_HUB: ${{ github.event.inputs.SKIP_DOCKER_HUB || 'false' }}
|
||||||
|
SKIP_GHCR: ${{ github.event.inputs.SKIP_GHCR }}
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -38,7 +69,7 @@ jobs:
|
|||||||
|
|
||||||
- name: build rustdesk-api-web
|
- name: build rustdesk-api-web
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/lejianwen/rustdesk-api-web
|
git clone ${{ env.WEBCLIENT_SOURCE_LOCATION }}
|
||||||
cd rustdesk-api-web
|
cd rustdesk-api-web
|
||||||
npm install
|
npm install
|
||||||
npm run build
|
npm run build
|
||||||
@@ -86,13 +117,13 @@ jobs:
|
|||||||
path: |
|
path: |
|
||||||
${{ matrix.job.goos}}-${{ matrix.job.platform }}.tar.gz
|
${{ matrix.job.goos}}-${{ matrix.job.platform }}.tar.gz
|
||||||
${{ matrix.job.goos}}-${{ matrix.job.platform }}.zip
|
${{ matrix.job.goos}}-${{ matrix.job.platform }}.zip
|
||||||
|
|
||||||
- name: Upload to GitHub Release
|
- name: Upload to GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
${{ matrix.job.goos}}-${{ matrix.job.platform }}.tar.gz
|
${{ matrix.job.goos}}-${{ matrix.job.platform }}.tar.gz
|
||||||
${{ matrix.job.goos}}-${{ matrix.job.platform }}.zip
|
${{ matrix.job.goos}}-${{ matrix.job.platform }}.zip
|
||||||
|
# tag_name: ${{ env.LATEST_TAG }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
@@ -117,20 +148,34 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
|
if: ${{ env.SKIP_DOCKER_HUB == 'false' }} # Only log in if SKIP_DOCKER_HUB is false
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Log in to GitHub Container Registry
|
||||||
|
if: ${{ env.SKIP_GHCR == 'false' }} # Only log in if GHCR push is enabled
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: vars
|
id: vars
|
||||||
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
run: |
|
||||||
|
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
||||||
|
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "TAG=latest" >> $GITHUB_ENV # Default to 'latest' if not a tag
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: lejianwen/rustdesk-api
|
images: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api
|
||||||
|
|
||||||
- name: Download binaries
|
- name: Download binaries
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
@@ -144,7 +189,8 @@ jobs:
|
|||||||
tar -xzf ${{ matrix.job.goos }}-${{ matrix.job.platform }}.tar.gz -C ${{ matrix.job.platform }}
|
tar -xzf ${{ matrix.job.goos }}-${{ matrix.job.platform }}.tar.gz -C ${{ matrix.job.platform }}
|
||||||
file ${{ matrix.job.platform }}/apimain
|
file ${{ matrix.job.platform }}/apimain
|
||||||
|
|
||||||
- name: Build and push Docker image ${{ matrix.job.platform }}
|
- name: Build and push Docker image to Docker Hub ${{ matrix.job.platform }}
|
||||||
|
if: ${{ env.SKIP_DOCKER_HUB == 'false' }} # Only run this step if SKIP_DOCKER_HUB is false
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: "."
|
context: "."
|
||||||
@@ -155,8 +201,24 @@ jobs:
|
|||||||
build-args: |
|
build-args: |
|
||||||
BUILDARCH=${{ matrix.job.platform }}
|
BUILDARCH=${{ matrix.job.platform }}
|
||||||
tags: |
|
tags: |
|
||||||
lejianwen/rustdesk-api:${{ env.LATEST_TAG }}-${{ matrix.job.platform }}
|
${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.LATEST_TAG }}-${{ matrix.job.platform }},
|
||||||
lejianwen/rustdesk-api:${{ env.TAG }}-${{ matrix.job.platform }}
|
${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-${{ matrix.job.platform }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image to GHCR ${{ matrix.job.platform }}
|
||||||
|
if: ${{ env.SKIP_GHCR == 'false' }} # Only run this step if SKIP_GHCR is false
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: "."
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: ${{ matrix.job.docker_platform }}
|
||||||
|
push: true
|
||||||
|
provenance: false
|
||||||
|
build-args: |
|
||||||
|
BUILDARCH=${{ matrix.job.platform }}
|
||||||
|
tags: |
|
||||||
|
ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.LATEST_TAG }}-${{ matrix.job.platform }},
|
||||||
|
ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-${{ matrix.job.platform }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -167,24 +229,62 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
id: vars
|
id: vars
|
||||||
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
run: |
|
||||||
|
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
||||||
|
echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
echo "TAG=latest" >> $GITHUB_ENV # Default to 'latest' if not a tag
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
|
if: ${{ env.SKIP_DOCKER_HUB == 'false' }} # Only log in if Docker Hub push is enabled
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||||
|
|
||||||
- name: Create and push manifest (:version)
|
- name: Log in to GitHub Container Registry
|
||||||
|
if: ${{ env.SKIP_GHCR == 'false' }} # Only log in if GHCR push is enabled
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Create and push manifest Docker Hub (:version)
|
||||||
|
if: ${{ env.SKIP_DOCKER_HUB == 'false' }}
|
||||||
uses: Noelware/docker-manifest-action@master
|
uses: Noelware/docker-manifest-action@master
|
||||||
with:
|
with:
|
||||||
base-image: lejianwen/rustdesk-api:${{ env.TAG }}
|
base-image: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}
|
||||||
extra-images: lejianwen/rustdesk-api:${{ env.TAG }}-amd64,lejianwen/rustdesk-api:${{ env.TAG }}-arm64
|
extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64,
|
||||||
|
${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64
|
||||||
push: true
|
push: true
|
||||||
|
|
||||||
- name: Create and push manifest (:latest)
|
- name: Create and push manifest GHCR (:version)
|
||||||
|
if: ${{ env.SKIP_GHCR == 'false' }}
|
||||||
uses: Noelware/docker-manifest-action@master
|
uses: Noelware/docker-manifest-action@master
|
||||||
with:
|
with:
|
||||||
base-image: lejianwen/rustdesk-api:latest
|
base-image: ghcr.io/${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}
|
||||||
extra-images: lejianwen/rustdesk-api:latest-amd64,lejianwen/rustdesk-api:latest-arm64
|
extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-amd64,
|
||||||
|
ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:${{ env.TAG }}-arm64
|
||||||
push: true
|
push: true
|
||||||
|
amend: true
|
||||||
|
|
||||||
|
- name: Create and push manifest Docker Hub (:latest)
|
||||||
|
if: ${{ env.SKIP_DOCKER_HUB == 'false' }}
|
||||||
|
uses: Noelware/docker-manifest-action@master
|
||||||
|
with:
|
||||||
|
base-image: ${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:latest
|
||||||
|
extra-images: ${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64,
|
||||||
|
${{ env.DOCKERHUB_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64
|
||||||
|
push: true
|
||||||
|
|
||||||
|
- name: Create and push manifest GHCR (:latest)
|
||||||
|
if: ${{ env.SKIP_GHCR == 'false' }}
|
||||||
|
uses: Noelware/docker-manifest-action@master
|
||||||
|
with:
|
||||||
|
base-image: ghcr.io/${{ env.BASE_IMAGE_NAMESPACE }}/rustdesk-api:latest
|
||||||
|
extra-images: ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-amd64,
|
||||||
|
ghcr.io/${{ env.GHCR_IMAGE_NAMESPACE }}/rustdesk-api:latest-arm64
|
||||||
|
push: true
|
||||||
|
amend: true
|
||||||
@@ -22,7 +22,7 @@ const docTemplateadmin = `{
|
|||||||
"token": []
|
"token": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "创建地址簿",
|
"description": "批量创建地址簿",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@@ -32,7 +32,7 @@ const docTemplateadmin = `{
|
|||||||
"tags": [
|
"tags": [
|
||||||
"地址簿"
|
"地址簿"
|
||||||
],
|
],
|
||||||
"summary": "创建地址簿",
|
"summary": "批量创建地址簿",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "地址簿信息",
|
"description": "地址簿信息",
|
||||||
@@ -1242,7 +1242,7 @@ const docTemplateadmin = `{
|
|||||||
"token": []
|
"token": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "设备删除",
|
"description": "批量设备删除",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@@ -1252,15 +1252,15 @@ const docTemplateadmin = `{
|
|||||||
"tags": [
|
"tags": [
|
||||||
"设备"
|
"设备"
|
||||||
],
|
],
|
||||||
"summary": "设备删除",
|
"summary": "批量设备删除",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "设备信息",
|
"description": "设备id",
|
||||||
"name": "body",
|
"name": "body",
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/admin.PeerForm"
|
"$ref": "#/definitions/admin.PeerBatchDeleteForm"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1365,6 +1365,12 @@ const docTemplateadmin = `{
|
|||||||
"description": "页大小",
|
"description": "页大小",
|
||||||
"name": "page_size",
|
"name": "page_size",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "时间",
|
||||||
|
"name": "time_ago",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -2311,6 +2317,12 @@ const docTemplateadmin = `{
|
|||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"user_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@@ -2398,6 +2410,20 @@ const docTemplateadmin = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"admin.PeerBatchDeleteForm": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"row_ids"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"row_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"admin.PeerForm": {
|
"admin.PeerForm": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
"token": []
|
"token": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "创建地址簿",
|
"description": "批量创建地址簿",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"地址簿"
|
"地址簿"
|
||||||
],
|
],
|
||||||
"summary": "创建地址簿",
|
"summary": "批量创建地址簿",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "地址簿信息",
|
"description": "地址簿信息",
|
||||||
@@ -1235,7 +1235,7 @@
|
|||||||
"token": []
|
"token": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "设备删除",
|
"description": "批量设备删除",
|
||||||
"consumes": [
|
"consumes": [
|
||||||
"application/json"
|
"application/json"
|
||||||
],
|
],
|
||||||
@@ -1245,15 +1245,15 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"设备"
|
"设备"
|
||||||
],
|
],
|
||||||
"summary": "设备删除",
|
"summary": "批量设备删除",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
"description": "设备信息",
|
"description": "设备id",
|
||||||
"name": "body",
|
"name": "body",
|
||||||
"in": "body",
|
"in": "body",
|
||||||
"required": true,
|
"required": true,
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/admin.PeerForm"
|
"$ref": "#/definitions/admin.PeerBatchDeleteForm"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -1358,6 +1358,12 @@
|
|||||||
"description": "页大小",
|
"description": "页大小",
|
||||||
"name": "page_size",
|
"name": "page_size",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "时间",
|
||||||
|
"name": "time_ago",
|
||||||
|
"in": "query"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -2304,6 +2310,12 @@
|
|||||||
"user_id": {
|
"user_id": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"user_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
"username": {
|
"username": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@@ -2391,6 +2403,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"admin.PeerBatchDeleteForm": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"row_ids"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"row_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"admin.PeerForm": {
|
"admin.PeerForm": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -46,6 +46,10 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
user_id:
|
user_id:
|
||||||
type: integer
|
type: integer
|
||||||
|
user_ids:
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
type: array
|
||||||
username:
|
username:
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
@@ -107,6 +111,15 @@ definitions:
|
|||||||
- op
|
- op
|
||||||
- redirect_url
|
- redirect_url
|
||||||
type: object
|
type: object
|
||||||
|
admin.PeerBatchDeleteForm:
|
||||||
|
properties:
|
||||||
|
row_ids:
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
type: array
|
||||||
|
required:
|
||||||
|
- row_ids
|
||||||
|
type: object
|
||||||
admin.PeerForm:
|
admin.PeerForm:
|
||||||
properties:
|
properties:
|
||||||
cpu:
|
cpu:
|
||||||
@@ -473,7 +486,7 @@ paths:
|
|||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: 创建地址簿
|
description: 批量创建地址簿
|
||||||
parameters:
|
parameters:
|
||||||
- description: 地址簿信息
|
- description: 地址簿信息
|
||||||
in: body
|
in: body
|
||||||
@@ -499,7 +512,7 @@ paths:
|
|||||||
$ref: '#/definitions/response.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
security:
|
security:
|
||||||
- token: []
|
- token: []
|
||||||
summary: 创建地址簿
|
summary: 批量创建地址簿
|
||||||
tags:
|
tags:
|
||||||
- 地址簿
|
- 地址簿
|
||||||
/admin/address_book/delete:
|
/admin/address_book/delete:
|
||||||
@@ -1196,14 +1209,14 @@ paths:
|
|||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
description: 设备删除
|
description: 批量设备删除
|
||||||
parameters:
|
parameters:
|
||||||
- description: 设备信息
|
- description: 设备id
|
||||||
in: body
|
in: body
|
||||||
name: body
|
name: body
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/admin.PeerForm'
|
$ref: '#/definitions/admin.PeerBatchDeleteForm'
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
@@ -1217,7 +1230,7 @@ paths:
|
|||||||
$ref: '#/definitions/response.Response'
|
$ref: '#/definitions/response.Response'
|
||||||
security:
|
security:
|
||||||
- token: []
|
- token: []
|
||||||
summary: 设备删除
|
summary: 批量设备删除
|
||||||
tags:
|
tags:
|
||||||
- 设备
|
- 设备
|
||||||
/admin/peer/detail/{id}:
|
/admin/peer/detail/{id}:
|
||||||
@@ -1266,6 +1279,10 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
name: page_size
|
name: page_size
|
||||||
type: integer
|
type: integer
|
||||||
|
- description: 时间
|
||||||
|
in: query
|
||||||
|
name: time_ago
|
||||||
|
type: integer
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
|
|||||||
Reference in New Issue
Block a user