MCPcopy
hub / github.com/minio/minio-go / makeInventoryReqMetadata

Function makeInventoryReqMetadata

api-inventory-ext.go:36–50  ·  view source on GitHub ↗

This file contains the inventory API extension for MinIO server. It is not compatible with AWS S3.

(bucket string, urlParams ...string)

Source from the content-addressed store, hash-verified

34// compatible with AWS S3.
35
36func makeInventoryReqMetadata(bucket string, urlParams ...string) requestMetadata {
37 urlValues := make(url.Values)
38 urlValues.Set("minio-inventory", "")
39
40 // If an odd number of parameters is given, we skip the last pair to avoid
41 // an out of bounds access.
42 for i := 0; i+1 < len(urlParams); i += 2 {
43 urlValues.Set(urlParams[i], urlParams[i+1])
44 }
45
46 return requestMetadata{
47 bucketName: bucket,
48 queryValues: urlValues,
49 }
50}
51
52// GenerateInventoryConfigYAML generates a YAML template for an inventory configuration.
53// This is a MinIO-specific API and is not compatible with AWS S3.

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected