Documentation ¶
Index ¶
- type CloudFilesStorage
- func (cf *CloudFilesStorage) Download(filename string, writer io.Writer) error
- func (cf *CloudFilesStorage) List(dc crypto.Decryptor) ([]*FileInfo, error)
- func (cf *CloudFilesStorage) Start() error
- func (cf *CloudFilesStorage) Stop() error
- func (cf *CloudFilesStorage) Upload(filename string, reader io.ReadSeeker) error
- type DownloadQueue
- type DownloadTorrenter
- type Downloader
- type FileDownload
- type FileInfo
- type Lister
- type PeerDownloader
- type PersistentDownloader
- type S3Storage
- func (s *S3Storage) Download(filename string, writer io.Writer) error
- func (s *S3Storage) DownloadTorrent(filename string, writer io.Writer) error
- func (s *S3Storage) List(dc crypto.Decryptor) ([]*FileInfo, error)
- func (s *S3Storage) Start() error
- func (s *S3Storage) Stop() error
- func (s *S3Storage) Upload(filename string, reader io.ReadSeeker) error
- type SizeReader
- type Storage
- type TorrentDownloader
- type Uploader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudFilesStorage ¶
type CloudFilesStorage struct {
// contains filtered or unexported fields
}
func NewCloudFiles ¶
func NewCloudFiles(creds *common.RackspaceCreds, bucket string) (*CloudFilesStorage, error)
func (*CloudFilesStorage) Download ¶
func (cf *CloudFilesStorage) Download(filename string, writer io.Writer) error
func (*CloudFilesStorage) List ¶
func (cf *CloudFilesStorage) List(dc crypto.Decryptor) ([]*FileInfo, error)
func (*CloudFilesStorage) Start ¶
func (cf *CloudFilesStorage) Start() error
func (*CloudFilesStorage) Stop ¶
func (cf *CloudFilesStorage) Stop() error
func (*CloudFilesStorage) Upload ¶
func (cf *CloudFilesStorage) Upload(filename string, reader io.ReadSeeker) error
type DownloadQueue ¶
type DownloadQueue struct {
// contains filtered or unexported fields
}
func (*DownloadQueue) Add ¶
func (dq *DownloadQueue) Add(conf *common.Conf, fi *FileInfo, dchan chan *FileDownload) *FileDownload
func (*DownloadQueue) Start ¶
func (dq *DownloadQueue) Start() error
func (*DownloadQueue) Stop ¶
func (dq *DownloadQueue) Stop() error
type DownloadTorrenter ¶
type Downloader ¶
type FileDownload ¶
type FileDownload struct { FileInfo *FileInfo Error error // contains filtered or unexported fields }
func (*FileDownload) Done ¶
func (fd *FileDownload) Done(err error)
func (*FileDownload) Start ¶
func (fd *FileDownload) Start()
func (*FileDownload) Stop ¶
func (fd *FileDownload) Stop() error
func (*FileDownload) TransferRate ¶
func (fd *FileDownload) TransferRate() string
type PeerDownloader ¶
type PeerDownloader struct {
// contains filtered or unexported fields
}
func (*PeerDownloader) Download ¶
func (pd *PeerDownloader) Download(filename string, writer io.Writer) error
func (*PeerDownloader) Start ¶
func (pd *PeerDownloader) Start() error
func (*PeerDownloader) Stop ¶
func (pd *PeerDownloader) Stop() error
type PersistentDownloader ¶
type PersistentDownloader interface { Downloader Start() error Stop() error }
func NewPeerDownloader ¶
func NewPeerDownloader(conf *common.Conf) (PersistentDownloader, error)
func NewPersistentDownloader ¶
func NewPersistentDownloader(c *common.Conf) (PersistentDownloader, error)
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
func (*S3Storage) DownloadTorrent ¶
type SizeReader ¶
type Storage ¶
type Storage interface { Uploader Downloader Lister }
type TorrentDownloader ¶
type TorrentDownloader struct {
// contains filtered or unexported fields
}
func NewTorrentDownloader ¶
func NewTorrentDownloader(conf *common.Conf) (*TorrentDownloader, error)
func (*TorrentDownloader) Download ¶
func (td *TorrentDownloader) Download(filename string, writer io.Writer) error
func (*TorrentDownloader) Start ¶
func (td *TorrentDownloader) Start() error
func (*TorrentDownloader) Stop ¶
func (td *TorrentDownloader) Stop() error
type Uploader ¶
type Uploader interface { // Upload with this remote filename. // See https://code.google.com/p/go/issues/detail?id=6738 for discussion // of sized / length'ed readers -- this uses .Seek to calcualte // the file size. Upload(filename string, reader io.ReadSeeker) error }
Click to show internal directories.
Click to hide internal directories.