Files
kubesphere/pkg/simple/client/s3/interface.go
2020-01-02 20:52:00 +08:00

18 lines
405 B
Go

package s3
import (
"io"
"time"
)
type Interface interface {
// Upload uploads a object to storage and returns object location if succeeded
Upload(key string, body io.Reader) (string, error)
// Get retrieves and object's downloadable location if succeeded
Get(key string, fileName string, expire time.Duration) (string, error)
// Delete deletes an object by its key
Delete(key string) error
}