Documentation ¶
Index ¶
- Constants
- Variables
- type AzureBlob
- func (s *AzureBlob) Connect() error
- func (s *AzureBlob) DeleteFile(key string) error
- func (s *AzureBlob) GetFileReader(key string) (io.ReadCloser, error)
- func (s *AzureBlob) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
- func (s *AzureBlob) Kind() string
- func (s *AzureBlob) PutFile(key string, r io.ReadCloser) error
- func (s *AzureBlob) StatFile(key string) (RemoteFile, error)
- func (s *AzureBlob) Walk(azPath string, recursive bool, process func(r RemoteFile) error) error
- type Backup
- type BackupDestination
- func (bd *BackupDestination) BackupList(parseMetadata bool, parseMetadataOnly string) ([]Backup, error)
- func (bd *BackupDestination) DownloadCompressedStream(ctx context.Context, remotePath string, localPath string) error
- func (bd *BackupDestination) DownloadPath(size int64, remotePath string, localPath string) error
- func (bd *BackupDestination) RemoveBackup(backup Backup) error
- func (bd *BackupDestination) RemoveOldBackups(keep int) error
- func (bd *BackupDestination) UploadCompressedStream(baseLocalPath string, files []string, remotePath string) error
- func (bd *BackupDestination) UploadPath(size int64, baseLocalPath string, files []string, remotePath string) error
- type COS
- func (c *COS) Connect() error
- func (c *COS) DeleteFile(key string) error
- func (c *COS) GetFileReader(key string) (io.ReadCloser, error)
- func (c *COS) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
- func (c *COS) Kind() string
- func (c *COS) PutFile(key string, r io.ReadCloser) error
- func (c *COS) StatFile(key string) (RemoteFile, error)
- func (c *COS) Walk(cosPath string, recursive bool, process func(RemoteFile) error) error
- type FTP
- func (f *FTP) Connect() error
- func (f *FTP) DeleteFile(key string) error
- func (f *FTP) GetFileReader(key string) (io.ReadCloser, error)
- func (f *FTP) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
- func (f *FTP) Kind() string
- func (f *FTP) MkdirAll(key string, client *ftp.ServerConn) error
- func (f *FTP) PutFile(key string, r io.ReadCloser) error
- func (f *FTP) StatFile(key string) (RemoteFile, error)
- func (f *FTP) Walk(ftpPath string, recursive bool, process func(RemoteFile) error) error
- type FTPFileReader
- type GCS
- func (gcs *GCS) Connect() error
- func (gcs *GCS) DeleteFile(key string) error
- func (gcs *GCS) GetFileReader(key string) (io.ReadCloser, error)
- func (gcs *GCS) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
- func (gcs *GCS) GetFileWriter(key string) io.WriteCloser
- func (gcs *GCS) Kind() string
- func (gcs *GCS) PutFile(key string, r io.ReadCloser) error
- func (gcs *GCS) StatFile(key string) (RemoteFile, error)
- func (gcs *GCS) Walk(gcsPath string, recursive bool, process func(r RemoteFile) error) error
- type RemoteFile
- type RemoteStorage
- type S3
- func (s *S3) Connect() error
- func (s *S3) DeleteFile(key string) error
- func (s *S3) GetFileReader(key string) (io.ReadCloser, error)
- func (s *S3) GetFileReaderWithLocalPath(key, localPath string) (io.ReadCloser, error)
- func (s *S3) Kind() string
- func (s *S3) PutFile(key string, r io.ReadCloser) error
- func (s *S3) StatFile(key string) (RemoteFile, error)
- func (s *S3) Walk(s3Path string, recursive bool, process func(r RemoteFile) error) error
- type S3LogToApexLogAdapter
- type SFTP
- func (sftp *SFTP) Connect() error
- func (sftp *SFTP) Debug(msg string, v ...interface{})
- func (sftp *SFTP) DeleteDirectory(dirPath string) error
- func (sftp *SFTP) DeleteFile(key string) error
- func (sftp *SFTP) GetFileReader(key string) (io.ReadCloser, error)
- func (sftp *SFTP) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
- func (sftp *SFTP) Kind() string
- func (sftp *SFTP) PutFile(key string, localFile io.ReadCloser) error
- func (sftp *SFTP) StatFile(key string) (RemoteFile, error)
- func (sftp *SFTP) Walk(remotePath string, recursive bool, process func(RemoteFile) error) error
Constants ¶
View Source
const (
// BufferSize - size of ring buffer between stream handlers
BufferSize = 1 * 1024 * 1024
)
Variables ¶
View Source
var ( // ErrNotFound is returned when file/object cannot be found ErrNotFound = errors.New("key not found") ErrFileDoesNotExist = errors.New("file does not exist") )
Functions ¶
This section is empty.
Types ¶
type AzureBlob ¶
type AzureBlob struct { Container azblob.ContainerURL CPK azblob.ClientProvidedKeyOptions Config *config.AzureBlobConfig }
AzureBlob - presents methods for manipulate data on Azure
func (*AzureBlob) DeleteFile ¶
func (*AzureBlob) GetFileReader ¶
func (s *AzureBlob) GetFileReader(key string) (io.ReadCloser, error)
func (*AzureBlob) GetFileReaderWithLocalPath ¶ added in v1.4.0
func (s *AzureBlob) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
type Backup ¶
type Backup struct { metadata.BackupMetadata Legacy bool FileExtension string Broken string UploadDate time.Time }
func GetBackupsToDelete ¶
type BackupDestination ¶
type BackupDestination struct { RemoteStorage // contains filtered or unexported fields }
func NewBackupDestination ¶
func NewBackupDestination(cfg *config.Config, calcMaxSize bool) (*BackupDestination, error)
func (*BackupDestination) BackupList ¶
func (bd *BackupDestination) BackupList(parseMetadata bool, parseMetadataOnly string) ([]Backup, error)
func (*BackupDestination) DownloadCompressedStream ¶ added in v1.3.2
func (*BackupDestination) DownloadPath ¶
func (bd *BackupDestination) DownloadPath(size int64, remotePath string, localPath string) error
func (*BackupDestination) RemoveBackup ¶
func (bd *BackupDestination) RemoveBackup(backup Backup) error
func (*BackupDestination) RemoveOldBackups ¶
func (bd *BackupDestination) RemoveOldBackups(keep int) error
func (*BackupDestination) UploadCompressedStream ¶ added in v1.3.2
func (bd *BackupDestination) UploadCompressedStream(baseLocalPath string, files []string, remotePath string) error
func (*BackupDestination) UploadPath ¶
type COS ¶
func (*COS) DeleteFile ¶
func (*COS) GetFileReader ¶
func (c *COS) GetFileReader(key string) (io.ReadCloser, error)
func (*COS) GetFileReaderWithLocalPath ¶ added in v1.4.0
func (c *COS) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
type FTP ¶
func (*FTP) DeleteFile ¶
func (*FTP) GetFileReader ¶
func (f *FTP) GetFileReader(key string) (io.ReadCloser, error)
func (*FTP) GetFileReaderWithLocalPath ¶ added in v1.4.0
func (f *FTP) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
type FTPFileReader ¶ added in v1.2.0
func (*FTPFileReader) Close ¶ added in v1.2.0
func (fr *FTPFileReader) Close() error
type GCS ¶
GCS - presents methods for manipulate data on GCS
func (*GCS) DeleteFile ¶
func (*GCS) GetFileReader ¶
func (gcs *GCS) GetFileReader(key string) (io.ReadCloser, error)
func (*GCS) GetFileReaderWithLocalPath ¶ added in v1.4.0
func (gcs *GCS) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
func (*GCS) GetFileWriter ¶
func (gcs *GCS) GetFileWriter(key string) io.WriteCloser
type RemoteFile ¶
RemoteFile - interface describe file on remote storage
type RemoteStorage ¶
type RemoteStorage interface { Kind() string StatFile(key string) (RemoteFile, error) DeleteFile(key string) error Connect() error Walk(prefix string, recursive bool, fn func(RemoteFile) error) error GetFileReader(key string) (io.ReadCloser, error) GetFileReaderWithLocalPath(key, localPath string) (io.ReadCloser, error) PutFile(key string, r io.ReadCloser) error }
RemoteStorage -
type S3 ¶
type S3 struct { Config *config.S3Config PartSize int64 Concurrency int BufferSize int // contains filtered or unexported fields }
S3 - presents methods for manipulate data on s3
func (*S3) DeleteFile ¶
func (*S3) GetFileReader ¶
func (s *S3) GetFileReader(key string) (io.ReadCloser, error)
func (*S3) GetFileReaderWithLocalPath ¶ added in v1.4.0
func (s *S3) GetFileReaderWithLocalPath(key, localPath string) (io.ReadCloser, error)
type S3LogToApexLogAdapter ¶ added in v1.0.15
type S3LogToApexLogAdapter struct {
// contains filtered or unexported fields
}
func (*S3LogToApexLogAdapter) Log ¶ added in v1.0.15
func (S3LogToApexLogAdapter *S3LogToApexLogAdapter) Log(args ...interface{})
type SFTP ¶
type SFTP struct { Config *config.SFTPConfig // contains filtered or unexported fields }
SFTP Implement RemoteStorage
func (*SFTP) DeleteDirectory ¶
func (*SFTP) DeleteFile ¶
func (*SFTP) GetFileReader ¶
func (sftp *SFTP) GetFileReader(key string) (io.ReadCloser, error)
func (*SFTP) GetFileReaderWithLocalPath ¶ added in v1.4.0
func (sftp *SFTP) GetFileReaderWithLocalPath(key, _ string) (io.ReadCloser, error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
forked from github.com/Azure/azure-storage-blob-go/azblob/blob/feature/clientprovidedkey because UploadStreamToBlockBlob does not expose CPK
|
forked from github.com/Azure/azure-storage-blob-go/azblob/blob/feature/clientprovidedkey because UploadStreamToBlockBlob does not expose CPK |
Click to show internal directories.
Click to hide internal directories.