Versions in this module Expand all Collapse all v0 v0.1.0 Apr 18, 2019 Changes in this version + func Position(position uint) *uint + func TestVersionFormat(t *testing.T) + func URIs(uris ...string) []string + type BitTorrentStatus struct + AnnounceList []URI + Comment string + CreationDateUNIX UNIXTime + Info BitTorrentStatusInfo + Mode TorrentMode + type BitTorrentStatusInfo struct + Name string + type Client struct + func Dial(url string, authToken string) (client Client, err error) + func NewClient(rpcClient *rpc2.Client, authToken string) Client + func (c *Client) AddMetalink(metalink []byte, options *Options) ([]GID, error) + func (c *Client) AddMetalinkAtPosition(metalink []byte, options *Options, position *uint) ([]GID, error) + func (c *Client) AddTorrent(torrent []byte, uris []string, options *Options) (GID, error) + func (c *Client) AddTorrentAtPosition(torrent []byte, uris []string, options *Options, position *uint) (GID, error) + func (c *Client) AddURI(uris []string, options *Options) (GID, error) + func (c *Client) AddURIAtPosition(uris []string, options *Options, position *uint) (GID, error) + func (c *Client) ChangeGlobalOptions(options Options) error + func (c *Client) ChangeOptions(gid string, options Options) error + func (c *Client) ChangePosition(gid string, pos int, how PositionSetBehaviour) (int, error) + func (c *Client) ChangeURI(gid string, fileIndex uint, delURIs []string, addURIs []string) (uint, uint, error) + func (c *Client) ChangeURIAt(gid string, fileIndex uint, delURIs []string, addURIs []string, position *uint) (uint, uint, error) + func (c *Client) Close() error + func (c *Client) Delete(gid string) (err error) + func (c *Client) Download(uris []string, options *Options) (status Status, err error) + func (c *Client) DownloadWithContext(ctx context.Context, uris []string, options *Options) (status Status, err error) + func (c *Client) ForcePause(gid string) error + func (c *Client) ForcePauseAll() error + func (c *Client) ForceRemove(gid string) error + func (c *Client) ForceShutdown() error + func (c *Client) GetFiles(gid string) ([]File, error) + func (c *Client) GetGID(gid string) GID + func (c *Client) GetGlobalOptions() (Options, error) + func (c *Client) GetGlobalStats() (Stats, error) + func (c *Client) GetOptions(gid string) (Options, error) + func (c *Client) GetPeers(gid string) ([]Peer, error) + func (c *Client) GetServers(gid string) ([]FileServers, error) + func (c *Client) GetSessionInfo() (SessionInfo, error) + func (c *Client) GetURIs(gid string) ([]URI, error) + func (c *Client) GetVersion() (VersionInfo, error) + func (c *Client) MultiCall(methods ...MethodCall) ([]MethodResult, error) + func (c *Client) Pause(gid string) error + func (c *Client) PauseAll() error + func (c *Client) PurgeDownloadResults() error + func (c *Client) Remove(gid string) error + func (c *Client) RemoveDownloadResult(gid string) error + func (c *Client) Run() + func (c *Client) SaveSession() error + func (c *Client) Shutdown() error + func (c *Client) String() string + func (c *Client) Subscribe(name string, listener EventListener) + func (c *Client) TellActive(keys ...string) ([]Status, error) + func (c *Client) TellStatus(gid string, keys ...string) (Status, error) + func (c *Client) TellStopped(offset int, num uint, keys ...string) ([]Status, error) + func (c *Client) TellWaiting(offset int, num uint, keys ...string) ([]Status, error) + func (c *Client) Unpause(gid string) error + func (c *Client) UnpauseAll() error + func (c *Client) WaitForDownload(gid string) error + type DownloadEvent struct + GID string + func (e *DownloadEvent) String() string + type DownloadStatus string + const StatusActive + const StatusCompleted + const StatusError + const StatusPaused + const StatusRemoved + const StatusWaiting + type EventListener func(event *DownloadEvent) + type ExitStatus uint8 + const BencodedFileParseError + const ChecksumValidationFailed + const CouldNotCreateDirectory + const CouldNotCreateNewFile + const CouldNotOpenExistingFile + const DownloadSpeedTooSlow + const FTPCommandFailed + const FileAlreadyExists + const FileIOError + const HTTPAuthorizationFailed + const HTTPResponseHeaderBad + const JSONRPCParseError + const MagnetURIBad + const MetalinkParsingFailed + const NameResolutionFailed + const NetworkError + const NotEnoughDiskSpace + const PieceLengthMismatch + const RemoteNoResume + const RemoteServerHandleRequestError + const RenamingFailed + const Reserved + const ResourceNotFound + const ResourceNotFoundReached + const SameFileBeingDownloaded + const SameInfoHashBeingDownloaded + const Success + const Timeout + const TooManyRedirects + const TorrentFileCorrupt + const UnfinishedDownloads + const UnknownError + type File struct + CompletedLength uint + Index int + Length uint + Path string + Selected bool + URIs []URI + type FileServers struct + Index uint + Servers []Server + type GID struct + GID string + func (gid *GID) ChangeOptions(options Options) error + func (gid *GID) ChangePosition(pos int, how PositionSetBehaviour) (int, error) + func (gid *GID) ChangeURI(fileIndex uint, delURIs []string, addURIs []string) (uint, uint, error) + func (gid *GID) ChangeURIAt(fileIndex uint, delURIs []string, addURIs []string, position *uint) (uint, uint, error) + func (gid *GID) Delete() error + func (gid *GID) ForcePause() error + func (gid *GID) ForceRemove() error + func (gid *GID) GetFiles() ([]File, error) + func (gid *GID) GetOptions() (Options, error) + func (gid *GID) GetPeers() ([]Peer, error) + func (gid *GID) GetServers() ([]FileServers, error) + func (gid *GID) GetURIs() ([]URI, error) + func (gid *GID) Pause() error + func (gid *GID) Remove() error + func (gid *GID) RemoveDownloadResult() error + func (gid *GID) String() string + func (gid *GID) TellStatus(keys ...string) (Status, error) + func (gid *GID) Unpause() error + func (gid *GID) WaitForDownload() error + type MethodCall struct + MethodName string + Params []interface{} + func NewMethodCall(methodName string, params ...interface{}) MethodCall + type MethodCallError struct + Code uint + Message string + func (e *MethodCallError) Error() string + type MethodResult struct + Error error + Result []byte + func (res *MethodResult) Unmarshal(v interface{}) error + type Options struct + AllProxy string + AllProxyPassword string + AllProxyUser string + AllowOverwrite bool + AllowPieceLengthChange bool + AlwaysResume bool + AsyncDNS bool + AutoFileRenaming bool + BTEnableHookAfterHashCheck bool + BTEnableLpd bool + BTExcludeTracker string + BTExternalIP string + BTForceEncryption bool + BTHashCheckSeed bool + BTLoadSavedMetadata bool + BTMaxPeers uint + BTMetadataOnly bool + BTMinCryptoLevel string + BTPrioritizePiece string + BTRemoveUnselectedFile bool + BTRequestPeerSpeedLimit string + BTRequireCrypto bool + BTSaveMetadata bool + BTSeedUnverified bool + BTStopTimeout uint + BTTracker string + BTTrackerConnectTimeout uint + BTTrackerInterval uint + BTTrackerTimeout uint + CheckIntegrity bool + Checksum string + ConditionalGet bool + ConnectTimeout uint + ContentDispositionDefaultUTF8 bool + Continue bool + Dir string + DryRun bool + EnableHTTPKeepAlive bool + EnableHTTPPipelining bool + EnableMMap bool + EnablePeerExchange bool + FTPPasswd string + FTPPasv bool + FTPProxy string + FTPProxyPasswd string + FTPProxyUser string + FTPReuseConnection bool + FTPType string + FTPUser string + FileAllocation string + FollowMetalink bool + FollowTorrent bool + ForceSave bool + GID string + HTTPAcceptGzip bool + HTTPAuthChallenge bool + HTTPNoCache bool + HTTPPasswd string + HTTPProxy string + HTTPProxyPasswd string + HTTPProxyUser string + HTTPSProxy string + HTTPSProxyPasswd string + HTTPSProxyUser string + HTTPUser string + HashCheckOnly bool + Header string + IndexOut uint + LowestSpeedLimit uint + MaxConnectionPerServer uint + MaxDownloadLimit uint + MaxFileNotFound uint + MaxMMapLimit uint + MaxResumeFailureTries uint + MaxTries uint + MaxUploadLimit uint + MetalinkBaseURI string + MetalinkEnableUniqueProtocol bool + MetalinkLanguage string + MetalinkLocation string + MetalinkOS string + MetalinkPreferredProtocol string + MetalinkVersion string + MinSplitSize uint + NoFileAllocationLimit bool + NoNetrc bool + NoProxy bool + Out string + ParameterizedURI string + Pause bool + PauseMetadata bool + PieceLength string + ProxyMethod string + RPCSaveUploadMetadata string + RealtimeChunkChecksum string + Referer string + RemoteTime bool + RemoveControlFile string + RetryWait uint + ReuseURI bool + SSHHostKeyMD string + SeedRatio float32 + SeedTime uint + SelectFile bool + Split uint + StreamPieceSelector string + Timeout uint + URISelector string + UseHead bool + UserAgent string + type Peer struct + AmChoking bool + BitField string + DownloadSpeed uint + ID string + IP string + PeerChoking bool + Port uint16 + Seeder bool + UploadSpeed uint + type PositionSetBehaviour string + const SetPositionEnd + const SetPositionRelative + const SetPositionStart + type Server struct + CurrentURI string + DownloadSpeed uint + URI string + type SessionInfo struct + ID string + type Stats struct + DownloadSpeed uint + NumActive uint + NumStopped uint + NumStoppedTotal uint + NumWaiting uint + UploadSpeed uint + type Status struct + BelongsTo string + BitField string + BitTorrent BitTorrentStatus + CompletedLength uint + Connections uint + Dir string + DownloadSpeed uint + ErrorCode ExitStatus + ErrorMessage string + Files []File + FollowedBy []string + Following string + GID string + InfoHash string + NumPieces uint + NumSeeders uint + PieceLength uint + Seeder bool + Status DownloadStatus + TotalLength uint + UploadLength uint + UploadSpeed uint + VerifiedLength uint + VerifyIntegrityPending bool + type TorrentMode string + const TorrentModeMulti + const TorrentModeSingle + type UNIXTime struct + func (t *UNIXTime) UnmarshalJSON(data []byte) error + func (t UNIXTime) MarshalJSON() ([]byte, error) + type URI struct + Status URIStatus + URI string + type URIStatus string + const URIUsed + const URIWaiting + type VersionInfo struct + EnabledFeatures []string + Version string