mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
parent
f13e558ab4
commit
c9ce92f635
@ -36,6 +36,12 @@ type User struct {
|
|||||||
Revoke []string `json:"revoke,omitempty"`
|
Revoke []string `json:"revoke,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// userListEntry is the user representation given by the server for ListUsers
|
||||||
|
type userListEntry struct {
|
||||||
|
User string `json:"user"`
|
||||||
|
Roles []Role `json:"roles"`
|
||||||
|
}
|
||||||
|
|
||||||
type UserRoles struct {
|
type UserRoles struct {
|
||||||
User string `json:"user"`
|
User string `json:"user"`
|
||||||
Roles []Role `json:"roles"`
|
Roles []Role `json:"roles"`
|
||||||
@ -194,7 +200,7 @@ func (u *httpAuthUserAPI) ListUsers(ctx context.Context) ([]string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var userList struct {
|
var userList struct {
|
||||||
Users []User `json:"users"`
|
Users []userListEntry `json:"users"`
|
||||||
}
|
}
|
||||||
|
|
||||||
if err = json.Unmarshal(body, &userList); err != nil {
|
if err = json.Unmarshal(body, &userList); err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user