Documentation ¶
Index ¶
- func GetStorageProvider(providerType string, clientId string, clientSecret string, region string, ...) (oss.StorageInterface, error)
- func NewAliyunOssStorageProvider(clientId string, clientSecret string, region string, bucket string, ...) oss.StorageInterface
- func NewAwsS3StorageProvider(clientId string, clientSecret string, region string, bucket string, ...) oss.StorageInterface
- func NewAzureBlobStorageProvider(clientId string, clientSecret string, region string, bucket string, ...) oss.StorageInterface
- func NewCasdoorStorageProvider(providerType string, clientId string, clientSecret string, region string, ...) oss.StorageInterface
- func NewGoogleCloudStorageProvider(clientSecret string, bucket string, endpoint string) oss.StorageInterface
- func NewMinIOS3StorageProvider(clientId string, clientSecret string, region string, bucket string, ...) oss.StorageInterface
- func NewQiniuCloudKodoStorageProvider(clientId string, clientSecret string, region string, bucket string, ...) (oss.StorageInterface, error)
- func NewSynologyNasStorageProvider(clientId string, clientSecret string, endpoint string) oss.StorageInterface
- func NewTencentCloudCosStorageProvider(clientId string, clientSecret string, region string, bucket string, ...) oss.StorageInterface
- type LocalFileSystemProvider
- func (sp LocalFileSystemProvider) Delete(path string) error
- func (sp LocalFileSystemProvider) Get(path string) (*os.File, error)
- func (sp LocalFileSystemProvider) GetEndpoint() string
- func (sp LocalFileSystemProvider) GetFullPath(path string) string
- func (sp LocalFileSystemProvider) GetStream(path string) (io.ReadCloser, error)
- func (sp LocalFileSystemProvider) GetURL(path string) (url string, err error)
- func (sp LocalFileSystemProvider) List(path string) ([]*oss.Object, error)
- func (sp LocalFileSystemProvider) Put(path string, reader io.Reader) (*oss.Object, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStorageProvider ¶
func NewAwsS3StorageProvider ¶
func NewAzureBlobStorageProvider ¶ added in v1.47.0
func NewCasdoorStorageProvider ¶ added in v1.682.0
func NewGoogleCloudStorageProvider ¶ added in v1.384.0
func NewGoogleCloudStorageProvider(clientSecret string, bucket string, endpoint string) oss.StorageInterface
func NewMinIOS3StorageProvider ¶ added in v1.94.0
func NewQiniuCloudKodoStorageProvider ¶ added in v1.384.0
func NewSynologyNasStorageProvider ¶ added in v1.500.0
func NewSynologyNasStorageProvider(clientId string, clientSecret string, endpoint string) oss.StorageInterface
Types ¶
type LocalFileSystemProvider ¶ added in v1.411.0
type LocalFileSystemProvider struct {
BaseDir string
}
LocalFileSystemProvider file system storage
func NewLocalFileSystemStorageProvider ¶
func NewLocalFileSystemStorageProvider() *LocalFileSystemProvider
NewLocalFileSystemStorageProvider initialize the local file system storage
func (LocalFileSystemProvider) Delete ¶ added in v1.411.0
func (sp LocalFileSystemProvider) Delete(path string) error
Delete delete file
func (LocalFileSystemProvider) Get ¶ added in v1.411.0
func (sp LocalFileSystemProvider) Get(path string) (*os.File, error)
Get receive file with given path
func (LocalFileSystemProvider) GetEndpoint ¶ added in v1.411.0
func (sp LocalFileSystemProvider) GetEndpoint() string
GetEndpoint get endpoint, LocalFileSystemProvider's endpoint is /
func (LocalFileSystemProvider) GetFullPath ¶ added in v1.411.0
func (sp LocalFileSystemProvider) GetFullPath(path string) string
GetFullPath get full path from absolute/relative path
func (LocalFileSystemProvider) GetStream ¶ added in v1.411.0
func (sp LocalFileSystemProvider) GetStream(path string) (io.ReadCloser, error)
GetStream get file as stream
func (LocalFileSystemProvider) GetURL ¶ added in v1.411.0
func (sp LocalFileSystemProvider) GetURL(path string) (url string, err error)
GetURL get public accessible URL
Click to show internal directories.
Click to hide internal directories.