15 lines
347 B
Go
15 lines
347 B
Go
|
|
package storage
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
"io"
|
||
|
|
"time"
|
||
|
|
)
|
||
|
|
|
||
|
|
type Client interface {
|
||
|
|
Upload(ctx context.Context, key string, body io.Reader, contentType string) error
|
||
|
|
Delete(ctx context.Context, key string) error
|
||
|
|
PresignUpload(ctx context.Context, key string, contentType string, expires time.Duration) (string, error)
|
||
|
|
PublicURL(key string) string
|
||
|
|
}
|