method

Backend.SignedURL

Create a SigV4 GET URL for a private object.

Arguments

ArgumentTypeDescription
ctxcontext.ContextThe ctx value.
keystringThe key value.
ttltime.DurationThe ttl value.

Returns

The declared result.

(string, error)

How it works

ttl must be between one second and seven days. Object keys are validated before signing.

Full signature

func (backend *Backend) SignedURL( ctx context.Context, key string, ttl time.Duration, ) (string, error)

Source adapters/storage/s3/s3.go:230

Related types

  • Backend

    An S3 storage and URL-signing backend.