1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
13 "git.arvados.org/arvados.git/sdk/go/arvados"
17 // -- this file is auto-generated -- do not edit -- edit list.go and run "go generate" instead --
20 func (conn *Conn) generated_ContainerList(ctx context.Context, options arvados.ListOptions) (arvados.ContainerList, error) {
22 var merged arvados.ContainerList
23 var needSort atomic.Value
25 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
26 cl, err := backend.ContainerList(ctx, options)
32 if len(merged.Items) == 0 {
34 } else if len(cl.Items) > 0 {
35 merged.Items = append(merged.Items, cl.Items...)
38 uuids := make([]string, 0, len(cl.Items))
39 for _, item := range cl.Items {
40 uuids = append(uuids, item.UUID)
44 if needSort.Load().(bool) {
45 // Apply the default/implied order, "modified_at desc"
46 sort.Slice(merged.Items, func(i, j int) bool {
47 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
51 if merged.Items == nil {
52 // Return empty results as [], not null
53 // (https://github.com/golang/go/issues/27589 might be
54 // a better solution in the future)
55 merged.Items = []arvados.Container{}
60 func (conn *Conn) generated_SpecimenList(ctx context.Context, options arvados.ListOptions) (arvados.SpecimenList, error) {
62 var merged arvados.SpecimenList
63 var needSort atomic.Value
65 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
66 cl, err := backend.SpecimenList(ctx, options)
72 if len(merged.Items) == 0 {
74 } else if len(cl.Items) > 0 {
75 merged.Items = append(merged.Items, cl.Items...)
78 uuids := make([]string, 0, len(cl.Items))
79 for _, item := range cl.Items {
80 uuids = append(uuids, item.UUID)
84 if needSort.Load().(bool) {
85 // Apply the default/implied order, "modified_at desc"
86 sort.Slice(merged.Items, func(i, j int) bool {
87 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
91 if merged.Items == nil {
92 // Return empty results as [], not null
93 // (https://github.com/golang/go/issues/27589 might be
94 // a better solution in the future)
95 merged.Items = []arvados.Specimen{}
100 func (conn *Conn) generated_UserList(ctx context.Context, options arvados.ListOptions) (arvados.UserList, error) {
102 var merged arvados.UserList
103 var needSort atomic.Value
104 needSort.Store(false)
105 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
106 cl, err := backend.UserList(ctx, options)
112 if len(merged.Items) == 0 {
114 } else if len(cl.Items) > 0 {
115 merged.Items = append(merged.Items, cl.Items...)
118 uuids := make([]string, 0, len(cl.Items))
119 for _, item := range cl.Items {
120 uuids = append(uuids, item.UUID)
124 if needSort.Load().(bool) {
125 // Apply the default/implied order, "modified_at desc"
126 sort.Slice(merged.Items, func(i, j int) bool {
127 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
131 if merged.Items == nil {
132 // Return empty results as [], not null
133 // (https://github.com/golang/go/issues/27589 might be
134 // a better solution in the future)
135 merged.Items = []arvados.User{}