ListBucketInventoryConfigurations lists up to 100 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 - continuationToken: Token for pagination (empty stri
(ctx context.Context, bucket, continuationToken string)
| 211 | // |
| 212 | // Returns a list result with configurations and a continuation token for the next page, or an error. |
| 213 | func (c *Client) ListBucketInventoryConfigurations(ctx context.Context, bucket, continuationToken string) (lr *InventoryListResult, err error) { |
| 214 | if err := s3utils.CheckValidBucketName(bucket); err != nil { |
| 215 | return nil, err |
| 216 | } |
| 217 | reqMeta := makeInventoryReqMetadata(bucket, "continuation-token", continuationToken) |
| 218 | resp, err := c.executeMethod(ctx, http.MethodGet, reqMeta) |
| 219 | defer closeResponse(resp) |
| 220 | if err != nil { |
| 221 | return nil, err |
| 222 | } |
| 223 | if resp.StatusCode != http.StatusOK { |
| 224 | return nil, httpRespToErrorResponse(resp, bucket, "") |
| 225 | } |
| 226 | |
| 227 | decoder := json.NewDecoder(resp.Body) |
| 228 | err = decoder.Decode(&lr) |
| 229 | if err != nil { |
| 230 | return nil, err |
| 231 | } |
| 232 | return lr, nil |
| 233 | } |
| 234 | |
| 235 | // ListBucketInventoryConfigurationsIterator returns an iterator that lists all inventory configurations |
| 236 | // for a bucket. This is a MinIO-specific API and is not compatible with AWS S3. |
no test coverage detected