Files
2026-03-09 11:44:51 +08:00

42 lines
1.0 KiB
Go

package aliyun
import (
"context"
"errors"
"io"
"time"
"code.yun.ink/pkg/storagex"
)
// 确保实现了 storage.Uploader 接口
var _ storagex.Uploader = (*AliyunUploader)(nil)
type AliyunFactory struct{}
// Create 根据配置创建 AliyunUploader 实例
func (f *AliyunFactory) Create(cfg storagex.Config) (storagex.Uploader, error) {
return &AliyunUploader{}, nil
}
type AliyunUploader struct {
storagex.UploaderImpl
}
func (o *AliyunUploader) GetObject(ctx context.Context, objectKey string) (io.ReadCloser, error) {
return nil, errors.New("not implemented")
}
func (o *AliyunUploader) PutObject(ctx context.Context, objectKey string, value io.Reader) (*storagex.PutResult, error) {
return nil, errors.New("not implemented")
}
func (o *AliyunUploader) GetUrl(ctx context.Context, objectKey string, expire time.Duration) (string, error) {
return "", errors.New("not implemented")
}
func (o *AliyunUploader) DeleteObject(ctx context.Context, objectKey string) error {
return errors.New("not implemented")
}