Documentation ¶
Overview ¶
Package tctypes contains the shared types for client implementations.
Index ¶
- Variables
- func Format(i int64, asIEC bool, precision int) string
- type Bool
- type ByteCount
- type ByteFormatter
- type Duration
- type ErrNo
- type Error
- type File
- type HTTPLogger
- type KiLimit
- type Limit
- type MilliDuration
- type MilliTime
- type Mode
- type Peer
- type Percent
- type Priority
- type Rate
- type State
- type Status
- type Time
- type Torrent
- type Tracker
Constants ¶
This section is empty.
Variables ¶
var DefaultAsIEC bool = true
DefaultAsIEC toggles whether the IEC format is used by default for byte counts/rates/limits' string conversion.
var DefaultTransport = http.DefaultTransport
DefaultTransport is the default transport used by the HTTP logger.
Functions ¶
Types ¶
type Bool ¶
type Bool bool
Bool wraps int64.
func (Bool) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface.
func (Bool) MarshalYAML ¶
MarshalYAML satisfies the yaml.Marshaler interface.
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type ByteCount ¶
type ByteCount int64
ByteCount wraps a byte count as int64.
func (ByteCount) Add ¶
func (bc ByteCount) Add(i interface{}) interface{}
Add adds i to the byte count.
type ByteFormatter ¶
type ByteFormatter interface { // Int64 returns the actual value in a int64. Int64() int64 // Format formats the value in a human readable string, with the passed // precision. Format(bool, int) string // String satisfies the fmt.Stringer interface, returning a human readable // string. String() string // Add adds the passed value to itself, returning the sum of the two values. Add(interface{}) interface{} }
ByteFormatter is the shared interface for byte counts, rates, and limits.
type Duration ¶
Duration wraps time.Duration.
func (Duration) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface.
func (Duration) MarshalYAML ¶
MarshalYAML satisfies the yaml.Marshaler interface.
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type Error ¶
type Error string
Error is an error.
const ( // ErrInvalidTime is the invalid time error. ErrInvalidTime Error = "invalid time" // ErrInvalidDuration is the invalid duration error. ErrInvalidDuration Error = "invalid duration" // ErrInvalidBool is the invalid bool error. ErrInvalidBool Error = "invalid bool" // ErrInvalidPriority is the invalid priority error. ErrInvalidPriority Error = "invalid priority" // ErrInvalidStatus is the invalid status error. ErrInvalidStatus Error = "invalid status" // ErrInvalidMode is the invalid mode error. ErrInvalidMode Error = "invalid mode" // ErrInvalidState is the invalid state error. ErrInvalidState Error = "invalid state" // ErrInvalidEncryption is the invalid encryption error. ErrInvalidEncryption Error = "invalid encryption" )
type File ¶
type File struct { BytesCompleted ByteCount `json:"bytesCompleted,omitempty" yaml:"bytesCompleted,omitempty"` // tr_torrent Length ByteCount `json:"length,omitempty" yaml:"length,omitempty"` // tr_info Name string `json:"name,omitempty" yaml:"name,omitempty"` // tr_info Wanted bool `json:"wanted,omitempty" yaml:"wanted,omitempty"` // tr_info Priority string `json:"priority,omitempty" yaml:"priority,omitempty"` // tr_info ID int64 `json:"id" yaml:"id"` Torrent string `json:"-" yaml:"-" all:"torrent"` HashString string `json:"-" yaml:"-" all:"hashString"` }
File is combined fields of files, fileStats from a torrent.
func (File) PercentDone ¶
DoPercentDone calculates the done percent for the file.
type HTTPLogger ¶
type HTTPLogger struct {
// contains filtered or unexported fields
}
HTTPLogger provides a logging http.RoundTripper transport.
Handles logging of HTTP requests and responses to standard logging funcs.
func NewHTTPLogf ¶
func NewHTTPLogf(transport http.RoundTripper, logf func(string, ...interface{})) *HTTPLogger
NewHTTPLogf creates a new HTTP transport that logs to the provided logging function for the provided transport.
Prefixes "-> " and "<- " to each line of the HTTP request, response, and an additional blank line ("\n\n") to the output.
func NewHTTPLogger ¶
func NewHTTPLogger(transport http.RoundTripper, reqf, resf func([]byte)) *HTTPLogger
NewHTTPLogger creates a new HTTP transport.
type KiLimit ¶
type KiLimit int64
KiLimit is a K bytes per second limit.
type MilliDuration ¶
MilliDuration wraps time.Duration.
func (MilliDuration) MarshalJSON ¶
func (d MilliDuration) MarshalJSON() ([]byte, error)
MarshalJSON satisfies the json.Marshaler interface.
func (MilliDuration) MarshalYAML ¶
func (d MilliDuration) MarshalYAML() (interface{}, error)
MarshalYAML satisfies the yaml.Marshaler interface.
func (MilliDuration) String ¶
func (d MilliDuration) String() string
String satisfies the fmt.Stringer interface.
func (*MilliDuration) UnmarshalJSON ¶
func (d *MilliDuration) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies the json.Unmarshaler interface.
type MilliTime ¶
MilliTime wraps time.Time.
func (MilliTime) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface.
func (MilliTime) MarshalYAML ¶
MarshalYAML satisfies the yaml.Marshaler interface.
func (*MilliTime) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type Mode ¶
type Mode int64
Mode are idle/ratio modes.
func (*Mode) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type Peer ¶
type Peer struct { Address string `json:"address,omitempty" yaml:"address,omitempty"` // tr_peer_stat ClientName string `json:"clientName,omitempty" yaml:"clientName,omitempty"` // tr_peer_stat ClientIsChoked bool `json:"clientIsChoked,omitempty" yaml:"clientIsChoked,omitempty"` // tr_peer_stat ClientIsInterested bool `json:"clientIsInterested,omitempty" yaml:"clientIsInterested,omitempty"` // tr_peer_stat FlagStr string `json:"flagStr,omitempty" yaml:"flagStr,omitempty"` // tr_peer_stat IsDownloadingFrom bool `json:"isDownloadingFrom,omitempty" yaml:"isDownloadingFrom,omitempty"` // tr_peer_stat IsEncrypted bool `json:"isEncrypted,omitempty" yaml:"isEncrypted,omitempty"` // tr_peer_stat IsIncoming bool `json:"isIncoming,omitempty" yaml:"isIncoming,omitempty"` // tr_peer_stat IsUploadingTo bool `json:"isUploadingTo,omitempty" yaml:"isUploadingTo,omitempty"` // tr_peer_stat IsUTP bool `json:"isUTP,omitempty" yaml:"isUTP,omitempty"` // tr_peer_stat PeerIsChoked bool `json:"peerIsChoked,omitempty" yaml:"peerIsChoked,omitempty"` // tr_peer_stat PeerIsInterested bool `json:"peerIsInterested,omitempty" yaml:"peerIsInterested,omitempty"` // tr_peer_stat Port int64 `json:"port,omitempty" yaml:"port,omitempty"` // tr_peer_stat Progress Percent `json:"progress,omitempty" yaml:"progress,omitempty"` // tr_peer_stat RateToClient Rate `json:"rateToClient,omitempty" yaml:"rateToClient,omitempty"` // tr_peer_stat RateToPeer Rate `json:"rateToPeer,omitempty" yaml:"rateToPeer,omitempty"` // tr_peer_stat ID int64 `json:"id" yaml:"id"` Torrent string `json:"-" yaml:"-" all:"torrent"` HashString string `json:"-" yaml:"-" all:"hashString"` }
Peer is a peer.
type Priority ¶
type Priority int64
Priority are file priorities.
Priorities.
func (*Priority) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type State ¶
type State int64
State are tracker states.
func (*State) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type Status ¶
type Status int64
Status are torrent statuses.
const ( StatusStopped Status = iota StatusCheckWait StatusChecking StatusDownloadWait StatusDownloading StatusSeedWait StatusSeeding )
Statuses.
func (*Status) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type Time ¶
Time wraps time.Time.
func (Time) MarshalJSON ¶
MarshalJSON satisfies the json.Marshaler interface.
func (Time) MarshalYAML ¶
MarshalYAML satisfies the yaml.Marshaler interface.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON satisfies the json.Unmarshaler interface.
type Torrent ¶
type Torrent struct { ActivityDate Time `json:"activityDate,omitempty" yaml:"activityDate,omitempty"` // tr_stat AddedDate Time `json:"addedDate,omitempty" yaml:"addedDate,omitempty"` // tr_stat BandwidthPriority Priority `json:"bandwidthPriority,omitempty" yaml:"bandwidthPriority,omitempty"` // tr_priority_t Comment string `json:"comment,omitempty" yaml:"comment,omitempty"` // tr_info CorruptEver ByteCount `json:"corruptEver,omitempty" yaml:"corruptEver,omitempty"` // tr_stat Creator string `json:"creator,omitempty" yaml:"creator,omitempty"` // tr_info DateCreated Time `json:"dateCreated,omitempty" yaml:"dateCreated,omitempty"` // tr_info DesiredAvailable ByteCount `json:"desiredAvailable,omitempty" yaml:"desiredAvailable,omitempty"` // tr_stat DoneDate Time `json:"doneDate,omitempty" yaml:"doneDate,omitempty"` // tr_stat DownloadDir string `json:"downloadDir,omitempty" yaml:"downloadDir,omitempty"` // tr_torrent DownloadedEver ByteCount `json:"downloadedEver,omitempty" yaml:"downloadedEver,omitempty"` // tr_stat DownloadLimit Limit `json:"downloadLimit,omitempty" yaml:"downloadLimit,omitempty"` // tr_torrent DownloadLimited bool `json:"downloadLimited,omitempty" yaml:"downloadLimited,omitempty"` // tr_torrent EditDate Time `json:"editDate,omitempty" yaml:"editDate,omitempty"` // tr_stat Error ErrNo `json:"error,omitempty" yaml:"error,omitempty"` // tr_stat ErrorString string `json:"errorString,omitempty" yaml:"errorString,omitempty"` // tr_stat Eta Duration `json:"eta,omitempty" yaml:"eta,omitempty"` // tr_stat EtaIdle Duration `json:"etaIdle,omitempty" yaml:"etaIdle,omitempty"` // tr_stat Files []struct { BytesCompleted ByteCount `json:"bytesCompleted,omitempty" yaml:"bytesCompleted,omitempty"` // tr_torrent Length ByteCount `json:"length,omitempty" yaml:"length,omitempty"` // tr_info Name string `json:"name,omitempty" yaml:"name,omitempty"` // tr_info } `json:"files,omitempty" yaml:"files,omitempty"` // n/a FileStats []struct { BytesCompleted ByteCount `json:"bytesCompleted,omitempty" yaml:"bytesCompleted,omitempty"` // tr_torrent Wanted bool `json:"wanted,omitempty" yaml:"wanted,omitempty"` // tr_info Priority Priority `json:"priority,omitempty" yaml:"priority,omitempty"` // tr_info } `json:"fileStats,omitempty" yaml:"fileStats,omitempty"` // n/a HashString string `json:"hashString,omitempty" yaml:"hashString,omitempty"` // tr_info HaveUnchecked ByteCount `json:"haveUnchecked,omitempty" yaml:"haveUnchecked,omitempty"` // tr_stat HaveValid ByteCount `json:"haveValid,omitempty" yaml:"haveValid,omitempty"` // tr_stat HonorsSessionLimits bool `json:"honorsSessionLimits,omitempty" yaml:"honorsSessionLimits,omitempty"` // tr_torrent ID int64 `json:"id,omitempty" yaml:"id,omitempty"` // tr_torrent IsFinished bool `json:"isFinished,omitempty" yaml:"isFinished,omitempty"` // tr_stat IsPrivate bool `json:"isPrivate,omitempty" yaml:"isPrivate,omitempty"` // tr_torrent IsStalled bool `json:"isStalled,omitempty" yaml:"isStalled,omitempty"` // tr_stat Labels []string `json:"labels,omitempty" yaml:"labels,omitempty"` // tr_torrent LeftUntilDone ByteCount `json:"leftUntilDone,omitempty" yaml:"leftUntilDone,omitempty"` // tr_stat MagnetLink string `json:"magnetLink,omitempty" yaml:"magnetLink,omitempty"` // n/a ManualAnnounceTime Time `json:"manualAnnounceTime,omitempty" yaml:"manualAnnounceTime,omitempty"` // tr_stat MaxConnectedPeers int64 `json:"maxConnectedPeers,omitempty" yaml:"maxConnectedPeers,omitempty"` // tr_torrent MetadataPercentComplete Percent `json:"metadataPercentComplete,omitempty" yaml:"metadataPercentComplete,omitempty"` // tr_stat Name string `json:"name,omitempty" yaml:"name,omitempty"` // tr_info PeerLimit int64 `json:"peer-limit,omitempty" yaml:"peer-limit,omitempty"` // tr_torrent Peers []struct { Address string `json:"address,omitempty" yaml:"address,omitempty"` // tr_peer_stat ClientName string `json:"clientName,omitempty" yaml:"clientName,omitempty"` // tr_peer_stat ClientIsChoked bool `json:"clientIsChoked,omitempty" yaml:"clientIsChoked,omitempty"` // tr_peer_stat ClientIsInterested bool `json:"clientIsInterested,omitempty" yaml:"clientIsInterested,omitempty"` // tr_peer_stat FlagStr string `json:"flagStr,omitempty" yaml:"flagStr,omitempty"` // tr_peer_stat IsDownloadingFrom bool `json:"isDownloadingFrom,omitempty" yaml:"isDownloadingFrom,omitempty"` // tr_peer_stat IsEncrypted bool `json:"isEncrypted,omitempty" yaml:"isEncrypted,omitempty"` // tr_peer_stat IsIncoming bool `json:"isIncoming,omitempty" yaml:"isIncoming,omitempty"` // tr_peer_stat IsUploadingTo bool `json:"isUploadingTo,omitempty" yaml:"isUploadingTo,omitempty"` // tr_peer_stat IsUTP bool `json:"isUTP,omitempty" yaml:"isUTP,omitempty"` // tr_peer_stat PeerIsChoked bool `json:"peerIsChoked,omitempty" yaml:"peerIsChoked,omitempty"` // tr_peer_stat PeerIsInterested bool `json:"peerIsInterested,omitempty" yaml:"peerIsInterested,omitempty"` // tr_peer_stat Port int64 `json:"port,omitempty" yaml:"port,omitempty"` // tr_peer_stat Progress Percent `json:"progress,omitempty" yaml:"progress,omitempty"` // tr_peer_stat RateToClient Rate `json:"rateToClient,omitempty" yaml:"rateToClient,omitempty"` // tr_peer_stat RateToPeer Rate `json:"rateToPeer,omitempty" yaml:"rateToPeer,omitempty"` // tr_peer_stat } `json:"peers,omitempty" yaml:"peers,omitempty"` // n/a PeersConnected int64 `json:"peersConnected,omitempty" yaml:"peersConnected,omitempty"` // tr_stat PeersFrom struct { FromCache int64 `json:"fromCache,omitempty" yaml:"fromCache,omitempty"` // tr_stat FromDht int64 `json:"fromDht,omitempty" yaml:"fromDht,omitempty"` // tr_stat FromIncoming int64 `json:"fromIncoming,omitempty" yaml:"fromIncoming,omitempty"` // tr_stat FromLpd int64 `json:"fromLpd,omitempty" yaml:"fromLpd,omitempty"` // tr_stat FromLtep int64 `json:"fromLtep,omitempty" yaml:"fromLtep,omitempty"` // tr_stat FromPex int64 `json:"fromPex,omitempty" yaml:"fromPex,omitempty"` // tr_stat FromTracker int64 `json:"fromTracker,omitempty" yaml:"fromTracker,omitempty"` // tr_stat } `json:"peersFrom,omitempty" yaml:"peersFrom,omitempty"` // n/a PeersGettingFromUs int64 `json:"peersGettingFromUs,omitempty" yaml:"peersGettingFromUs,omitempty"` // tr_stat PeersSendingToUs int64 `json:"peersSendingToUs,omitempty" yaml:"peersSendingToUs,omitempty"` // tr_stat PercentDone Percent `json:"percentDone,omitempty" yaml:"percentDone,omitempty"` // tr_stat Pieces []byte `json:"pieces,omitempty" yaml:"pieces,omitempty"` // tr_torrent PieceCount int64 `json:"pieceCount,omitempty" yaml:"pieceCount,omitempty"` // tr_info PieceSize ByteCount `json:"pieceSize,omitempty" yaml:"pieceSize,omitempty"` // tr_info Priorities []Priority `json:"priorities,omitempty" yaml:"priorities,omitempty"` // n/a QueuePosition int64 `json:"queuePosition,omitempty" yaml:"queuePosition,omitempty"` // tr_stat RateDownload Rate `json:"rateDownload,omitempty" yaml:"rateDownload,omitempty"` // tr_stat RateUpload Rate `json:"rateUpload,omitempty" yaml:"rateUpload,omitempty"` // tr_stat RecheckProgress Percent `json:"recheckProgress,omitempty" yaml:"recheckProgress,omitempty"` // tr_stat SecondsDownloading Duration `json:"secondsDownloading,omitempty" yaml:"secondsDownloading,omitempty"` // tr_stat SecondsSeeding Duration `json:"secondsSeeding,omitempty" yaml:"secondsSeeding,omitempty"` // tr_stat SeedIdleLimit int64 `json:"seedIdleLimit,omitempty" yaml:"seedIdleLimit,omitempty"` // tr_torrent SeedIdleMode Mode `json:"seedIdleMode,omitempty" yaml:"seedIdleMode,omitempty"` // tr_inactvelimit SeedRatioLimit float64 `json:"seedRatioLimit,omitempty" yaml:"seedRatioLimit,omitempty"` // tr_torrent SeedRatioMode Mode `json:"seedRatioMode,omitempty" yaml:"seedRatioMode,omitempty"` // tr_ratiolimit SizeWhenDone ByteCount `json:"sizeWhenDone,omitempty" yaml:"sizeWhenDone,omitempty"` // tr_stat StartDate Time `json:"startDate,omitempty" yaml:"startDate,omitempty"` // tr_stat Status Status `json:"status,omitempty" yaml:"status,omitempty"` // tr_stat Trackers []struct { Announce string `json:"announce,omitempty" yaml:"announce,omitempty"` // tr_tracker_info ID int64 `json:"id,omitempty" yaml:"id,omitempty"` // tr_tracker_info Scrape string `json:"scrape,omitempty" yaml:"scrape,omitempty"` // tr_tracker_info Tier int64 `json:"tier,omitempty" yaml:"tier,omitempty"` // tr_tracker_info } `json:"trackers,omitempty" yaml:"trackers,omitempty"` // n/a TrackerStats []struct { Announce string `json:"announce,omitempty" yaml:"announce,omitempty"` // tr_tracker_stat AnnounceState State `json:"announceState,omitempty" yaml:"announceState,omitempty"` // tr_tracker_stat DownloadCount int64 `json:"downloadCount,omitempty" yaml:"downloadCount,omitempty"` // tr_tracker_stat HasAnnounced bool `json:"hasAnnounced,omitempty" yaml:"hasAnnounced,omitempty"` // tr_tracker_stat HasScraped bool `json:"hasScraped,omitempty" yaml:"hasScraped,omitempty"` // tr_tracker_stat Host string `json:"host,omitempty" yaml:"host,omitempty"` // tr_tracker_stat ID int64 `json:"id,omitempty" yaml:"id,omitempty"` // tr_tracker_stat IsBackup bool `json:"isBackup,omitempty" yaml:"isBackup,omitempty"` // tr_tracker_stat LastAnnouncePeerCount int64 `json:"lastAnnouncePeerCount,omitempty" yaml:"lastAnnouncePeerCount,omitempty"` // tr_tracker_stat LastAnnounceResult string `json:"lastAnnounceResult,omitempty" yaml:"lastAnnounceResult,omitempty"` // tr_tracker_stat LastAnnounceStartTime Time `json:"lastAnnounceStartTime,omitempty" yaml:"lastAnnounceStartTime,omitempty"` // tr_tracker_stat LastAnnounceSucceeded bool `json:"lastAnnounceSucceeded,omitempty" yaml:"lastAnnounceSucceeded,omitempty"` // tr_tracker_stat LastAnnounceTime Time `json:"lastAnnounceTime,omitempty" yaml:"lastAnnounceTime,omitempty"` // tr_tracker_stat LastAnnounceTimedOut bool `json:"lastAnnounceTimedOut,omitempty" yaml:"lastAnnounceTimedOut,omitempty"` // tr_tracker_stat LastScrapeResult string `json:"lastScrapeResult,omitempty" yaml:"lastScrapeResult,omitempty"` // tr_tracker_stat LastScrapeStartTime Time `json:"lastScrapeStartTime,omitempty" yaml:"lastScrapeStartTime,omitempty"` // tr_tracker_stat LastScrapeSucceeded bool `json:"lastScrapeSucceeded,omitempty" yaml:"lastScrapeSucceeded,omitempty"` // tr_tracker_stat LastScrapeTime Time `json:"lastScrapeTime,omitempty" yaml:"lastScrapeTime,omitempty"` // tr_tracker_stat LastScrapeTimedOut int64 `json:"lastScrapeTimedOut,omitempty" yaml:"lastScrapeTimedOut,omitempty"` // tr_tracker_stat LeecherCount int64 `json:"leecherCount,omitempty" yaml:"leecherCount,omitempty"` // tr_tracker_stat NextAnnounceTime Time `json:"nextAnnounceTime,omitempty" yaml:"nextAnnounceTime,omitempty"` // tr_tracker_stat NextScrapeTime Time `json:"nextScrapeTime,omitempty" yaml:"nextScrapeTime,omitempty"` // tr_tracker_stat Scrape string `json:"scrape,omitempty" yaml:"scrape,omitempty"` // tr_tracker_stat ScrapeState State `json:"scrapeState,omitempty" yaml:"scrapeState,omitempty"` // tr_tracker_stat SeederCount int64 `json:"seederCount,omitempty" yaml:"seederCount,omitempty"` // tr_tracker_stat Tier int64 `json:"tier,omitempty" yaml:"tier,omitempty"` // tr_tracker_stat } `json:"trackerStats,omitempty" yaml:"trackerStats,omitempty"` // n/a TotalSize ByteCount `json:"totalSize,omitempty" yaml:"totalSize,omitempty"` // tr_info TorrentFile string `json:"torrentFile,omitempty" yaml:"torrentFile,omitempty"` // tr_info UploadedEver ByteCount `json:"uploadedEver,omitempty" yaml:"uploadedEver,omitempty"` // tr_stat UploadLimit Limit `json:"uploadLimit,omitempty" yaml:"uploadLimit,omitempty"` // tr_torrent UploadLimited bool `json:"uploadLimited,omitempty" yaml:"uploadLimited,omitempty"` // tr_torrent UploadRatio float64 `json:"uploadRatio,omitempty" yaml:"uploadRatio,omitempty"` // tr_stat Wanted []Bool `json:"wanted,omitempty" yaml:"wanted,omitempty"` // n/a Webseeds []string `json:"webseeds,omitempty" yaml:"webseeds,omitempty"` // n/a WebseedsSendingToUs int64 `json:"webseedsSendingToUs,omitempty" yaml:"webseedsSendingToUs,omitempty"` // tr_stat }
Torrent holds information about a torrent.
type Tracker ¶
type Tracker struct { Announce string `json:"announce,omitempty" yaml:"announce,omitempty"` // tr_tracker_info ID int64 `json:"id" yaml:"id"` // tr_tracker_info Scrape string `json:"scrape,omitempty" yaml:"scrape,omitempty"` // tr_tracker_info Tier int64 `json:"tier,omitempty" yaml:"tier,omitempty"` // tr_tracker_info AnnounceState State `json:"announceState,omitempty" yaml:"announceState,omitempty"` // tr_tracker_stat DownloadCount int64 `json:"downloadCount,omitempty" yaml:"downloadCount,omitempty"` // tr_tracker_stat HasAnnounced bool `json:"hasAnnounced,omitempty" yaml:"hasAnnounced,omitempty"` // tr_tracker_stat HasScraped bool `json:"hasScraped,omitempty" yaml:"hasScraped,omitempty"` // tr_tracker_stat Host string `json:"host,omitempty" yaml:"host,omitempty"` // tr_tracker_stat IsBackup bool `json:"isBackup,omitempty" yaml:"isBackup,omitempty"` // tr_tracker_stat LastAnnouncePeerCount int64 `json:"lastAnnouncePeerCount,omitempty" yaml:"lastAnnouncePeerCount,omitempty"` // tr_tracker_stat LastAnnounceResult string `json:"lastAnnounceResult,omitempty" yaml:"lastAnnounceResult,omitempty"` // tr_tracker_stat LastAnnounceStartTime Time `json:"lastAnnounceStartTime,omitempty" yaml:"lastAnnounceStartTime,omitempty"` // tr_tracker_stat LastAnnounceSucceeded bool `json:"lastAnnounceSucceeded,omitempty" yaml:"lastAnnounceSucceeded,omitempty"` // tr_tracker_stat LastAnnounceTime Time `json:"lastAnnounceTime,omitempty" yaml:"lastAnnounceTime,omitempty"` // tr_tracker_stat LastAnnounceTimedOut bool `json:"lastAnnounceTimedOut,omitempty" yaml:"lastAnnounceTimedOut,omitempty"` // tr_tracker_stat LastScrapeResult string `json:"lastScrapeResult,omitempty" yaml:"lastScrapeResult,omitempty"` // tr_tracker_stat LastScrapeStartTime Time `json:"lastScrapeStartTime,omitempty" yaml:"lastScrapeStartTime,omitempty"` // tr_tracker_stat LastScrapeSucceeded bool `json:"lastScrapeSucceeded,omitempty" yaml:"lastScrapeSucceeded,omitempty"` // tr_tracker_stat LastScrapeTime Time `json:"lastScrapeTime,omitempty" yaml:"lastScrapeTime,omitempty"` // tr_tracker_stat LastScrapeTimedOut int64 `json:"lastScrapeTimedOut,omitempty" yaml:"lastScrapeTimedOut,omitempty"` // tr_tracker_stat LeecherCount int64 `json:"leecherCount,omitempty" yaml:"leecherCount,omitempty"` // tr_tracker_stat NextAnnounceTime Time `json:"nextAnnounceTime,omitempty" yaml:"nextAnnounceTime,omitempty"` // tr_tracker_stat NextScrapeTime Time `json:"nextScrapeTime,omitempty" yaml:"nextScrapeTime,omitempty"` // tr_tracker_stat ScrapeState State `json:"scrapeState,omitempty" yaml:"scrapeState,omitempty"` // tr_tracker_stat SeederCount int64 `json:"seederCount,omitempty" yaml:"seederCount,omitempty"` // tr_tracker_stat Torrent string `json:"-" yaml:"-" all:"torrent"` HashString string `json:"-" yaml:"-" all:"hashString"` }
Tracker is combined fields of trackers, trackerStats from a torrent.