Documentation ¶
Index ¶
- type Config
- type Event
- type Node
- type OsFs
- type Storage
- func (s *Storage) DetectFileRefs(path string) (rootPath string, dirName string, _ []storage.FileRef, _ error)
- func (s *Storage) GetActiveFiles(bagId []byte) ([]uint32, error)
- func (s *Storage) GetAll() []*storage.Torrent
- func (s *Storage) GetAllFilesRefsInDir(path string) ([]storage.FileRef, error)
- func (s *Storage) GetFS() storage.FS
- func (s *Storage) GetPiece(bagId []byte, id uint32) (*storage.PieceInfo, error)
- func (s *Storage) GetSingleFileRef(path string) (storage.FileRef, error)
- func (s *Storage) GetSpeedLimits() (download uint64, upload uint64, err error)
- func (s *Storage) GetTorrent(hash []byte) *storage.Torrent
- func (s *Storage) GetTorrentByOverlay(overlay []byte) *storage.Torrent
- func (s *Storage) PiecesMask(bagId []byte, num uint32) []byte
- func (s *Storage) RemovePiece(bagId []byte, id uint32) error
- func (s *Storage) RemoveTorrent(t *storage.Torrent, withFiles bool) error
- func (s *Storage) SetActiveFiles(bagId []byte, ids []uint32) error
- func (s *Storage) SetPiece(bagId []byte, id uint32, p *storage.PieceInfo) error
- func (s *Storage) SetSpeedLimits(download, upload uint64) error
- func (s *Storage) SetTorrent(t *storage.Torrent) error
- func (s *Storage) UpdateUploadStats(bagId []byte, val uint64) error
- type TorrentStored
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Key ed25519.PrivateKey ListenAddr string ExternalIP string DownloadsPath string }
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func (*Storage) DetectFileRefs ¶ added in v0.2.0
func (*Storage) GetAllFilesRefsInDir ¶ added in v0.2.0
func (*Storage) GetSingleFileRef ¶ added in v0.2.0
func (*Storage) GetSpeedLimits ¶
func (*Storage) GetTorrentByOverlay ¶
func (*Storage) RemoveTorrent ¶
func (*Storage) SetSpeedLimits ¶
type TorrentStored ¶
Click to show internal directories.
Click to hide internal directories.