¶ Management role
Update Time: 2024-10-10 07:28:40
This module is used to manage the Authing role, and the role can be changed, the role add/delete the user.
¶ Get a list of roles
management.NewClient(userPoolId, appSecret).GetRoleList(req)
Get a list of roles
¶ parameter
model.QueryListRequest
<QueryListRequest>QueryListRequest.Page
<int> default: 1QueryListRequest.Limit
<int> default: 10QueryListRequest.SortBy
<SortByEnum> sorting rules
¶ Example
client := management.NewClient(userPoolId, appSecret)
req := model.GetRoleListRequest{
Page: 1,
Limit: 10,
SortBy: enum.SortByCreatedAtAsc,
}
resp, _ := client.GetRoleList(req)
¶ Get a list of users
management.NewClient(userPoolId, appSecret).GetRoleUserList(req)
Get the user list, the interface is a paging interface.
¶ parameter
model.GetRoleUserListRequest
<GetRoleUserListRequest>GetRoleUserListRequest.Page
<int> default: 1GetRoleUserListRequest.Limit
<int> default: 10GetRoleUserListRequest.Code
<string> role CodeGetRoleUserListRequest.Namespace
<string> group ID
¶ Example
client := management.NewClient(userPoolId, appSecret)
req := model.GetRoleUserListRequest{
Page: 1,
Limit: 10,
Code: "develop",
Namespace: "default",
}
resp, _ := client.GetRoleUserList(req)