Documentation ¶
Overview ¶
Package qbtweb provides a idiomatic Go client for qBittorrent web.
See: https://github.com/qbittorrent/qBittorrent/wiki/Web-API-Documentation
Index ¶
- type AppBuildInfoRequest
- type AppBuildInfoResponse
- type AppDefaultSavePathRequest
- type AppPreferencesRequest
- type AppPreferencesResponse
- type AppSetPreferencesRequest
- func (req *AppSetPreferencesRequest) Do(ctx context.Context, cl *Client) error
- func (req AppSetPreferencesRequest) WithAddTrackers(addTrackers string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAddTrackersEnabled(addTrackersEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAltDlLimit(altDlLimit KiLimit) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAltUpLimit(altUpLimit KiLimit) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAlternativeWebuiEnabled(alternativeWebuiEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAlternativeWebuiPath(alternativeWebuiPath string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAnnounceIp(announceIp string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAnnounceToAllTiers(announceToAllTiers bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAnnounceToAllTrackers(announceToAllTrackers bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAnonymousMode(anonymousMode bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAsyncIoThreads(asyncIoThreads int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAutoDeleteMode(autoDeleteMode int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAutoTmmEnabled(autoTmmEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAutorunEnabled(autorunEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithAutorunProgram(autorunProgram string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithBannedIPs(bannedIPs string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithBittorrentProtocol(bittorrentProtocol Protocol) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithBypassAuthSubnetWhitelist(bypassAuthSubnetWhitelist string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithBypassAuthSubnetWhitelistEnabled(bypassAuthSubnetWhitelistEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithBypassLocalAuth(bypassLocalAuth bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithCategoryChangedTmmEnabled(categoryChangedTmmEnabled bool) *AppSetPreferencesRequest
- func (req *AppSetPreferencesRequest) WithChanged(fields ...string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithCheckingMemoryUse(checkingMemoryUse int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithCreateSubfolderEnabled(createSubfolderEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithCurrentInterfaceAddress(currentInterfaceAddress string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithCurrentNetworkInterface(currentNetworkInterface string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDht(dht bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDiskCache(diskCache int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDiskCacheTtl(diskCacheTtl Duration) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDlLimit(dlLimit KiLimit) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDontCountSlowTorrents(dontCountSlowTorrents bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDyndnsDomain(dyndnsDomain string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDyndnsEnabled(dyndnsEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDyndnsPassword(dyndnsPassword string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDyndnsService(dyndnsService ServiceType) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithDyndnsUsername(dyndnsUsername string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithEmbeddedTrackerPort(embeddedTrackerPort int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithEnableCoalesceReadWrite(enableCoalesceReadWrite bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithEnableEmbeddedTracker(enableEmbeddedTracker bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithEnableMultiConnectionsFromSameIp(enableMultiConnectionsFromSameIp bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithEnableOsCache(enableOsCache bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithEnableSuperSeeding(enableSuperSeeding bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithEnableUploadSuggestions(enableUploadSuggestions bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithEncryption(encryption Encryption) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithExportDir(exportDir string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithExportDirFin(exportDirFin string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithFilePoolSize(filePoolSize int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithIncompleteFilesExt(incompleteFilesExt bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithIpFilterEnabled(ipFilterEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithIpFilterPath(ipFilterPath string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithIpFilterTrackers(ipFilterTrackers bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithLimitLanPeers(limitLanPeers bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithLimitTcpOverhead(limitTcpOverhead bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithLimitUtpRate(limitUtpRate bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithListenPort(listenPort int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithLocale(locale string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithLsd(lsd bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMailNotificationAuthEnabled(mailNotificationAuthEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMailNotificationEmail(mailNotificationEmail string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMailNotificationEnabled(mailNotificationEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMailNotificationPassword(mailNotificationPassword string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMailNotificationSender(mailNotificationSender string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMailNotificationSmtp(mailNotificationSmtp string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMailNotificationSslEnabled(mailNotificationSslEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMailNotificationUsername(mailNotificationUsername string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxActiveDownloads(maxActiveDownloads int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxActiveTorrents(maxActiveTorrents int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxActiveUploads(maxActiveUploads int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxConnec(maxConnec int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxConnecPerTorrent(maxConnecPerTorrent int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxRatio(maxRatio Percent) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxRatioAct(maxRatioAct BehaviorType) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxRatioEnabled(maxRatioEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxSeedingTime(maxSeedingTime Duration) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxSeedingTimeEnabled(maxSeedingTimeEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxUploads(maxUploads int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithMaxUploadsPerTorrent(maxUploadsPerTorrent int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithOutgoingPortsMax(outgoingPortsMax int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithOutgoingPortsMin(outgoingPortsMin int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithPex(pex bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithPreallocateAll(preallocateAll bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithProxyAuthEnabled(proxyAuthEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithProxyIp(proxyIp string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithProxyPassword(proxyPassword string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithProxyPeerConnections(proxyPeerConnections bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithProxyPort(proxyPort int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithProxyTorrentsOnly(proxyTorrentsOnly bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithProxyType(proxyType ProxyType) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithProxyUsername(proxyUsername string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithQueueingEnabled(queueingEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithRandomPort(randomPort bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithRecheckCompletedTorrents(recheckCompletedTorrents bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithResolvePeerCountries(resolvePeerCountries bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithRssAutoDownloadingEnabled(rssAutoDownloadingEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithRssMaxArticlesPerFeed(rssMaxArticlesPerFeed int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithRssProcessingEnabled(rssProcessingEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithRssRefreshInterval(rssRefreshInterval int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSavePath(savePath string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSavePathChangedTmmEnabled(savePathChangedTmmEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSaveResumeDataInterval(saveResumeDataInterval Duration) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithScanDirs(scanDirs map[string]interface{}) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithScheduleFromHour(scheduleFromHour int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithScheduleFromMin(scheduleFromMin int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithScheduleToHour(scheduleToHour int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithScheduleToMin(scheduleToMin int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSchedulerDays(schedulerDays DaySchedule) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSchedulerEnabled(schedulerEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSendBufferLowWatermark(sendBufferLowWatermark int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSendBufferWatermark(sendBufferWatermark int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSendBufferWatermarkFactor(sendBufferWatermarkFactor int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSlowTorrentDlRateThreshold(slowTorrentDlRateThreshold KiLimit) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSlowTorrentInactiveTimer(slowTorrentInactiveTimer Duration) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSlowTorrentUlRateThreshold(slowTorrentUlRateThreshold KiLimit) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithSocketBacklogSize(socketBacklogSize int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithStartPausedEnabled(startPausedEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithTempPath(tempPath string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithTempPathEnabled(tempPathEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithTorrentChangedTmmEnabled(torrentChangedTmmEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithUpLimit(upLimit KiLimit) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithUploadChokingAlgorithm(uploadChokingAlgorithm int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithUploadSlotsBehavior(uploadSlotsBehavior int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithUpnp(upnp bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithUseHttps(useHttps bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithUtpTcpMixedMode(utpTcpMixedMode int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiAddress(webUiAddress string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiClickjackingProtectionEnabled(webUiClickjackingProtectionEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiCsrfProtectionEnabled(webUiCsrfProtectionEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiDomainList(webUiDomainList string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiHostHeaderValidationEnabled(webUiHostHeaderValidationEnabled bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiHttpsCertPath(webUiHttpsCertPath string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiHttpsKeyPath(webUiHttpsKeyPath string) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiPort(webUiPort int64) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiSessionTimeout(webUiSessionTimeout Duration) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiUpnp(webUiUpnp bool) *AppSetPreferencesRequest
- func (req AppSetPreferencesRequest) WithWebUiUsername(webUiUsername string) *AppSetPreferencesRequest
- type AppShutdownRequest
- type AppVersionRequest
- type AppWebapiVersionRequest
- type AuthLogoutRequest
- type BehaviorType
- type Bool
- type ByteCount
- type Category
- type Client
- type ClientOption
- func WithCredentialFallback(user, pass string) ClientOption
- func WithHTTPClient(httpClient *http.Client) ClientOption
- func WithHost(host string) ClientOption
- func WithLogf(logf func(string, ...interface{})) ClientOption
- func WithTimeout(timeout time.Duration) ClientOption
- func WithURL(urlstr string) ClientOption
- func WithUserAgent(userAgent string) ClientOption
- type ConnectionStatus
- type DaySchedule
- type Duration
- type Encryption
- type Error
- type File
- type FilePriority
- type FilterType
- type KiLimit
- type LogMainRequest
- func (req *LogMainRequest) Do(ctx context.Context, cl *Client) ([]MainLogEntry, error)
- func (req LogMainRequest) WithCritical(critical bool) *LogMainRequest
- func (req LogMainRequest) WithInfo(info bool) *LogMainRequest
- func (req LogMainRequest) WithLastKnownID(lastKnownID int64) *LogMainRequest
- func (req LogMainRequest) WithNormal(normal bool) *LogMainRequest
- func (req LogMainRequest) WithWarning(warning bool) *LogMainRequest
- type LogPeersRequest
- type LogType
- type MainLogEntry
- type MilliTime
- type PeersLogEntry
- type Percent
- type PieceState
- type Plugin
- type Preferences
- type Protocol
- type ProxyType
- type Rate
- type RootType
- type RssAddFeedRequest
- type RssAddFolderRequest
- type RssItemsRequest
- type RssMoveItemRequest
- type RssRemoveItemRequest
- type RssRemoveRuleRequest
- type RssRenameRuleRequest
- type RssRulesRequest
- type RssSetRuleRequest
- type Rule
- type SearchCategoriesRequest
- type SearchDeleteRequest
- type SearchEnablePluginRequest
- type SearchInstallPluginRequest
- type SearchPluginsRequest
- type SearchResult
- type SearchResultsRequest
- type SearchResultsResponse
- type SearchStartRequest
- func (req *SearchStartRequest) Do(ctx context.Context, cl *Client) (*SearchStartResponse, error)
- func (req SearchStartRequest) WithCategory(category string) *SearchStartRequest
- func (req SearchStartRequest) WithPattern(pattern string) *SearchStartRequest
- func (req SearchStartRequest) WithPlugins(plugins []string) *SearchStartRequest
- type SearchStartResponse
- type SearchStatusInfo
- type SearchStatusRequest
- type SearchStopRequest
- type SearchUninstallPluginRequest
- type SearchUpdatePluginsRequest
- type ServiceType
- type State
- type SyncMaindataRequest
- type SyncMaindataResponse
- type SyncTorrentPeersRequest
- type SyncTorrentPeersResponse
- type Time
- type Torrent
- type TorrentProperties
- type TorrentsAddPeersRequest
- type TorrentsAddRequest
- func (req *TorrentsAddRequest) Do(ctx context.Context, cl *Client) error
- func (req *TorrentsAddRequest) EncodeFormData(w io.Writer) (string, error)
- func (req TorrentsAddRequest) WithAutoTMM(autoTMM bool) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithCategory(category string) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithCookie(name, value string) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithDlLimit(dlLimit Rate) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithFirstLastPiecePrio(firstLastPiecePrio bool) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithPaused(paused bool) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithRename(rename string) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithRootFolder(rootFolder RootType) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithSavepath(savepath string) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithSequentialDownload(sequentialDownload bool) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithSkipChecking(skipChecking bool) *TorrentsAddRequest
- func (req *TorrentsAddRequest) WithTorrent(name string, data []byte) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithURLs(urls []string) *TorrentsAddRequest
- func (req TorrentsAddRequest) WithUpLimit(upLimit Rate) *TorrentsAddRequest
- type TorrentsAddTagsRequest
- type TorrentsAddTrackersRequest
- type TorrentsBottomPrioRequest
- type TorrentsCategoriesRequest
- type TorrentsCreateCategoryRequest
- type TorrentsCreateTagsRequest
- type TorrentsDecreasePrioRequest
- type TorrentsDeleteRequest
- type TorrentsDeleteTagsRequest
- type TorrentsDownloadLimitRequest
- type TorrentsEditCategoryRequest
- type TorrentsEditTrackerRequest
- type TorrentsFilePrioRequest
- type TorrentsFilesRequest
- type TorrentsIncreasePrioRequest
- type TorrentsInfoRequest
- func (req *TorrentsInfoRequest) Do(ctx context.Context, cl *Client) ([]Torrent, error)
- func (req TorrentsInfoRequest) WithCategory(category string) *TorrentsInfoRequest
- func (req TorrentsInfoRequest) WithFilter(filter FilterType) *TorrentsInfoRequest
- func (req TorrentsInfoRequest) WithLimit(limit int64) *TorrentsInfoRequest
- func (req TorrentsInfoRequest) WithOffset(offset int64) *TorrentsInfoRequest
- func (req TorrentsInfoRequest) WithReverse(reverse bool) *TorrentsInfoRequest
- func (req TorrentsInfoRequest) WithSort(sort string) *TorrentsInfoRequest
- type TorrentsInfoResponse
- type TorrentsPauseRequest
- type TorrentsPieceHashesRequest
- type TorrentsPieceStatesRequest
- type TorrentsPropertiesRequest
- type TorrentsReannounceRequest
- type TorrentsRecheckRequest
- type TorrentsRemoveCategoriesRequest
- type TorrentsRemoveTagsRequest
- type TorrentsRemoveTrackersRequest
- type TorrentsRenameRequest
- type TorrentsResumeRequest
- type TorrentsSetAutoManagementRequest
- type TorrentsSetCategoryRequest
- type TorrentsSetDownloadLimitRequest
- type TorrentsSetForceStartRequest
- type TorrentsSetLocationRequest
- type TorrentsSetShareLimitsRequest
- func (req *TorrentsSetShareLimitsRequest) Do(ctx context.Context, cl *Client) error
- func (req TorrentsSetShareLimitsRequest) WithRatioLimit(ratioLimit Percent) *TorrentsSetShareLimitsRequest
- func (req TorrentsSetShareLimitsRequest) WithSeedingTimeLimit(seedingTimeLimit Duration) *TorrentsSetShareLimitsRequest
- type TorrentsSetSuperSeedingRequest
- type TorrentsSetUploadLimitRequest
- type TorrentsTagsRequest
- type TorrentsToggleFirstLastPiecePrioRequest
- type TorrentsToggleSequentialDownloadRequest
- type TorrentsTopPrioRequest
- type TorrentsTrackersRequest
- type TorrentsUploadLimitRequest
- type TorrentsWebseedsRequest
- type Tracker
- type TrackerStatus
- type TransferBanPeersRequest
- type TransferDownloadLimitRequest
- type TransferInfoRequest
- type TransferInfoResponse
- type TransferSetDownloadLimitRequest
- type TransferSetUploadLimitRequest
- type TransferSpeedLimitsModeRequest
- type TransferToggleSpeedLimitsModeRequest
- type TransferUploadLimitRequest
- type Webseed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppBuildInfoRequest ¶
type AppBuildInfoRequest struct{}
AppBuildInfoRequest is a app buildInfo request.
func AppBuildInfo ¶
func AppBuildInfo() *AppBuildInfoRequest
AppBuildInfo creates a app buildInfo request.
func (*AppBuildInfoRequest) Do ¶
func (req *AppBuildInfoRequest) Do(ctx context.Context, cl *Client) (*AppBuildInfoResponse, error)
Do executes the request against the provided context and client.
type AppBuildInfoResponse ¶
type AppBuildInfoResponse struct { Qt string `json:"qt,omitempty" yaml:"qt,omitempty"` // QT version Libtorrent string `json:"libtorrent,omitempty" yaml:"libtorrent,omitempty"` // libtorrent version Boost string `json:"boost,omitempty" yaml:"boost,omitempty"` // Boost version Openssl string `json:"openssl,omitempty" yaml:"openssl,omitempty"` // OpenSSL version Bitness int64 `json:"bitness,omitempty" yaml:"bitness,omitempty"` // Application bitness (e.g. 64-bit) Zlib string `json:"zlib,omitempty" yaml:"zlib,omitempty"` // Zlib version }
AppBuildInfoResponse is the app buildInfo response.
type AppDefaultSavePathRequest ¶
type AppDefaultSavePathRequest struct{}
AppDefaultSavePathRequest is a app defaultSavePath request.
func AppDefaultSavePath ¶
func AppDefaultSavePath() *AppDefaultSavePathRequest
AppDefaultSavePath creates a app defaultSavePath request.
type AppPreferencesRequest ¶
type AppPreferencesRequest struct{}
AppPreferencesRequest is a app preferences request.
func AppPreferences ¶
func AppPreferences() *AppPreferencesRequest
AppPreferences creates a app preferences request.
func (*AppPreferencesRequest) Do ¶
func (req *AppPreferencesRequest) Do(ctx context.Context, cl *Client) (*AppPreferencesResponse, error)
Do executes the request against the provided context and client.
type AppPreferencesResponse ¶
type AppPreferencesResponse = Preferences
AppPreferencesResponse is the app preferences response.
type AppSetPreferencesRequest ¶
type AppSetPreferencesRequest struct { Preferences // contains filtered or unexported fields }
AppSetPreferencesRequest is a app setPreferences request.
func AppSetPreferences ¶
func AppSetPreferences() *AppSetPreferencesRequest
AppSetPreferences creates a app setPreferences request.
func (*AppSetPreferencesRequest) Do ¶
func (req *AppSetPreferencesRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (AppSetPreferencesRequest) WithAddTrackers ¶
func (req AppSetPreferencesRequest) WithAddTrackers(addTrackers string) *AppSetPreferencesRequest
WithAddTrackers sets add_trackers.
func (AppSetPreferencesRequest) WithAddTrackersEnabled ¶
func (req AppSetPreferencesRequest) WithAddTrackersEnabled(addTrackersEnabled bool) *AppSetPreferencesRequest
WithAddTrackersEnabled sets add_trackers_enabled.
func (AppSetPreferencesRequest) WithAltDlLimit ¶
func (req AppSetPreferencesRequest) WithAltDlLimit(altDlLimit KiLimit) *AppSetPreferencesRequest
WithAltDlLimit sets alt_dl_limit.
func (AppSetPreferencesRequest) WithAltUpLimit ¶
func (req AppSetPreferencesRequest) WithAltUpLimit(altUpLimit KiLimit) *AppSetPreferencesRequest
WithAltUpLimit sets alt_up_limit.
func (AppSetPreferencesRequest) WithAlternativeWebuiEnabled ¶
func (req AppSetPreferencesRequest) WithAlternativeWebuiEnabled(alternativeWebuiEnabled bool) *AppSetPreferencesRequest
WithAlternativeWebuiEnabled sets alternative_webui_enabled.
func (AppSetPreferencesRequest) WithAlternativeWebuiPath ¶
func (req AppSetPreferencesRequest) WithAlternativeWebuiPath(alternativeWebuiPath string) *AppSetPreferencesRequest
WithAlternativeWebuiPath sets alternative_webui_path.
func (AppSetPreferencesRequest) WithAnnounceIp ¶
func (req AppSetPreferencesRequest) WithAnnounceIp(announceIp string) *AppSetPreferencesRequest
WithAnnounceIp sets announce_ip.
func (AppSetPreferencesRequest) WithAnnounceToAllTiers ¶
func (req AppSetPreferencesRequest) WithAnnounceToAllTiers(announceToAllTiers bool) *AppSetPreferencesRequest
WithAnnounceToAllTiers sets announce_to_all_tiers.
func (AppSetPreferencesRequest) WithAnnounceToAllTrackers ¶
func (req AppSetPreferencesRequest) WithAnnounceToAllTrackers(announceToAllTrackers bool) *AppSetPreferencesRequest
WithAnnounceToAllTrackers sets announce_to_all_trackers.
func (AppSetPreferencesRequest) WithAnonymousMode ¶
func (req AppSetPreferencesRequest) WithAnonymousMode(anonymousMode bool) *AppSetPreferencesRequest
WithAnonymousMode sets anonymous_mode.
func (AppSetPreferencesRequest) WithAsyncIoThreads ¶
func (req AppSetPreferencesRequest) WithAsyncIoThreads(asyncIoThreads int64) *AppSetPreferencesRequest
WithAsyncIoThreads sets async_io_threads.
func (AppSetPreferencesRequest) WithAutoDeleteMode ¶
func (req AppSetPreferencesRequest) WithAutoDeleteMode(autoDeleteMode int64) *AppSetPreferencesRequest
WithAutoDeleteMode sets auto_delete_mode.
func (AppSetPreferencesRequest) WithAutoTmmEnabled ¶
func (req AppSetPreferencesRequest) WithAutoTmmEnabled(autoTmmEnabled bool) *AppSetPreferencesRequest
WithAutoTmmEnabled sets auto_tmm_enabled.
func (AppSetPreferencesRequest) WithAutorunEnabled ¶
func (req AppSetPreferencesRequest) WithAutorunEnabled(autorunEnabled bool) *AppSetPreferencesRequest
WithAutorunEnabled sets autorun_enabled.
func (AppSetPreferencesRequest) WithAutorunProgram ¶
func (req AppSetPreferencesRequest) WithAutorunProgram(autorunProgram string) *AppSetPreferencesRequest
WithAutorunProgram sets autorun_program.
func (AppSetPreferencesRequest) WithBannedIPs ¶
func (req AppSetPreferencesRequest) WithBannedIPs(bannedIPs string) *AppSetPreferencesRequest
WithBannedIPs sets banned_IPs.
func (AppSetPreferencesRequest) WithBittorrentProtocol ¶
func (req AppSetPreferencesRequest) WithBittorrentProtocol(bittorrentProtocol Protocol) *AppSetPreferencesRequest
WithBittorrentProtocol sets bittorrent_protocol.
func (AppSetPreferencesRequest) WithBypassAuthSubnetWhitelist ¶
func (req AppSetPreferencesRequest) WithBypassAuthSubnetWhitelist(bypassAuthSubnetWhitelist string) *AppSetPreferencesRequest
WithBypassAuthSubnetWhitelist sets bypass_auth_subnet_whitelist.
func (AppSetPreferencesRequest) WithBypassAuthSubnetWhitelistEnabled ¶
func (req AppSetPreferencesRequest) WithBypassAuthSubnetWhitelistEnabled(bypassAuthSubnetWhitelistEnabled bool) *AppSetPreferencesRequest
WithBypassAuthSubnetWhitelistEnabled sets bypass_auth_subnet_whitelist_enabled.
func (AppSetPreferencesRequest) WithBypassLocalAuth ¶
func (req AppSetPreferencesRequest) WithBypassLocalAuth(bypassLocalAuth bool) *AppSetPreferencesRequest
WithBypassLocalAuth sets bypass_local_auth.
func (AppSetPreferencesRequest) WithCategoryChangedTmmEnabled ¶
func (req AppSetPreferencesRequest) WithCategoryChangedTmmEnabled(categoryChangedTmmEnabled bool) *AppSetPreferencesRequest
WithCategoryChangedTmmEnabled sets category_changed_tmm_enabled.
func (*AppSetPreferencesRequest) WithChanged ¶
func (req *AppSetPreferencesRequest) WithChanged(fields ...string) *AppSetPreferencesRequest
WithChanged marks the fields that were changed.
func (AppSetPreferencesRequest) WithCheckingMemoryUse ¶
func (req AppSetPreferencesRequest) WithCheckingMemoryUse(checkingMemoryUse int64) *AppSetPreferencesRequest
WithCheckingMemoryUse sets checking_memory_use.
func (AppSetPreferencesRequest) WithCreateSubfolderEnabled ¶
func (req AppSetPreferencesRequest) WithCreateSubfolderEnabled(createSubfolderEnabled bool) *AppSetPreferencesRequest
WithCreateSubfolderEnabled sets create_subfolder_enabled.
func (AppSetPreferencesRequest) WithCurrentInterfaceAddress ¶
func (req AppSetPreferencesRequest) WithCurrentInterfaceAddress(currentInterfaceAddress string) *AppSetPreferencesRequest
WithCurrentInterfaceAddress sets current_interface_address.
func (AppSetPreferencesRequest) WithCurrentNetworkInterface ¶
func (req AppSetPreferencesRequest) WithCurrentNetworkInterface(currentNetworkInterface string) *AppSetPreferencesRequest
WithCurrentNetworkInterface sets current_network_interface.
func (AppSetPreferencesRequest) WithDht ¶
func (req AppSetPreferencesRequest) WithDht(dht bool) *AppSetPreferencesRequest
WithDht sets dht.
func (AppSetPreferencesRequest) WithDiskCache ¶
func (req AppSetPreferencesRequest) WithDiskCache(diskCache int64) *AppSetPreferencesRequest
WithDiskCache sets disk_cache.
func (AppSetPreferencesRequest) WithDiskCacheTtl ¶
func (req AppSetPreferencesRequest) WithDiskCacheTtl(diskCacheTtl Duration) *AppSetPreferencesRequest
WithDiskCacheTtl sets disk_cache_ttl.
func (AppSetPreferencesRequest) WithDlLimit ¶
func (req AppSetPreferencesRequest) WithDlLimit(dlLimit KiLimit) *AppSetPreferencesRequest
WithDlLimit sets dl_limit.
func (AppSetPreferencesRequest) WithDontCountSlowTorrents ¶
func (req AppSetPreferencesRequest) WithDontCountSlowTorrents(dontCountSlowTorrents bool) *AppSetPreferencesRequest
WithDontCountSlowTorrents sets dont_count_slow_torrents.
func (AppSetPreferencesRequest) WithDyndnsDomain ¶
func (req AppSetPreferencesRequest) WithDyndnsDomain(dyndnsDomain string) *AppSetPreferencesRequest
WithDyndnsDomain sets dyndns_domain.
func (AppSetPreferencesRequest) WithDyndnsEnabled ¶
func (req AppSetPreferencesRequest) WithDyndnsEnabled(dyndnsEnabled bool) *AppSetPreferencesRequest
WithDyndnsEnabled sets dyndns_enabled.
func (AppSetPreferencesRequest) WithDyndnsPassword ¶
func (req AppSetPreferencesRequest) WithDyndnsPassword(dyndnsPassword string) *AppSetPreferencesRequest
WithDyndnsPassword sets dyndns_password.
func (AppSetPreferencesRequest) WithDyndnsService ¶
func (req AppSetPreferencesRequest) WithDyndnsService(dyndnsService ServiceType) *AppSetPreferencesRequest
WithDyndnsService sets dyndns_service.
func (AppSetPreferencesRequest) WithDyndnsUsername ¶
func (req AppSetPreferencesRequest) WithDyndnsUsername(dyndnsUsername string) *AppSetPreferencesRequest
WithDyndnsUsername sets dyndns_username.
func (AppSetPreferencesRequest) WithEmbeddedTrackerPort ¶
func (req AppSetPreferencesRequest) WithEmbeddedTrackerPort(embeddedTrackerPort int64) *AppSetPreferencesRequest
WithEmbeddedTrackerPort sets embedded_tracker_port.
func (AppSetPreferencesRequest) WithEnableCoalesceReadWrite ¶
func (req AppSetPreferencesRequest) WithEnableCoalesceReadWrite(enableCoalesceReadWrite bool) *AppSetPreferencesRequest
WithEnableCoalesceReadWrite sets enable_coalesce_read_write.
func (AppSetPreferencesRequest) WithEnableEmbeddedTracker ¶
func (req AppSetPreferencesRequest) WithEnableEmbeddedTracker(enableEmbeddedTracker bool) *AppSetPreferencesRequest
WithEnableEmbeddedTracker sets enable_embedded_tracker.
func (AppSetPreferencesRequest) WithEnableMultiConnectionsFromSameIp ¶
func (req AppSetPreferencesRequest) WithEnableMultiConnectionsFromSameIp(enableMultiConnectionsFromSameIp bool) *AppSetPreferencesRequest
WithEnableMultiConnectionsFromSameIp sets enable_multi_connections_from_same_ip.
func (AppSetPreferencesRequest) WithEnableOsCache ¶
func (req AppSetPreferencesRequest) WithEnableOsCache(enableOsCache bool) *AppSetPreferencesRequest
WithEnableOsCache sets enable_os_cache.
func (AppSetPreferencesRequest) WithEnableSuperSeeding ¶
func (req AppSetPreferencesRequest) WithEnableSuperSeeding(enableSuperSeeding bool) *AppSetPreferencesRequest
WithEnableSuperSeeding sets enable_super_seeding.
func (AppSetPreferencesRequest) WithEnableUploadSuggestions ¶
func (req AppSetPreferencesRequest) WithEnableUploadSuggestions(enableUploadSuggestions bool) *AppSetPreferencesRequest
WithEnableUploadSuggestions sets enable_upload_suggestions.
func (AppSetPreferencesRequest) WithEncryption ¶
func (req AppSetPreferencesRequest) WithEncryption(encryption Encryption) *AppSetPreferencesRequest
WithEncryption sets encryption.
func (AppSetPreferencesRequest) WithExportDir ¶
func (req AppSetPreferencesRequest) WithExportDir(exportDir string) *AppSetPreferencesRequest
WithExportDir sets export_dir.
func (AppSetPreferencesRequest) WithExportDirFin ¶
func (req AppSetPreferencesRequest) WithExportDirFin(exportDirFin string) *AppSetPreferencesRequest
WithExportDirFin sets export_dir_fin.
func (AppSetPreferencesRequest) WithFilePoolSize ¶
func (req AppSetPreferencesRequest) WithFilePoolSize(filePoolSize int64) *AppSetPreferencesRequest
WithFilePoolSize sets file_pool_size.
func (AppSetPreferencesRequest) WithIncompleteFilesExt ¶
func (req AppSetPreferencesRequest) WithIncompleteFilesExt(incompleteFilesExt bool) *AppSetPreferencesRequest
WithIncompleteFilesExt sets incomplete_files_ext.
func (AppSetPreferencesRequest) WithIpFilterEnabled ¶
func (req AppSetPreferencesRequest) WithIpFilterEnabled(ipFilterEnabled bool) *AppSetPreferencesRequest
WithIpFilterEnabled sets ip_filter_enabled.
func (AppSetPreferencesRequest) WithIpFilterPath ¶
func (req AppSetPreferencesRequest) WithIpFilterPath(ipFilterPath string) *AppSetPreferencesRequest
WithIpFilterPath sets ip_filter_path.
func (AppSetPreferencesRequest) WithIpFilterTrackers ¶
func (req AppSetPreferencesRequest) WithIpFilterTrackers(ipFilterTrackers bool) *AppSetPreferencesRequest
WithIpFilterTrackers sets ip_filter_trackers.
func (AppSetPreferencesRequest) WithLimitLanPeers ¶
func (req AppSetPreferencesRequest) WithLimitLanPeers(limitLanPeers bool) *AppSetPreferencesRequest
WithLimitLanPeers sets limit_lan_peers.
func (AppSetPreferencesRequest) WithLimitTcpOverhead ¶
func (req AppSetPreferencesRequest) WithLimitTcpOverhead(limitTcpOverhead bool) *AppSetPreferencesRequest
WithLimitTcpOverhead sets limit_tcp_overhead.
func (AppSetPreferencesRequest) WithLimitUtpRate ¶
func (req AppSetPreferencesRequest) WithLimitUtpRate(limitUtpRate bool) *AppSetPreferencesRequest
WithLimitUtpRate sets limit_utp_rate.
func (AppSetPreferencesRequest) WithListenPort ¶
func (req AppSetPreferencesRequest) WithListenPort(listenPort int64) *AppSetPreferencesRequest
WithListenPort sets listen_port.
func (AppSetPreferencesRequest) WithLocale ¶
func (req AppSetPreferencesRequest) WithLocale(locale string) *AppSetPreferencesRequest
WithLocale sets locale.
func (AppSetPreferencesRequest) WithLsd ¶
func (req AppSetPreferencesRequest) WithLsd(lsd bool) *AppSetPreferencesRequest
WithLsd sets lsd.
func (AppSetPreferencesRequest) WithMailNotificationAuthEnabled ¶
func (req AppSetPreferencesRequest) WithMailNotificationAuthEnabled(mailNotificationAuthEnabled bool) *AppSetPreferencesRequest
WithMailNotificationAuthEnabled sets mail_notification_auth_enabled.
func (AppSetPreferencesRequest) WithMailNotificationEmail ¶
func (req AppSetPreferencesRequest) WithMailNotificationEmail(mailNotificationEmail string) *AppSetPreferencesRequest
WithMailNotificationEmail sets mail_notification_email.
func (AppSetPreferencesRequest) WithMailNotificationEnabled ¶
func (req AppSetPreferencesRequest) WithMailNotificationEnabled(mailNotificationEnabled bool) *AppSetPreferencesRequest
WithMailNotificationEnabled sets mail_notification_enabled.
func (AppSetPreferencesRequest) WithMailNotificationPassword ¶
func (req AppSetPreferencesRequest) WithMailNotificationPassword(mailNotificationPassword string) *AppSetPreferencesRequest
WithMailNotificationPassword sets mail_notification_password.
func (AppSetPreferencesRequest) WithMailNotificationSender ¶
func (req AppSetPreferencesRequest) WithMailNotificationSender(mailNotificationSender string) *AppSetPreferencesRequest
WithMailNotificationSender sets mail_notification_sender.
func (AppSetPreferencesRequest) WithMailNotificationSmtp ¶
func (req AppSetPreferencesRequest) WithMailNotificationSmtp(mailNotificationSmtp string) *AppSetPreferencesRequest
WithMailNotificationSmtp sets mail_notification_smtp.
func (AppSetPreferencesRequest) WithMailNotificationSslEnabled ¶
func (req AppSetPreferencesRequest) WithMailNotificationSslEnabled(mailNotificationSslEnabled bool) *AppSetPreferencesRequest
WithMailNotificationSslEnabled sets mail_notification_ssl_enabled.
func (AppSetPreferencesRequest) WithMailNotificationUsername ¶
func (req AppSetPreferencesRequest) WithMailNotificationUsername(mailNotificationUsername string) *AppSetPreferencesRequest
WithMailNotificationUsername sets mail_notification_username.
func (AppSetPreferencesRequest) WithMaxActiveDownloads ¶
func (req AppSetPreferencesRequest) WithMaxActiveDownloads(maxActiveDownloads int64) *AppSetPreferencesRequest
WithMaxActiveDownloads sets max_active_downloads.
func (AppSetPreferencesRequest) WithMaxActiveTorrents ¶
func (req AppSetPreferencesRequest) WithMaxActiveTorrents(maxActiveTorrents int64) *AppSetPreferencesRequest
WithMaxActiveTorrents sets max_active_torrents.
func (AppSetPreferencesRequest) WithMaxActiveUploads ¶
func (req AppSetPreferencesRequest) WithMaxActiveUploads(maxActiveUploads int64) *AppSetPreferencesRequest
WithMaxActiveUploads sets max_active_uploads.
func (AppSetPreferencesRequest) WithMaxConnec ¶
func (req AppSetPreferencesRequest) WithMaxConnec(maxConnec int64) *AppSetPreferencesRequest
WithMaxConnec sets max_connec.
func (AppSetPreferencesRequest) WithMaxConnecPerTorrent ¶
func (req AppSetPreferencesRequest) WithMaxConnecPerTorrent(maxConnecPerTorrent int64) *AppSetPreferencesRequest
WithMaxConnecPerTorrent sets max_connec_per_torrent.
func (AppSetPreferencesRequest) WithMaxRatio ¶
func (req AppSetPreferencesRequest) WithMaxRatio(maxRatio Percent) *AppSetPreferencesRequest
WithMaxRatio sets max_ratio.
func (AppSetPreferencesRequest) WithMaxRatioAct ¶
func (req AppSetPreferencesRequest) WithMaxRatioAct(maxRatioAct BehaviorType) *AppSetPreferencesRequest
WithMaxRatioAct sets max_ratio_act.
func (AppSetPreferencesRequest) WithMaxRatioEnabled ¶
func (req AppSetPreferencesRequest) WithMaxRatioEnabled(maxRatioEnabled bool) *AppSetPreferencesRequest
WithMaxRatioEnabled sets max_ratio_enabled.
func (AppSetPreferencesRequest) WithMaxSeedingTime ¶
func (req AppSetPreferencesRequest) WithMaxSeedingTime(maxSeedingTime Duration) *AppSetPreferencesRequest
WithMaxSeedingTime sets max_seeding_time.
func (AppSetPreferencesRequest) WithMaxSeedingTimeEnabled ¶
func (req AppSetPreferencesRequest) WithMaxSeedingTimeEnabled(maxSeedingTimeEnabled bool) *AppSetPreferencesRequest
WithMaxSeedingTimeEnabled sets max_seeding_time_enabled.
func (AppSetPreferencesRequest) WithMaxUploads ¶
func (req AppSetPreferencesRequest) WithMaxUploads(maxUploads int64) *AppSetPreferencesRequest
WithMaxUploads sets max_uploads.
func (AppSetPreferencesRequest) WithMaxUploadsPerTorrent ¶
func (req AppSetPreferencesRequest) WithMaxUploadsPerTorrent(maxUploadsPerTorrent int64) *AppSetPreferencesRequest
WithMaxUploadsPerTorrent sets max_uploads_per_torrent.
func (AppSetPreferencesRequest) WithOutgoingPortsMax ¶
func (req AppSetPreferencesRequest) WithOutgoingPortsMax(outgoingPortsMax int64) *AppSetPreferencesRequest
WithOutgoingPortsMax sets outgoing_ports_max.
func (AppSetPreferencesRequest) WithOutgoingPortsMin ¶
func (req AppSetPreferencesRequest) WithOutgoingPortsMin(outgoingPortsMin int64) *AppSetPreferencesRequest
WithOutgoingPortsMin sets outgoing_ports_min.
func (AppSetPreferencesRequest) WithPex ¶
func (req AppSetPreferencesRequest) WithPex(pex bool) *AppSetPreferencesRequest
WithPex sets pex.
func (AppSetPreferencesRequest) WithPreallocateAll ¶
func (req AppSetPreferencesRequest) WithPreallocateAll(preallocateAll bool) *AppSetPreferencesRequest
WithPreallocateAll sets preallocate_all.
func (AppSetPreferencesRequest) WithProxyAuthEnabled ¶
func (req AppSetPreferencesRequest) WithProxyAuthEnabled(proxyAuthEnabled bool) *AppSetPreferencesRequest
WithProxyAuthEnabled sets proxy_auth_enabled.
func (AppSetPreferencesRequest) WithProxyIp ¶
func (req AppSetPreferencesRequest) WithProxyIp(proxyIp string) *AppSetPreferencesRequest
WithProxyIp sets proxy_ip.
func (AppSetPreferencesRequest) WithProxyPassword ¶
func (req AppSetPreferencesRequest) WithProxyPassword(proxyPassword string) *AppSetPreferencesRequest
WithProxyPassword sets proxy_password.
func (AppSetPreferencesRequest) WithProxyPeerConnections ¶
func (req AppSetPreferencesRequest) WithProxyPeerConnections(proxyPeerConnections bool) *AppSetPreferencesRequest
WithProxyPeerConnections sets proxy_peer_connections.
func (AppSetPreferencesRequest) WithProxyPort ¶
func (req AppSetPreferencesRequest) WithProxyPort(proxyPort int64) *AppSetPreferencesRequest
WithProxyPort sets proxy_port.
func (AppSetPreferencesRequest) WithProxyTorrentsOnly ¶
func (req AppSetPreferencesRequest) WithProxyTorrentsOnly(proxyTorrentsOnly bool) *AppSetPreferencesRequest
WithProxyTorrentsOnly sets proxy_torrents_only.
func (AppSetPreferencesRequest) WithProxyType ¶
func (req AppSetPreferencesRequest) WithProxyType(proxyType ProxyType) *AppSetPreferencesRequest
WithProxyType sets proxy_type.
func (AppSetPreferencesRequest) WithProxyUsername ¶
func (req AppSetPreferencesRequest) WithProxyUsername(proxyUsername string) *AppSetPreferencesRequest
WithProxyUsername sets proxy_username.
func (AppSetPreferencesRequest) WithQueueingEnabled ¶
func (req AppSetPreferencesRequest) WithQueueingEnabled(queueingEnabled bool) *AppSetPreferencesRequest
WithQueueingEnabled sets queueing_enabled.
func (AppSetPreferencesRequest) WithRandomPort ¶
func (req AppSetPreferencesRequest) WithRandomPort(randomPort bool) *AppSetPreferencesRequest
WithRandomPort sets random_port.
func (AppSetPreferencesRequest) WithRecheckCompletedTorrents ¶
func (req AppSetPreferencesRequest) WithRecheckCompletedTorrents(recheckCompletedTorrents bool) *AppSetPreferencesRequest
WithRecheckCompletedTorrents sets recheck_completed_torrents.
func (AppSetPreferencesRequest) WithResolvePeerCountries ¶
func (req AppSetPreferencesRequest) WithResolvePeerCountries(resolvePeerCountries bool) *AppSetPreferencesRequest
WithResolvePeerCountries sets resolve_peer_countries.
func (AppSetPreferencesRequest) WithRssAutoDownloadingEnabled ¶
func (req AppSetPreferencesRequest) WithRssAutoDownloadingEnabled(rssAutoDownloadingEnabled bool) *AppSetPreferencesRequest
WithRssAutoDownloadingEnabled sets rss_auto_downloading_enabled.
func (AppSetPreferencesRequest) WithRssMaxArticlesPerFeed ¶
func (req AppSetPreferencesRequest) WithRssMaxArticlesPerFeed(rssMaxArticlesPerFeed int64) *AppSetPreferencesRequest
WithRssMaxArticlesPerFeed sets rss_max_articles_per_feed.
func (AppSetPreferencesRequest) WithRssProcessingEnabled ¶
func (req AppSetPreferencesRequest) WithRssProcessingEnabled(rssProcessingEnabled bool) *AppSetPreferencesRequest
WithRssProcessingEnabled sets rss_processing_enabled.
func (AppSetPreferencesRequest) WithRssRefreshInterval ¶
func (req AppSetPreferencesRequest) WithRssRefreshInterval(rssRefreshInterval int64) *AppSetPreferencesRequest
WithRssRefreshInterval sets rss_refresh_interval.
func (AppSetPreferencesRequest) WithSavePath ¶
func (req AppSetPreferencesRequest) WithSavePath(savePath string) *AppSetPreferencesRequest
WithSavePath sets save_path.
func (AppSetPreferencesRequest) WithSavePathChangedTmmEnabled ¶
func (req AppSetPreferencesRequest) WithSavePathChangedTmmEnabled(savePathChangedTmmEnabled bool) *AppSetPreferencesRequest
WithSavePathChangedTmmEnabled sets save_path_changed_tmm_enabled.
func (AppSetPreferencesRequest) WithSaveResumeDataInterval ¶
func (req AppSetPreferencesRequest) WithSaveResumeDataInterval(saveResumeDataInterval Duration) *AppSetPreferencesRequest
WithSaveResumeDataInterval sets save_resume_data_interval.
func (AppSetPreferencesRequest) WithScanDirs ¶
func (req AppSetPreferencesRequest) WithScanDirs(scanDirs map[string]interface{}) *AppSetPreferencesRequest
WithScanDirs sets scan_dirs.
func (AppSetPreferencesRequest) WithScheduleFromHour ¶
func (req AppSetPreferencesRequest) WithScheduleFromHour(scheduleFromHour int64) *AppSetPreferencesRequest
WithScheduleFromHour sets schedule_from_hour.
func (AppSetPreferencesRequest) WithScheduleFromMin ¶
func (req AppSetPreferencesRequest) WithScheduleFromMin(scheduleFromMin int64) *AppSetPreferencesRequest
WithScheduleFromMin sets schedule_from_min.
func (AppSetPreferencesRequest) WithScheduleToHour ¶
func (req AppSetPreferencesRequest) WithScheduleToHour(scheduleToHour int64) *AppSetPreferencesRequest
WithScheduleToHour sets schedule_to_hour.
func (AppSetPreferencesRequest) WithScheduleToMin ¶
func (req AppSetPreferencesRequest) WithScheduleToMin(scheduleToMin int64) *AppSetPreferencesRequest
WithScheduleToMin sets schedule_to_min.
func (AppSetPreferencesRequest) WithSchedulerDays ¶
func (req AppSetPreferencesRequest) WithSchedulerDays(schedulerDays DaySchedule) *AppSetPreferencesRequest
WithSchedulerDays sets scheduler_days.
func (AppSetPreferencesRequest) WithSchedulerEnabled ¶
func (req AppSetPreferencesRequest) WithSchedulerEnabled(schedulerEnabled bool) *AppSetPreferencesRequest
WithSchedulerEnabled sets scheduler_enabled.
func (AppSetPreferencesRequest) WithSendBufferLowWatermark ¶
func (req AppSetPreferencesRequest) WithSendBufferLowWatermark(sendBufferLowWatermark int64) *AppSetPreferencesRequest
WithSendBufferLowWatermark sets send_buffer_low_watermark.
func (AppSetPreferencesRequest) WithSendBufferWatermark ¶
func (req AppSetPreferencesRequest) WithSendBufferWatermark(sendBufferWatermark int64) *AppSetPreferencesRequest
WithSendBufferWatermark sets send_buffer_watermark.
func (AppSetPreferencesRequest) WithSendBufferWatermarkFactor ¶
func (req AppSetPreferencesRequest) WithSendBufferWatermarkFactor(sendBufferWatermarkFactor int64) *AppSetPreferencesRequest
WithSendBufferWatermarkFactor sets send_buffer_watermark_factor.
func (AppSetPreferencesRequest) WithSlowTorrentDlRateThreshold ¶
func (req AppSetPreferencesRequest) WithSlowTorrentDlRateThreshold(slowTorrentDlRateThreshold KiLimit) *AppSetPreferencesRequest
WithSlowTorrentDlRateThreshold sets slow_torrent_dl_rate_threshold.
func (AppSetPreferencesRequest) WithSlowTorrentInactiveTimer ¶
func (req AppSetPreferencesRequest) WithSlowTorrentInactiveTimer(slowTorrentInactiveTimer Duration) *AppSetPreferencesRequest
WithSlowTorrentInactiveTimer sets slow_torrent_inactive_timer.
func (AppSetPreferencesRequest) WithSlowTorrentUlRateThreshold ¶
func (req AppSetPreferencesRequest) WithSlowTorrentUlRateThreshold(slowTorrentUlRateThreshold KiLimit) *AppSetPreferencesRequest
WithSlowTorrentUlRateThreshold sets slow_torrent_ul_rate_threshold.
func (AppSetPreferencesRequest) WithSocketBacklogSize ¶
func (req AppSetPreferencesRequest) WithSocketBacklogSize(socketBacklogSize int64) *AppSetPreferencesRequest
WithSocketBacklogSize sets socket_backlog_size.
func (AppSetPreferencesRequest) WithStartPausedEnabled ¶
func (req AppSetPreferencesRequest) WithStartPausedEnabled(startPausedEnabled bool) *AppSetPreferencesRequest
WithStartPausedEnabled sets start_paused_enabled.
func (AppSetPreferencesRequest) WithTempPath ¶
func (req AppSetPreferencesRequest) WithTempPath(tempPath string) *AppSetPreferencesRequest
WithTempPath sets temp_path.
func (AppSetPreferencesRequest) WithTempPathEnabled ¶
func (req AppSetPreferencesRequest) WithTempPathEnabled(tempPathEnabled bool) *AppSetPreferencesRequest
WithTempPathEnabled sets temp_path_enabled.
func (AppSetPreferencesRequest) WithTorrentChangedTmmEnabled ¶
func (req AppSetPreferencesRequest) WithTorrentChangedTmmEnabled(torrentChangedTmmEnabled bool) *AppSetPreferencesRequest
WithTorrentChangedTmmEnabled sets torrent_changed_tmm_enabled.
func (AppSetPreferencesRequest) WithUpLimit ¶
func (req AppSetPreferencesRequest) WithUpLimit(upLimit KiLimit) *AppSetPreferencesRequest
WithUpLimit sets up_limit.
func (AppSetPreferencesRequest) WithUploadChokingAlgorithm ¶
func (req AppSetPreferencesRequest) WithUploadChokingAlgorithm(uploadChokingAlgorithm int64) *AppSetPreferencesRequest
WithUploadChokingAlgorithm sets upload_choking_algorithm.
func (AppSetPreferencesRequest) WithUploadSlotsBehavior ¶
func (req AppSetPreferencesRequest) WithUploadSlotsBehavior(uploadSlotsBehavior int64) *AppSetPreferencesRequest
WithUploadSlotsBehavior sets upload_slots_behavior.
func (AppSetPreferencesRequest) WithUpnp ¶
func (req AppSetPreferencesRequest) WithUpnp(upnp bool) *AppSetPreferencesRequest
WithUpnp sets upnp.
func (AppSetPreferencesRequest) WithUseHttps ¶
func (req AppSetPreferencesRequest) WithUseHttps(useHttps bool) *AppSetPreferencesRequest
WithUseHttps sets use_https.
func (AppSetPreferencesRequest) WithUtpTcpMixedMode ¶
func (req AppSetPreferencesRequest) WithUtpTcpMixedMode(utpTcpMixedMode int64) *AppSetPreferencesRequest
WithUtpTcpMixedMode sets utp_tcp_mixed_mode.
func (AppSetPreferencesRequest) WithWebUiAddress ¶
func (req AppSetPreferencesRequest) WithWebUiAddress(webUiAddress string) *AppSetPreferencesRequest
WithWebUiAddress sets web_ui_address.
func (AppSetPreferencesRequest) WithWebUiClickjackingProtectionEnabled ¶
func (req AppSetPreferencesRequest) WithWebUiClickjackingProtectionEnabled(webUiClickjackingProtectionEnabled bool) *AppSetPreferencesRequest
WithWebUiClickjackingProtectionEnabled sets web_ui_clickjacking_protection_enabled.
func (AppSetPreferencesRequest) WithWebUiCsrfProtectionEnabled ¶
func (req AppSetPreferencesRequest) WithWebUiCsrfProtectionEnabled(webUiCsrfProtectionEnabled bool) *AppSetPreferencesRequest
WithWebUiCsrfProtectionEnabled sets web_ui_csrf_protection_enabled.
func (AppSetPreferencesRequest) WithWebUiDomainList ¶
func (req AppSetPreferencesRequest) WithWebUiDomainList(webUiDomainList string) *AppSetPreferencesRequest
WithWebUiDomainList sets web_ui_domain_list.
func (AppSetPreferencesRequest) WithWebUiHostHeaderValidationEnabled ¶
func (req AppSetPreferencesRequest) WithWebUiHostHeaderValidationEnabled(webUiHostHeaderValidationEnabled bool) *AppSetPreferencesRequest
WithWebUiHostHeaderValidationEnabled sets web_ui_host_header_validation_enabled.
func (AppSetPreferencesRequest) WithWebUiHttpsCertPath ¶
func (req AppSetPreferencesRequest) WithWebUiHttpsCertPath(webUiHttpsCertPath string) *AppSetPreferencesRequest
WithWebUiHttpsCertPath sets web_ui_https_cert_path.
func (AppSetPreferencesRequest) WithWebUiHttpsKeyPath ¶
func (req AppSetPreferencesRequest) WithWebUiHttpsKeyPath(webUiHttpsKeyPath string) *AppSetPreferencesRequest
WithWebUiHttpsKeyPath sets web_ui_https_key_path.
func (AppSetPreferencesRequest) WithWebUiPort ¶
func (req AppSetPreferencesRequest) WithWebUiPort(webUiPort int64) *AppSetPreferencesRequest
WithWebUiPort sets web_ui_port.
func (AppSetPreferencesRequest) WithWebUiSessionTimeout ¶
func (req AppSetPreferencesRequest) WithWebUiSessionTimeout(webUiSessionTimeout Duration) *AppSetPreferencesRequest
WithWebUiSessionTimeout sets web_ui_session_timeout.
func (AppSetPreferencesRequest) WithWebUiUpnp ¶
func (req AppSetPreferencesRequest) WithWebUiUpnp(webUiUpnp bool) *AppSetPreferencesRequest
WithWebUiUpnp sets web_ui_upnp.
func (AppSetPreferencesRequest) WithWebUiUsername ¶
func (req AppSetPreferencesRequest) WithWebUiUsername(webUiUsername string) *AppSetPreferencesRequest
WithWebUiUsername sets web_ui_username.
type AppShutdownRequest ¶
type AppShutdownRequest struct{}
AppShutdownRequest is a app shutdown request.
func AppShutdown ¶
func AppShutdown() *AppShutdownRequest
AppShutdown creates a app shutdown request.
type AppWebapiVersionRequest ¶
type AppWebapiVersionRequest struct{}
AppWebapiVersionRequest is a app webapiVersion request.
func AppWebapiVersion ¶
func AppWebapiVersion() *AppWebapiVersionRequest
AppWebapiVersion creates a app webapiVersion request.
type BehaviorType ¶
type BehaviorType int
BehaviorType is the max ratio stop behavior enum.
const ( BehaviorPause BehaviorType = iota BehaviorRemove )
Max ratio stop behavior values.
func (BehaviorType) String ¶
func (i BehaviorType) String() string
type Category ¶
type Category struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` // Name of the category SavePath string `json:"savePath,omitempty" yaml:"savePath,omitempty"` // Save path of the category }
Category is a category.
type Client ¶
Client is a qbittorrent web client.
func NewClient ¶
func NewClient(opts ...ClientOption) *Client
NewClient creates a new qBittorrent web client.
func (*Client) AuthLogout ¶
AuthLogout executes a auth logout request.
type ClientOption ¶
type ClientOption = func(*Client)
ClientOption is a qBittorrent web client option.
func WithCredentialFallback ¶
func WithCredentialFallback(user, pass string) ClientOption
WithCredentialFallback is a qBittorrent web client option to set the credential fallback to send to the rpc host.
func WithHTTPClient ¶
func WithHTTPClient(httpClient *http.Client) ClientOption
WithClient is a qBittorrent web client option to set the underlying http.Client used.
func WithHost ¶
func WithHost(host string) ClientOption
WithHost is a qBittorrent web client option to set the remote host. Remote URL will become 'http://<host>/transmission/rpc'.
func WithLogf ¶
func WithLogf(logf func(string, ...interface{})) ClientOption
WithLogf is a qBittorrent web client option to set a logging handler for HTTP requests and responses.
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
WithTimeout is a qBittorrent web client option to set the rpc host request tiemout.
func WithURL ¶
func WithURL(urlstr string) ClientOption
WithURL is a qBittorrent web client option to set the remote URL.
func WithUserAgent ¶
func WithUserAgent(userAgent string) ClientOption
WithUserAgent is a qBittorrent web client option to set the user agent sent to the rpc host.
type ConnectionStatus ¶
type ConnectionStatus string
ConnectionStatus is the connection status enum.
const ( ConnectionConnected ConnectionStatus = "connected" ConnectionFirewalled ConnectionStatus = "firewalled" ConnectionDisconnected ConnectionStatus = "disconnected" )
Connection status values.
type DaySchedule ¶
type DaySchedule int
DaySchedule is the day schedule enum.
const ( EveryDay DaySchedule = iota EveryWeekday EveryWeekend EveryMonday EveryTuesday EveryWednesday EveryThursday EveryFriday EverySaturday EverySunday )
Day schedule values.
func (DaySchedule) String ¶
func (i DaySchedule) String() string
type Encryption ¶
type Encryption int
Encryption is the encryption enum.
const ( EncryptionPreferred Encryption = iota EncryptionForceOn EncryptionForceOff )
Encryption values.
func (Encryption) String ¶
func (i Encryption) String() string
type Error ¶
type Error string
Error is an error.
const ( Error = "unauthorized user" // ErrTorrentNotFound is the torrent not found error. ErrTorrentNotFound Error = "torrent not found" // ErrTorrentFileInvalid is the torrent file invalid error. ErrTorrentFileInvalid Error = "torrent file invalid" // ErrRequestFailed is the request failed error. ErrRequestFailed Error = "request failed" )ErrUnauthorizedUser
Error values.
type File ¶
type File struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` // File name (including relative path) Size ByteCount `json:"size,omitempty" yaml:"size,omitempty"` // File size (bytes) Progress Percent `json:"progress,omitempty" yaml:"progress,omitempty"` // File progress (percentage/100) Priority FilePriority `json:"priority,omitempty" yaml:"priority,omitempty"` // File priority. See possible values here below IsSeed bool `json:"is_seed,omitempty" yaml:"is_seed,omitempty"` // True if file is seeding/complete PieceRange []int64 `json:"piece_range,omitempty" yaml:"piece_range,omitempty"` // The first number is the starting piece index and the second number is the ending piece index (inclusive) Availability Percent `json:"availability,omitempty" yaml:"availability,omitempty"` // Percentage of file pieces currently available }
File is a file.
type FilePriority ¶
type FilePriority int
FilePriority is the file priority enum.
const ( FilePriorityDoNotDownload FilePriority = 0 FilePriorityNormal FilePriority = 1 FilePriorityHigh FilePriority = 6 FilePriorityMaximal FilePriority = 7 )
File priority values.
func (FilePriority) String ¶
func (i FilePriority) String() string
type FilterType ¶
type FilterType string
FilterType are the filter types.
const ( FilterAll FilterType = "all" FilterDownloading FilterType = "downloading" FilterCompleted FilterType = "completed" FilterPaused FilterType = "paused" FilterActive FilterType = "active" FilterInactive FilterType = "inactive" FilterResumed FilterType = "resumed" )
Filter values.
type LogMainRequest ¶
type LogMainRequest struct { Normal bool `json:"normal" yaml:"normal"` // Include normal messages (default: true) Info bool `json:"info" yaml:"info"` // Include info messages (default: true) Warning bool `json:"warning" yaml:"warning"` // Include warning messages (default: true) Critical bool `json:"critical" yaml:"critical"` // Include critical messages (default: true) LastKnownID int64 `json:"last_known_id" yaml:"last_known_id"` // Exclude messages with "message id" <= last_known_id (default: -1) }
LogMainRequest is a log main request.
func (*LogMainRequest) Do ¶
func (req *LogMainRequest) Do(ctx context.Context, cl *Client) ([]MainLogEntry, error)
Do executes the request against the provided context and client.
func (LogMainRequest) WithCritical ¶
func (req LogMainRequest) WithCritical(critical bool) *LogMainRequest
WithCritical sets include critical messages (default: true).
func (LogMainRequest) WithInfo ¶
func (req LogMainRequest) WithInfo(info bool) *LogMainRequest
WithInfo sets include info messages (default: true).
func (LogMainRequest) WithLastKnownID ¶
func (req LogMainRequest) WithLastKnownID(lastKnownID int64) *LogMainRequest
WithLastKnownID sets exclude messages with "message id" <= last_known_id (default: -1).
func (LogMainRequest) WithNormal ¶
func (req LogMainRequest) WithNormal(normal bool) *LogMainRequest
WithNormal sets include normal messages (default: true).
func (LogMainRequest) WithWarning ¶
func (req LogMainRequest) WithWarning(warning bool) *LogMainRequest
WithWarning sets include warning messages (default: true).
type LogPeersRequest ¶
type LogPeersRequest struct {
LastKnownID int64 `json:"last_known_id" yaml:"last_known_id"` // Exclude messages with "message id" <= last_known_id (default: -1)
}
LogPeersRequest is a log peers request.
func (*LogPeersRequest) Do ¶
func (req *LogPeersRequest) Do(ctx context.Context, cl *Client) ([]PeersLogEntry, error)
Do executes the request against the provided context and client.
func (LogPeersRequest) WithLastKnownID ¶
func (req LogPeersRequest) WithLastKnownID(lastKnownID int64) *LogPeersRequest
WithLastKnownID sets exclude messages with "message id" <= last_known_id (default: -1).
type MainLogEntry ¶
type MainLogEntry struct { ID int64 `json:"id,omitempty" yaml:"id,omitempty"` // ID of the message Message string `json:"message,omitempty" yaml:"message,omitempty"` // Text of the message Timestamp MilliTime `json:"timestamp,omitempty" yaml:"timestamp,omitempty"` // Milliseconds since epoch Type LogType `json:"type,omitempty" yaml:"type,omitempty"` // Type of the message: Log::NORMAL: 1, Log::INFO: 2, Log::WARNING: 4, Log::CRITICAL: 8 }
MainLogEntry is the a main log entry.
type PeersLogEntry ¶
type PeersLogEntry struct { ID int64 `json:"id,omitempty" yaml:"id,omitempty"` // ID of the peer Ip string `json:"ip,omitempty" yaml:"ip,omitempty"` // IP of the peer Timestamp MilliTime `json:"timestamp,omitempty" yaml:"timestamp,omitempty"` // Milliseconds since epoch Blocked bool `json:"blocked,omitempty" yaml:"blocked,omitempty"` // Whether or not the peer was blocked Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` // Reason of the block }
PeersLogEntry is a peers log entry.
type PieceState ¶
type PieceState int
PieceState is the piece state enum.
const ( PieceStateNotDownloadedYet PieceState = iota PieceStateDownloading PieceStateDone )
Piece state values.
func (PieceState) String ¶
func (i PieceState) String() string
type Plugin ¶
type Plugin struct { Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` // Whether the plugin is enabled FullName string `json:"fullName,omitempty" yaml:"fullName,omitempty"` // Full name of the plugin Name string `json:"name,omitempty" yaml:"name,omitempty"` // Short name of the plugin SupportedCategories []string `json:"supportedCategories,omitempty" yaml:"supportedCategories,omitempty"` // List of supported categories as strings URL string `json:"url,omitempty" yaml:"url,omitempty"` // URL of the torrent site Version string `json:"version,omitempty" yaml:"version,omitempty"` // Installed version of the plugin }
Plugin holds information about a plugin.
type Preferences ¶
type Preferences struct { AddTrackers string `json:"add_trackers" yaml:"add_trackers"` // not documented AddTrackersEnabled bool `json:"add_trackers_enabled" yaml:"add_trackers_enabled"` // not documented AltDlLimit KiLimit `json:"alt_dl_limit" yaml:"alt_dl_limit"` // Alternative global download speed limit in KiB/s AltUpLimit KiLimit `json:"alt_up_limit" yaml:"alt_up_limit"` // Alternative global upload speed limit in KiB/s AlternativeWebuiEnabled bool `json:"alternative_webui_enabled" yaml:"alternative_webui_enabled"` // True if an alternative WebUI should be used AlternativeWebuiPath string `json:"alternative_webui_path" yaml:"alternative_webui_path"` // File path to the alternative WebUI AnnounceIp string `json:"announce_ip" yaml:"announce_ip"` // not documented AnnounceToAllTiers bool `json:"announce_to_all_tiers" yaml:"announce_to_all_tiers"` // not documented AnnounceToAllTrackers bool `json:"announce_to_all_trackers" yaml:"announce_to_all_trackers"` // not documented AnonymousMode bool `json:"anonymous_mode" yaml:"anonymous_mode"` // If true anonymous mode will be enabled; read more here; this option is only available in qBittorent built against libtorrent version 0.16.X and higher AsyncIoThreads int64 `json:"async_io_threads" yaml:"async_io_threads"` // not documented AutoDeleteMode int64 `json:"auto_delete_mode" yaml:"auto_delete_mode"` // TODO AutoTmmEnabled bool `json:"auto_tmm_enabled" yaml:"auto_tmm_enabled"` // True if Automatic Torrent Management is enabled by default AutorunEnabled bool `json:"autorun_enabled" yaml:"autorun_enabled"` // True if external program should be run after torrent has finished downloading AutorunProgram string `json:"autorun_program" yaml:"autorun_program"` // Program path/name/arguments to run if autorun_enabled is enabled; path is separated by slashes; you can use %f and %n arguments, which will be expanded by qBittorent as path_to_torrent_file and torrent_name (from the GUI; not the .torrent file name) respectively BannedIPs string `json:"banned_IPs" yaml:"banned_IPs"` // not documented BittorrentProtocol Protocol `json:"bittorrent_protocol" yaml:"bittorrent_protocol"` // not documented BypassAuthSubnetWhitelist string `json:"bypass_auth_subnet_whitelist" yaml:"bypass_auth_subnet_whitelist"` // (White)list of ipv4/ipv6 subnets for which webui authentication should be bypassed; list entries are separated by commas BypassAuthSubnetWhitelistEnabled bool `json:"bypass_auth_subnet_whitelist_enabled" yaml:"bypass_auth_subnet_whitelist_enabled"` // True if webui authentication should be bypassed for clients whose ip resides within (at least) one of the subnets on the whitelist BypassLocalAuth bool `json:"bypass_local_auth" yaml:"bypass_local_auth"` // True if authentication challenge for loopback address (127.0.0.1) should be disabled CategoryChangedTmmEnabled bool `json:"category_changed_tmm_enabled" yaml:"category_changed_tmm_enabled"` // True if torrent should be relocated when its Category's save path changes CheckingMemoryUse int64 `json:"checking_memory_use" yaml:"checking_memory_use"` // not documented CreateSubfolderEnabled bool `json:"create_subfolder_enabled" yaml:"create_subfolder_enabled"` // True if a subfolder should be created when adding a torrent CurrentInterfaceAddress string `json:"current_interface_address" yaml:"current_interface_address"` // not documented Dht bool `json:"dht" yaml:"dht"` // True if DHT is enabled DlLimit KiLimit `json:"dl_limit" yaml:"dl_limit"` // Global download speed limit in KiB/s; -1 means no limit is applied DontCountSlowTorrents bool `json:"dont_count_slow_torrents" yaml:"dont_count_slow_torrents"` // If true torrents w/o any activity (stalled ones) will not be counted towards max_active_* limits; see dont_count_slow_torrents for more information DyndnsDomain string `json:"dyndns_domain" yaml:"dyndns_domain"` // Your DDNS domain name DyndnsEnabled bool `json:"dyndns_enabled" yaml:"dyndns_enabled"` // True if server DNS should be updated dynamically DyndnsPassword string `json:"dyndns_password" yaml:"dyndns_password"` // Password for DDNS service DyndnsService ServiceType `json:"dyndns_service" yaml:"dyndns_service"` // See list of possible values here below DyndnsUsername string `json:"dyndns_username" yaml:"dyndns_username"` // Username for DDNS service Encryption Encryption `json:"encryption" yaml:"encryption"` // See list of possible values here below ExportDir string `json:"export_dir" yaml:"export_dir"` // Path to directory to copy .torrent files to. Slashes are used as path separators ExportDirFin string `json:"export_dir_fin" yaml:"export_dir_fin"` // Path to directory to copy .torrent files of completed downloads to. Slashes are used as path separators IncompleteFilesExt bool `json:"incomplete_files_ext" yaml:"incomplete_files_ext"` // True if ".!qB" should be appended to incomplete files IpFilterEnabled bool `json:"ip_filter_enabled" yaml:"ip_filter_enabled"` // True if external IP filter should be enabled IpFilterPath string `json:"ip_filter_path" yaml:"ip_filter_path"` // Path to IP filter file (.dat, .p2p, .p2b files are supported); path is separated by slashes IpFilterTrackers bool `json:"ip_filter_trackers" yaml:"ip_filter_trackers"` // True if IP filters are applied to trackers LimitLanPeers bool `json:"limit_lan_peers" yaml:"limit_lan_peers"` // True if [du]l_limit should be applied to peers on the LAN LimitTcpOverhead bool `json:"limit_tcp_overhead" yaml:"limit_tcp_overhead"` // True if [du]l_limit should be applied to estimated TCP overhead (service data: e.g. packet headers) LimitUtpRate bool `json:"limit_utp_rate" yaml:"limit_utp_rate"` // True if [du]l_limit should be applied to uTP connections; this option is only available in qBittorent built against libtorrent version 0.16.X and higher ListenPort int64 `json:"listen_port" yaml:"listen_port"` // Port for incoming connections Locale string `json:"locale" yaml:"locale"` // Currently selected language (e.g. en_GB for English) Lsd bool `json:"lsd" yaml:"lsd"` // True if LSD is enabled MailNotificationAuthEnabled bool `json:"mail_notification_auth_enabled" yaml:"mail_notification_auth_enabled"` // True if smtp server requires authentication MailNotificationEmail string `json:"mail_notification_email" yaml:"mail_notification_email"` // e-mail to send notifications to MailNotificationEnabled bool `json:"mail_notification_enabled" yaml:"mail_notification_enabled"` // True if e-mail notification should be enabled MailNotificationPassword string `json:"mail_notification_password" yaml:"mail_notification_password"` // Password for smtp authentication MailNotificationSender string `json:"mail_notification_sender" yaml:"mail_notification_sender"` // e-mail where notifications should originate from MailNotificationSmtp string `json:"mail_notification_smtp" yaml:"mail_notification_smtp"` // smtp server for e-mail notifications MailNotificationSslEnabled bool `json:"mail_notification_ssl_enabled" yaml:"mail_notification_ssl_enabled"` // True if smtp server requires SSL connection MailNotificationUsername string `json:"mail_notification_username" yaml:"mail_notification_username"` // Username for smtp authentication MaxActiveDownloads int64 `json:"max_active_downloads" yaml:"max_active_downloads"` // Maximum number of active simultaneous downloads MaxActiveTorrents int64 `json:"max_active_torrents" yaml:"max_active_torrents"` // Maximum number of active simultaneous downloads and uploads MaxActiveUploads int64 `json:"max_active_uploads" yaml:"max_active_uploads"` // Maximum number of active simultaneous uploads MaxConnec int64 `json:"max_connec" yaml:"max_connec"` // Maximum global number of simultaneous connections MaxConnecPerTorrent int64 `json:"max_connec_per_torrent" yaml:"max_connec_per_torrent"` // Maximum number of simultaneous connections per torrent MaxRatio Percent `json:"max_ratio" yaml:"max_ratio"` // Get the global share ratio limit MaxRatioAct BehaviorType `json:"max_ratio_act" yaml:"max_ratio_act"` // Action performed when a torrent reaches the maximum share ratio. See list of possible values here below. MaxRatioEnabled bool `json:"max_ratio_enabled" yaml:"max_ratio_enabled"` // True if share ratio limit is enabled MaxUploads int64 `json:"max_uploads" yaml:"max_uploads"` // Maximum number of upload slots MaxUploadsPerTorrent int64 `json:"max_uploads_per_torrent" yaml:"max_uploads_per_torrent"` // Maximum number of upload slots per torrent Pex bool `json:"pex" yaml:"pex"` // True if PeX is enabled PreallocateAll bool `json:"preallocate_all" yaml:"preallocate_all"` // True if disk space should be pre-allocated for all files ProxyAuthEnabled bool `json:"proxy_auth_enabled" yaml:"proxy_auth_enabled"` // True proxy requires authentication; doesn't apply to SOCKS4 proxies ProxyIp string `json:"proxy_ip" yaml:"proxy_ip"` // Proxy IP address or domain name ProxyPassword string `json:"proxy_password" yaml:"proxy_password"` // Password for proxy authentication ProxyPeerConnections bool `json:"proxy_peer_connections" yaml:"proxy_peer_connections"` // True if peer and web seed connections should be proxified; this option will have any effect only in qBittorent built against libtorrent version 0.16.X and higher ProxyPort int64 `json:"proxy_port" yaml:"proxy_port"` // Proxy port ProxyType ProxyType `json:"proxy_type" yaml:"proxy_type"` // See list of possible values here below ProxyUsername string `json:"proxy_username" yaml:"proxy_username"` // Username for proxy authentication QueueingEnabled bool `json:"queueing_enabled" yaml:"queueing_enabled"` // True if torrent queuing is enabled RandomPort bool `json:"random_port" yaml:"random_port"` // True if the port is randomly selected RssAutoDownloadingEnabled bool `json:"rss_auto_downloading_enabled" yaml:"rss_auto_downloading_enabled"` // Enable auto-downloading of torrents from the RSS feeds RssMaxArticlesPerFeed int64 `json:"rss_max_articles_per_feed" yaml:"rss_max_articles_per_feed"` // Max stored articles per RSS feed RssProcessingEnabled bool `json:"rss_processing_enabled" yaml:"rss_processing_enabled"` // Enable processing of RSS feeds RssRefreshInterval int64 `json:"rss_refresh_interval" yaml:"rss_refresh_interval"` // RSS refresh interval SavePath string `json:"save_path" yaml:"save_path"` // Default save path for torrents, separated by slashes SavePathChangedTmmEnabled bool `json:"save_path_changed_tmm_enabled" yaml:"save_path_changed_tmm_enabled"` // True if torrent should be relocated when the default save path changes ScanDirs map[string]interface{} `json:"scan_dirs" yaml:"scan_dirs"` // Property: directory to watch for torrent files, value: where torrents loaded from this directory should be downloaded to (see list of possible values below). Slashes are used as path separators; multiple key/value pairs can be specified ScheduleFromHour int64 `json:"schedule_from_hour" yaml:"schedule_from_hour"` // Scheduler starting hour ScheduleFromMin int64 `json:"schedule_from_min" yaml:"schedule_from_min"` // Scheduler starting minute ScheduleToHour int64 `json:"schedule_to_hour" yaml:"schedule_to_hour"` // Scheduler ending hour ScheduleToMin int64 `json:"schedule_to_min" yaml:"schedule_to_min"` // Scheduler ending minute SchedulerDays DaySchedule `json:"scheduler_days" yaml:"scheduler_days"` // Scheduler days. See possible values here below SchedulerEnabled bool `json:"scheduler_enabled" yaml:"scheduler_enabled"` // True if alternative limits should be applied according to schedule SlowTorrentDlRateThreshold KiLimit `json:"slow_torrent_dl_rate_threshold" yaml:"slow_torrent_dl_rate_threshold"` // Download rate in KiB/s for a torrent to be considered "slow" SlowTorrentInactiveTimer Duration `json:"slow_torrent_inactive_timer" yaml:"slow_torrent_inactive_timer"` // Seconds a torrent should be inactive before considered "slow" SlowTorrentUlRateThreshold KiLimit `json:"slow_torrent_ul_rate_threshold" yaml:"slow_torrent_ul_rate_threshold"` // Upload rate in KiB/s for a torrent to be considered "slow" StartPausedEnabled bool `json:"start_paused_enabled" yaml:"start_paused_enabled"` // True if torrents should be added in a Paused state TempPath string `json:"temp_path" yaml:"temp_path"` // Path for incomplete torrents, separated by slashes TempPathEnabled bool `json:"temp_path_enabled" yaml:"temp_path_enabled"` // True if folder for incomplete torrents is enabled TorrentChangedTmmEnabled bool `json:"torrent_changed_tmm_enabled" yaml:"torrent_changed_tmm_enabled"` // True if torrent should be relocated when its Category changes UpLimit KiLimit `json:"up_limit" yaml:"up_limit"` // Global upload speed limit in KiB/s; -1 means no limit is applied Upnp bool `json:"upnp" yaml:"upnp"` // True if UPnP/NAT-PMP is enabled UseHttps bool `json:"use_https" yaml:"use_https"` // True if WebUI HTTPS access is enabled WebUiAddress string `json:"web_ui_address" yaml:"web_ui_address"` // IP address to use for the WebUI WebUiClickjackingProtectionEnabled bool `json:"web_ui_clickjacking_protection_enabled" yaml:"web_ui_clickjacking_protection_enabled"` // True if WebUI clickjacking protection is enabled WebUiCsrfProtectionEnabled bool `json:"web_ui_csrf_protection_enabled" yaml:"web_ui_csrf_protection_enabled"` // True if WebUI CSRF protection is enabled WebUiDomainList string `json:"web_ui_domain_list" yaml:"web_ui_domain_list"` // Comma-separated list of domains to accept when performing Host header validation WebUiPort int64 `json:"web_ui_port" yaml:"web_ui_port"` // WebUI port WebUiUpnp bool `json:"web_ui_upnp" yaml:"web_ui_upnp"` // True if UPnP is used for the WebUI port WebUiUsername string `json:"web_ui_username" yaml:"web_ui_username"` // WebUI username CurrentNetworkInterface string `json:"current_network_interface" yaml:"current_network_interface"` // not completed DiskCache int64 `json:"disk_cache" yaml:"disk_cache"` // not completed DiskCacheTtl Duration `json:"disk_cache_ttl" yaml:"disk_cache_ttl"` // not completed EmbeddedTrackerPort int64 `json:"embedded_tracker_port" yaml:"embedded_tracker_port"` // not completed EnableCoalesceReadWrite bool `json:"enable_coalesce_read_write" yaml:"enable_coalesce_read_write"` // not completed EnableEmbeddedTracker bool `json:"enable_embedded_tracker" yaml:"enable_embedded_tracker"` // not completed EnableMultiConnectionsFromSameIp bool `json:"enable_multi_connections_from_same_ip" yaml:"enable_multi_connections_from_same_ip"` // not completed EnableOsCache bool `json:"enable_os_cache" yaml:"enable_os_cache"` // not completed EnableSuperSeeding bool `json:"enable_super_seeding" yaml:"enable_super_seeding"` // not completed EnableUploadSuggestions bool `json:"enable_upload_suggestions" yaml:"enable_upload_suggestions"` // not completed FilePoolSize int64 `json:"file_pool_size" yaml:"file_pool_size"` // not completed MaxSeedingTime Duration `json:"max_seeding_time" yaml:"max_seeding_time"` // not completed MaxSeedingTimeEnabled bool `json:"max_seeding_time_enabled" yaml:"max_seeding_time_enabled"` // not completed OutgoingPortsMax int64 `json:"outgoing_ports_max" yaml:"outgoing_ports_max"` // not completed OutgoingPortsMin int64 `json:"outgoing_ports_min" yaml:"outgoing_ports_min"` // not completed ProxyTorrentsOnly bool `json:"proxy_torrents_only" yaml:"proxy_torrents_only"` // not completed RecheckCompletedTorrents bool `json:"recheck_completed_torrents" yaml:"recheck_completed_torrents"` // not completed ResolvePeerCountries bool `json:"resolve_peer_countries" yaml:"resolve_peer_countries"` // not completed SaveResumeDataInterval Duration `json:"save_resume_data_interval" yaml:"save_resume_data_interval"` // not completed SendBufferLowWatermark int64 `json:"send_buffer_low_watermark" yaml:"send_buffer_low_watermark"` // not completed SendBufferWatermark int64 `json:"send_buffer_watermark" yaml:"send_buffer_watermark"` // not completed SendBufferWatermarkFactor int64 `json:"send_buffer_watermark_factor" yaml:"send_buffer_watermark_factor"` // not completed SocketBacklogSize int64 `json:"socket_backlog_size" yaml:"socket_backlog_size"` // not completed UploadChokingAlgorithm int64 `json:"upload_choking_algorithm" yaml:"upload_choking_algorithm"` // not completed UploadSlotsBehavior int64 `json:"upload_slots_behavior" yaml:"upload_slots_behavior"` // not completed UtpTcpMixedMode int64 `json:"utp_tcp_mixed_mode" yaml:"utp_tcp_mixed_mode"` // not completed WebUiHostHeaderValidationEnabled bool `json:"web_ui_host_header_validation_enabled" yaml:"web_ui_host_header_validation_enabled"` // not completed WebUiHttpsCertPath string `json:"web_ui_https_cert_path" yaml:"web_ui_https_cert_path"` // not completed WebUiHttpsKeyPath string `json:"web_ui_https_key_path" yaml:"web_ui_https_key_path"` // not completed WebUiSessionTimeout Duration `json:"web_ui_session_timeout" yaml:"web_ui_session_timeout"` // not completed }
Preferences is the app preferences.
type ProxyType ¶
type ProxyType int
ProxyType is the proxy type enum.
type RssAddFeedRequest ¶
type RssAddFeedRequest struct { URL string `json:"url" yaml:"url"` // URL of RSS feed (e.g. "http://thepiratebay.org/rss//top100/200") Path string `json:"path,omitempty" yaml:"path,omitempty"` // Full path of added folder (e.g. "The Pirate Bay\Top100") }
RssAddFeedRequest is a rss addFeed request.
func RssAddFeed ¶
func RssAddFeed(urlstr string) *RssAddFeedRequest
RssAddFeed creates a rss addFeed request.
func (*RssAddFeedRequest) Do ¶
func (req *RssAddFeedRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (RssAddFeedRequest) WithPath ¶
func (req RssAddFeedRequest) WithPath(path string) *RssAddFeedRequest
WithPath sets full path of added folder (e.g. "The Pirate Bay\Top100").
type RssAddFolderRequest ¶
type RssAddFolderRequest struct {
Path string `json:"path" yaml:"path"` // Full path of added folder (e.g. "The Pirate Bay\Top100")
}
RssAddFolderRequest is a rss addFolder request.
func RssAddFolder ¶
func RssAddFolder(path string) *RssAddFolderRequest
RssAddFolder creates a rss addFolder request.
type RssItemsRequest ¶
type RssItemsRequest struct {
WithData bool `json:"withData" yaml:"withData"`
}
RssItemsRequest is a rss items request.
type RssMoveItemRequest ¶
type RssMoveItemRequest struct { ItemPath string `json:"itemPath" yaml:"itemPath"` // Current full path of item (e.g. "The Pirate Bay\Top100") DestPath string `json:"destPath" yaml:"destPath"` // New full path of item (e.g. "The Pirate Bay") }
RssMoveItemRequest is a rss moveItem request.
func RssMoveItem ¶
func RssMoveItem(itemPath, destPath string) *RssMoveItemRequest
RssMoveItem creates a rss moveItem request.
type RssRemoveItemRequest ¶
type RssRemoveItemRequest struct {
Path string `json:"path" yaml:"path"` // Full path of added folder (e.g. "The Pirate Bay\Top100")
}
RssRemoveItemRequest is a rss removeItem request.
func RssRemoveItem ¶
func RssRemoveItem(path string) *RssRemoveItemRequest
RssRemoveItem creates a rss removeItem request.
type RssRemoveRuleRequest ¶
type RssRemoveRuleRequest struct {
RuleName string `json:"ruleName,omitempty" yaml:"ruleName,omitempty"` // Rule name (e.g. "Punisher")
}
RssRemoveRuleRequest is a rss removeRule request.
func RssRemoveRule ¶
func RssRemoveRule(ruleName string) *RssRemoveRuleRequest
RssRemoveRule creates a rss removeRule request.
type RssRenameRuleRequest ¶
type RssRenameRuleRequest struct { RuleName string `json:"ruleName,omitempty" yaml:"ruleName,omitempty"` // Rule name (e.g. "Punisher") NewRuleName string `json:"newRuleName,omitempty" yaml:"newRuleName,omitempty"` // New rule name (e.g. "The Punisher") }
RssRenameRuleRequest is a rss renameRule request.
func RssRenameRule ¶
func RssRenameRule(ruleName, newRuleName string) *RssRenameRuleRequest
RssRenameRule creates a rss renameRule request.
type RssSetRuleRequest ¶
type RssSetRuleRequest struct { RuleName string `json:"ruleName,omitempty" yaml:"ruleName,omitempty"` // Rule name (e.g. "Punisher") RuleDef Rule `json:"ruleDef,omitempty" yaml:"ruleDef,omitempty"` // JSON encoded rule definition }
RssSetRuleRequest is a rss setRule request.
func RssSetRule ¶
func RssSetRule(ruleName string, ruleDef Rule) *RssSetRuleRequest
RssSetRule creates a rss setRule request.
type Rule ¶
type Rule struct { Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` // Whether the rule is enabled MustContain string `json:"mustContain,omitempty" yaml:"mustContain,omitempty"` // The substring that the torrent name must contain MustNotContain string `json:"mustNotContain,omitempty" yaml:"mustNotContain,omitempty"` // The substring that the torrent name must not contain UseRegex bool `json:"useRegex,omitempty" yaml:"useRegex,omitempty"` // Enable regex mode in "mustContain" and "mustNotContain" EpisodeFilter string `json:"episodeFilter,omitempty" yaml:"episodeFilter,omitempty"` // Episode filter definition SmartFilter bool `json:"smartFilter,omitempty" yaml:"smartFilter,omitempty"` // Enable smart episode filter PreviouslyMatchedEpisodes []string `json:"previouslyMatchedEpisodes,omitempty" yaml:"previouslyMatchedEpisodes,omitempty"` // The list of episode IDs already matched by smart filter AffectedFeeds []string `json:"affectedFeeds,omitempty" yaml:"affectedFeeds,omitempty"` // The feed URLs the rule applied to IgnoreDays DaySchedule `json:"ignoreDays,omitempty" yaml:"ignoreDays,omitempty"` // Ignore sunsequent rule matches LastMatch string `json:"lastMatch,omitempty" yaml:"lastMatch,omitempty"` // The rule last match time AddPaused bool `json:"addPaused,omitempty" yaml:"addPaused,omitempty"` // Add matched torrent in paused mode AssignedCategory string `json:"assignedCategory,omitempty" yaml:"assignedCategory,omitempty"` // Assign category to the torrent SavePath string `json:"savePath,omitempty" yaml:"savePath,omitempty"` // Save torrent to the given directory }
type SearchCategoriesRequest ¶
type SearchCategoriesRequest struct {
PluginName string `json:"pluginName,omitempty" yaml:"pluginName,omitempty"` // name of the plugin (e.g. "legittorrents"). Also supports all and enabled
}
SearchCategoriesRequest is a search categories request.
func SearchCategories ¶
func SearchCategories() *SearchCategoriesRequest
SearchCategories creates a search categories request.
func (*SearchCategoriesRequest) Do ¶
Do executes the request against the provided context and client.
func (SearchCategoriesRequest) WithPluginName ¶
func (req SearchCategoriesRequest) WithPluginName(pluginName string) *SearchCategoriesRequest
WithPluginName sets name of the plugin (e.g. "legittorrents"). Also supports all and enabled.
type SearchDeleteRequest ¶
type SearchDeleteRequest struct {
ID int64 `json:"id" yaml:"id"` // ID of the search job
}
SearchDeleteRequest is a search delete request.
func SearchDelete ¶
func SearchDelete(id int64) *SearchDeleteRequest
SearchDelete creates a search delete request.
type SearchEnablePluginRequest ¶
type SearchEnablePluginRequest struct { Names []string `json:"names" yaml:"names"` // Name of the plugin to uninstall (e.g. "legittorrents"). Supports multiple names separated by | Enable bool `json:"enable" yaml:"enable"` // Whether the plugins should be enabled }
SearchEnablePluginRequest is a search enablePlugin request.
func SearchEnablePlugin ¶
func SearchEnablePlugin(enable bool, names ...string) *SearchEnablePluginRequest
SearchEnablePlugin creates a search enablePlugin request.
type SearchInstallPluginRequest ¶
type SearchInstallPluginRequest struct {
Sources []string `json:"sources" yaml:"sources"` // Url or file path of the plugin to install (e.g. "https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py"). Supports multiple sources separated by |
}
SearchInstallPluginRequest is a search installPlugin request.
func SearchInstallPlugin ¶
func SearchInstallPlugin(sources ...string) *SearchInstallPluginRequest
SearchInstallPlugin creates a search installPlugin request.
type SearchPluginsRequest ¶
type SearchPluginsRequest struct{}
SearchPluginsRequest is a search plugins request.
func SearchPlugins ¶
func SearchPlugins() *SearchPluginsRequest
SearchPlugins creates a search plugins request.
type SearchResult ¶
type SearchResult struct { DescrLink string `json:"descrLink,omitempty" yaml:"descrLink,omitempty"` // URL of the torrent's description page FileName string `json:"fileName,omitempty" yaml:"fileName,omitempty"` // Name of the file FileSize int64 `json:"fileSize,omitempty" yaml:"fileSize,omitempty"` // Size of the file in Bytes FileUrl string `json:"fileUrl,omitempty" yaml:"fileUrl,omitempty"` // Torrent download link (usually either .torrent file or magnet link) NbLeechers int64 `json:"nbLeechers,omitempty" yaml:"nbLeechers,omitempty"` // Number of leechers NbSeeders int64 `json:"nbSeeders,omitempty" yaml:"nbSeeders,omitempty"` // Number of seeders SiteUrl string `json:"siteUrl,omitempty" yaml:"siteUrl,omitempty"` // URL of the torrent site }
SearchResult is a search result.
type SearchResultsRequest ¶
type SearchResultsRequest struct { ID int64 `json:"id" yaml:"id"` // ID of the search job Limit int64 `json:"limit optional,omitempty" yaml:"limit optional,omitempty"` // max number of results to return. 0 or negative means no limit Offset int64 `json:"offset optional,omitempty" yaml:"offset optional,omitempty"` // result to start at. A negative number means count backwards (e.g. -2 returns the 2 most recent results) }
SearchResultsRequest is a search results request.
func SearchResults ¶
func SearchResults() *SearchResultsRequest
SearchResults creates a search results request.
func (*SearchResultsRequest) Do ¶
func (req *SearchResultsRequest) Do(ctx context.Context, cl *Client) (*SearchResultsResponse, error)
Do executes the request against the provided context and client.
func (SearchResultsRequest) WithLimit ¶
func (req SearchResultsRequest) WithLimit(limit int64) *SearchResultsRequest
WithLimit sets max number of results to return. 0 or negative means no limit.
func (SearchResultsRequest) WithOffset ¶
func (req SearchResultsRequest) WithOffset(offset int64) *SearchResultsRequest
WithOffset sets result to start at. A negative number means count backwards (e.g. -2 returns the 2 most recent results).
type SearchResultsResponse ¶
type SearchResultsResponse struct { Results []SearchResult `json:"results,omitempty" yaml:"results,omitempty"` // Array of result objects- see table below Status string `json:"status,omitempty" yaml:"status,omitempty"` // Current status of the search job (either Running or Stopped) Total int64 `json:"total,omitempty" yaml:"total,omitempty"` // Total number of results. If the status is Running this number may continue to increase }
SearchResultsResponse is the search results response.
type SearchStartRequest ¶
type SearchStartRequest struct { Pattern string `json:"pattern,omitempty" yaml:"pattern,omitempty"` // Pattern to search for (e.g. "Ubuntu 18.04") Plugins []string `json:"plugins,omitempty" yaml:"plugins,omitempty"` // Plugins to use for searching (e.g. "legittorrents"). Supports multiple plugins separated by |. Also supports all and enabled Category string `json:"category,omitempty" yaml:"category,omitempty"` // Categories to limit your search to (e.g. "legittorrents"). Available categories depend on the specified plugins. Also supports all }
SearchStartRequest is a search start request.
func SearchStart ¶
func SearchStart() *SearchStartRequest
SearchStart creates a search start request.
func (*SearchStartRequest) Do ¶
func (req *SearchStartRequest) Do(ctx context.Context, cl *Client) (*SearchStartResponse, error)
Do executes the request against the provided context and client.
func (SearchStartRequest) WithCategory ¶
func (req SearchStartRequest) WithCategory(category string) *SearchStartRequest
WithCategory sets categories to limit your search to (e.g. "legittorrents"). Available categories depend on the specified plugins. Also supports all.
func (SearchStartRequest) WithPattern ¶
func (req SearchStartRequest) WithPattern(pattern string) *SearchStartRequest
WithPattern sets pattern to search for (e.g. "Ubuntu 18.04").
func (SearchStartRequest) WithPlugins ¶
func (req SearchStartRequest) WithPlugins(plugins []string) *SearchStartRequest
WithPlugins sets plugins to use for searching (e.g. "legittorrents"). Supports multiple plugins separated by |. Also supports all and enabled.
type SearchStartResponse ¶
type SearchStartResponse struct {
ID int64 `json:"id,omitempty" yaml:"id,omitempty"`
}
SearchStartResponse is the search start response.
type SearchStatusInfo ¶
type SearchStatusInfo struct { ID int64 `json:"id,omitempty" yaml:"id,omitempty"` // ID of the search job Status string `json:"status,omitempty" yaml:"status,omitempty"` // Current status of the search job (either Running or Stopped) Total int64 `json:"total,omitempty" yaml:"total,omitempty"` // Total number of results. If the status is Running this number may contineu to increase }
SearchStatusInfo is a search status.
type SearchStatusRequest ¶
type SearchStatusRequest struct {
ID int64 `json:"id,omitempty" yaml:"id,omitempty"`
}
SearchStatusRequest is a search status request.
func SearchStatus ¶
func SearchStatus(id int64) *SearchStatusRequest
SearchStatus creates a search status request.
func (*SearchStatusRequest) Do ¶
func (req *SearchStatusRequest) Do(ctx context.Context, cl *Client) ([]SearchStatusInfo, error)
Do executes the request against the provided context and client.
type SearchStopRequest ¶
type SearchStopRequest struct {
ID int64 `json:"id,omitempty" yaml:"id,omitempty"`
}
SearchStopRequest is a search stop request.
func SearchStop ¶
func SearchStop(id int64) *SearchStopRequest
SearchStop creates a search stop request.
type SearchUninstallPluginRequest ¶
type SearchUninstallPluginRequest struct {
Names []string `json:"names" yaml:"names"` // Name of the plugin to uninstall (e.g. "legittorrents"). Supports multiple names separated by |
}
SearchUninstallPluginRequest is a search uninstallPlugin request.
func SearchUninstallPlugin ¶
func SearchUninstallPlugin(names ...string) *SearchUninstallPluginRequest
SearchUninstallPlugin creates a search uninstallPlugin request.
type SearchUpdatePluginsRequest ¶
type SearchUpdatePluginsRequest struct{}
SearchUpdatePluginsRequest is a search updatePlugins request.
func SearchUpdatePlugins ¶
func SearchUpdatePlugins() *SearchUpdatePluginsRequest
SearchUpdatePlugins creates a search updatePlugins request.
type ServiceType ¶
type ServiceType int
ServiceType is the dyndns service type enum.
const ( ServiceUseDyDNS ServiceType = iota ServiceUseNOIP )
Dyndns service values.
func (ServiceType) String ¶
func (i ServiceType) String() string
type State ¶
type State string
State is the state enum.
const ( StateError State = "error" // Some error occurred, applies to paused torrents StateMissingFiles State = "missingFiles" // Torrent data files is missing StateUploading State = "uploading" // Torrent is being seeded and data is being transferred StatePausedUP State = "pausedUP" // Torrent is paused and has finished downloading StateQueuedUP State = "queuedUP" // Queuing is enabled and torrent is queued for upload StateStalledUP State = "stalledUP" // Torrent is being seeded, but no connection were made StateCheckingUP State = "checkingUP" // Torrent has finished downloading and is being checked StateForcedUP State = "forcedUP" // Torrent is forced to uploading and ignore queue limit StateAllocating State = "allocating" // Torrent is allocating disk space for download StateDownloading State = "downloading" // Torrent is being downloaded and data is being transferred StateMetaDL State = "metaDL" // Torrent has just started downloading and is fetching metadata StatePausedDL State = "pausedDL" // Torrent is paused and has NOT finished downloading StateQueuedDL State = "queuedDL" // Queuing is enabled and torrent is queued for download StateStalledDL State = "stalledDL" // Torrent is being downloaded, but no connection were made StateCheckingDL State = "checkingDL" // Same as checkingUP, but torrent has NOT finished downloading StateForceDL State = "forceDL" // Torrent is forced to downloading to ignore queue limit StateCheckingResumeData State = "checkingResumeData" // Checking resume data on qBt startup StateMoving State = "moving" // Torrent is moving to another location StateUnknown State = "unknown" // Unknown status )
State values.
type SyncMaindataRequest ¶
type SyncMaindataRequest struct {
Rid int64 `json:"rid,omitempty" yaml:"rid,omitempty"` // Response ID. If not provided, rid=0 will be assumed. If the given rid is different from the one of last server reply, full_update will be true (see the server reply details for more info)
}
SyncMaindataRequest is a sync maindata request.
func SyncMaindata ¶
func SyncMaindata() *SyncMaindataRequest
SyncMaindata creates a sync maindata request.
func (*SyncMaindataRequest) Do ¶
func (req *SyncMaindataRequest) Do(ctx context.Context, cl *Client) (*SyncMaindataResponse, error)
Do executes the request against the provided context and client.
func (SyncMaindataRequest) WithResponseID ¶
func (req SyncMaindataRequest) WithResponseID(rid int64) *SyncMaindataRequest
WithResponseID sets response ID. If not provided, rid=0 will be assumed. If the given rid is different from the one of last server reply, full_update will be true (see the server reply details for more info).
type SyncMaindataResponse ¶
type SyncMaindataResponse struct { Rid int64 `json:"rid,omitempty" yaml:"rid,omitempty"` // Response ID FullUpdate bool `json:"full_update,omitempty" yaml:"full_update,omitempty"` // Whether the response contains all the data or partial data Torrents []Torrent `json:"torrents,omitempty" yaml:"torrents,omitempty"` // Property: torrent hash, value: same as torrent list TorrentsRemoved []string `json:"torrents_removed,omitempty" yaml:"torrents_removed,omitempty"` // List of hashes of torrents removed since last request Categories map[string]Category `json:"categories,omitempty" yaml:"categories,omitempty"` // Info for categories added since last request CategoriesRemoved []string `json:"categories_removed,omitempty" yaml:"categories_removed,omitempty"` // List of categories removed since last request Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` // List of tags added since last request TagsRemoved []string `json:"tags_removed,omitempty" yaml:"tags_removed,omitempty"` // List of tags removed since last request ServerState State `json:"server_state,omitempty" yaml:"server_state,omitempty"` // Global transfer info }
SyncMaindataResponse is the sync maindata response.
type SyncTorrentPeersRequest ¶
type SyncTorrentPeersRequest struct { Hash string `json:"hash,omitempty" yaml:"hash,omitempty"` // Torrent hash Rid int64 `json:"rid,omitempty" yaml:"rid,omitempty"` // Response ID. If not provided, rid=0 will be assumed. If the given rid is different from the one of last server reply, full_update will be true (see the server reply details for more info) }
SyncTorrentPeersRequest is a sync torrentPeers request.
func SyncTorrentPeers ¶
func SyncTorrentPeers(hash string) *SyncTorrentPeersRequest
SyncTorrentPeers creates a sync torrentPeers request.
func (*SyncTorrentPeersRequest) Do ¶
func (req *SyncTorrentPeersRequest) Do(ctx context.Context, cl *Client) (*SyncTorrentPeersResponse, error)
Do executes the request against the provided context and client.
func (SyncTorrentPeersRequest) WithResponseID ¶
func (req SyncTorrentPeersRequest) WithResponseID(rid int64) *SyncTorrentPeersRequest
WithResponseID sets the response id. If not provided, rid=0 will be assumed. If the given rid is different from the one of last server reply, full_update will be true (see the server reply details for more info)
type SyncTorrentPeersResponse ¶
type SyncTorrentPeersResponse struct { }
SyncTorrentPeersResponse is the sync torrentPeers response.
TODO: not documented.
type Torrent ¶
type Torrent struct { AddedOn Time `json:"added_on,omitempty" yaml:"added_on,omitempty"` // Time (Unix Epoch) when the torrent was added to the client AmountLeft ByteCount `json:"amount_left,omitempty" yaml:"amount_left,omitempty"` // Amount of data left to download (bytes) Availability Percent `json:"availability,omitempty" yaml:"availability,omitempty"` // not documented AutoTmm bool `json:"auto_tmm,omitempty" yaml:"auto_tmm,omitempty"` // Whether this torrent is managed by Automatic Torrent Management Category string `json:"category,omitempty" yaml:"category,omitempty"` // Category of the torrent Completed ByteCount `json:"completed,omitempty" yaml:"completed,omitempty"` // Amount of transfer data completed (bytes) CompletionOn Time `json:"completion_on,omitempty" yaml:"completion_on,omitempty"` // Time (Unix Epoch) when the torrent completed DlLimit Rate `json:"dl_limit,omitempty" yaml:"dl_limit,omitempty"` // Torrent download speed limit (bytes/s). -1 if ulimited. Dlspeed Rate `json:"dlspeed,omitempty" yaml:"dlspeed,omitempty"` // Torrent download speed (bytes/s) Downloaded ByteCount `json:"downloaded,omitempty" yaml:"downloaded,omitempty"` // Amount of data downloaded DownloadedSession ByteCount `json:"downloaded_session,omitempty" yaml:"downloaded_session,omitempty"` // Amount of data downloaded this session Eta Duration `json:"eta,omitempty" yaml:"eta,omitempty"` // Torrent ETA (seconds) FLPiecePrio bool `json:"f_l_piece_prio,omitempty" yaml:"f_l_piece_prio,omitempty"` // True if first last piece are prioritized ForceStart bool `json:"force_start,omitempty" yaml:"force_start,omitempty"` // True if force start is enabled for this torrent Hash string `json:"hash,omitempty" yaml:"hash,omitempty"` // Torrent hash LastActivity Time `json:"last_activity,omitempty" yaml:"last_activity,omitempty"` // Last time (Unix Epoch) when a chunk was downloaded/uploaded MagnetURI string `json:"magnet_uri,omitempty" yaml:"magnet_uri,omitempty"` // Magnet URI corresponding to this torrent MaxRatio Percent `json:"max_ratio,omitempty" yaml:"max_ratio,omitempty"` // Maximum share ratio until torrent is stopped from seeding/uploading MaxSeedingTime Duration `json:"max_seeding_time,omitempty" yaml:"max_seeding_time,omitempty"` // Maximum seeding time (seconds) until torrent is stopped from seeding Name string `json:"name,omitempty" yaml:"name,omitempty"` // Torrent name NumComplete int64 `json:"num_complete,omitempty" yaml:"num_complete,omitempty"` // Number of seeds in the swarm NumIncomplete int64 `json:"num_incomplete,omitempty" yaml:"num_incomplete,omitempty"` // Number of leechers in the swarm NumLeechs int64 `json:"num_leechs,omitempty" yaml:"num_leechs,omitempty"` // Number of leechers connected to NumSeeds int64 `json:"num_seeds,omitempty" yaml:"num_seeds,omitempty"` // Number of seeds connected to Priority int64 `json:"priority,omitempty" yaml:"priority,omitempty"` // Torrent priority. Returns -1 if queuing is disabled or torrent is in seed mode Progress Percent `json:"progress,omitempty" yaml:"progress,omitempty"` // Torrent progress (percentage/100) Ratio Percent `json:"ratio,omitempty" yaml:"ratio,omitempty"` // Torrent share ratio. Max ratio value: 9999. RatioLimit Percent `json:"ratio_limit,omitempty" yaml:"ratio_limit,omitempty"` // TODO (what is different from max_ratio?) SavePath string `json:"save_path,omitempty" yaml:"save_path,omitempty"` // Path where this torrent's data is stored SeedingTimeLimit Duration `json:"seeding_time_limit,omitempty" yaml:"seeding_time_limit,omitempty"` // TODO (what is different from max_seeding_time?) SeenComplete Time `json:"seen_complete,omitempty" yaml:"seen_complete,omitempty"` // Time (Unix Epoch) when this torrent was last seen complete SeqDl bool `json:"seq_dl,omitempty" yaml:"seq_dl,omitempty"` // True if sequential download is enabled Size ByteCount `json:"size,omitempty" yaml:"size,omitempty"` // Total size (bytes) of files selected for download State State `json:"state,omitempty" yaml:"state,omitempty"` // Torrent state. See table here below for the possible values SuperSeeding bool `json:"super_seeding,omitempty" yaml:"super_seeding,omitempty"` // True if super seeding is enabled Tags string `json:"tags,omitempty" yaml:"tags,omitempty"` // Comma-concatenated tag list of the torrent TimeActive Duration `json:"time_active,omitempty" yaml:"time_active,omitempty"` // Total active time (seconds) TotalSize ByteCount `json:"total_size,omitempty" yaml:"total_size,omitempty"` // Total size (bytes) of all file in this torrent (including unselected ones) Tracker string `json:"tracker,omitempty" yaml:"tracker,omitempty"` // The first tracker with working status. (TODO: what is returned if no tracker is working?) UpLimit Rate `json:"up_limit,omitempty" yaml:"up_limit,omitempty"` // Torrent upload speed limit (bytes/s). -1 if ulimited. Uploaded ByteCount `json:"uploaded,omitempty" yaml:"uploaded,omitempty"` // Amount of data uploaded UploadedSession ByteCount `json:"uploaded_session,omitempty" yaml:"uploaded_session,omitempty"` // Amount of data uploaded this session Upspeed Rate `json:"upspeed,omitempty" yaml:"upspeed,omitempty"` // Torrent upload speed (bytes/s) }
Torrent holds information about a torrent.
type TorrentProperties ¶
type TorrentProperties struct { SavePath string `json:"save_path,omitempty" yaml:"save_path,omitempty"` // Torrent save path CreationDate Time `json:"creation_date,omitempty" yaml:"creation_date,omitempty"` // Torrent creation date (Unix timestamp) PieceSize ByteCount `json:"piece_size,omitempty" yaml:"piece_size,omitempty"` // Torrent piece size (bytes) Comment string `json:"comment,omitempty" yaml:"comment,omitempty"` // Torrent comment TotalWasted ByteCount `json:"total_wasted,omitempty" yaml:"total_wasted,omitempty"` // Total data wasted for torrent (bytes) TotalUploaded ByteCount `json:"total_uploaded,omitempty" yaml:"total_uploaded,omitempty"` // Total data uploaded for torrent (bytes) TotalUploadedSession ByteCount `json:"total_uploaded_session,omitempty" yaml:"total_uploaded_session,omitempty"` // Total data uploaded this session (bytes) TotalDownloaded ByteCount `json:"total_downloaded,omitempty" yaml:"total_downloaded,omitempty"` // Total data downloaded for torrent (bytes) TotalDownloadedSession ByteCount `json:"total_downloaded_session,omitempty" yaml:"total_downloaded_session,omitempty"` // Total data downloaded this session (bytes) UpLimit Rate `json:"up_limit,omitempty" yaml:"up_limit,omitempty"` // Torrent upload limit (bytes/s) DlLimit Rate `json:"dl_limit,omitempty" yaml:"dl_limit,omitempty"` // Torrent download limit (bytes/s) TimeElapsed Duration `json:"time_elapsed,omitempty" yaml:"time_elapsed,omitempty"` // Torrent elapsed time (seconds) SeedingTime Duration `json:"seeding_time,omitempty" yaml:"seeding_time,omitempty"` // Torrent elapsed time while complete (seconds) NbConnections int64 `json:"nb_connections,omitempty" yaml:"nb_connections,omitempty"` // Torrent connection count NbConnectionsLimit int64 `json:"nb_connections_limit,omitempty" yaml:"nb_connections_limit,omitempty"` // Torrent connection count limit AdditionDate Time `json:"addition_date,omitempty" yaml:"addition_date,omitempty"` // When this torrent was added (unix timestamp) CompletionDate Time `json:"completion_date,omitempty" yaml:"completion_date,omitempty"` // Torrent completion date (unix timestamp) CreatedBy string `json:"created_by,omitempty" yaml:"created_by,omitempty"` // Torrent creator DlSpeedAvg Rate `json:"dl_speed_avg,omitempty" yaml:"dl_speed_avg,omitempty"` // Torrent average download speed (bytes/second) DlSpeed Rate `json:"dl_speed,omitempty" yaml:"dl_speed,omitempty"` // Torrent download speed (bytes/second) Eta Duration `json:"eta,omitempty" yaml:"eta,omitempty"` // Torrent ETA (seconds) LastSeen Time `json:"last_seen,omitempty" yaml:"last_seen,omitempty"` // Last seen complete date (unix timestamp) Peers int64 `json:"peers,omitempty" yaml:"peers,omitempty"` // Number of peers connected to PeersTotal int64 `json:"peers_total,omitempty" yaml:"peers_total,omitempty"` // Number of peers in the swarm PiecesHave int64 `json:"pieces_have,omitempty" yaml:"pieces_have,omitempty"` // Number of pieces owned PiecesNum int64 `json:"pieces_num,omitempty" yaml:"pieces_num,omitempty"` // Number of pieces of the torrent Reannounce Duration `json:"reannounce,omitempty" yaml:"reannounce,omitempty"` // Number of seconds until the next announce Seeds int64 `json:"seeds,omitempty" yaml:"seeds,omitempty"` // Number of seeds connected to SeedsTotal int64 `json:"seeds_total,omitempty" yaml:"seeds_total,omitempty"` // Number of seeds in the swarm TotalSize ByteCount `json:"total_size,omitempty" yaml:"total_size,omitempty"` // Torrent total size (bytes) UpSpeedAvg Rate `json:"up_speed_avg,omitempty" yaml:"up_speed_avg,omitempty"` // Torrent average upload speed (bytes/second) UpSpeed Rate `json:"up_speed,omitempty" yaml:"up_speed,omitempty"` // Torrent upload speed (bytes/second) }
TorrentProperties are torrent properties.
type TorrentsAddPeersRequest ¶
type TorrentsAddPeersRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Peers []string `json:"peers" yaml:"peers"` // The peer to add, or multiple peers separated by a pipe |. Each peer is a colon-separated host:port }
TorrentsAddPeersRequest is a torrents addPeers request.
func TorrentsAddPeers ¶
func TorrentsAddPeers(hashes ...string) *TorrentsAddPeersRequest
TorrentsAddPeers creates a torrents addPeers request.
func (*TorrentsAddPeersRequest) Do ¶
func (req *TorrentsAddPeersRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (TorrentsAddPeersRequest) WithPeers ¶
func (req TorrentsAddPeersRequest) WithPeers(peers []string) *TorrentsAddPeersRequest
WithPeers sets peers to add.
type TorrentsAddRequest ¶
type TorrentsAddRequest struct { URLs []string `json:"urls,omitempty" yaml:"urls,omitempty"` // URLs separated with newlines Torrents map[string][]byte `json:"torrents,omitempty" yaml:"torrents,omitempty"` // Raw data of torrent file. torrents can be presented multiple times. Savepath string `json:"savepath,omitempty" yaml:"savepath,omitempty"` // Download folder Cookie url.Values `json:"cookie,omitempty" yaml:"cookie,omitempty"` // Cookie sent to download the .torrent file Category string `json:"category,omitempty" yaml:"category,omitempty"` // Category for the torrent SkipChecking bool `json:"skip_checking,omitempty" yaml:"skip_checking,omitempty"` // Skip hash checking. Possible values are true, false (default) Paused bool `json:"paused,omitempty" yaml:"paused,omitempty"` // Add torrents in the paused state. Possible values are true, false (default) RootFolder RootType `json:"root_folder,omitempty" yaml:"root_folder,omitempty"` // Create the root folder. Possible values are true, false, unset (default) Rename string `json:"rename,omitempty" yaml:"rename,omitempty"` // Rename torrent UpLimit Rate `json:"upLimit,omitempty" yaml:"upLimit,omitempty"` // Set torrent upload speed limit. Unit in bytes/second DlLimit Rate `json:"dlLimit,omitempty" yaml:"dlLimit,omitempty"` // Set torrent download speed limit. Unit in bytes/second AutoTMM bool `json:"autoTMM,omitempty" yaml:"autoTMM,omitempty"` // Whether Automatic Torrent Management should be used SequentialDownload bool `json:"sequentialDownload,omitempty" yaml:"sequentialDownload,omitempty"` // Enable sequential download. Possible values are true, false (default) FirstLastPiecePrio bool `json:"firstLastPiecePrio,omitempty" yaml:"firstLastPiecePrio,omitempty"` // Prioritize download first last piece. Possible values are true, false (default) }
TorrentsAddRequest is a torrents add request.
func TorrentsAdd ¶
func TorrentsAdd() *TorrentsAddRequest
TorrentsAdd creates a torrents add request.
func (*TorrentsAddRequest) Do ¶
func (req *TorrentsAddRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (*TorrentsAddRequest) EncodeFormData ¶
func (req *TorrentsAddRequest) EncodeFormData(w io.Writer) (string, error)
EncodeFormData encodes the torrent add request as form data.
func (TorrentsAddRequest) WithAutoTMM ¶
func (req TorrentsAddRequest) WithAutoTMM(autoTMM bool) *TorrentsAddRequest
WithAutoTMM sets whether Automatic Torrent Management should be used.
func (TorrentsAddRequest) WithCategory ¶
func (req TorrentsAddRequest) WithCategory(category string) *TorrentsAddRequest
WithCategory sets category for the torrent.
func (TorrentsAddRequest) WithCookie ¶
func (req TorrentsAddRequest) WithCookie(name, value string) *TorrentsAddRequest
WithCookie sets cookie sent to download the .torrent file.
func (TorrentsAddRequest) WithDlLimit ¶
func (req TorrentsAddRequest) WithDlLimit(dlLimit Rate) *TorrentsAddRequest
WithDlLimit sets set torrent download speed limit. Unit in bytes/second.
func (TorrentsAddRequest) WithFirstLastPiecePrio ¶
func (req TorrentsAddRequest) WithFirstLastPiecePrio(firstLastPiecePrio bool) *TorrentsAddRequest
WithFirstLastPiecePrio sets prioritize download first last piece. Possible values are true, false (default).
func (TorrentsAddRequest) WithPaused ¶
func (req TorrentsAddRequest) WithPaused(paused bool) *TorrentsAddRequest
WithPaused sets add torrents in the paused state. Possible values are true, false (default).
func (TorrentsAddRequest) WithRename ¶
func (req TorrentsAddRequest) WithRename(rename string) *TorrentsAddRequest
WithRename sets rename torrent.
func (TorrentsAddRequest) WithRootFolder ¶
func (req TorrentsAddRequest) WithRootFolder(rootFolder RootType) *TorrentsAddRequest
WithRootFolder sets create the root folder. Possible values are true, false, unset (default).
func (TorrentsAddRequest) WithSavepath ¶
func (req TorrentsAddRequest) WithSavepath(savepath string) *TorrentsAddRequest
WithSavepath sets download folder.
func (TorrentsAddRequest) WithSequentialDownload ¶
func (req TorrentsAddRequest) WithSequentialDownload(sequentialDownload bool) *TorrentsAddRequest
WithSequentialDownload sets enable sequential download. Possible values are true, false (default).
func (TorrentsAddRequest) WithSkipChecking ¶
func (req TorrentsAddRequest) WithSkipChecking(skipChecking bool) *TorrentsAddRequest
WithSkipChecking sets skip hash checking. Possible values are true, false (default).
func (*TorrentsAddRequest) WithTorrent ¶
func (req *TorrentsAddRequest) WithTorrent(name string, data []byte) *TorrentsAddRequest
WithTorrent adds a torrent to the add request.
func (TorrentsAddRequest) WithURLs ¶
func (req TorrentsAddRequest) WithURLs(urls []string) *TorrentsAddRequest
WithURLs sets urls separated with newlines.
func (TorrentsAddRequest) WithUpLimit ¶
func (req TorrentsAddRequest) WithUpLimit(upLimit Rate) *TorrentsAddRequest
WithUpLimit sets set torrent upload speed limit. Unit in bytes/second.
type TorrentsAddTagsRequest ¶
type TorrentsAddTagsRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Tags []string `json:"tags" yaml:"tags"` // The list of tags you want to add to passed torrents }
TorrentsAddTagsRequest is a torrents addTags request.
func TorrentsAddTags ¶
func TorrentsAddTags(hashes ...string) *TorrentsAddTagsRequest
TorrentsAddTags creates a torrents addTags request.
func (*TorrentsAddTagsRequest) Do ¶
func (req *TorrentsAddTagsRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (TorrentsAddTagsRequest) WithTags ¶
func (req TorrentsAddTagsRequest) WithTags(tags []string) *TorrentsAddTagsRequest
WithTags sets the list of tags you want to add to passed torrents.
type TorrentsAddTrackersRequest ¶
type TorrentsAddTrackersRequest struct { Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of URLs []string `json:"urls" yaml:"urls"` }
TorrentsAddTrackersRequest is a torrents addTrackers request.
func TorrentsAddTrackers ¶
func TorrentsAddTrackers(hash string, urls ...string) *TorrentsAddTrackersRequest
TorrentsAddTrackers creates a torrents addTrackers request.
func (*TorrentsAddTrackersRequest) Do ¶
func (req *TorrentsAddTrackersRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (TorrentsAddTrackersRequest) WithURLs ¶
func (req TorrentsAddTrackersRequest) WithURLs(urls []string) *TorrentsAddTrackersRequest
WithURLs sets urls separated with newlines.
type TorrentsBottomPrioRequest ¶
type TorrentsBottomPrioRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsBottomPrioRequest is a torrents bottomPrio request.
func TorrentsBottomPrio ¶
func TorrentsBottomPrio(hashes ...string) *TorrentsBottomPrioRequest
TorrentsBottomPrio creates a torrents bottomPrio request.
type TorrentsCategoriesRequest ¶
type TorrentsCategoriesRequest struct{}
TorrentsCategoriesRequest is a torrents categories request.
func TorrentsCategories ¶
func TorrentsCategories() *TorrentsCategoriesRequest
TorrentsCategories creates a torrents categories request.
type TorrentsCreateCategoryRequest ¶
type TorrentsCreateCategoryRequest struct { Category string `json:"category" yaml:"category"` // The category you want to create. SavePath string `json:"savePath" yaml:"savePath"` // Category save path. }
TorrentsCreateCategoryRequest is a torrents createCategory request.
func TorrentsCreateCategory ¶
func TorrentsCreateCategory(category, savePath string) *TorrentsCreateCategoryRequest
TorrentsCreateCategory creates a torrents createCategory request.
type TorrentsCreateTagsRequest ¶
type TorrentsCreateTagsRequest struct {
Tags []string `json:"tags" yaml:"tags"` // The list of tags you want to add to passed torrents
}
TorrentsCreateTagsRequest is a torrents createTags request.
func TorrentsCreateTags ¶
func TorrentsCreateTags(tags ...string) *TorrentsCreateTagsRequest
TorrentsCreateTags creates a torrents createTags request.
type TorrentsDecreasePrioRequest ¶
type TorrentsDecreasePrioRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsDecreasePrioRequest is a torrents decreasePrio request.
func TorrentsDecreasePrio ¶
func TorrentsDecreasePrio(hashes ...string) *TorrentsDecreasePrioRequest
TorrentsDecreasePrio creates a torrents decreasePrio request.
type TorrentsDeleteRequest ¶
type TorrentsDeleteRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. DeleteFiles bool `json:"deleteFiles" yaml:"deleteFiles"` // If set to true, the downloaded data will also be deleted, otherwise has no effect. }
TorrentsDeleteRequest is a torrents delete request.
func TorrentsDelete ¶
func TorrentsDelete(deleteFiles bool, hashes ...string) *TorrentsDeleteRequest
TorrentsDelete creates a torrents delete request.
type TorrentsDeleteTagsRequest ¶
type TorrentsDeleteTagsRequest struct {
Tags []string `json:"tags" yaml:"tags"` // The list of tags you want to add to passed torrents
}
TorrentsDeleteTagsRequest is a torrents deleteTags request.
func TorrentsDeleteTags ¶
func TorrentsDeleteTags(tags ...string) *TorrentsDeleteTagsRequest
TorrentsDeleteTags creates a torrents deleteTags request.
type TorrentsDownloadLimitRequest ¶
type TorrentsDownloadLimitRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsDownloadLimitRequest is a torrents downloadLimit request.
func TorrentsDownloadLimit ¶
func TorrentsDownloadLimit(hashes ...string) *TorrentsDownloadLimitRequest
TorrentsDownloadLimit creates a torrents downloadLimit request.
type TorrentsEditCategoryRequest ¶
type TorrentsEditCategoryRequest struct { Category string `json:"category" yaml:"category"` // The category you want to create. SavePath string `json:"savePath" yaml:"savePath"` // Category save path. }
TorrentsEditCategoryRequest is a torrents editCategory request.
func TorrentsEditCategory ¶
func TorrentsEditCategory(category, savePath string) *TorrentsEditCategoryRequest
TorrentsEditCategory creates a torrents editCategory request.
type TorrentsEditTrackerRequest ¶
type TorrentsEditTrackerRequest struct { Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of OrigURL string `json:"origUrl" yaml:"origUrl"` // The tracker URL you want to edit NewURL string `json:"newUrl" yaml:"newUrl"` // The new URL to replace the origUrl }
TorrentsEditTrackerRequest is a torrents editTracker request.
func TorrentsEditTracker ¶
func TorrentsEditTracker(hash, origURL, newURL string) *TorrentsEditTrackerRequest
TorrentsEditTracker creates a torrents editTracker request.
type TorrentsFilePrioRequest ¶
type TorrentsFilePrioRequest struct { Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of ID []string `json:"id" yaml:"id"` // File ids, separated by | Priority FilePriority `json:"priority" yaml:"priority"` // File priority to set }
TorrentsFilePrioRequest is a torrents filePrio request.
func TorrentsFilePrio ¶
func TorrentsFilePrio(hash string, priority FilePriority, id ...string) *TorrentsFilePrioRequest
TorrentsFilePrio creates a torrents filePrio request.
func (*TorrentsFilePrioRequest) Do ¶
func (req *TorrentsFilePrioRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (TorrentsFilePrioRequest) WithID ¶
func (req TorrentsFilePrioRequest) WithID(id []string) *TorrentsFilePrioRequest
WithID sets file ids, separated by |.
func (TorrentsFilePrioRequest) WithPriority ¶
func (req TorrentsFilePrioRequest) WithPriority(priority FilePriority) *TorrentsFilePrioRequest
WithPriority sets file priority to set.
type TorrentsFilesRequest ¶
type TorrentsFilesRequest struct {
Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of
}
TorrentsFilesRequest is a torrents files request.
func TorrentsFiles ¶
func TorrentsFiles(hash string) *TorrentsFilesRequest
TorrentsFiles creates a torrents files request.
type TorrentsIncreasePrioRequest ¶
type TorrentsIncreasePrioRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsIncreasePrioRequest is a torrents increasePrio request.
func TorrentsIncreasePrio ¶
func TorrentsIncreasePrio(hashes ...string) *TorrentsIncreasePrioRequest
TorrentsIncreasePrio creates a torrents increasePrio request.
type TorrentsInfoRequest ¶
type TorrentsInfoRequest struct { Filter FilterType `json:"filter,omitempty" yaml:"filter,omitempty"` Category string `json:"category,omitempty" yaml:"category,omitempty"` Sort string `json:"sort,omitempty" yaml:"sort,omitempty"` Reverse bool `json:"reverse,omitempty" yaml:"reverse,omitempty"` Limit int64 `json:"limit,omitempty" yaml:"limit,omitempty"` Offset int64 `json:"offset,omitempty" yaml:"offset,omitempty"` Hashes []string `json:"hashes,omitempty" yaml:"hashes,omitempty"` }
TorrentsInfoRequest is a torrents info request.
func TorrentsInfo ¶
func TorrentsInfo(hashes ...string) *TorrentsInfoRequest
TorrentsInfo creates a torrents info request.
func (TorrentsInfoRequest) WithCategory ¶
func (req TorrentsInfoRequest) WithCategory(category string) *TorrentsInfoRequest
WithCategory sets the category value.
func (TorrentsInfoRequest) WithFilter ¶
func (req TorrentsInfoRequest) WithFilter(filter FilterType) *TorrentsInfoRequest
WithFilter sets the filter value.
func (TorrentsInfoRequest) WithLimit ¶
func (req TorrentsInfoRequest) WithLimit(limit int64) *TorrentsInfoRequest
WithLimit sets the limit value.
func (TorrentsInfoRequest) WithOffset ¶
func (req TorrentsInfoRequest) WithOffset(offset int64) *TorrentsInfoRequest
WithOffset sets the offset value.
func (TorrentsInfoRequest) WithReverse ¶
func (req TorrentsInfoRequest) WithReverse(reverse bool) *TorrentsInfoRequest
WithReverse sets the reverse value.
func (TorrentsInfoRequest) WithSort ¶
func (req TorrentsInfoRequest) WithSort(sort string) *TorrentsInfoRequest
WithSort sets the sort value.
type TorrentsInfoResponse ¶
type TorrentsInfoResponse []Torrent
TorrentsInfoResponse is the torrents info response.
type TorrentsPauseRequest ¶
type TorrentsPauseRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsPauseRequest is a torrents pause request.
func TorrentsPause ¶
func TorrentsPause(hashes ...string) *TorrentsPauseRequest
TorrentsPause creates a torrents pause request.
type TorrentsPieceHashesRequest ¶
type TorrentsPieceHashesRequest struct {
Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of
}
TorrentsPieceHashesRequest is a torrents pieceHashes request.
func TorrentsPieceHashes ¶
func TorrentsPieceHashes(hash string) *TorrentsPieceHashesRequest
TorrentsPieceHashes creates a torrents pieceHashes request.
type TorrentsPieceStatesRequest ¶
type TorrentsPieceStatesRequest struct {
Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of
}
TorrentsPieceStatesRequest is a torrents pieceStates request.
func TorrentsPieceStates ¶
func TorrentsPieceStates(hash string) *TorrentsPieceStatesRequest
TorrentsPieceStates creates a torrents pieceStates request.
func (*TorrentsPieceStatesRequest) Do ¶
func (req *TorrentsPieceStatesRequest) Do(ctx context.Context, cl *Client) ([]PieceState, error)
Do executes the request against the provided context and client.
type TorrentsPropertiesRequest ¶
type TorrentsPropertiesRequest struct {
Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of
}
TorrentsPropertiesRequest is a torrents properties request.
func TorrentsProperties ¶
func TorrentsProperties(hash string) *TorrentsPropertiesRequest
TorrentsProperties creates a torrents properties request.
func (*TorrentsPropertiesRequest) Do ¶
func (req *TorrentsPropertiesRequest) Do(ctx context.Context, cl *Client) (*TorrentProperties, error)
Do executes the request against the provided context and client.
type TorrentsReannounceRequest ¶
type TorrentsReannounceRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsReannounceRequest is a torrents reannounce request.
func TorrentsReannounce ¶
func TorrentsReannounce(hashes ...string) *TorrentsReannounceRequest
TorrentsReannounce creates a torrents reannounce request.
type TorrentsRecheckRequest ¶
type TorrentsRecheckRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsRecheckRequest is a torrents reannounce request.
func TorrentsRecheck ¶
func TorrentsRecheck(hashes ...string) *TorrentsRecheckRequest
TorrentsRecheck creates a torrents reannounce request.
type TorrentsRemoveCategoriesRequest ¶
type TorrentsRemoveCategoriesRequest struct {
Categories []string `json:"categories" yaml:"categories"`
}
TorrentsRemoveCategoriesRequest is a torrents removeCategories request.
func TorrentsRemoveCategories ¶
func TorrentsRemoveCategories(categories ...string) *TorrentsRemoveCategoriesRequest
TorrentsRemoveCategories creates a torrents removeCategories request.
type TorrentsRemoveTagsRequest ¶
type TorrentsRemoveTagsRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Tags []string `json:"tags" yaml:"tags"` // The list of tags you want to add to passed torrents }
TorrentsRemoveTagsRequest is a torrents removeTags request.
func TorrentsRemoveTags ¶
func TorrentsRemoveTags(hashes ...string) *TorrentsRemoveTagsRequest
TorrentsRemoveTags creates a torrents removeTags request.
func (*TorrentsRemoveTagsRequest) Do ¶
func (req *TorrentsRemoveTagsRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (TorrentsRemoveTagsRequest) WithTags ¶
func (req TorrentsRemoveTagsRequest) WithTags(tags []string) *TorrentsRemoveTagsRequest
WithTags sets the list of tags you want to add to passed torrents.
type TorrentsRemoveTrackersRequest ¶
type TorrentsRemoveTrackersRequest struct { Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of URLs []string `json:"urls" yaml:"urls"` }
TorrentsRemoveTrackersRequest is a torrents removeTrackers request.
func TorrentsRemoveTrackers ¶
func TorrentsRemoveTrackers(hash string, urls ...string) *TorrentsRemoveTrackersRequest
TorrentsRemoveTrackers creates a torrents removeTrackers request.
func (*TorrentsRemoveTrackersRequest) Do ¶
func (req *TorrentsRemoveTrackersRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (TorrentsRemoveTrackersRequest) WithURLs ¶
func (req TorrentsRemoveTrackersRequest) WithURLs(urls []string) *TorrentsRemoveTrackersRequest
WithURLs sets urls separated with newlines.
type TorrentsRenameRequest ¶
type TorrentsRenameRequest struct { Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of Name string `json:"name" yaml:"name"` // Name to set. }
TorrentsRenameRequest is a torrents rename request.
func TorrentsRename ¶
func TorrentsRename(hash string, name string) *TorrentsRenameRequest
TorrentsRename creates a torrents rename request.
type TorrentsResumeRequest ¶
type TorrentsResumeRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsResumeRequest is a torrents resume request.
func TorrentsResume ¶
func TorrentsResume(hashes ...string) *TorrentsResumeRequest
TorrentsResume creates a torrents resume request.
type TorrentsSetAutoManagementRequest ¶
type TorrentsSetAutoManagementRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Enable bool `json:"enable" yaml:"enable"` // affects the torrents listed in hashes, default is false }
TorrentsSetAutoManagementRequest is a torrents setAutoManagement request.
func TorrentsSetAutoManagement ¶
func TorrentsSetAutoManagement(enable bool, hashes ...string) *TorrentsSetAutoManagementRequest
TorrentsSetAutoManagement creates a torrents setAutoManagement request.
type TorrentsSetCategoryRequest ¶
type TorrentsSetCategoryRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Category string `json:"category" yaml:"category"` // The torrent category you want to set. }
TorrentsSetCategoryRequest is a torrents setCategory request.
func TorrentsSetCategory ¶
func TorrentsSetCategory(category string, hashes ...string) *TorrentsSetCategoryRequest
TorrentsSetCategory creates a torrents setCategory request.
type TorrentsSetDownloadLimitRequest ¶
type TorrentsSetDownloadLimitRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Limit Rate `json:"limit" yaml:"limit"` }
TorrentsSetDownloadLimitRequest is a torrents setDownloadLimit request.
func TorrentsSetDownloadLimit ¶
func TorrentsSetDownloadLimit(limit Rate, hashes ...string) *TorrentsSetDownloadLimitRequest
TorrentsSetDownloadLimit creates a torrents setDownloadLimit request.
type TorrentsSetForceStartRequest ¶
type TorrentsSetForceStartRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Value bool `json:"value" yaml:"value"` // affects the torrents listed in hashes, default is false }
TorrentsSetForceStartRequest is a torrents setForceStart request.
func TorrentsSetForceStart ¶
func TorrentsSetForceStart(value bool, hashes ...string) *TorrentsSetForceStartRequest
TorrentsSetForceStart creates a torrents setForceStart request.
type TorrentsSetLocationRequest ¶
type TorrentsSetLocationRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Location string `json:"location" yaml:"location"` // The location to download the torrent to. If the location doesn't exist, the torrent's location is unchanged. }
TorrentsSetLocationRequest is a torrents setLocation request.
func TorrentsSetLocation ¶
func TorrentsSetLocation(location string, hashes ...string) *TorrentsSetLocationRequest
TorrentsSetLocation creates a torrents setLocation request.
type TorrentsSetShareLimitsRequest ¶
type TorrentsSetShareLimitsRequest struct {}
TorrentsSetShareLimitsRequest is a torrents setShareLimits request.
func TorrentsSetShareLimits ¶
func TorrentsSetShareLimits(hashes ...string) *TorrentsSetShareLimitsRequest
TorrentsSetShareLimits creates a torrents setShareLimits request.
func (*TorrentsSetShareLimitsRequest) Do ¶
func (req *TorrentsSetShareLimitsRequest) Do(ctx context.Context, cl *Client) error
Do executes the request against the provided context and client.
func (TorrentsSetShareLimitsRequest) WithRatioLimit ¶
func (req TorrentsSetShareLimitsRequest) WithRatioLimit(ratioLimit Percent) *TorrentsSetShareLimitsRequest
WithRatioLimit sets the max ratio the torrent should be seeded until. -2 means the global limit should be used, -1 means no limit.
func (TorrentsSetShareLimitsRequest) WithSeedingTimeLimit ¶
func (req TorrentsSetShareLimitsRequest) WithSeedingTimeLimit(seedingTimeLimit Duration) *TorrentsSetShareLimitsRequest
WithSeedingTimeLimit sets the max amount of time the torrent should be seeded. -2 means the global limit should be used, -1 means no limit.
type TorrentsSetSuperSeedingRequest ¶
type TorrentsSetSuperSeedingRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Value bool `json:"value" yaml:"value"` // affects the torrents listed in hashes, default is false }
TorrentsSetSuperSeedingRequest is a torrents setSuperSeeding request.
func TorrentsSetSuperSeeding ¶
func TorrentsSetSuperSeeding(value bool, hashes ...string) *TorrentsSetSuperSeedingRequest
TorrentsSetSuperSeeding creates a torrents setSuperSeeding request.
type TorrentsSetUploadLimitRequest ¶
type TorrentsSetUploadLimitRequest struct { Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents. Limit Rate `json:"limit" yaml:"limit"` }
TorrentsSetUploadLimitRequest is a torrents setUploadLimit request.
func TorrentsSetUploadLimit ¶
func TorrentsSetUploadLimit(limit Rate, hashes ...string) *TorrentsSetUploadLimitRequest
TorrentsSetUploadLimit creates a torrents setUploadLimit request.
type TorrentsTagsRequest ¶
type TorrentsTagsRequest struct{}
TorrentsTagsRequest is a torrents tags request.
func TorrentsTags ¶
func TorrentsTags() *TorrentsTagsRequest
TorrentsTags creates a torrents tags request.
type TorrentsToggleFirstLastPiecePrioRequest ¶
type TorrentsToggleFirstLastPiecePrioRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsToggleFirstLastPiecePrioRequest is a torrents toggleFirstLastPiecePrio request.
func TorrentsToggleFirstLastPiecePrio ¶
func TorrentsToggleFirstLastPiecePrio(hashes ...string) *TorrentsToggleFirstLastPiecePrioRequest
TorrentsToggleFirstLastPiecePrio creates a torrents toggleFirstLastPiecePrio request.
type TorrentsToggleSequentialDownloadRequest ¶
type TorrentsToggleSequentialDownloadRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsToggleSequentialDownloadRequest is a torrents toggleSequentialDownload request.
func TorrentsToggleSequentialDownload ¶
func TorrentsToggleSequentialDownload(hashes ...string) *TorrentsToggleSequentialDownloadRequest
TorrentsToggleSequentialDownload creates a torrents toggleSequentialDownload request.
type TorrentsTopPrioRequest ¶
type TorrentsTopPrioRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsTopPrioRequest is a torrents topPrio request.
func TorrentsTopPrio ¶
func TorrentsTopPrio(hashes ...string) *TorrentsTopPrioRequest
TorrentsTopPrio creates a torrents topPrio request.
type TorrentsTrackersRequest ¶
type TorrentsTrackersRequest struct {
Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of
}
TorrentsTrackersRequest is a torrents trackers request.
func TorrentsTrackers ¶
func TorrentsTrackers(hash string) *TorrentsTrackersRequest
TorrentsTrackers creates a torrents trackers request.
type TorrentsUploadLimitRequest ¶
type TorrentsUploadLimitRequest struct {
Hashes []string `json:"hashes" yaml:"hashes"` // The hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.
}
TorrentsUploadLimitRequest is a torrents uploadLimit request.
func TorrentsUploadLimit ¶
func TorrentsUploadLimit(hashes ...string) *TorrentsUploadLimitRequest
TorrentsUploadLimit creates a torrents uploadLimit request.
type TorrentsWebseedsRequest ¶
type TorrentsWebseedsRequest struct {
Hash string `json:"hash" yaml:"hash"` // The hash of the torrent you want to get the contents of
}
TorrentsWebseedsRequest is a torrents webseeds request.
func TorrentsWebseeds ¶
func TorrentsWebseeds(hash string) *TorrentsWebseedsRequest
TorrentsWebseeds creates a torrents webseeds request.
type Tracker ¶
type Tracker struct { URL string `json:"url,omitempty" yaml:"url,omitempty"` // Tracker url Status TrackerStatus `json:"status,omitempty" yaml:"status,omitempty"` // Tracker status. See the table below for possible values Tier int64 `json:"tier,omitempty" yaml:"tier,omitempty"` // Tracker priority tier. Lower tier trackers are tried before higher tiers NumPeers int64 `json:"num_peers,omitempty" yaml:"num_peers,omitempty"` // Number of peers for current torrent, as reported by the tracker NumSeeds int64 `json:"num_seeds,omitempty" yaml:"num_seeds,omitempty"` // Number of seeds for current torrent, asreported by the tracker NumLeeches int64 `json:"num_leeches,omitempty" yaml:"num_leeches,omitempty"` // Number of leeches for current torrent, as reported by the tracker NumDownloaded int64 `json:"num_downloaded,omitempty" yaml:"num_downloaded,omitempty"` // Number of completed downlods for current torrent, as reported by the tracker Msg string `json:"msg,omitempty" yaml:"msg,omitempty"` // Tracker message (there is no way of knowing what this message is - it's up to tracker admins) }
Tracker holds information about a torrent tracker.
type TrackerStatus ¶
type TrackerStatus int
TrackerStatus is the tracker status enum.
const ( TrackerDisabled TrackerStatus = iota TrackerNotYetContacted TrackerContactedAndWorking TrackerUpdating TrackerNotWorking )
Tracker status values.
func (TrackerStatus) String ¶
func (i TrackerStatus) String() string
type TransferBanPeersRequest ¶
type TransferBanPeersRequest struct {
Peers []string `json:"peers,omitempty" yaml:"peers,omitempty"` // The peer to ban, or multiple peers separated by a pipe |. Each peer is a colon-separated host:port
}
TransferBanPeersRequest is a transfer banPeers request.
func TransferBanPeers ¶
func TransferBanPeers(peers ...string) *TransferBanPeersRequest
TransferBanPeers creates a transfer banPeers request.
type TransferDownloadLimitRequest ¶
type TransferDownloadLimitRequest struct{}
TransferDownloadLimitRequest is a transfer downloadLimit request.
func TransferDownloadLimit ¶
func TransferDownloadLimit() *TransferDownloadLimitRequest
TransferDownloadLimit creates a transfer downloadLimit request.
type TransferInfoRequest ¶
type TransferInfoRequest struct{}
TransferInfoRequest is a transfer info request.
func TransferInfo ¶
func TransferInfo() *TransferInfoRequest
TransferInfo creates a transfer info request.
func (*TransferInfoRequest) Do ¶
func (req *TransferInfoRequest) Do(ctx context.Context, cl *Client) (*TransferInfoResponse, error)
Do executes the request against the provided context and client.
type TransferInfoResponse ¶
type TransferInfoResponse struct { DlInfoSpeed Rate `json:"dl_info_speed,omitempty" yaml:"dl_info_speed,omitempty"` // Global download rate (bytes/s) DlInfoData ByteCount `json:"dl_info_data,omitempty" yaml:"dl_info_data,omitempty"` // Data downloaded this session (bytes) UpInfoSpeed Rate `json:"up_info_speed,omitempty" yaml:"up_info_speed,omitempty"` // Global upload rate (bytes/s) UpInfoData ByteCount `json:"up_info_data,omitempty" yaml:"up_info_data,omitempty"` // Data uploaded this session (bytes) DlRateLimit Rate `json:"dl_rate_limit,omitempty" yaml:"dl_rate_limit,omitempty"` // Download rate limit (bytes/s) UpRateLimit Rate `json:"up_rate_limit,omitempty" yaml:"up_rate_limit,omitempty"` // Upload rate limit (bytes/s) DhtNodes int64 `json:"dht_nodes,omitempty" yaml:"dht_nodes,omitempty"` // DHT nodes connected to ConnectionStatus ConnectionStatus `json:"connection_status,omitempty" yaml:"connection_status,omitempty"` // Connection status. See possible values here below }
TransferInfoResponse is the transfer info response.
type TransferSetDownloadLimitRequest ¶
type TransferSetDownloadLimitRequest struct {
Limit Rate
}
TransferSetDownloadLimitRequest is a transfer setDownloadLimit request.
func TransferSetDownloadLimit ¶
func TransferSetDownloadLimit(limit Rate) *TransferSetDownloadLimitRequest
TransferSetDownloadLimit creates a transfer setDownloadLimit request.
type TransferSetUploadLimitRequest ¶
type TransferSetUploadLimitRequest struct {
Limit Rate
}
TransferSetUploadLimitRequest is a transfer setUploadLimit request.
func TransferSetUploadLimit ¶
func TransferSetUploadLimit(limit Rate) *TransferSetUploadLimitRequest
TransferSetUploadLimit creates a transfer setUploadLimit request.
type TransferSpeedLimitsModeRequest ¶
type TransferSpeedLimitsModeRequest struct{}
TransferSpeedLimitsModeRequest is a transfer speedLimitsMode request.
func TransferSpeedLimitsMode ¶
func TransferSpeedLimitsMode() *TransferSpeedLimitsModeRequest
TransferSpeedLimitsMode creates a transfer speedLimitsMode request.
type TransferToggleSpeedLimitsModeRequest ¶
type TransferToggleSpeedLimitsModeRequest struct{}
TransferToggleSpeedLimitsModeRequest is a transfer toggleSpeedLimitsMode request.
func TransferToggleSpeedLimitsMode ¶
func TransferToggleSpeedLimitsMode() *TransferToggleSpeedLimitsModeRequest
TransferToggleSpeedLimitsMode creates a transfer toggleSpeedLimitsMode request.
type TransferUploadLimitRequest ¶
type TransferUploadLimitRequest struct{}
TransferUploadLimitRequest is a transfer uploadLimit request.
func TransferUploadLimit ¶
func TransferUploadLimit() *TransferUploadLimitRequest
TransferUploadLimit creates a transfer uploadLimit request.