You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
syntax = "v1"
|
|
|
|
type (
|
|
// Token request | 查询凭证请求
|
|
// swagger:parameters GetTokenListAdmin
|
|
TokenReq {
|
|
BaseID
|
|
*Pagination
|
|
|
|
// User id | 用户ID
|
|
UserID int64 `json:"userId,string,optional" form:"userId,string,optional"`
|
|
|
|
// Token status | Token状态
|
|
Status string `json:"status,optional" form:"status,optional"`
|
|
|
|
// Provider source | 提供商来源
|
|
Source string `json:"source,optional" form:"source,optional"`
|
|
|
|
// Token type | 凭证类型 [Bearer]
|
|
//
|
|
// Example: Bearer
|
|
TokenType string `json:"tokenType,optional" form:"tokenType,optional"`
|
|
}
|
|
|
|
// Token list response | 凭证列表返回
|
|
TokenListResp {
|
|
// Page | 分页数据
|
|
Page *Pagination `json:"page,optional"`
|
|
|
|
// List | 数据列表
|
|
List []TokenInfo `json:"list"`
|
|
}
|
|
)
|
|
|
|
@server(
|
|
group: token_admin
|
|
prefix: /api/admin/token
|
|
jwt: Auth
|
|
middleware: Authority
|
|
)
|
|
service api {
|
|
// Get token list | 获取凭证列表
|
|
@handler getTokenListAdmin
|
|
get /list (TokenReq) returns (TokenListResp)
|
|
|
|
// Disable token | 禁用凭证(强制下线)
|
|
@handler disableTokenAdmin
|
|
post /disable (BaseID)
|
|
} |