1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
13 "git.curoverse.com/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) 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
54 func (conn *Conn) SpecimenList(ctx context.Context, options arvados.ListOptions) (arvados.SpecimenList, error) {
56 var merged arvados.SpecimenList
57 var needSort atomic.Value
59 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
60 cl, err := backend.SpecimenList(ctx, options)
66 if len(merged.Items) == 0 {
68 } else if len(cl.Items) > 0 {
69 merged.Items = append(merged.Items, cl.Items...)
72 uuids := make([]string, 0, len(cl.Items))
73 for _, item := range cl.Items {
74 uuids = append(uuids, item.UUID)
78 if needSort.Load().(bool) {
79 // Apply the default/implied order, "modified_at desc"
80 sort.Slice(merged.Items, func(i, j int) bool {
81 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt