1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
11 func (fs *customFileSystem) usersLoadOne(parent inode, name string) (inode, error) {
13 err := fs.RequestAndDecode(&resp, "GET", "arvados/v1/users", nil, ResourceListParams{
15 Filters: []Filter{{"username", "=", name}},
19 } else if len(resp.Items) == 0 {
20 return nil, os.ErrNotExist
23 return fs.newProjectNode(parent, user.Username, user.UUID), nil
26 func (fs *customFileSystem) usersLoadAll(parent inode) ([]inode, error) {
27 params := ResourceListParams{
34 err := fs.RequestAndDecode(&resp, "GET", "arvados/v1/users", nil, params)
37 } else if len(resp.Items) == 0 {
40 for _, user := range resp.Items {
41 if user.Username == "" {
44 inodes = append(inodes, fs.newProjectNode(parent, user.Username, user.UUID))
46 params.Filters = []Filter{{"uuid", ">", resp.Items[len(resp.Items)-1].UUID}}