ListBucketInventoryConfigurationsIterator returns an iterator that lists all inventory configurations for a bucket. This is a MinIO-specific API and is not compatible with AWS S3. Parameters: - ctx: Context for request cancellation and timeout - bucket: Name of the bucket Returns an iterator that
(ctx context.Context, bucket string)
| 242 | // Returns an iterator that yields InventoryConfiguration values and errors. The iterator automatically |
| 243 | // handles pagination and fetches all configurations. |
| 244 | func (c *Client) ListBucketInventoryConfigurationsIterator(ctx context.Context, bucket string) iter.Seq2[InventoryConfiguration, error] { |
| 245 | return func(yield func(InventoryConfiguration, error) bool) { |
| 246 | if err := s3utils.CheckValidBucketName(bucket); err != nil { |
| 247 | yield(InventoryConfiguration{}, err) |
| 248 | return |
| 249 | } |
| 250 | var continuationToken string |
| 251 | for { |
| 252 | listResult, err := c.ListBucketInventoryConfigurations(ctx, bucket, continuationToken) |
| 253 | if err != nil { |
| 254 | yield(InventoryConfiguration{}, err) |
| 255 | return |
| 256 | } |
| 257 | |
| 258 | for _, item := range listResult.Items { |
| 259 | if !yield(item, nil) { |
| 260 | return |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | if listResult.NextContinuationToken == "" { |
| 265 | return |
| 266 | } |
| 267 | continuationToken = listResult.NextContinuationToken |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | // InventoryJobStatus represents the status of an inventory job. |
| 273 | type InventoryJobStatus struct { |
nothing calls this directly
no test coverage detected