created media storage package + interface
This commit is contained in:
parent
218e7d652f
commit
1a67c02e00
3 changed files with 102 additions and 0 deletions
15
internal/interfaces/mediaStorage.go
Normal file
15
internal/interfaces/mediaStorage.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue