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 Etag string `json:"etag"`
13 IsActive bool `json:"is_active"`
14 IsAdmin bool `json:"is_admin"`
15 Username string `json:"username"`
16 Email string `json:"email"`
17 FullName string `json:"full_name"`
18 FirstName string `json:"first_name"`
19 LastName string `json:"last_name"`
20 IdentityURL string `json:"identity_url"`
21 IsInvited bool `json:"is_invited"`
22 OwnerUUID string `json:"owner_uuid"`
23 CreatedAt time.Time `json:"created_at"`
24 ModifiedAt time.Time `json:"modified_at"`
25 ModifiedByUserUUID string `json:"modified_by_user_uuid"`
26 ModifiedByClientUUID string `json:"modified_by_client_uuid"`
27 Prefs map[string]interface{} `json:"prefs"`
28 WritableBy []string `json:"writable_by,omitempty"`
29 CanWrite bool `json:"can_write"`
30 CanManage bool `json:"can_manage"`
33 // UserList is an arvados#userList resource.
34 type UserList struct {
35 Items []User `json:"items"`
36 ItemsAvailable int `json:"items_available"`
37 Offset int `json:"offset"`
38 Limit int `json:"limit"`
41 // CurrentUser calls arvados.v1.users.current, and returns the User
42 // record corresponding to this client's credentials.
43 func (c *Client) CurrentUser() (User, error) {
45 err := c.RequestAndDecode(&u, "GET", "arvados/v1/users/current", nil, nil)