Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteObject ¶
DeleteObject deletes a file from S3.
Types ¶
type ErrS3InitializationFailed ¶
type ErrS3InitializationFailed struct{}
func (ErrS3InitializationFailed) Error ¶
func (e ErrS3InitializationFailed) Error() string
type LocalCacheError ¶ added in v1.3.3
type LocalCacheError struct{}
func (LocalCacheError) Error ¶ added in v1.3.3
func (e LocalCacheError) Error() string
type ObjectInfo ¶
type ObjectInfo struct {
CachePath string
Body io.ReadCloser
ContentLength int64
ContentType string
}
ObjectInfo holds metadata about a retrieved object.
func GetObject ¶
func GetObject(ctx context.Context, key string) (*ObjectInfo, error)
GetObject retrieves a file directly from S3.
func GetObjectViaCache ¶ added in v1.3.3
func GetObjectViaCache(ctx context.Context, key string) (*ObjectInfo, error)
func GetObjectViaProxy ¶
func GetObjectViaProxy(ctx context.Context, key string) (*ObjectInfo, error)
GetObjectViaProxy retrieves a file via CDN if configured, otherwise falls back to S3.
Click to show internal directories.
Click to hide internal directories.