39 lines
897 B
Go
39 lines
897 B
Go
package aws
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"io"
|
|
"time"
|
|
|
|
"code.yun.ink/pkg/storagex"
|
|
)
|
|
|
|
var _ storagex.Uploader = (*S3Uploader)(nil)
|
|
|
|
type S3Factory struct{}
|
|
|
|
func (f *S3Factory) Create(cfg storagex.Config) (storagex.Uploader, error) {
|
|
return &S3Uploader{}, nil
|
|
}
|
|
|
|
type S3Uploader struct {
|
|
storagex.UploaderImpl
|
|
}
|
|
|
|
func (o *S3Uploader) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error) {
|
|
return nil, errors.New("not implemented")
|
|
}
|
|
|
|
func (o *S3Uploader) PutObject(ctx context.Context, objectKey string, value io.Reader) (*storagex.PutResult, error) {
|
|
return nil, errors.New("not implemented")
|
|
}
|
|
|
|
func (o *S3Uploader) GetUrl(ctx context.Context, objectKey string, expire time.Duration) (string, error) {
|
|
return "", errors.New("not implemented")
|
|
}
|
|
|
|
func (o *S3Uploader) DeleteObject(ctx context.Context, objectKey string) error {
|
|
return errors.New("not implemented")
|
|
}
|