Documentation
¶
Index ¶
- type AliBlobstore
- func (client *AliBlobstore) Copy(srcBlob string, dstBlob string) error
- func (client *AliBlobstore) Delete(object string) error
- func (client *AliBlobstore) DeleteRecursive(prefix string) error
- func (client *AliBlobstore) EnsureStorageExists() error
- func (client *AliBlobstore) Exists(object string) (bool, error)
- func (client *AliBlobstore) Get(sourceObject string, dest string) error
- func (client *AliBlobstore) List(prefix string) ([]string, error)
- func (client *AliBlobstore) Properties(dest string) error
- func (client *AliBlobstore) Put(sourceFilePath string, destinationObject string) error
- func (client *AliBlobstore) Sign(object string, action string, expiration time.Duration) (string, error)
- type BlobProperties
- type DefaultStorageClient
- func (dsc DefaultStorageClient) Copy(sourceObject string, destinationObject string) error
- func (dsc DefaultStorageClient) Delete(object string) error
- func (dsc DefaultStorageClient) DeleteRecursive(prefix string) error
- func (dsc DefaultStorageClient) Download(sourceObject string, destinationFilePath string) error
- func (dsc DefaultStorageClient) EnsureBucketExists() error
- func (dsc DefaultStorageClient) Exists(object string) (bool, error)
- func (dsc DefaultStorageClient) List(prefix string) ([]string, error)
- func (dsc DefaultStorageClient) Properties(object string) error
- func (dsc DefaultStorageClient) SignedUrlGet(object string, expiredInSec int64) (string, error)
- func (dsc DefaultStorageClient) SignedUrlPut(object string, expiredInSec int64) (string, error)
- func (dsc DefaultStorageClient) Upload(sourceFilePath string, sourceFileMD5 string, destinationObject string) error
- type StorageClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliBlobstore ¶
type AliBlobstore struct {
// contains filtered or unexported fields
}
func New ¶
func New(storageClient StorageClient) (AliBlobstore, error)
func (*AliBlobstore) Delete ¶
func (client *AliBlobstore) Delete(object string) error
func (*AliBlobstore) DeleteRecursive ¶
func (client *AliBlobstore) DeleteRecursive(prefix string) error
func (*AliBlobstore) EnsureStorageExists ¶
func (client *AliBlobstore) EnsureStorageExists() error
func (*AliBlobstore) Properties ¶
func (client *AliBlobstore) Properties(dest string) error
type BlobProperties ¶
type DefaultStorageClient ¶
type DefaultStorageClient struct {
// contains filtered or unexported fields
}
func (DefaultStorageClient) Copy ¶
func (dsc DefaultStorageClient) Copy(sourceObject string, destinationObject string) error
func (DefaultStorageClient) Delete ¶
func (dsc DefaultStorageClient) Delete(object string) error
func (DefaultStorageClient) DeleteRecursive ¶
func (dsc DefaultStorageClient) DeleteRecursive(prefix string) error
func (DefaultStorageClient) Download ¶
func (dsc DefaultStorageClient) Download(sourceObject string, destinationFilePath string) error
func (DefaultStorageClient) EnsureBucketExists ¶
func (dsc DefaultStorageClient) EnsureBucketExists() error
func (DefaultStorageClient) Exists ¶
func (dsc DefaultStorageClient) Exists(object string) (bool, error)
func (DefaultStorageClient) List ¶
func (dsc DefaultStorageClient) List(prefix string) ([]string, error)
func (DefaultStorageClient) Properties ¶
func (dsc DefaultStorageClient) Properties(object string) error
func (DefaultStorageClient) SignedUrlGet ¶
func (dsc DefaultStorageClient) SignedUrlGet(object string, expiredInSec int64) (string, error)
func (DefaultStorageClient) SignedUrlPut ¶
func (dsc DefaultStorageClient) SignedUrlPut(object string, expiredInSec int64) (string, error)
type StorageClient ¶
type StorageClient interface {
Upload(
sourceFilePath string,
sourceFileMD5 string,
destinationObject string,
) error
Download(
sourceObject string,
destinationFilePath string,
) error
Copy(
srcBlob string,
destBlob string,
) error
Delete(
object string,
) error
DeleteRecursive(
objects string,
) error
Exists(
object string,
) (bool, error)
SignedUrlPut(
object string,
expiredInSec int64,
) (string, error)
SignedUrlGet(
object string,
expiredInSec int64,
) (string, error)
List(
prefix string,
) ([]string, error)
Properties(
object string,
) error
EnsureBucketExists() error
}
func NewStorageClient ¶
func NewStorageClient(storageConfig config.AliStorageConfig) (StorageClient, error)
Click to show internal directories.
Click to hide internal directories.