Documentation ¶
Index ¶
- type AliBlobstore
- func (client *AliBlobstore) Delete(object string) error
- func (client *AliBlobstore) Exists(object string) (bool, error)
- func (client *AliBlobstore) Get(sourceObject string, destinationFilePath string) error
- func (client *AliBlobstore) Put(sourceFilePath string, destinationObject string) error
- func (client *AliBlobstore) Sign(object string, action string, expiredInSec int64) (string, error)
- type DefaultStorageClient
- func (dsc DefaultStorageClient) Delete(object string) error
- func (dsc DefaultStorageClient) Download(sourceObject string, destinationFilePath string) error
- func (dsc DefaultStorageClient) Exists(object string) (bool, 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) Get ¶
func (client *AliBlobstore) Get(sourceObject string, destinationFilePath string) error
type DefaultStorageClient ¶
type DefaultStorageClient struct {
// contains filtered or unexported fields
}
func (DefaultStorageClient) Delete ¶
func (dsc DefaultStorageClient) Delete( object string, ) error
func (DefaultStorageClient) Download ¶
func (dsc DefaultStorageClient) Download( sourceObject string, destinationFilePath string, ) error
func (DefaultStorageClient) Exists ¶
func (dsc DefaultStorageClient) Exists(object string) (bool, 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 Delete( object string, ) error Exists( object string, ) (bool, error) SignedUrlPut( object string, expiredInSec int64, ) (string, error) SignedUrlGet( object string, expiredInSec int64, ) (string, error) }
func NewStorageClient ¶
func NewStorageClient(storageConfig config.AliStorageConfig) (StorageClient, error)
Click to show internal directories.
Click to hide internal directories.