1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
9 // User is an arvados#user record
11 UUID string `json:"uuid"`
12 IsActive bool `json:"is_active"`
13 IsAdmin bool `json:"is_admin"`
14 Username string `json:"username"`
15 Email string `json:"email"`
16 FullName string `json:"full_name"`
17 FirstName string `json:"first_name"`
18 LastName string `json:"last_name"`
19 IdentityURL string `json:"identity_url"`
20 IsInvited bool `json:"is_invited"`
21 OwnerUUID string `json:"owner_uuid"`
22 CreatedAt time.Time `json:"created_at"`
23 ModifiedAt time.Time `json:"modified_at"`
24 ModifiedByUserUUID string `json:"modified_by_user_uuid"`
25 ModifiedByClientUUID string `json:"modified_by_client_uuid"`
26 Prefs map[string]interface{} `json:"prefs"`
29 // UserList is an arvados#userList resource.
30 type UserList struct {
31 Items []User `json:"items"`
32 ItemsAvailable int `json:"items_available"`
33 Offset int `json:"offset"`
34 Limit int `json:"limit"`
37 // CurrentUser calls arvados.v1.users.current, and returns the User
38 // record corresponding to this client's credentials.
39 func (c *Client) CurrentUser() (User, error) {
41 err := c.RequestAndDecode(&u, "GET", "arvados/v1/users/current", nil, nil)