Documentation ¶
Index ¶
- Variables
- func CopyWithMeter(dest io.Writer, src io.Reader, meter *Meter) (int64, error)
- func IsAzureStorageUrl(repoUrl string) bool
- func ParseAzureBlobUrl(urlString string) (storageAccount, container, prefix string, err error)
- func ParseRepoName(result RepoParseResult) (string, error)
- type AzureBlobRepository
- 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 ByteSize
- type FileInfo
- type GCSFileInfo
- type GCSRepository
- 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 HttpFileInfo
- type HttpRepository
- func (repo *HttpRepository) Delete(repoPath string) error
- func (repo *HttpRepository) Download(repoPath, localPath string, m *Meter) error
- func (repo *HttpRepository) List(repoPath string) ([]FileInfo, error)
- func (repo *HttpRepository) Stat(repoPath string) (FileInfo, error)
- func (repo *HttpRepository) Upload(localPath, repoPath string, meter *Meter) error
- type LocalFileSystemRepository
- func (repo *LocalFileSystemRepository) Delete(repoPath string) error
- func (repo *LocalFileSystemRepository) Download(repoPath, localPath string, m *Meter) error
- func (repo *LocalFileSystemRepository) List(repoPath string) ([]FileInfo, error)
- func (repo *LocalFileSystemRepository) Stat(repoPath string) (FileInfo, error)
- func (repo *LocalFileSystemRepository) Upload(localPath, repoPath string, m *Meter) error
- type Meter
- type RcloneFileInfo
- type RcloneRepository
- func (repo *RcloneRepository) Delete(repoPath string) error
- func (repo *RcloneRepository) Download(repoPath, localPath string, m *Meter) error
- func (repo *RcloneRepository) List(repoPath string) ([]FileInfo, error)
- func (repo *RcloneRepository) Stat(repoPath string) (FileInfo, error)
- func (repo *RcloneRepository) Upload(localPath, repoPath string, m *Meter) error
- type RepoParseResult
- type Repository
- type S3FileInfo
- type S3Repository
- func (repo *S3Repository) Delete(repoPath string) error
- func (repo *S3Repository) Download(repoPath, localPath string, m *Meter) error
- func (repo *S3Repository) List(repoPath string) ([]FileInfo, error)
- func (repo *S3Repository) Stat(repoPath string) (FileInfo, error)
- func (repo *S3Repository) Upload(localPath, repoPath string, m *Meter) error
- type SSHRepository
- 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
- type Session
- type SimpleFileInfo
- type UnsupportedRepositoryError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnsupportedRepository = errors.New("Unsupported repository")
Functions ¶
func IsAzureStorageUrl ¶ added in v0.8.0
func ParseAzureBlobUrl ¶ added in v0.8.0
func ParseRepoName ¶ added in v0.10.0
func ParseRepoName(result RepoParseResult) (string, error)
Types ¶
type AzureBlobRepository ¶ added in v0.8.0
type AzureBlobRepository struct { Client *azblob.ContainerClient Prefix string BasePath string }
func NewAzureBlobRepository ¶ added in v0.8.0
func NewAzureBlobRepository(repo string) (*AzureBlobRepository, error)
func (*AzureBlobRepository) Delete ¶ added in v0.8.0
func (repo *AzureBlobRepository) Delete(repoPath string) error
func (*AzureBlobRepository) Download ¶ added in v0.8.0
func (repo *AzureBlobRepository) Download(repoPath, localPath string, m *Meter) error
func (*AzureBlobRepository) List ¶ added in v0.8.0
func (repo *AzureBlobRepository) List(repoPath string) ([]FileInfo, error)
type GCSFileInfo ¶ added in v0.8.0
type GCSFileInfo struct {
// contains filtered or unexported fields
}
func (*GCSFileInfo) IsDir ¶ added in v0.8.0
func (fi *GCSFileInfo) IsDir() bool
func (*GCSFileInfo) Name ¶ added in v0.8.0
func (fi *GCSFileInfo) Name() string
type GCSRepository ¶ added in v0.8.0
Local Filesystem
func NewGCSRepository ¶ added in v0.8.0
func NewGCSRepository(bucket, basePath string) (*GCSRepository, error)
func (*GCSRepository) Delete ¶ added in v0.8.0
func (repo *GCSRepository) Delete(repoPath string) error
func (*GCSRepository) Download ¶ added in v0.8.0
func (repo *GCSRepository) Download(repoPath, localPath string, m *Meter) error
func (*GCSRepository) List ¶ added in v0.8.0
func (repo *GCSRepository) List(repoPath string) ([]FileInfo, error)
type HttpFileInfo ¶
type HttpFileInfo struct {
// contains filtered or unexported fields
}
func (*HttpFileInfo) IsDir ¶
func (info *HttpFileInfo) IsDir() bool
func (*HttpFileInfo) Name ¶
func (info *HttpFileInfo) Name() string
type HttpRepository ¶
type HttpRepository struct {
RepoUrl string
}
func NewHttpRepository ¶
func NewHttpRepository(repo string) (*HttpRepository, error)
func (*HttpRepository) Delete ¶
func (repo *HttpRepository) Delete(repoPath string) error
type LocalFileSystemRepository ¶
type LocalFileSystemRepository struct {
RepoDir string
}
Local Filesystem
func NewLocalFileSystemRepository ¶
func NewLocalFileSystemRepository(repoDir string) (*LocalFileSystemRepository, error)
func (*LocalFileSystemRepository) Delete ¶
func (repo *LocalFileSystemRepository) Delete(repoPath string) error
func (*LocalFileSystemRepository) Download ¶
func (repo *LocalFileSystemRepository) Download(repoPath, localPath string, m *Meter) error
func (*LocalFileSystemRepository) List ¶
func (repo *LocalFileSystemRepository) List(repoPath string) ([]FileInfo, error)
type RcloneFileInfo ¶ added in v0.7.0
func (*RcloneFileInfo) IsDir ¶ added in v0.7.0
func (e *RcloneFileInfo) IsDir() bool
func (*RcloneFileInfo) Name ¶ added in v0.7.0
func (e *RcloneFileInfo) Name() string
type RcloneRepository ¶
Local Filesystem
func NewRcloneRepository ¶
func NewRcloneRepository(remote, basePath string) (*RcloneRepository, error)
func (*RcloneRepository) Delete ¶
func (repo *RcloneRepository) Delete(repoPath string) error
func (*RcloneRepository) Download ¶
func (repo *RcloneRepository) Download(repoPath, localPath string, m *Meter) error
func (*RcloneRepository) List ¶
func (repo *RcloneRepository) List(repoPath string) ([]FileInfo, error)
type RepoParseResult ¶ added in v0.10.0
type RepoParseResult struct { Repo string // contains filtered or unexported fields }
func ParseRepo ¶ added in v0.10.0
func ParseRepo(repo string) (RepoParseResult, error)
type Repository ¶
type Repository interface { Upload(localPath, repoPath string, meter *Meter) error Download(repoPath, localPath string, meter *Meter) error Delete(repoPath string) error Stat(repoPath string) (FileInfo, error) List(repoPath string) ([]FileInfo, error) }
func NewRepository ¶
func NewRepository(result RepoParseResult) (Repository, error)
type S3FileInfo ¶ added in v0.7.0
type S3FileInfo struct {
// contains filtered or unexported fields
}
func (*S3FileInfo) IsDir ¶ added in v0.7.0
func (fi *S3FileInfo) IsDir() bool
func (*S3FileInfo) Name ¶ added in v0.7.0
func (fi *S3FileInfo) Name() string
type S3Repository ¶
type S3Repository struct { Bucket string BasePath string // contains filtered or unexported fields }
func NewS3Repository ¶
func NewS3Repository(bucket, basePath string) (*S3Repository, error)
func (*S3Repository) Delete ¶
func (repo *S3Repository) Delete(repoPath string) error
type SSHRepository ¶ added in v0.7.0
func NewSSHRepository ¶ added in v0.7.0
func NewSSHRepository(hostname, basePath string) (*SSHRepository, error)
func (*SSHRepository) Delete ¶ added in v0.7.0
func (repo *SSHRepository) Delete(repoPath string) error
func (*SSHRepository) Download ¶ added in v0.7.0
func (repo *SSHRepository) Download(repoPath, localPath string, m *Meter) error
func (*SSHRepository) List ¶ added in v0.7.0
func (repo *SSHRepository) List(repoPath string) ([]FileInfo, error)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSession ¶
func NewSession() *Session
func (*Session) CalculateSpeed ¶
type SimpleFileInfo ¶ added in v0.8.0
type SimpleFileInfo struct {
// contains filtered or unexported fields
}
func (*SimpleFileInfo) IsDir ¶ added in v0.8.0
func (fi *SimpleFileInfo) IsDir() bool
func (*SimpleFileInfo) Name ¶ added in v0.8.0
func (fi *SimpleFileInfo) Name() string
type UnsupportedRepositoryError ¶
type UnsupportedRepositoryError struct {
Message string
}
func (UnsupportedRepositoryError) Error ¶
func (err UnsupportedRepositoryError) Error() string
Click to show internal directories.
Click to hide internal directories.