1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
7 // User is an arvados#user record
9 UUID string `json:"uuid,omitempty"`
10 IsActive bool `json:"is_active"`
11 IsAdmin bool `json:"is_admin"`
12 Username string `json:"username,omitempty"`
13 Email string `json:"email,omitempty"`
16 // UserList is an arvados#userList resource.
17 type UserList struct {
18 Items []User `json:"items"`
19 ItemsAvailable int `json:"items_available"`
20 Offset int `json:"offset"`
21 Limit int `json:"limit"`
24 // CurrentUser calls arvados.v1.users.current, and returns the User
25 // record corresponding to this client's credentials.
26 func (c *Client) CurrentUser() (User, error) {
28 err := c.RequestAndDecode(&u, "GET", "arvados/v1/users/current", nil, nil)