Documentation ¶
Index ¶
- type Option
- type S3Storage
- func (s *S3Storage) Delete(ctx context.Context, image string) error
- func (s *S3Storage) Get(r *http.Request, image string) (*imagor.Blob, error)
- func (s *S3Storage) Path(image string) (string, bool)
- func (s *S3Storage) Put(ctx context.Context, image string, blob *imagor.Blob) error
- func (s *S3Storage) Stat(ctx context.Context, image string) (stat *imagor.Stat, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(h *S3Storage)
Option S3Storage option
func WithACL ¶
WithACL with ACL option https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#canned-acl
func WithExpiration ¶
WithExpiration with modified time expiration option
func WithPathPrefix ¶
WithPathPrefix with path prefix option
func WithStorageClass ¶
WithFileStorageClass with storage storage class option
type S3Storage ¶
type S3Storage struct { S3 *s3.S3 Uploader *s3manager.Uploader Downloader *s3manager.Downloader Bucket string BaseDir string PathPrefix string ACL string SafeChars string StorageClass string Expiration time.Duration // contains filtered or unexported fields }
S3Storage AWS S3 Storage implements imagor.Storage interface
Click to show internal directories.
Click to hide internal directories.