Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PresignConfig ¶
type PresignConfig struct {
// contains filtered or unexported fields
}
type PresignOption ¶
type PresignOption func(*PresignConfig)
func SetCacheDuration ¶
func SetCacheDuration(duration time.Duration) PresignOption
func SetDownloadOptions ¶ added in v1.1.1
func SetDownloadOptions(fileName string, contentType string) PresignOption
func SetExpirationDuration ¶
func SetExpirationDuration(duration time.Duration) PresignOption
type S3FileStore ¶
type S3FileStore struct {
Client *s3.Client
BucketName string
DefaultObjectCacheDuration *time.Duration
DefaultPresignExpirationDuration time.Duration
}
func New ¶
func New(bucketName string, region string) *S3FileStore
func (*S3FileStore) PresignedGetUrl ¶
func (s *S3FileStore) PresignedGetUrl(key string, opts ...PresignOption) (string, error)
func (*S3FileStore) PresignedPutUrl ¶
func (s *S3FileStore) PresignedPutUrl( key string, opts ...PresignOption, ) (string, error)
Click to show internal directories.
Click to hide internal directories.