Documentation ¶
Index ¶
- func GetStorageProvider(providerType string, clientId string, clientSecret string, region string, ...) oss.StorageInterface
- 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 NewLocalFileSystemStorageProvider(clientId string, clientSecret string, region string, bucket string, ...) oss.StorageInterface
- func NewMinIOS3StorageProvider(clientId string, clientSecret string, region string, bucket string, ...) oss.StorageInterface
- func NewTencentCloudCosStorageProvider(clientId string, clientSecret string, region string, bucket string, ...) oss.StorageInterface
- type FileSystem
- func (fileSystem FileSystem) Delete(path string) error
- func (fileSystem FileSystem) Get(path string) (*os.File, error)
- func (fileSystem FileSystem) GetEndpoint() string
- func (fileSystem FileSystem) GetFullPath(path string) string
- func (fileSystem FileSystem) GetStream(path string) (io.ReadCloser, error)
- func (fileSystem FileSystem) GetURL(path string) (url string, err error)
- func (fileSystem FileSystem) List(path string) ([]*oss.Object, error)
- func (fileSystem FileSystem) 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 NewMinIOS3StorageProvider ¶ added in v1.94.0
Types ¶
type FileSystem ¶
type FileSystem struct {
Base string
}
FileSystem file system storage
func NewFileSystem ¶
func NewFileSystem(base string) *FileSystem
NewFileSystem initialize the local file system storage
func (FileSystem) Delete ¶
func (fileSystem FileSystem) Delete(path string) error
Delete delete file
func (FileSystem) Get ¶
func (fileSystem FileSystem) Get(path string) (*os.File, error)
Get receive file with given path
func (FileSystem) GetEndpoint ¶
func (fileSystem FileSystem) GetEndpoint() string
GetEndpoint get endpoint, FileSystem's endpoint is /
func (FileSystem) GetFullPath ¶
func (fileSystem FileSystem) GetFullPath(path string) string
GetFullPath get full path from absolute/relative path
func (FileSystem) GetStream ¶
func (fileSystem FileSystem) GetStream(path string) (io.ReadCloser, error)
GetStream get file as stream
func (FileSystem) GetURL ¶
func (fileSystem FileSystem) GetURL(path string) (url string, err error)
GetURL get public accessible URL
Click to show internal directories.
Click to hide internal directories.