Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync/group #6

Merged
merged 10 commits into from
Sep 26, 2023
44 changes: 44 additions & 0 deletions gen/openapi/sync/v1/group.swagger.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"swagger": "2.0",
"info": {
"title": "sync/v1/group.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"protobufAny": {
"type": "object",
"properties": {
"@type": {
"type": "string"
}
},
"additionalProperties": {}
},
"rpcStatus": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/protobufAny"
}
}
}
}
}
}
187 changes: 187 additions & 0 deletions gen/openapi/sync/v1/sync_service.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,38 @@
]
}
},
"/gapi/sync/v1/sync_group": {
"get": {
"summary": "通过UID获取所有组信息",
"operationId": "SyncService_SyncGroup",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1SyncGroupResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "after",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
}
],
"tags": [
"SyncService"
]
}
},
"/gapi/sync/v1/update": {
"post": {
"summary": "提交最新配置 若配置的ID为空,则创建新配置。若配置的删除时间不为空,则代表该配置已被删除。",
Expand Down Expand Up @@ -337,6 +369,90 @@
"SyncService"
]
}
},
"/gapi/sync/v1/update_group": {
"post": {
"summary": "更新组信息",
"operationId": "SyncService_UpdateGroup",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpdateGroupResponse"
}
},
"default": {
"description": "An unexpected error response.",
"schema": {
"$ref": "#/definitions/rpcStatus"
}
}
},
"parameters": [
{
"name": "group.id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.name",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.description",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.avatar",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.createdAt",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "group.updatedAt",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "group.deletedAt",
"in": "query",
"required": false,
"type": "string",
"format": "date-time"
},
{
"name": "group.uid",
"description": "创建者",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "group.isPersonal",
"description": "是否是个人组",
"in": "query",
"required": false,
"type": "boolean"
}
],
"tags": [
"SyncService"
]
}
}
},
"definitions": {
Expand Down Expand Up @@ -368,6 +484,50 @@
}
}
},
"v1Group": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"avatar": {
"type": "string"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"deletedAt": {
"type": "string",
"format": "date-time"
},
"uid": {
"type": "string",
"title": "创建者"
},
"isPersonal": {
"type": "boolean",
"title": "是否是个人组"
},
"members": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Member"
}
}
}
},
"v1Host": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -501,6 +661,14 @@
}
}
},
"v1Member": {
"type": "object",
"properties": {
"uid": {
"type": "string"
}
}
},
"v1SshKey": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -542,6 +710,22 @@
},
"title": "SSH 密钥"
},
"v1SyncGroupResponse": {
"type": "object",
"properties": {
"serverTime": {
"type": "string",
"format": "date-time"
},
"groups": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/v1Group"
}
}
}
},
"v1SyncResponse": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -580,6 +764,9 @@
}
}
},
"v1UpdateGroupResponse": {
"type": "object"
},
"v1UpdateResponse": {
"type": "object",
"properties": {
Expand Down
Loading