Documentation ¶
Index ¶
- Constants
- type MinioClient
- type Storage
- func (s *Storage) CheckURL(objectURL string) (string, error)
- func (s *Storage) CopyFile(srcURL string, objectURL string) error
- func (s *Storage) Download(objectURL string, localPath string) (string, error)
- func (s *Storage) IsLocalURL(srcURL string) (bool, error)
- func (s *Storage) SetCredential(credential string) error
- func (s *Storage) Upload(localPath string, objectURL string) error
Constants ¶
View Source
const ( // S3Prefix defines that prefix of url is s3 S3Prefix = "s3" // LocalPrefix defines that prefix of url is local host LocalPrefix = "" )
View Source
const MaxTimeOut = 100 * time.Second
MaxTimeOut is max deadline time of client working
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MinioClient ¶
type MinioClient struct {
Client *minio.Client
}
MinioClient defines a minio client
type Storage ¶
type Storage struct { MinioClient *MinioClient IsLocalStorage bool }
func (*Storage) IsLocalURL ¶
IsLocalURL checks whether the url is local url
func (*Storage) SetCredential ¶
SetCredential sets credential of the storage service
Click to show internal directories.
Click to hide internal directories.