storage

package
v1.561.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStorageProvider

func GetStorageProvider(providerType string, clientId string, clientSecret string, region string, bucket string, endpoint string) (oss.StorageInterface, error)

func NewAliyunOssStorageProvider

func NewAliyunOssStorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface

func NewAwsS3StorageProvider

func NewAwsS3StorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface

func NewAzureBlobStorageProvider added in v1.47.0

func NewAzureBlobStorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface

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 NewMinIOS3StorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) oss.StorageInterface

func NewQiniuCloudKodoStorageProvider added in v1.384.0

func NewQiniuCloudKodoStorageProvider(clientId string, clientSecret string, region string, bucket string, endpoint string) (oss.StorageInterface, error)

func NewSynologyNasStorageProvider added in v1.500.0

func NewSynologyNasStorageProvider(clientId string, clientSecret string, endpoint string) oss.StorageInterface

func NewTencentCloudCosStorageProvider

func NewTencentCloudCosStorageProvider(clientId string, clientSecret string, region string, bucket 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

func (LocalFileSystemProvider) List added in v1.411.0

func (sp LocalFileSystemProvider) List(path string) ([]*oss.Object, error)

List list all objects under current path

func (LocalFileSystemProvider) Put added in v1.411.0

func (sp LocalFileSystemProvider) Put(path string, reader io.Reader) (*oss.Object, error)

Put store a reader into given path

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL