Добавьте S3-вложения с дедупликацией и безопасной сверкой хранилищ
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package attachment
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
"time"
|
||||
)
|
||||
|
||||
var ErrObjectMissing = errors.New("object missing")
|
||||
|
||||
type Object struct {
|
||||
Key string
|
||||
Size int64
|
||||
Modified time.Time
|
||||
}
|
||||
|
||||
type Blobs interface {
|
||||
Put(context.Context, string, io.Reader, int64, string) error
|
||||
Open(context.Context, string) (io.ReadCloser, error)
|
||||
Stat(context.Context, string) (Object, error)
|
||||
Copy(context.Context, string, string) error
|
||||
Delete(context.Context, string) error
|
||||
List(context.Context, string, string, int) ([]Object, error)
|
||||
}
|
||||
Reference in New Issue
Block a user