Versions in this module Expand all Collapse all v0 v0.11.0 Feb 7, 2023 v0.10.0 Jun 17, 2022 Changes in this version + func ParseRepoName(result RepoParseResult) (string, error) + type RepoParseResult struct + Repo string + func ParseRepo(repo string) (RepoParseResult, error) v0.9.0 Apr 18, 2022 v0.8.0 Apr 12, 2022 Changes in this version + func IsAzureStorageUrl(repoUrl string) bool + func ParseAzureBlobUrl(urlString string) (storageAccount, container, prefix string, err error) + type AzureBlobRepository struct + BasePath string + Client *azblob.ContainerClient + Prefix string + func NewAzureBlobRepository(repo string) (*AzureBlobRepository, error) + func (repo *AzureBlobRepository) Delete(repoPath string) error + func (repo *AzureBlobRepository) Download(repoPath, localPath string, m *Meter) error + func (repo *AzureBlobRepository) List(repoPath string) ([]FileInfo, error) + func (repo *AzureBlobRepository) Stat(repoPath string) (FileInfo, error) + func (repo *AzureBlobRepository) Upload(localPath, repoPath string, m *Meter) error + type GCSFileInfo struct + func (fi *GCSFileInfo) IsDir() bool + func (fi *GCSFileInfo) Name() string + type GCSRepository struct + BasePath string + Bucket string + Client *storage.Client + func NewGCSRepository(bucket, basePath string) (*GCSRepository, error) + func (repo *GCSRepository) Delete(repoPath string) error + func (repo *GCSRepository) Download(repoPath, localPath string, m *Meter) error + func (repo *GCSRepository) List(repoPath string) ([]FileInfo, error) + func (repo *GCSRepository) Stat(repoPath string) (FileInfo, error) + func (repo *GCSRepository) Upload(localPath, repoPath string, m *Meter) error type SSHRepository + SFTPClient *sftp.Client + SSHClient *ssh.Client + type SimpleFileInfo struct + func (fi *SimpleFileInfo) IsDir() bool + func (fi *SimpleFileInfo) Name() string v0.7.0 Mar 31, 2022 Changes in this version type FileInfo + IsDir func() bool + Name func() string + type RcloneFileInfo struct + IsDir_ bool + Name_ string + func (e *RcloneFileInfo) IsDir() bool + func (e *RcloneFileInfo) Name() string + type S3FileInfo struct + func (fi *S3FileInfo) IsDir() bool + func (fi *S3FileInfo) Name() string + type SSHFileInfo struct + func (e SSHFileInfo) IsDir() bool + func (e SSHFileInfo) Name() string + type SSHRepository struct + BaseDir string + Host string + func NewSSHRepository(host, basePath string) (*SSHRepository, error) + func (repo *SSHRepository) Delete(repoPath string) error + func (repo *SSHRepository) Download(repoPath, localPath string, m *Meter) error + func (repo *SSHRepository) List(repoPath string) ([]FileInfo, error) + func (repo *SSHRepository) Stat(repoPath string) (FileInfo, error) + func (repo *SSHRepository) Upload(localPath, repoPath string, m *Meter) error v0.6.0 Mar 23, 2022 Changes in this version + var ErrUnsupportedRepository = errors.New("Unsupported repository") + func CopyWithMeter(dest io.Writer, src io.Reader, meter *Meter) (int64, error) + type ByteSize float64 + const EB + const GB + const KB + const MB + const PB + const TB + const YB + const ZB + func (b ByteSize) String() string + type FileInfo fs.FileInfo + type HttpFileInfo struct + func (info *HttpFileInfo) IsDir() bool + func (info *HttpFileInfo) ModTime() time.Time + func (info *HttpFileInfo) Mode() fs.FileMode + func (info *HttpFileInfo) Name() string + func (info *HttpFileInfo) Size() int64 + func (info *HttpFileInfo) Sys() interface{} + type HttpRepository struct + RepoUrl string + func NewHttpRepository(repo string) (*HttpRepository, error) + func (repo *HttpRepository) Delete(repoPath string) error + func (repo *HttpRepository) Download(repoPath, localPath string, m *Meter) error + func (repo *HttpRepository) List(repoPath string) ([]ListEntry, error) + func (repo *HttpRepository) Stat(repoPath string) (FileInfo, error) + func (repo *HttpRepository) Upload(localPath, repoPath string, meter *Meter) error + type ListEntry fs.DirEntry + type LocalFileSystemRepository struct + RepoDir string + func NewLocalFileSystemRepository(repoDir string) (*LocalFileSystemRepository, error) + func (repo *LocalFileSystemRepository) Delete(repoPath string) error + func (repo *LocalFileSystemRepository) Download(repoPath, localPath string, m *Meter) error + func (repo *LocalFileSystemRepository) List(repoPath string) ([]ListEntry, error) + func (repo *LocalFileSystemRepository) Stat(repoPath string) (FileInfo, error) + func (repo *LocalFileSystemRepository) Upload(localPath, repoPath string, m *Meter) error + type Meter struct + func (m *Meter) AddBytes(bytes int) + func (m *Meter) SetBytes(bytes int64) + func (m *Meter) Write(p []byte) (n int, err error) + type RcloneListEntry struct + IsDir_ bool + ModTime time.Time + Name_ string + Path string + Size uint64 + func (e *RcloneListEntry) Info() (fs.FileInfo, error) + func (e *RcloneListEntry) IsDir() bool + func (e *RcloneListEntry) Name() string + func (e *RcloneListEntry) Type() fs.FileMode + type RcloneRepository struct + BaseDir string + Remote string + func NewRcloneRepository(remote, basePath string) (*RcloneRepository, error) + func (repo *RcloneRepository) Delete(repoPath string) error + func (repo *RcloneRepository) Download(repoPath, localPath string, m *Meter) error + func (repo *RcloneRepository) List(repoPath string) ([]ListEntry, error) + func (repo *RcloneRepository) Stat(repoPath string) (FileInfo, error) + func (repo *RcloneRepository) Upload(localPath, repoPath string, m *Meter) error + type Repository interface + Delete func(repoPath string) error + Download func(repoPath, localPath string, meter *Meter) error + List func(repoPath string) ([]ListEntry, error) + Stat func(repoPath string) (FileInfo, error) + Upload func(localPath, repoPath string, meter *Meter) error + func NewRepository(repo string) (Repository, error) + type S3DirEntry struct + func (e *S3DirEntry) Info() (fs.FileInfo, error) + func (e *S3DirEntry) IsDir() bool + func (e *S3DirEntry) Name() string + func (e *S3DirEntry) Type() fs.FileMode + type S3Repository struct + BasePath string + Bucket string + func NewS3Repository(bucket, basePath string) (*S3Repository, error) + func (repo *S3Repository) Delete(repoPath string) error + func (repo *S3Repository) Download(repoPath, localPath string, m *Meter) error + func (repo *S3Repository) List(repoPath string) ([]ListEntry, error) + func (repo *S3Repository) Stat(repoPath string) (FileInfo, error) + func (repo *S3Repository) Upload(localPath, repoPath string, m *Meter) error + type Session struct + func NewSession() *Session + func (s *Session) CalculateSpeed() ByteSize + func (s *Session) NewMeter() *Meter + type UnsupportedRepositoryError struct + Message string + func (err UnsupportedRepositoryError) Error() string