2025-10-15 19:44:41 +03:00
|
|
|
package interfaces
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"io"
|
|
|
|
|
"net/url"
|
|
|
|
|
"time"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type MediaStorage interface {
|
2025-10-15 21:34:32 +03:00
|
|
|
CheckBucketExists(bucketName string) (bool, error)
|
2025-10-15 19:44:41 +03:00
|
|
|
Upload(ctx context.Context, bucket, object string, reader io.Reader, size int64) error
|
2025-10-19 19:43:33 +03:00
|
|
|
GetPublicLink(ctx context.Context, bucket, object string) (string, string, error)
|
|
|
|
|
GetPresignedLink(ctx context.Context, bucket, object string, expires time.Duration, params url.Values) (string, error)
|
2025-10-15 19:44:41 +03:00
|
|
|
Delete(ctx context.Context, bucket, object string) error
|
2025-10-17 23:47:48 +03:00
|
|
|
GetObjectEtag(ctx context.Context, bucketName, object string) (string, error)
|
2025-10-15 19:44:41 +03:00
|
|
|
}
|