Documentation
¶
Index ¶
- type Config
- type S3Object
- type S3Session
- func (s *S3Session) GetFile(w http.ResponseWriter, bucket, filekey string, cacheDurinSeconds int) (int64, error)
- func (s *S3Session) Hash(filekey, lastmodified string) string
- func (s *S3Session) HeadFile(bucket, filekey string) (time.Time, error)
- func (s *S3Session) ListObjects(bucketName, folder string) ([]S3Object, error)
- func (s *S3Session) RemoveFile(bucket, remoteFileName string) error
- func (s *S3Session) RemoveFolder(bucket, folder string) error
- func (s *S3Session) UploadFile(fileToUpload, remoteFileName, bucket, contentType string) error
- func (s *S3Session) UploadLargeFile(fileToUpload, remoteFileName, bucket, contentType string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3Session ¶
func GetSession ¶
GetSession creates a new AWS session. Can be reused to upload multiple files
func (*S3Session) HeadFile ¶
HeadFile make head request to S3 storage and get metadata of file without getting file contents
func (*S3Session) ListObjects ¶
func (*S3Session) RemoveFile ¶
RemoveFile will remove given remote-file from S3 storage
func (*S3Session) RemoveFolder ¶
RemoveFolder will remove given folder and all of it's files from S3
func (*S3Session) UploadFile ¶
UploadFile 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 (*S3Session) UploadLargeFile ¶
UploadLargeFile will upload a single large file to S3 as multipart uplaod, it will require a pre-built aws session
Click to show internal directories.
Click to hide internal directories.