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_AuthorizedKeyList(ctx context.Context, options arvados.ListOptions) (arvados.AuthorizedKeyList, error) {
22 var merged arvados.AuthorizedKeyList
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 options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
27 cl, err := backend.AuthorizedKeyList(ctx, options)
33 if len(merged.Items) == 0 {
35 } else if len(cl.Items) > 0 {
36 merged.Items = append(merged.Items, cl.Items...)
39 uuids := make([]string, 0, len(cl.Items))
40 for _, item := range cl.Items {
41 uuids = append(uuids, item.UUID)
45 if needSort.Load().(bool) {
46 // Apply the default/implied order, "modified_at desc"
47 sort.Slice(merged.Items, func(i, j int) bool {
48 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
52 if merged.Items == nil {
53 // Return empty results as [], not null
54 // (https://github.com/golang/go/issues/27589 might be
55 // a better solution in the future)
56 merged.Items = []arvados.AuthorizedKey{}
61 func (conn *Conn) generated_ContainerList(ctx context.Context, options arvados.ListOptions) (arvados.ContainerList, error) {
63 var merged arvados.ContainerList
64 var needSort atomic.Value
66 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
67 options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
68 cl, err := backend.ContainerList(ctx, options)
74 if len(merged.Items) == 0 {
76 } else if len(cl.Items) > 0 {
77 merged.Items = append(merged.Items, cl.Items...)
80 uuids := make([]string, 0, len(cl.Items))
81 for _, item := range cl.Items {
82 uuids = append(uuids, item.UUID)
86 if needSort.Load().(bool) {
87 // Apply the default/implied order, "modified_at desc"
88 sort.Slice(merged.Items, func(i, j int) bool {
89 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
93 if merged.Items == nil {
94 // Return empty results as [], not null
95 // (https://github.com/golang/go/issues/27589 might be
96 // a better solution in the future)
97 merged.Items = []arvados.Container{}
102 func (conn *Conn) generated_ContainerRequestList(ctx context.Context, options arvados.ListOptions) (arvados.ContainerRequestList, error) {
104 var merged arvados.ContainerRequestList
105 var needSort atomic.Value
106 needSort.Store(false)
107 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
108 options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
109 cl, err := backend.ContainerRequestList(ctx, options)
115 if len(merged.Items) == 0 {
117 } else if len(cl.Items) > 0 {
118 merged.Items = append(merged.Items, cl.Items...)
121 uuids := make([]string, 0, len(cl.Items))
122 for _, item := range cl.Items {
123 uuids = append(uuids, item.UUID)
127 if needSort.Load().(bool) {
128 // Apply the default/implied order, "modified_at desc"
129 sort.Slice(merged.Items, func(i, j int) bool {
130 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
134 if merged.Items == nil {
135 // Return empty results as [], not null
136 // (https://github.com/golang/go/issues/27589 might be
137 // a better solution in the future)
138 merged.Items = []arvados.ContainerRequest{}
143 func (conn *Conn) generated_GroupList(ctx context.Context, options arvados.ListOptions) (arvados.GroupList, error) {
145 var merged arvados.GroupList
146 var needSort atomic.Value
147 needSort.Store(false)
148 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
149 options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
150 cl, err := backend.GroupList(ctx, options)
156 if len(merged.Items) == 0 {
158 } else if len(cl.Items) > 0 {
159 merged.Items = append(merged.Items, cl.Items...)
162 uuids := make([]string, 0, len(cl.Items))
163 for _, item := range cl.Items {
164 uuids = append(uuids, item.UUID)
168 if needSort.Load().(bool) {
169 // Apply the default/implied order, "modified_at desc"
170 sort.Slice(merged.Items, func(i, j int) bool {
171 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
175 if merged.Items == nil {
176 // Return empty results as [], not null
177 // (https://github.com/golang/go/issues/27589 might be
178 // a better solution in the future)
179 merged.Items = []arvados.Group{}
184 func (conn *Conn) generated_UserList(ctx context.Context, options arvados.ListOptions) (arvados.UserList, error) {
186 var merged arvados.UserList
187 var needSort atomic.Value
188 needSort.Store(false)
189 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
190 options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
191 cl, err := backend.UserList(ctx, options)
197 if len(merged.Items) == 0 {
199 } else if len(cl.Items) > 0 {
200 merged.Items = append(merged.Items, cl.Items...)
203 uuids := make([]string, 0, len(cl.Items))
204 for _, item := range cl.Items {
205 uuids = append(uuids, item.UUID)
209 if needSort.Load().(bool) {
210 // Apply the default/implied order, "modified_at desc"
211 sort.Slice(merged.Items, func(i, j int) bool {
212 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
216 if merged.Items == nil {
217 // Return empty results as [], not null
218 // (https://github.com/golang/go/issues/27589 might be
219 // a better solution in the future)
220 merged.Items = []arvados.User{}
225 func (conn *Conn) generated_LinkList(ctx context.Context, options arvados.ListOptions) (arvados.LinkList, error) {
227 var merged arvados.LinkList
228 var needSort atomic.Value
229 needSort.Store(false)
230 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
231 options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
232 cl, err := backend.LinkList(ctx, options)
238 if len(merged.Items) == 0 {
240 } else if len(cl.Items) > 0 {
241 merged.Items = append(merged.Items, cl.Items...)
244 uuids := make([]string, 0, len(cl.Items))
245 for _, item := range cl.Items {
246 uuids = append(uuids, item.UUID)
250 if needSort.Load().(bool) {
251 // Apply the default/implied order, "modified_at desc"
252 sort.Slice(merged.Items, func(i, j int) bool {
253 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
257 if merged.Items == nil {
258 // Return empty results as [], not null
259 // (https://github.com/golang/go/issues/27589 might be
260 // a better solution in the future)
261 merged.Items = []arvados.Link{}
266 func (conn *Conn) generated_LogList(ctx context.Context, options arvados.ListOptions) (arvados.LogList, error) {
268 var merged arvados.LogList
269 var needSort atomic.Value
270 needSort.Store(false)
271 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
272 options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
273 cl, err := backend.LogList(ctx, options)
279 if len(merged.Items) == 0 {
281 } else if len(cl.Items) > 0 {
282 merged.Items = append(merged.Items, cl.Items...)
285 uuids := make([]string, 0, len(cl.Items))
286 for _, item := range cl.Items {
287 uuids = append(uuids, item.UUID)
291 if needSort.Load().(bool) {
292 // Apply the default/implied order, "modified_at desc"
293 sort.Slice(merged.Items, func(i, j int) bool {
294 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
298 if merged.Items == nil {
299 // Return empty results as [], not null
300 // (https://github.com/golang/go/issues/27589 might be
301 // a better solution in the future)
302 merged.Items = []arvados.Log{}
307 func (conn *Conn) generated_APIClientAuthorizationList(ctx context.Context, options arvados.ListOptions) (arvados.APIClientAuthorizationList, error) {
309 var merged arvados.APIClientAuthorizationList
310 var needSort atomic.Value
311 needSort.Store(false)
312 err := conn.splitListRequest(ctx, options, func(ctx context.Context, _ string, backend arvados.API, options arvados.ListOptions) ([]string, error) {
313 options.ForwardedFor = conn.cluster.ClusterID + "-" + options.ForwardedFor
314 cl, err := backend.APIClientAuthorizationList(ctx, options)
320 if len(merged.Items) == 0 {
322 } else if len(cl.Items) > 0 {
323 merged.Items = append(merged.Items, cl.Items...)
326 uuids := make([]string, 0, len(cl.Items))
327 for _, item := range cl.Items {
328 uuids = append(uuids, item.UUID)
332 if needSort.Load().(bool) {
333 // Apply the default/implied order, "modified_at desc"
334 sort.Slice(merged.Items, func(i, j int) bool {
335 mi, mj := merged.Items[i].ModifiedAt, merged.Items[j].ModifiedAt
339 if merged.Items == nil {
340 // Return empty results as [], not null
341 // (https://github.com/golang/go/issues/27589 might be
342 // a better solution in the future)
343 merged.Items = []arvados.APIClientAuthorization{}