storage

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

A Storage provides the ability to pre-sign S3 urls

func NewStorage

func NewStorage(awsSession *session.Session) *Storage

NewStorage creates a new instance of Storage which can provide presigned URLs for AWS S3 buckets

func (Storage) GetPresignedURL

func (s Storage) GetPresignedURL(method string, uri string, expiry time.Duration) (*string, time.Time, error)

GetPresignedURL pre-signs given S3 url for the access via given HTTP method. The generated pre-signed URL will expire after provided time duration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL