Documentation
¶
Index ¶
- func GetProviderConfigFromEnv() map[string]interface{}
- type AzureBlobStorageConfig
- type AzureBlobStorageManager
- func (manager *AzureBlobStorageManager) DeleteObjects(locations []string) (err error)
- func (manager *AzureBlobStorageManager) Download(output *os.File, key string) error
- func (manager *AzureBlobStorageManager) GetDownloadKeyFromFileLocation(location string) string
- func (manager *AzureBlobStorageManager) GetObjectNameFromLocation(location string) (string, error)
- func (manager *AzureBlobStorageManager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
- type DOSpacesConfig
- type DOSpacesManager
- func (manager *DOSpacesManager) DeleteObjects(locations []string) (err error)
- func (manager *DOSpacesManager) Download(output *os.File, key string) error
- func (manager *DOSpacesManager) GetDownloadKeyFromFileLocation(location string) string
- func (manager *DOSpacesManager) GetObjectNameFromLocation(location string) (string, error)
- func (manager *DOSpacesManager) ListFilesWithPrefix(prefix string) ([]*SpacesObject, error)
- func (manager *DOSpacesManager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
- type FileManager
- type FileManagerFactory
- type FileManagerFactoryT
- type GCSConfig
- type GCSManager
- func (manager *GCSManager) DeleteObjects(locations []string) (err error)
- func (manager *GCSManager) Download(output *os.File, key string) error
- func (manager *GCSManager) GetDownloadKeyFromFileLocation(location string) string
- func (manager *GCSManager) GetObjectNameFromLocation(location string) (string, error)
- func (manager *GCSManager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
- type MinioConfig
- type MinioManager
- func (manager *MinioManager) DeleteObjects(locations []string) (err error)
- func (manager *MinioManager) Download(file *os.File, key string) error
- func (manager *MinioManager) GetDownloadKeyFromFileLocation(location string) string
- func (manager *MinioManager) GetObjectNameFromLocation(location string) (string, error)
- func (manager *MinioManager) ObjectUrl(objectName string) string
- func (manager *MinioManager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
- type S3Config
- type S3Manager
- func (manager *S3Manager) DeleteObjects(keys []string) (err error)
- func (manager *S3Manager) Download(output *os.File, key string) error
- func (manager *S3Manager) GetDownloadKeyFromFileLocation(location string) string
- func (manager *S3Manager) GetObjectNameFromLocation(location string) (string, error)
- func (manager *S3Manager) ListFilesWithPrefix(prefix string) ([]*S3Object, error)
- func (manager *S3Manager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
- type S3Object
- type SettingsT
- type SpacesObject
- type UploadOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetProviderConfigFromEnv ¶
func GetProviderConfigFromEnv() map[string]interface{}
GetProviderConfigFromEnv returns the provider config
Types ¶
type AzureBlobStorageConfig ¶
type AzureBlobStorageConfig struct { Container string Prefix string AccountName string AccountKey string }
func GetAzureBlogStorageConfig ¶
func GetAzureBlogStorageConfig(config map[string]interface{}) *AzureBlobStorageConfig
type AzureBlobStorageManager ¶
type AzureBlobStorageManager struct {
Config *AzureBlobStorageConfig
}
func (*AzureBlobStorageManager) DeleteObjects ¶ added in v0.1.10
func (manager *AzureBlobStorageManager) DeleteObjects(locations []string) (err error)
func (*AzureBlobStorageManager) Download ¶
func (manager *AzureBlobStorageManager) Download(output *os.File, key string) error
func (*AzureBlobStorageManager) GetDownloadKeyFromFileLocation ¶ added in v0.1.10
func (manager *AzureBlobStorageManager) GetDownloadKeyFromFileLocation(location string) string
TODO complete this
func (*AzureBlobStorageManager) GetObjectNameFromLocation ¶ added in v0.1.10
func (manager *AzureBlobStorageManager) GetObjectNameFromLocation(location string) (string, error)
GetObjectNameFromLocation gets the object name/key name from the object location url
https://account-name.blob.core.windows.net/container-name/key - >> key
func (*AzureBlobStorageManager) Upload ¶
func (manager *AzureBlobStorageManager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
Upload passed in file to Azure Blob Storage
type DOSpacesConfig ¶ added in v0.1.10
type DOSpacesConfig struct { Bucket string Prefix string EndPoint string AccessKeyID string AccessKey string }
func GetDOSpacesConfig ¶ added in v0.1.10
func GetDOSpacesConfig(config map[string]interface{}) *DOSpacesConfig
type DOSpacesManager ¶ added in v0.1.10
type DOSpacesManager struct {
Config *DOSpacesConfig
}
func (*DOSpacesManager) DeleteObjects ¶ added in v0.1.10
func (manager *DOSpacesManager) DeleteObjects(locations []string) (err error)
func (*DOSpacesManager) Download ¶ added in v0.1.10
func (manager *DOSpacesManager) Download(output *os.File, key string) error
func (*DOSpacesManager) GetDownloadKeyFromFileLocation ¶ added in v0.1.10
func (manager *DOSpacesManager) GetDownloadKeyFromFileLocation(location string) string
TODO complete this
func (*DOSpacesManager) GetObjectNameFromLocation ¶ added in v0.1.10
func (manager *DOSpacesManager) GetObjectNameFromLocation(location string) (string, error)
GetObjectNameFromLocation gets the object name/key name from the object location url
https://rudder.sgp1.digitaloceanspaces.com/key - >> key
func (*DOSpacesManager) ListFilesWithPrefix ¶ added in v0.1.10
func (manager *DOSpacesManager) ListFilesWithPrefix(prefix string) ([]*SpacesObject, error)
func (*DOSpacesManager) Upload ¶ added in v0.1.10
func (manager *DOSpacesManager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
Upload passed in file to spaces
type FileManager ¶
type FileManager interface { Upload(*os.File, ...string) (UploadOutput, error) Download(*os.File, string) error GetObjectNameFromLocation(string) (string, error) GetDownloadKeyFromFileLocation(location string) string DeleteObjects(locations []string) error }
FileManager inplements all upload methods
func New
deprecated
func New(settings *SettingsT) (FileManager, error)
Deprecated: Use an instance of FileManagerFactory instead
type FileManagerFactory ¶ added in v0.1.10
type FileManagerFactory interface {
New(settings *SettingsT) (FileManager, error)
}
var (
DefaultFileManagerFactory FileManagerFactory
)
type FileManagerFactoryT ¶ added in v0.1.10
type FileManagerFactoryT struct{}
func (*FileManagerFactoryT) New ¶ added in v0.1.10
func (factory *FileManagerFactoryT) New(settings *SettingsT) (FileManager, error)
New returns FileManager backed by configured provider
type GCSConfig ¶
func GetGCSConfig ¶
type GCSManager ¶
type GCSManager struct { Config *GCSConfig // contains filtered or unexported fields }
func (*GCSManager) DeleteObjects ¶ added in v0.1.10
func (manager *GCSManager) DeleteObjects(locations []string) (err error)
func (*GCSManager) Download ¶
func (manager *GCSManager) Download(output *os.File, key string) error
func (*GCSManager) GetDownloadKeyFromFileLocation ¶ added in v0.1.10
func (manager *GCSManager) GetDownloadKeyFromFileLocation(location string) string
TODO complete this
func (*GCSManager) GetObjectNameFromLocation ¶ added in v0.1.10
func (manager *GCSManager) GetObjectNameFromLocation(location string) (string, error)
GetObjectNameFromLocation gets the object name/key name from the object location url
https://storage.googleapis.com/bucket-name/key - >> key
func (*GCSManager) Upload ¶
func (manager *GCSManager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
type MinioConfig ¶
type MinioConfig struct { Bucket string Prefix string EndPoint string AccessKeyID string SecretAccessKey string UseSSL bool }
func GetMinioConfig ¶
func GetMinioConfig(config map[string]interface{}) *MinioConfig
type MinioManager ¶
type MinioManager struct {
Config *MinioConfig
}
func (*MinioManager) DeleteObjects ¶ added in v0.1.10
func (manager *MinioManager) DeleteObjects(locations []string) (err error)
func (*MinioManager) Download ¶
func (manager *MinioManager) Download(file *os.File, key string) error
func (*MinioManager) GetDownloadKeyFromFileLocation ¶ added in v0.1.10
func (manager *MinioManager) GetDownloadKeyFromFileLocation(location string) string
TODO complete this
func (*MinioManager) GetObjectNameFromLocation ¶ added in v0.1.10
func (manager *MinioManager) GetObjectNameFromLocation(location string) (string, error)
GetObjectNameFromLocation gets the object name/key name from the object location url
https://minio-endpoint/bucket-name/key1 - >> key1 http://minio-endpoint/bucket-name/key2 - >> key2
func (*MinioManager) ObjectUrl ¶
func (manager *MinioManager) ObjectUrl(objectName string) string
func (*MinioManager) Upload ¶
func (manager *MinioManager) Upload(file *os.File, prefixes ...string) (UploadOutput, error)
type S3Config ¶
type S3Config struct { Bucket string Prefix string AccessKeyID string AccessKey string EnableSSE bool RegionHint string }
func GetS3Config ¶
type S3Manager ¶
type S3Manager struct { Config *S3Config // contains filtered or unexported fields }
func (*S3Manager) DeleteObjects ¶ added in v0.1.10
func (*S3Manager) GetDownloadKeyFromFileLocation ¶ added in v0.1.10
func (*S3Manager) GetObjectNameFromLocation ¶ added in v0.1.10
GetObjectNameFromLocation gets the object name/key name from the object location url
https://bucket-name.s3.amazonaws.com/key - >> key