初始化框架
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
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")
|
||||
}
|
||||
Reference in New Issue
Block a user