Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Secret *katana.Secret Host string Region string AccessKeyID string SecretKey string Bucket string Path string PartSize int64 }
Config is configuration for S3 uploader
type S3Uploader ¶
type S3Uploader struct {
// contains filtered or unexported fields
}
S3Uploader is S3 uploader instance
func NewUploader ¶
func NewUploader(config *Config) (*S3Uploader, error)
NewUploader creates new S3 uploader instance
func (*S3Uploader) SetDispatcher ¶
func (u *S3Uploader) SetDispatcher(d *events.Dispatcher)
SetDispatcher sets events dispatcher
func (*S3Uploader) Upload ¶
func (u *S3Uploader) Upload(file, fileName string) error
Upload uploads given file to S3 storage
func (*S3Uploader) Write ¶ added in v0.0.2
func (u *S3Uploader) Write(r io.ReadCloser, fileName string, fileSize int64) error
Write writes data from given reader to given file
Click to show internal directories.
Click to hide internal directories.