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

Method PresignedGetObject

api-presigned.go:69–74  ·  view source on GitHub ↗

PresignedGetObject - Returns a presigned URL to access an object data without credentials. URL can have a maximum expiry of upto 7days or a minimum of 1sec. Additionally you can override a set of response headers using the query parameters.

(ctx context.Context, bucketName, objectName string, expires time.Duration, reqParams url.Values)

Source from the content-addressed store, hash-verified

67// upto 7days or a minimum of 1sec. Additionally you can override
68// a set of response headers using the query parameters.
69func (c *Client) PresignedGetObject(ctx context.Context, bucketName, objectName string, expires time.Duration, reqParams url.Values) (u *url.URL, err error) {
70 if err = s3utils.CheckValidObjectName(objectName); err != nil {
71 return nil, err
72 }
73 return c.presignURL(ctx, http.MethodGet, bucketName, objectName, expires, reqParams, nil)
74}
75
76// PresignedHeadObject - Returns a presigned URL to access
77// object metadata without credentials. URL can have a maximum expiry

Callers 3

testFunctionalFunction · 0.95
testFunctionalV2Function · 0.95
mainFunction · 0.80

Calls 2

presignURLMethod · 0.95
CheckValidObjectNameFunction · 0.92

Tested by

no test coverage detected