Documentation ¶
Index ¶
- type S3ObjectStore
- func (store *S3ObjectStore) AddFile(bucket, fileName string, src io.Reader) (*objectstore.UploadResult, error)
- func (store *S3ObjectStore) AddImage(bucket, fileName string, src io.Reader) (*objectstore.UploadResult, error)
- func (store *S3ObjectStore) DeleteFile(bucket, fileName string) error
- func (store *S3ObjectStore) DownloadFile(bucket, fileName string, file io.WriterAt) (int64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3ObjectStore ¶
type S3ObjectStore struct {
// contains filtered or unexported fields
}
S3ObjectStore defines object store for aws s3
func (*S3ObjectStore) AddFile ¶
func (store *S3ObjectStore) AddFile(bucket, fileName string, src io.Reader) (*objectstore.UploadResult, error)
AddFile will upload a single file to S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.
func (*S3ObjectStore) AddImage ¶
func (store *S3ObjectStore) AddImage(bucket, fileName string, src io.Reader) (*objectstore.UploadResult, error)
AddImage will upload a single image to S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.
func (*S3ObjectStore) DeleteFile ¶
func (store *S3ObjectStore) DeleteFile(bucket, fileName string) error
DeleteFile will delete a file from S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.
func (*S3ObjectStore) DownloadFile ¶
DownloadFile will download a file from S3, it will require a pre-built aws session and will set file info like content type and encryption on the uploaded file.