Skip to content

Commit

Permalink
feat: 提供账号查询、创建、删除的APIGW接口 TencentBlueKing#2472
Browse files Browse the repository at this point in the history
处理Review意见
  • Loading branch information
jsonwan committed Oct 12, 2023
1 parent e5b0a5e commit e909183
Show file tree
Hide file tree
Showing 27 changed files with 136 additions and 407 deletions.
2 changes: 0 additions & 2 deletions docs/apidoc/bk-api-gateway/v3/zh/create_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
"alias": "Admin",
"category": 1,
"type": 2,
"db_system_account_id": null,
"os": "Windows",
"description": "An account for windows",
"creator": "admin",
Expand Down Expand Up @@ -93,7 +92,6 @@
| alias | string | 账号别名 |
| category | int | 账号用途(1:系统账号) |
| type | int | 账号类型(1:Linux,2:Windows)|
| db_system_account_id | long | 账号用途为数据库账号时该字段生效,表示数据库账号对应的系统账号ID |
| os | string | 账号用途为系统账号时该字段生效,账号对应的OS |
| description | string | 账号描述 |
| creator | string | 创建人 |
Expand Down
2 changes: 0 additions & 2 deletions docs/apidoc/bk-api-gateway/v3/zh/get_account_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"category": 1,
"type": 1,
"os": "Linux",
"can_use": true,
"creator": "admin",
"bk_scope_type": "biz",
"bk_scope_id": "1",
Expand Down Expand Up @@ -95,7 +94,6 @@
| type | int | 账号类型(1:Linux,2:Windows,9:MySQL,10:Oracle,11:DB2)|
| db_system_account_id | long | 账号用途为DB账号时该字段生效,表示DB账号对应的系统账号ID |
| os | string | 账号用途为系统账号时该字段生效,账号对应的OS |
| can_use | bool | 是否有使用该账号的权限 |
| creator | string | 创建人 |
| create_time | long | 创建时间Unix时间戳(ms) |
| last_modify_user | string | 最近一次修改人 |
Expand Down
99 changes: 0 additions & 99 deletions docs/apidoc/bk-api-gateway/v3/zh/search_account.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"alias": "Admin",
"category": 1,
"type": 2,
"db_system_account_id": null,
"os": "Windows",
"description": "An account for windows",
"creator": "admin",
Expand Down Expand Up @@ -87,7 +86,6 @@
| alias | string | 账号别名 |
| category | int | 账号用途(1:系统账号) |
| type | int | 账号类型(1:Linux,2:Windows)|
| db_system_account_id | long | 账号用途为数据库账号时该字段生效,表示数据库账号对应的系统账号ID |
| os | string | 账号用途为系统账号时该字段生效,账号对应的OS |
| description | string | 账号描述 |
| creator | string | 创建人 |
Expand Down
100 changes: 0 additions & 100 deletions docs/apidoc/esb/jobv3-confapis/apidocs/zh_hans/search_account.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/apidoc/esb/jobv3-confapis/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -497,17 +497,6 @@
dest_http_method: POST


- path: /v2/jobv3/search_account/
name: search_account
label: 搜索账号
label_en: Search account
suggest_method: GET
api_type: query
comp_codename: generic.v2.jobv3.job_component
dest_path: /api/job/v3/job-manage/search_account/
dest_http_method: GET


