16 lines
406 B
Go
16 lines
406 B
Go
|
|
package interfaces
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
"context"
|
|||
|
|
"io"
|
|||
|
|
"net/url"
|
|||
|
|
"time"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
type MediaStorage interface {
|
|||
|
|
СreateBucketIfNotExists(bucketName string) error
|
|||
|
|
Upload(ctx context.Context, bucket, object string, reader io.Reader, size int64) error
|
|||
|
|
Get(ctx context.Context, bucket, object string, expires time.Duration, params url.Values) (*url.URL, error)
|
|||
|
|
Delete(ctx context.Context, bucket, object string) error
|
|||
|
|
}
|