| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package artifactregistry |
| 18 |
|
| 19 |
import ( |
| 20 |
"context" |
| 21 |
"time" |
| 22 |
|
| 23 |
artifactregistrypb "cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb" |
| 24 |
"cloud.google.com/go/longrunning" |
| 25 |
gax "github.com/googleapis/gax-go/v2" |
| 26 |
"google.golang.org/api/iterator" |
| 27 |
locationpb "google.golang.org/genproto/googleapis/cloud/location" |
| 28 |
) |
| 29 |
|
| 30 |
|
| 31 |
type BatchDeleteVersionsOperation struct { |
| 32 |
lro *longrunning.Operation |
| 33 |
pollPath string |
| 34 |
} |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
func (op *BatchDeleteVersionsOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 40 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 41 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
func (op *BatchDeleteVersionsOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 54 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 55 |
return op.lro.Poll(ctx, nil, opts...) |
| 56 |
} |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
func (op *BatchDeleteVersionsOperation) Metadata() (*artifactregistrypb.BatchDeleteVersionsMetadata, error) { |
| 63 |
var meta artifactregistrypb.BatchDeleteVersionsMetadata |
| 64 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 65 |
return nil, nil |
| 66 |
} else if err != nil { |
| 67 |
return nil, err |
| 68 |
} |
| 69 |
return &meta, nil |
| 70 |
} |
| 71 |
|
| 72 |
|
| 73 |
func (op *BatchDeleteVersionsOperation) Done() bool { |
| 74 |
return op.lro.Done() |
| 75 |
} |
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
func (op *BatchDeleteVersionsOperation) Name() string { |
| 80 |
return op.lro.Name() |
| 81 |
} |
| 82 |
|
| 83 |
|
| 84 |
type CreateAttachmentOperation struct { |
| 85 |
lro *longrunning.Operation |
| 86 |
pollPath string |
| 87 |
} |
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
func (op *CreateAttachmentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Attachment, error) { |
| 93 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 94 |
var resp artifactregistrypb.Attachment |
| 95 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 96 |
return nil, err |
| 97 |
} |
| 98 |
return &resp, nil |
| 99 |
} |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
func (op *CreateAttachmentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Attachment, error) { |
| 111 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 112 |
var resp artifactregistrypb.Attachment |
| 113 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 114 |
return nil, err |
| 115 |
} |
| 116 |
if !op.Done() { |
| 117 |
return nil, nil |
| 118 |
} |
| 119 |
return &resp, nil |
| 120 |
} |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
func (op *CreateAttachmentOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { |
| 127 |
var meta artifactregistrypb.OperationMetadata |
| 128 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 129 |
return nil, nil |
| 130 |
} else if err != nil { |
| 131 |
return nil, err |
| 132 |
} |
| 133 |
return &meta, nil |
| 134 |
} |
| 135 |
|
| 136 |
|
| 137 |
func (op *CreateAttachmentOperation) Done() bool { |
| 138 |
return op.lro.Done() |
| 139 |
} |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
func (op *CreateAttachmentOperation) Name() string { |
| 144 |
return op.lro.Name() |
| 145 |
} |
| 146 |
|
| 147 |
|
| 148 |
type CreateRepositoryOperation struct { |
| 149 |
lro *longrunning.Operation |
| 150 |
pollPath string |
| 151 |
} |
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
func (op *CreateRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { |
| 157 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 158 |
var resp artifactregistrypb.Repository |
| 159 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 160 |
return nil, err |
| 161 |
} |
| 162 |
return &resp, nil |
| 163 |
} |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
func (op *CreateRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.Repository, error) { |
| 175 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 176 |
var resp artifactregistrypb.Repository |
| 177 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 178 |
return nil, err |
| 179 |
} |
| 180 |
if !op.Done() { |
| 181 |
return nil, nil |
| 182 |
} |
| 183 |
return &resp, nil |
| 184 |
} |
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
func (op *CreateRepositoryOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { |
| 191 |
var meta artifactregistrypb.OperationMetadata |
| 192 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 193 |
return nil, nil |
| 194 |
} else if err != nil { |
| 195 |
return nil, err |
| 196 |
} |
| 197 |
return &meta, nil |
| 198 |
} |
| 199 |
|
| 200 |
|
| 201 |
func (op *CreateRepositoryOperation) Done() bool { |
| 202 |
return op.lro.Done() |
| 203 |
} |
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
func (op *CreateRepositoryOperation) Name() string { |
| 208 |
return op.lro.Name() |
| 209 |
} |
| 210 |
|
| 211 |
|
| 212 |
type DeleteAttachmentOperation struct { |
| 213 |
lro *longrunning.Operation |
| 214 |
pollPath string |
| 215 |
} |
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
func (op *DeleteAttachmentOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 221 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 222 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 223 |
} |
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
func (op *DeleteAttachmentOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 235 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 236 |
return op.lro.Poll(ctx, nil, opts...) |
| 237 |
} |
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
func (op *DeleteAttachmentOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { |
| 244 |
var meta artifactregistrypb.OperationMetadata |
| 245 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 246 |
return nil, nil |
| 247 |
} else if err != nil { |
| 248 |
return nil, err |
| 249 |
} |
| 250 |
return &meta, nil |
| 251 |
} |
| 252 |
|
| 253 |
|
| 254 |
func (op *DeleteAttachmentOperation) Done() bool { |
| 255 |
return op.lro.Done() |
| 256 |
} |
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
func (op *DeleteAttachmentOperation) Name() string { |
| 261 |
return op.lro.Name() |
| 262 |
} |
| 263 |
|
| 264 |
|
| 265 |
type DeleteFileOperation struct { |
| 266 |
lro *longrunning.Operation |
| 267 |
pollPath string |
| 268 |
} |
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
func (op *DeleteFileOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 274 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 275 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 276 |
} |
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
func (op *DeleteFileOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 288 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 289 |
return op.lro.Poll(ctx, nil, opts...) |
| 290 |
} |
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
func (op *DeleteFileOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { |
| 297 |
var meta artifactregistrypb.OperationMetadata |
| 298 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 299 |
return nil, nil |
| 300 |
} else if err != nil { |
| 301 |
return nil, err |
| 302 |
} |
| 303 |
return &meta, nil |
| 304 |
} |
| 305 |
|
| 306 |
|
| 307 |
func (op *DeleteFileOperation) Done() bool { |
| 308 |
return op.lro.Done() |
| 309 |
} |
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
func (op *DeleteFileOperation) Name() string { |
| 314 |
return op.lro.Name() |
| 315 |
} |
| 316 |
|
| 317 |
|
| 318 |
type DeletePackageOperation struct { |
| 319 |
lro *longrunning.Operation |
| 320 |
pollPath string |
| 321 |
} |
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
func (op *DeletePackageOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 327 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 328 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 329 |
} |
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
func (op *DeletePackageOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 341 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 342 |
return op.lro.Poll(ctx, nil, opts...) |
| 343 |
} |
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
func (op *DeletePackageOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { |
| 350 |
var meta artifactregistrypb.OperationMetadata |
| 351 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 352 |
return nil, nil |
| 353 |
} else if err != nil { |
| 354 |
return nil, err |
| 355 |
} |
| 356 |
return &meta, nil |
| 357 |
} |
| 358 |
|
| 359 |
|
| 360 |
func (op *DeletePackageOperation) Done() bool { |
| 361 |
return op.lro.Done() |
| 362 |
} |
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
func (op *DeletePackageOperation) Name() string { |
| 367 |
return op.lro.Name() |
| 368 |
} |
| 369 |
|
| 370 |
|
| 371 |
type DeleteRepositoryOperation struct { |
| 372 |
lro *longrunning.Operation |
| 373 |
pollPath string |
| 374 |
} |
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
func (op *DeleteRepositoryOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 380 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 381 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 382 |
} |
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
func (op *DeleteRepositoryOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 394 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 395 |
return op.lro.Poll(ctx, nil, opts...) |
| 396 |
} |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
func (op *DeleteRepositoryOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { |
| 403 |
var meta artifactregistrypb.OperationMetadata |
| 404 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 405 |
return nil, nil |
| 406 |
} else if err != nil { |
| 407 |
return nil, err |
| 408 |
} |
| 409 |
return &meta, nil |
| 410 |
} |
| 411 |
|
| 412 |
|
| 413 |
func (op *DeleteRepositoryOperation) Done() bool { |
| 414 |
return op.lro.Done() |
| 415 |
} |
| 416 |
|
| 417 |
|
| 418 |
|
| 419 |
func (op *DeleteRepositoryOperation) Name() string { |
| 420 |
return op.lro.Name() |
| 421 |
} |
| 422 |
|
| 423 |
|
| 424 |
type DeleteVersionOperation struct { |
| 425 |
lro *longrunning.Operation |
| 426 |
pollPath string |
| 427 |
} |
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
func (op *DeleteVersionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error { |
| 433 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 434 |
return op.lro.WaitWithInterval(ctx, nil, time.Minute, opts...) |
| 435 |
} |
| 436 |
|
| 437 |
|
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
func (op *DeleteVersionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error { |
| 447 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 448 |
return op.lro.Poll(ctx, nil, opts...) |
| 449 |
} |
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
func (op *DeleteVersionOperation) Metadata() (*artifactregistrypb.OperationMetadata, error) { |
| 456 |
var meta artifactregistrypb.OperationMetadata |
| 457 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 458 |
return nil, nil |
| 459 |
} else if err != nil { |
| 460 |
return nil, err |
| 461 |
} |
| 462 |
return &meta, nil |
| 463 |
} |
| 464 |
|
| 465 |
|
| 466 |
func (op *DeleteVersionOperation) Done() bool { |
| 467 |
return op.lro.Done() |
| 468 |
} |
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
func (op *DeleteVersionOperation) Name() string { |
| 473 |
return op.lro.Name() |
| 474 |
} |
| 475 |
|
| 476 |
|
| 477 |
type ImportAptArtifactsOperation struct { |
| 478 |
lro *longrunning.Operation |
| 479 |
pollPath string |
| 480 |
} |
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
func (op *ImportAptArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportAptArtifactsResponse, error) { |
| 486 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 487 |
var resp artifactregistrypb.ImportAptArtifactsResponse |
| 488 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 489 |
return nil, err |
| 490 |
} |
| 491 |
return &resp, nil |
| 492 |
} |
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
func (op *ImportAptArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportAptArtifactsResponse, error) { |
| 504 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 505 |
var resp artifactregistrypb.ImportAptArtifactsResponse |
| 506 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 507 |
return nil, err |
| 508 |
} |
| 509 |
if !op.Done() { |
| 510 |
return nil, nil |
| 511 |
} |
| 512 |
return &resp, nil |
| 513 |
} |
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
func (op *ImportAptArtifactsOperation) Metadata() (*artifactregistrypb.ImportAptArtifactsMetadata, error) { |
| 520 |
var meta artifactregistrypb.ImportAptArtifactsMetadata |
| 521 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 522 |
return nil, nil |
| 523 |
} else if err != nil { |
| 524 |
return nil, err |
| 525 |
} |
| 526 |
return &meta, nil |
| 527 |
} |
| 528 |
|
| 529 |
|
| 530 |
func (op *ImportAptArtifactsOperation) Done() bool { |
| 531 |
return op.lro.Done() |
| 532 |
} |
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
func (op *ImportAptArtifactsOperation) Name() string { |
| 537 |
return op.lro.Name() |
| 538 |
} |
| 539 |
|
| 540 |
|
| 541 |
type ImportYumArtifactsOperation struct { |
| 542 |
lro *longrunning.Operation |
| 543 |
pollPath string |
| 544 |
} |
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
func (op *ImportYumArtifactsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportYumArtifactsResponse, error) { |
| 550 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 551 |
var resp artifactregistrypb.ImportYumArtifactsResponse |
| 552 |
if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil { |
| 553 |
return nil, err |
| 554 |
} |
| 555 |
return &resp, nil |
| 556 |
} |
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
func (op *ImportYumArtifactsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*artifactregistrypb.ImportYumArtifactsResponse, error) { |
| 568 |
opts = append([]gax.CallOption{gax.WithPath(op.pollPath)}, opts...) |
| 569 |
var resp artifactregistrypb.ImportYumArtifactsResponse |
| 570 |
if err := op.lro.Poll(ctx, &resp, opts...); err != nil { |
| 571 |
return nil, err |
| 572 |
} |
| 573 |
if !op.Done() { |
| 574 |
return nil, nil |
| 575 |
} |
| 576 |
return &resp, nil |
| 577 |
} |
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
func (op *ImportYumArtifactsOperation) Metadata() (*artifactregistrypb.ImportYumArtifactsMetadata, error) { |
| 584 |
var meta artifactregistrypb.ImportYumArtifactsMetadata |
| 585 |
if err := op.lro.Metadata(&meta); err == longrunning.ErrNoMetadata { |
| 586 |
return nil, nil |
| 587 |
} else if err != nil { |
| 588 |
return nil, err |
| 589 |
} |
| 590 |
return &meta, nil |
| 591 |
} |
| 592 |
|
| 593 |
|
| 594 |
func (op *ImportYumArtifactsOperation) Done() bool { |
| 595 |
return op.lro.Done() |
| 596 |
} |
| 597 |
|
| 598 |
|
| 599 |
|
| 600 |
func (op *ImportYumArtifactsOperation) Name() string { |
| 601 |
return op.lro.Name() |
| 602 |
} |
| 603 |
|
| 604 |
|
| 605 |
type AttachmentIterator struct { |
| 606 |
items []*artifactregistrypb.Attachment |
| 607 |
pageInfo *iterator.PageInfo |
| 608 |
nextFunc func() error |
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
Response interface{} |
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Attachment, nextPageToken string, err error) |
| 622 |
} |
| 623 |
|
| 624 |
|
| 625 |
func (it *AttachmentIterator) PageInfo() *iterator.PageInfo { |
| 626 |
return it.pageInfo |
| 627 |
} |
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
func (it *AttachmentIterator) Next() (*artifactregistrypb.Attachment, error) { |
| 632 |
var item *artifactregistrypb.Attachment |
| 633 |
if err := it.nextFunc(); err != nil { |
| 634 |
return item, err |
| 635 |
} |
| 636 |
item = it.items[0] |
| 637 |
it.items = it.items[1:] |
| 638 |
return item, nil |
| 639 |
} |
| 640 |
|
| 641 |
func (it *AttachmentIterator) bufLen() int { |
| 642 |
return len(it.items) |
| 643 |
} |
| 644 |
|
| 645 |
func (it *AttachmentIterator) takeBuf() interface{} { |
| 646 |
b := it.items |
| 647 |
it.items = nil |
| 648 |
return b |
| 649 |
} |
| 650 |
|
| 651 |
|
| 652 |
type DockerImageIterator struct { |
| 653 |
items []*artifactregistrypb.DockerImage |
| 654 |
pageInfo *iterator.PageInfo |
| 655 |
nextFunc func() error |
| 656 |
|
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
Response interface{} |
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
|
| 665 |
|
| 666 |
|
| 667 |
|
| 668 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.DockerImage, nextPageToken string, err error) |
| 669 |
} |
| 670 |
|
| 671 |
|
| 672 |
func (it *DockerImageIterator) PageInfo() *iterator.PageInfo { |
| 673 |
return it.pageInfo |
| 674 |
} |
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
func (it *DockerImageIterator) Next() (*artifactregistrypb.DockerImage, error) { |
| 679 |
var item *artifactregistrypb.DockerImage |
| 680 |
if err := it.nextFunc(); err != nil { |
| 681 |
return item, err |
| 682 |
} |
| 683 |
item = it.items[0] |
| 684 |
it.items = it.items[1:] |
| 685 |
return item, nil |
| 686 |
} |
| 687 |
|
| 688 |
func (it *DockerImageIterator) bufLen() int { |
| 689 |
return len(it.items) |
| 690 |
} |
| 691 |
|
| 692 |
func (it *DockerImageIterator) takeBuf() interface{} { |
| 693 |
b := it.items |
| 694 |
it.items = nil |
| 695 |
return b |
| 696 |
} |
| 697 |
|
| 698 |
|
| 699 |
type FileIterator struct { |
| 700 |
items []*artifactregistrypb.File |
| 701 |
pageInfo *iterator.PageInfo |
| 702 |
nextFunc func() error |
| 703 |
|
| 704 |
|
| 705 |
|
| 706 |
|
| 707 |
Response interface{} |
| 708 |
|
| 709 |
|
| 710 |
|
| 711 |
|
| 712 |
|
| 713 |
|
| 714 |
|
| 715 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.File, nextPageToken string, err error) |
| 716 |
} |
| 717 |
|
| 718 |
|
| 719 |
func (it *FileIterator) PageInfo() *iterator.PageInfo { |
| 720 |
return it.pageInfo |
| 721 |
} |
| 722 |
|
| 723 |
|
| 724 |
|
| 725 |
func (it *FileIterator) Next() (*artifactregistrypb.File, error) { |
| 726 |
var item *artifactregistrypb.File |
| 727 |
if err := it.nextFunc(); err != nil { |
| 728 |
return item, err |
| 729 |
} |
| 730 |
item = it.items[0] |
| 731 |
it.items = it.items[1:] |
| 732 |
return item, nil |
| 733 |
} |
| 734 |
|
| 735 |
func (it *FileIterator) bufLen() int { |
| 736 |
return len(it.items) |
| 737 |
} |
| 738 |
|
| 739 |
func (it *FileIterator) takeBuf() interface{} { |
| 740 |
b := it.items |
| 741 |
it.items = nil |
| 742 |
return b |
| 743 |
} |
| 744 |
|
| 745 |
|
| 746 |
type LocationIterator struct { |
| 747 |
items []*locationpb.Location |
| 748 |
pageInfo *iterator.PageInfo |
| 749 |
nextFunc func() error |
| 750 |
|
| 751 |
|
| 752 |
|
| 753 |
|
| 754 |
Response interface{} |
| 755 |
|
| 756 |
|
| 757 |
|
| 758 |
|
| 759 |
|
| 760 |
|
| 761 |
|
| 762 |
InternalFetch func(pageSize int, pageToken string) (results []*locationpb.Location, nextPageToken string, err error) |
| 763 |
} |
| 764 |
|
| 765 |
|
| 766 |
func (it *LocationIterator) PageInfo() *iterator.PageInfo { |
| 767 |
return it.pageInfo |
| 768 |
} |
| 769 |
|
| 770 |
|
| 771 |
|
| 772 |
func (it *LocationIterator) Next() (*locationpb.Location, error) { |
| 773 |
var item *locationpb.Location |
| 774 |
if err := it.nextFunc(); err != nil { |
| 775 |
return item, err |
| 776 |
} |
| 777 |
item = it.items[0] |
| 778 |
it.items = it.items[1:] |
| 779 |
return item, nil |
| 780 |
} |
| 781 |
|
| 782 |
func (it *LocationIterator) bufLen() int { |
| 783 |
return len(it.items) |
| 784 |
} |
| 785 |
|
| 786 |
func (it *LocationIterator) takeBuf() interface{} { |
| 787 |
b := it.items |
| 788 |
it.items = nil |
| 789 |
return b |
| 790 |
} |
| 791 |
|
| 792 |
|
| 793 |
type MavenArtifactIterator struct { |
| 794 |
items []*artifactregistrypb.MavenArtifact |
| 795 |
pageInfo *iterator.PageInfo |
| 796 |
nextFunc func() error |
| 797 |
|
| 798 |
|
| 799 |
|
| 800 |
|
| 801 |
Response interface{} |
| 802 |
|
| 803 |
|
| 804 |
|
| 805 |
|
| 806 |
|
| 807 |
|
| 808 |
|
| 809 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.MavenArtifact, nextPageToken string, err error) |
| 810 |
} |
| 811 |
|
| 812 |
|
| 813 |
func (it *MavenArtifactIterator) PageInfo() *iterator.PageInfo { |
| 814 |
return it.pageInfo |
| 815 |
} |
| 816 |
|
| 817 |
|
| 818 |
|
| 819 |
func (it *MavenArtifactIterator) Next() (*artifactregistrypb.MavenArtifact, error) { |
| 820 |
var item *artifactregistrypb.MavenArtifact |
| 821 |
if err := it.nextFunc(); err != nil { |
| 822 |
return item, err |
| 823 |
} |
| 824 |
item = it.items[0] |
| 825 |
it.items = it.items[1:] |
| 826 |
return item, nil |
| 827 |
} |
| 828 |
|
| 829 |
func (it *MavenArtifactIterator) bufLen() int { |
| 830 |
return len(it.items) |
| 831 |
} |
| 832 |
|
| 833 |
func (it *MavenArtifactIterator) takeBuf() interface{} { |
| 834 |
b := it.items |
| 835 |
it.items = nil |
| 836 |
return b |
| 837 |
} |
| 838 |
|
| 839 |
|
| 840 |
type NpmPackageIterator struct { |
| 841 |
items []*artifactregistrypb.NpmPackage |
| 842 |
pageInfo *iterator.PageInfo |
| 843 |
nextFunc func() error |
| 844 |
|
| 845 |
|
| 846 |
|
| 847 |
|
| 848 |
Response interface{} |
| 849 |
|
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
|
| 854 |
|
| 855 |
|
| 856 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.NpmPackage, nextPageToken string, err error) |
| 857 |
} |
| 858 |
|
| 859 |
|
| 860 |
func (it *NpmPackageIterator) PageInfo() *iterator.PageInfo { |
| 861 |
return it.pageInfo |
| 862 |
} |
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
func (it *NpmPackageIterator) Next() (*artifactregistrypb.NpmPackage, error) { |
| 867 |
var item *artifactregistrypb.NpmPackage |
| 868 |
if err := it.nextFunc(); err != nil { |
| 869 |
return item, err |
| 870 |
} |
| 871 |
item = it.items[0] |
| 872 |
it.items = it.items[1:] |
| 873 |
return item, nil |
| 874 |
} |
| 875 |
|
| 876 |
func (it *NpmPackageIterator) bufLen() int { |
| 877 |
return len(it.items) |
| 878 |
} |
| 879 |
|
| 880 |
func (it *NpmPackageIterator) takeBuf() interface{} { |
| 881 |
b := it.items |
| 882 |
it.items = nil |
| 883 |
return b |
| 884 |
} |
| 885 |
|
| 886 |
|
| 887 |
type PackageIterator struct { |
| 888 |
items []*artifactregistrypb.Package |
| 889 |
pageInfo *iterator.PageInfo |
| 890 |
nextFunc func() error |
| 891 |
|
| 892 |
|
| 893 |
|
| 894 |
|
| 895 |
Response interface{} |
| 896 |
|
| 897 |
|
| 898 |
|
| 899 |
|
| 900 |
|
| 901 |
|
| 902 |
|
| 903 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Package, nextPageToken string, err error) |
| 904 |
} |
| 905 |
|
| 906 |
|
| 907 |
func (it *PackageIterator) PageInfo() *iterator.PageInfo { |
| 908 |
return it.pageInfo |
| 909 |
} |
| 910 |
|
| 911 |
|
| 912 |
|
| 913 |
func (it *PackageIterator) Next() (*artifactregistrypb.Package, error) { |
| 914 |
var item *artifactregistrypb.Package |
| 915 |
if err := it.nextFunc(); err != nil { |
| 916 |
return item, err |
| 917 |
} |
| 918 |
item = it.items[0] |
| 919 |
it.items = it.items[1:] |
| 920 |
return item, nil |
| 921 |
} |
| 922 |
|
| 923 |
func (it *PackageIterator) bufLen() int { |
| 924 |
return len(it.items) |
| 925 |
} |
| 926 |
|
| 927 |
func (it *PackageIterator) takeBuf() interface{} { |
| 928 |
b := it.items |
| 929 |
it.items = nil |
| 930 |
return b |
| 931 |
} |
| 932 |
|
| 933 |
|
| 934 |
type PythonPackageIterator struct { |
| 935 |
items []*artifactregistrypb.PythonPackage |
| 936 |
pageInfo *iterator.PageInfo |
| 937 |
nextFunc func() error |
| 938 |
|
| 939 |
|
| 940 |
|
| 941 |
|
| 942 |
Response interface{} |
| 943 |
|
| 944 |
|
| 945 |
|
| 946 |
|
| 947 |
|
| 948 |
|
| 949 |
|
| 950 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.PythonPackage, nextPageToken string, err error) |
| 951 |
} |
| 952 |
|
| 953 |
|
| 954 |
func (it *PythonPackageIterator) PageInfo() *iterator.PageInfo { |
| 955 |
return it.pageInfo |
| 956 |
} |
| 957 |
|
| 958 |
|
| 959 |
|
| 960 |
func (it *PythonPackageIterator) Next() (*artifactregistrypb.PythonPackage, error) { |
| 961 |
var item *artifactregistrypb.PythonPackage |
| 962 |
if err := it.nextFunc(); err != nil { |
| 963 |
return item, err |
| 964 |
} |
| 965 |
item = it.items[0] |
| 966 |
it.items = it.items[1:] |
| 967 |
return item, nil |
| 968 |
} |
| 969 |
|
| 970 |
func (it *PythonPackageIterator) bufLen() int { |
| 971 |
return len(it.items) |
| 972 |
} |
| 973 |
|
| 974 |
func (it *PythonPackageIterator) takeBuf() interface{} { |
| 975 |
b := it.items |
| 976 |
it.items = nil |
| 977 |
return b |
| 978 |
} |
| 979 |
|
| 980 |
|
| 981 |
type RepositoryIterator struct { |
| 982 |
items []*artifactregistrypb.Repository |
| 983 |
pageInfo *iterator.PageInfo |
| 984 |
nextFunc func() error |
| 985 |
|
| 986 |
|
| 987 |
|
| 988 |
|
| 989 |
Response interface{} |
| 990 |
|
| 991 |
|
| 992 |
|
| 993 |
|
| 994 |
|
| 995 |
|
| 996 |
|
| 997 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Repository, nextPageToken string, err error) |
| 998 |
} |
| 999 |
|
| 1000 |
|
| 1001 |
func (it *RepositoryIterator) PageInfo() *iterator.PageInfo { |
| 1002 |
return it.pageInfo |
| 1003 |
} |
| 1004 |
|
| 1005 |
|
| 1006 |
|
| 1007 |
func (it *RepositoryIterator) Next() (*artifactregistrypb.Repository, error) { |
| 1008 |
var item *artifactregistrypb.Repository |
| 1009 |
if err := it.nextFunc(); err != nil { |
| 1010 |
return item, err |
| 1011 |
} |
| 1012 |
item = it.items[0] |
| 1013 |
it.items = it.items[1:] |
| 1014 |
return item, nil |
| 1015 |
} |
| 1016 |
|
| 1017 |
func (it *RepositoryIterator) bufLen() int { |
| 1018 |
return len(it.items) |
| 1019 |
} |
| 1020 |
|
| 1021 |
func (it *RepositoryIterator) takeBuf() interface{} { |
| 1022 |
b := it.items |
| 1023 |
it.items = nil |
| 1024 |
return b |
| 1025 |
} |
| 1026 |
|
| 1027 |
|
| 1028 |
type RuleIterator struct { |
| 1029 |
items []*artifactregistrypb.Rule |
| 1030 |
pageInfo *iterator.PageInfo |
| 1031 |
nextFunc func() error |
| 1032 |
|
| 1033 |
|
| 1034 |
|
| 1035 |
|
| 1036 |
Response interface{} |
| 1037 |
|
| 1038 |
|
| 1039 |
|
| 1040 |
|
| 1041 |
|
| 1042 |
|
| 1043 |
|
| 1044 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Rule, nextPageToken string, err error) |
| 1045 |
} |
| 1046 |
|
| 1047 |
|
| 1048 |
func (it *RuleIterator) PageInfo() *iterator.PageInfo { |
| 1049 |
return it.pageInfo |
| 1050 |
} |
| 1051 |
|
| 1052 |
|
| 1053 |
|
| 1054 |
func (it *RuleIterator) Next() (*artifactregistrypb.Rule, error) { |
| 1055 |
var item *artifactregistrypb.Rule |
| 1056 |
if err := it.nextFunc(); err != nil { |
| 1057 |
return item, err |
| 1058 |
} |
| 1059 |
item = it.items[0] |
| 1060 |
it.items = it.items[1:] |
| 1061 |
return item, nil |
| 1062 |
} |
| 1063 |
|
| 1064 |
func (it *RuleIterator) bufLen() int { |
| 1065 |
return len(it.items) |
| 1066 |
} |
| 1067 |
|
| 1068 |
func (it *RuleIterator) takeBuf() interface{} { |
| 1069 |
b := it.items |
| 1070 |
it.items = nil |
| 1071 |
return b |
| 1072 |
} |
| 1073 |
|
| 1074 |
|
| 1075 |
type TagIterator struct { |
| 1076 |
items []*artifactregistrypb.Tag |
| 1077 |
pageInfo *iterator.PageInfo |
| 1078 |
nextFunc func() error |
| 1079 |
|
| 1080 |
|
| 1081 |
|
| 1082 |
|
| 1083 |
Response interface{} |
| 1084 |
|
| 1085 |
|
| 1086 |
|
| 1087 |
|
| 1088 |
|
| 1089 |
|
| 1090 |
|
| 1091 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Tag, nextPageToken string, err error) |
| 1092 |
} |
| 1093 |
|
| 1094 |
|
| 1095 |
func (it *TagIterator) PageInfo() *iterator.PageInfo { |
| 1096 |
return it.pageInfo |
| 1097 |
} |
| 1098 |
|
| 1099 |
|
| 1100 |
|
| 1101 |
func (it *TagIterator) Next() (*artifactregistrypb.Tag, error) { |
| 1102 |
var item *artifactregistrypb.Tag |
| 1103 |
if err := it.nextFunc(); err != nil { |
| 1104 |
return item, err |
| 1105 |
} |
| 1106 |
item = it.items[0] |
| 1107 |
it.items = it.items[1:] |
| 1108 |
return item, nil |
| 1109 |
} |
| 1110 |
|
| 1111 |
func (it *TagIterator) bufLen() int { |
| 1112 |
return len(it.items) |
| 1113 |
} |
| 1114 |
|
| 1115 |
func (it *TagIterator) takeBuf() interface{} { |
| 1116 |
b := it.items |
| 1117 |
it.items = nil |
| 1118 |
return b |
| 1119 |
} |
| 1120 |
|
| 1121 |
|
| 1122 |
type VersionIterator struct { |
| 1123 |
items []*artifactregistrypb.Version |
| 1124 |
pageInfo *iterator.PageInfo |
| 1125 |
nextFunc func() error |
| 1126 |
|
| 1127 |
|
| 1128 |
|
| 1129 |
|
| 1130 |
Response interface{} |
| 1131 |
|
| 1132 |
|
| 1133 |
|
| 1134 |
|
| 1135 |
|
| 1136 |
|
| 1137 |
|
| 1138 |
InternalFetch func(pageSize int, pageToken string) (results []*artifactregistrypb.Version, nextPageToken string, err error) |
| 1139 |
} |
| 1140 |
|
| 1141 |
|
| 1142 |
func (it *VersionIterator) PageInfo() *iterator.PageInfo { |
| 1143 |
return it.pageInfo |
| 1144 |
} |
| 1145 |
|
| 1146 |
|
| 1147 |
|
| 1148 |
func (it *VersionIterator) Next() (*artifactregistrypb.Version, error) { |
| 1149 |
var item *artifactregistrypb.Version |
| 1150 |
if err := it.nextFunc(); err != nil { |
| 1151 |
return item, err |
| 1152 |
} |
| 1153 |
item = it.items[0] |
| 1154 |
it.items = it.items[1:] |
| 1155 |
return item, nil |
| 1156 |
} |
| 1157 |
|
| 1158 |
func (it *VersionIterator) bufLen() int { |
| 1159 |
return len(it.items) |
| 1160 |
} |
| 1161 |
|
| 1162 |
func (it *VersionIterator) takeBuf() interface{} { |
| 1163 |
b := it.items |
| 1164 |
it.items = nil |
| 1165 |
return b |
| 1166 |
} |