api/internal/interfaces/mediaStorage.go
nquidox 3298602a23
All checks were successful
/ Make image (push) Successful in 1m31s
switch from pre-signed to public images
2025-10-19 19:43:33 +03:00

17 lines
580 B
Go

package interfaces
import (
"context"
"io"
"net/url"
"time"
)
type MediaStorage interface {
CheckBucketExists(bucketName string) (bool, error)
Upload(ctx context.Context, bucket, object string, reader io.Reader, size int64) error
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)
Delete(ctx context.Context, bucket, object string) error
GetObjectEtag(ctx context.Context, bucketName, object string) (string, error)
}