Documentation ¶
Overview ¶
Package s3 this package in intention to hide aws s3 storage implementation under the interface that will give you the ability to user other cloud providers in the future
Index ¶
- type FileInfo
- func (fi FileInfo) AcceptRanges() string
- func (fi FileInfo) ActiveStatus() string
- func (fi FileInfo) BucketKeyEnabled() bool
- func (fi FileInfo) CacheControl() string
- func (fi FileInfo) ContentDisposition() string
- func (fi FileInfo) ContentEncoding() string
- func (fi FileInfo) ContentLanguage() string
- func (fi FileInfo) ContentType() string
- func (fi FileInfo) DeleteMarker() bool
- func (fi FileInfo) ETag() string
- func (fi FileInfo) Expiration() string
- func (fi FileInfo) Expires() string
- func (fi FileInfo) LastModified() time.Time
- func (fi FileInfo) Metadata() map[string]*string
- func (fi FileInfo) MissingMeta() int64
- func (fi FileInfo) ObjectLockLegalHoldStatus() string
- func (fi FileInfo) ObjectLockMode() string
- func (fi FileInfo) ObjectLockRetainUntilDate() time.Time
- func (fi FileInfo) PartsCount() int64
- func (fi FileInfo) ReplicationStatus() string
- func (fi FileInfo) RequestCharged() string
- func (fi FileInfo) Restore() string
- func (fi FileInfo) SSECustomerAlgorithm() string
- func (fi FileInfo) SSECustomerKeyMD5() string
- func (fi FileInfo) SSEKMSKeyId() string
- func (fi FileInfo) ServerSideEncryption() string
- func (fi FileInfo) Size() int64
- func (fi FileInfo) StorageClass() string
- func (fi FileInfo) VersionId() string
- func (fi FileInfo) WebsiteRedirectLocation() string
- type Storage
- func (s *Storage) Copy(src string, dst string, options ...map[string]interface{}) error
- func (s *Storage) CopyWithContext(ctx aws.Context, src string, dst string, options ...map[string]interface{}) error
- func (s *Storage) Create(_ string) (io.ReadWriteCloser, error)
- func (s *Storage) Delete(path string) error
- func (s *Storage) DeleteWithContext(ctx aws.Context, path string) error
- func (s *Storage) Get(path string) (io.ReadCloser, error)
- func (s *Storage) GetWithContext(ctx aws.Context, path string) (io.ReadCloser, error)
- func (s *Storage) Link(path string, expire time.Duration) (string, error)
- func (s *Storage) List(path string, options ...map[string]interface{}) ([]string, error)
- func (s *Storage) ListWithContext(ctx aws.Context, path string, options ...map[string]interface{}) ([]string, error)
- func (s *Storage) Put(path string, body io.Reader) error
- func (s *Storage) PutWithContext(ctx aws.Context, path string, body io.Reader) error
- func (s *Storage) Stat(path string) (storage.FileInfo, error)
- func (s *Storage) Walk(path string, callback func(path string)) error
- func (s *Storage) WalkWithContext(ctx aws.Context, path string, callback func(path string)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
FileInfo struct to get file information
func (FileInfo) AcceptRanges ¶ added in v1.1.9
AcceptRanges get accept-ranges
func (FileInfo) ActiveStatus ¶ added in v1.1.9
ActiveStatus get ActiveStatus
func (FileInfo) BucketKeyEnabled ¶ added in v1.1.9
BucketKeyEnabled get BucketKeyEnabled
func (FileInfo) CacheControl ¶ added in v1.1.9
CacheControl get Cache-Control
func (FileInfo) ContentDisposition ¶ added in v1.1.9
ContentDisposition get Content-Disposition
func (FileInfo) ContentEncoding ¶ added in v1.1.9
ContentEncoding get Content-Encoding
func (FileInfo) ContentLanguage ¶ added in v1.1.9
ContentLanguage get Content-Language
func (FileInfo) ContentType ¶ added in v1.1.9
ContentType get Content-Type
func (FileInfo) DeleteMarker ¶ added in v1.1.9
DeleteMarker get DeleteMarker
func (FileInfo) Expiration ¶ added in v1.1.9
Expiration get Expiration
func (FileInfo) LastModified ¶ added in v1.1.9
LastModified get Last-Modified
func (FileInfo) MissingMeta ¶ added in v1.1.9
MissingMeta get MissingMeta
func (FileInfo) ObjectLockLegalHoldStatus ¶ added in v1.1.9
ObjectLockLegalHoldStatus get ObjectLockLegalHoldStatus
func (FileInfo) ObjectLockMode ¶ added in v1.1.9
ObjectLockMode get ObjectLockMode
func (FileInfo) ObjectLockRetainUntilDate ¶ added in v1.1.9
ObjectLockRetainUntilDate get ObjectLockRetainUntilDate
func (FileInfo) PartsCount ¶ added in v1.1.9
PartsCount get PartsCount
func (FileInfo) ReplicationStatus ¶ added in v1.1.9
ReplicationStatus get ReplicationStatus
func (FileInfo) RequestCharged ¶ added in v1.1.9
RequestCharged get RequestCharged
func (FileInfo) SSECustomerAlgorithm ¶ added in v1.1.9
SSECustomerAlgorithm get SSECustomerAlgorithm
func (FileInfo) SSECustomerKeyMD5 ¶ added in v1.1.9
SSECustomerKeyMD5 get SSECustomerKeyMD5
func (FileInfo) SSEKMSKeyId ¶ added in v1.1.9
SSEKMSKeyId get SSEKMSKeyId
func (FileInfo) ServerSideEncryption ¶ added in v1.1.9
ServerSideEncryption get ServerSideEncryption
func (FileInfo) StorageClass ¶ added in v1.1.9
StorageClass get StorageClass
func (FileInfo) WebsiteRedirectLocation ¶ added in v1.1.9
WebsiteRedirectLocation get WebsiteRedirectLocation
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage interface adaptation for s3
func NewStorage ¶
NewStorage create new storage instance
func (*Storage) Copy ¶ added in v1.1.8
Copy copies an object from the a path in a bucket to another path in the same or different bucket. 'src' and 'dst' are absolute paths of the file.
func (*Storage) CopyWithContext ¶ added in v1.1.8
func (s *Storage) CopyWithContext(ctx aws.Context, src string, dst string, options ...map[string]interface{}) error
CopyWithContext copies an object from the a path in a bucket to another path in the same or different bucket. 'src' and 'dst' are absolute paths of the file.
func (*Storage) Create ¶
func (s *Storage) Create(_ string) (io.ReadWriteCloser, error)
Create for create interface
func (*Storage) DeleteWithContext ¶ added in v1.1.6
DeleteWithContext removes object from s3
func (*Storage) Get ¶
func (s *Storage) Get(path string) (io.ReadCloser, error)
Get file from s3 bucket
func (*Storage) GetWithContext ¶ added in v1.1.6
GetWithContext gets file from s3 bucket
func (*Storage) ListWithContext ¶ added in v1.1.6
func (s *Storage) ListWithContext(ctx aws.Context, path string, options ...map[string]interface{}) ([]string, error)
ListWithContext reads the path content or prefixes
func (*Storage) PutWithContext ¶ added in v1.1.6
PutWithContext puts file into s3 bucket