Documentation ¶
Index ¶
- Constants
- type Config
- type S3Client
- func (c S3Client) GetBucket() *string
- func (c S3Client) KeyFromURL(url *url.URL) (string, error)
- func (c S3Client) NewGetPresignedURL(key string) (*string, error)
- func (c S3Client) NewPutPresignedURL(fileType string) (*models.PreSignedURL, error)
- func (c S3Client) SetTagValueForKey(key string, tagName string, tagValue string) error
- func (c S3Client) TagValueForKey(key string, tagName string) (string, error)
- func (c S3Client) UploadFile(file io.Reader, key string) error
Constants ¶
const ( // PresignedKeyDuration TODO: Roll this into the Config struct PresignedKeyDuration = 15 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
S3Client is an MINT s3 client wrapper
func NewS3Client ¶
NewS3Client creates a new s3 service client
func NewS3ClientUsingClient ¶
NewS3ClientUsingClient creates a new s3 wrapper using the specified s3 client This is most useful for testing where the s3 client needs to be mocked out.
func (S3Client) GetBucket ¶
GetBucket returns a *string containing the S3 Bucket as defined by the S3Configuration
func (S3Client) KeyFromURL ¶
KeyFromURL extracts an S3 key from a URL.
func (S3Client) NewGetPresignedURL ¶
NewGetPresignedURL returns a pre-signed URL used for GET-ing objects
func (S3Client) NewPutPresignedURL ¶
func (c S3Client) NewPutPresignedURL(fileType string) (*models.PreSignedURL, error)
NewPutPresignedURL returns a pre-signed URL used for PUT-ing objects
func (S3Client) SetTagValueForKey ¶
SetTagValueForKey sets the tag value and returns an error if any was encountered.
func (S3Client) TagValueForKey ¶
TagValueForKey returns the tag value and if that tag was found for the specified key and tag name. If no value is found, returns an empty string.