Documentation ¶
Index ¶
- Constants
- type CustomReader
- type CustomWriter
- type S3CredProvider
- type S3ctx
- func (s *S3ctx) CompleteUploadedParts(bname, bkey, uploadID string, parts []string) error
- func (s *S3ctx) CreateBucket(bname string) error
- func (s *S3ctx) DeleteBucket(bname string) error
- func (s *S3ctx) DeleteObject(bname, bkey string) error
- func (s *S3ctx) DownloadFile(fname, bname, bkey string, objMaxSize int64, doneParts types.DownloadedParts, ...) (types.DownloadedParts, error)
- func (s *S3ctx) DownloadFileByChunks(fname, bname, bkey string) (io.ReadCloser, int64, error)
- func (s *S3ctx) GetObjectMD5(bname, bkey string) (error, string)
- func (s *S3ctx) GetObjectMetaData(bname, bkey string) (int64, string, error)
- func (s *S3ctx) GetObjectSize(bname, bkey string) (error, int64)
- func (s *S3ctx) GetObjectURL(bname, bkey string) (error, string)
- func (s *S3ctx) GetSignedURL(bname, bkey string, duration time.Duration) (string, error)
- func (s *S3ctx) IsBucketAvailable(bname string) (error, bool)
- func (s *S3ctx) ListImages(bname string, prgNotify types.StatsNotifChan) ([]string, error)
- func (s *S3ctx) UploadFile(fname, bname, bkey string, compression bool, prgNotify types.StatsNotifChan) (string, error)
- func (s *S3ctx) UploadPart(bname, bkey string, chunk []byte, partNumber int64, uploadID string) (string, string, error)
- func (s *S3ctx) WaitUntilBucketExists(bname string) bool
- func (s *S3ctx) WithContext(cancelContext context.Context) *S3ctx
- func (s *S3ctx) WithLogger(logger types.Logger) *S3ctx
Constants ¶
View Source
const ( //S3Concurrency parallels parts download limit S3Concurrency = 5 //S3PartSize size of part to download S3PartSize = 5 * 1024 * 1024 //S3PartLeaveError leaves parts to manual resolve errors on uploads S3PartLeaveError = true )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomReader ¶
type CustomReader struct {
// contains filtered or unexported fields
}
CustomReader contains the details of Chunks being downloaded
type CustomWriter ¶
type CustomWriter struct {
// contains filtered or unexported fields
}
type S3CredProvider ¶
type S3CredProvider struct {
// contains filtered or unexported fields
}
func (*S3CredProvider) IsExpired ¶
func (p *S3CredProvider) IsExpired() bool
func (*S3CredProvider) Retrieve ¶
func (p *S3CredProvider) Retrieve() (credentials.Value, error)
type S3ctx ¶
type S3ctx struct {
// contains filtered or unexported fields
}
func (*S3ctx) CompleteUploadedParts ¶
CompleteUploadedParts is used to complete the multiple uploaded parts
func (*S3ctx) CreateBucket ¶
func (*S3ctx) DeleteBucket ¶
func (*S3ctx) DeleteObject ¶
func (*S3ctx) DownloadFile ¶
func (s *S3ctx) DownloadFile(fname, bname, bkey string, objMaxSize int64, doneParts types.DownloadedParts, prgNotify types.StatsNotifChan) (types.DownloadedParts, error)
func (*S3ctx) DownloadFileByChunks ¶
DownloadFileByChunks downloads the file from s3 chunk by chunk and passes it to the caller
func (*S3ctx) GetObjectMetaData ¶
func (*S3ctx) GetSignedURL ¶
GetSignedURL is used to generate the URI which can be used to access the resource until the URI expries
func (*S3ctx) ListImages ¶
func (*S3ctx) UploadFile ¶
func (*S3ctx) UploadPart ¶
func (s *S3ctx) UploadPart(bname, bkey string, chunk []byte, partNumber int64, uploadID string) (string, string, error)
UploadPart is used to upload the given chunk of data into the Multipart file
func (*S3ctx) WaitUntilBucketExists ¶
func (*S3ctx) WithContext ¶
WithContext can be used to pass a context e.g., for cancellation
Click to show internal directories.
Click to hide internal directories.