- path: /v2/jobv3/create_account/
name: create_account
label: 创建账号
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ validation.constraints.InvalidPort.message=端口号只能为1-65535之间的整
validation.constraints.NotContainSpecialChar.message=不可包含 \\|/:*<>"? 特殊字符
validation.constraints.NotBlankField.message=不能为空
validation.constraints.AccountId_empty.message=账号ID不能为空
validation.constraints.AccountName_empty.message=账号名称[account]不能为空
validation.constraints.AccountType_empty.message=账号类型[type]不能为空
validation.constraints.AccountCategory_empty.message=账号用途[category]不能为空
validation.constraints.AccountPassword_tooLong.message=账号密码[password]不能超过255字符
validation.constraints.AccountAlias_tooLong.message=账号别名[alias]不能超过255字符
validation.constraints.AccountDescription_tooLong.message=账号描述[description]不能超过1024字符
validation.constraints.AccountName_empty.message=账号名称不能为空
validation.constraints.AccountType_illegal.message=账号类型取值非法
validation.constraints.AccountCategory_illegal.message=账号用途取值非法
validation.constraints.AccountPassword_tooLong.message=账号密码不能超过255字符
validation.constraints.AccountAlias_tooLong.message=账号别名不能超过255字符
validation.constraints.AccountDescription_tooLong.message=账号描述不能超过1024字符
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ validation.constraints.InvalidFileUploadSettingAmount.message=File size must be
validation.constraints.InvalidPort.message=Port must be a integer which is between 1 and 65535
validation.constraints.NotContainSpecialChar.message=Cannot contain special char, such as \\|/:*<>"?
validation.constraints.AccountId_empty.message=Account id cannot be empty
validation.constraints.AccountName_empty.message=Account name (account) cannot be empty
validation.constraints.AccountType_empty.message=Account type cannot be empty
validation.constraints.AccountCategory_empty.message=Account category cannot be empty
validation.constraints.AccountName_empty.message=Account name cannot be empty
validation.constraints.AccountType_illegal.message=Account type value is illegal
validation.constraints.AccountCategory_illegal.message=Account category value is illegal
validation.constraints.AccountPassword_tooLong.message=Account password length cannot be larger than 255
validation.constraints.AccountAlias_tooLong.message=Account alias length cannot be larger than 255
validation.constraints.AccountDescription_tooLong.message=Account description length cannot be larger than 1024
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ validation.constraints.InvalidFileUploadSettingAmount.message=File size must be
validation.constraints.InvalidPort.message=Port must be a integer which is between 1 and 65535
validation.constraints.NotContainSpecialChar.message=Cannot contain special char, such as \\|/:*<>"?
validation.constraints.AccountId_empty.message=Account id cannot be empty
validation.constraints.AccountName_empty.message=Account name (account) cannot be empty
validation.constraints.AccountType_empty.message=Account type cannot be empty
validation.constraints.AccountCategory_empty.message=Account category cannot be empty
validation.constraints.AccountName_empty.message=Account name cannot be empty
validation.constraints.AccountType_illegal.message=Account type value is illegal
validation.constraints.AccountCategory_illegal.message=Account category value is illegal
validation.constraints.AccountPassword_tooLong.message=Account password length cannot be larger than 255
validation.constraints.AccountAlias_tooLong.message=Account alias length cannot be larger than 255
validation.constraints.AccountDescription_tooLong.message=Account description length cannot be larger than 1024
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ validation.constraints.InvalidFileUploadSettingAmount.message=文件大小只能
validation.constraints.InvalidPort.message=端口号只能为1-65535之间的整数
validation.constraints.NotContainSpecialChar.message=不可包含 \\|/:*<>"? 特殊字符
validation.constraints.AccountId_empty.message=账号ID不能为空
validation.constraints.AccountName_empty.message=账号名称[account]不能为空
validation.constraints.AccountType_empty.message=账号类型[type]不能为空
validation.constraints.AccountCategory_empty.message=账号用途[category]不能为空
validation.constraints.AccountPassword_tooLong.message=账号密码[password]不能超过255字符
validation.constraints.AccountAlias_tooLong.message=账号别名[alias]不能超过255字符
validation.constraints.AccountDescription_tooLong.message=账号描述[description]不能超过1024字符
validation.constraints.AccountName_empty.message=账号名称不能为空
validation.constraints.AccountType_illegal.message=账号类型取值非法
validation.constraints.AccountCategory_illegal.message=账号用途取值非法
validation.constraints.AccountPassword_tooLong.message=账号密码不能超过255字符
validation.constraints.AccountAlias_tooLong.message=账号别名不能超过255字符
validation.constraints.AccountDescription_tooLong.message=账号描述不能超过1024字符
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ validation.constraints.InvalidFileUploadSettingAmount.message=文件大小只能
validation.constraints.InvalidPort.message=端口号只能为1-65535之间的整数
validation.constraints.NotContainSpecialChar.message=不可包含 \\|/:*<>"? 特殊字符
validation.constraints.AccountId_empty.message=账号ID不能为空
validation.constraints.AccountName_empty.message=账号名称[account]不能为空
validation.constraints.AccountType_empty.message=账号类型[type]不能为空
validation.constraints.AccountCategory_empty.message=账号用途[category]不能为空
validation.constraints.AccountPassword_tooLong.message=账号密码[password]不能超过255字符
validation.constraints.AccountAlias_tooLong.message=账号别名[alias]不能超过255字符
validation.constraints.AccountDescription_tooLong.message=账号描述[description]不能超过1024字符
validation.constraints.AccountName_empty.message=账号名称不能为空
validation.constraints.AccountType_illegal.message=账号类型取值非法
validation.constraints.AccountCategory_illegal.message=账号用途取值非法
validation.constraints.AccountPassword_tooLong.message=账号密码不能超过255字符
validation.constraints.AccountAlias_tooLong.message=账号别名不能超过255字符
validation.constraints.AccountDescription_tooLong.message=账号描述不能超过1024字符
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ public static AccountCategoryEnum valOf(Integer category) {
return null;
}

public static boolean isValid(Integer category) {
if (category == null) {
return false;
}
return valOf(category) != null;
}

public Integer getValue() {
return value;
}
Expand Down
Loading

0 comments on commit e909183

Please sign in to comment.