gosdk/storage/storage.go

21 lines
483 B
Go
Raw Normal View History

2024-01-25 14:59:48 +08:00
package storage
import "time"
type ObjectInfo struct {
Size int64
MimeType string
Hash string
PutTime int64
}
type Storage interface {
Put(fileName, objectName string, onProcess func(fsize, uploaded int64)) error
Get(objectName, fileName string) error
Del(objectName string) error
Url(objectName string, expire time.Duration) string
Stat(objectName string) (*ObjectInfo, error)
List(objectPrefix string) ([]string, error)
Fetch(url, objectName string) error
}