TokenReturn
MessageType: "TokenReturn"
TokenReturn: string //Contains the JWT token for new clients, only returned once, not stored in server
torrentList
MessageType: "torrentList"
total: int //Integer containing the total number of torrents in the server
data: array //Array containing individual torrent stats (torrentListArray)
data Struct
| data Array | Data Type | Notes |
|---|---|---|
| TorrentHashString | string | //Passed to client for displaying hash and is used to uniquly identify all torrents |
| TorrentName | string | //String of the name of the torrent |
| DownloadedSize | string | //how much the client has downloaded total |
| Size | string | //total size of the torrent |
| DownloadSpeed | string | //the dl speed of the torrent |
| Status | string | //Whether the torrent is stopped, running, seeding etc |
| PercentDone | string | //Passed to client to show percent done |
| ActivePeers | string | //Active peers that uploading/downloading |
| UploadSpeed | string | //passed to client to show Uploadspeed |
| StoragePath | string | //Where the torrent Data will be stored after download |
| DateAdded | string | //Passed to client (and stored in stormdb) |
| ETA | string | //ETA for the torrent |
| TorrentLabel | string | //user provided label for the torrent |
| SourceType | string | //Stores whether the torrent came from a torrent file or a magnet link |
| KnownSwarm | []torrent.Peer | //array of peers |
| UploadRatio | string | //what the download to upload ratio is for the torrent |
| TotalUploadedSize | string | //Humanized version of TotalUploadedBytes to pass to the client |
| TotalUploadedBytes | int64 | //includes bytes that happened before reboot (from stormdb) |
| NumberofFiles | int | //Number of files in the torrent |
| NumberofPieces | int | //Total number of pieces in the torrent (Not currently used) |
| MaxConnections | int | //Used to stop the torrent by limiting the max allowed connections |
torrentFileList
MessageType: "torrentFileList"
TotalFiles: int //Integer containing the total number of files in the torrent
FileList: array //TorrentFile Struct // Array containing individual torrent files
| FileList array | data type | Notes |
|---|---|---|
| TorrentHashString | string | //Used to tie the file to a torrent //TODO not sure if needed |
| FileName | string | //The name of the file |
| FilePath | string | //The relative filepath to the file |
| FileSize | string | //Humanized file size display |
| FilePercent | string | //String value of percent of individual file percent done |
| FilePriority | string | //Currently "High", "Normal", or "Cancel" |
torrentPeerList
MessageType: "torrentPeerList"
TotalPeers: int //Integer containing the total number of peers in the torrent
PeerList: []Peer //Peer Struct // Array containing individual torrent files
WARN: This will likely change in the future
| Peer Struct | data type | Notes |
|---|---|---|
| ID | []byte | //TODO, plan on converting this to strings before sending |
| IP | []byte | |
| Port | int | //Port the peer is running on |
| Source | string | //Will convert to a meaningful string at some point |
| SupportsEncryption | bool | //Does the client support encyrption |
rssList
MessageType: "rssList"
TotalRSSFeeds: int //Integer containing the total number of RSS Feeds in the database
RSSFeeds: []RSSFeedsNames //RSSFeedsNames Struct // Array containing RSS Feed "Name" and "URL"
| RSSFeedsNames | data type | Notes |
|---|---|---|
| RSSName | string | // Name is pulled from the RSS Name field |
| RSSFeedURL | string |
rssTorrentList
MessageType: "rssTorrentList"
URL: string //URL of the RSS feed
Name: string //Name of the RSS feed, as extracted from the feed
TotalTorrents: int //Integer containing the total number of torrents in the feed
Torrents: []SingleRSSTorrent //SingleRSSTorrent Struct // Array containing RSS Feed "Name" and "URL"
| SingleRSSTorrent | data type | Notes |
|---|---|---|
| Link | string | //Link field should contain the magnet link for the torrent |
| Title | string | //Title field also pulled from the RSS Feed |
| PubDate | string | //Date the torrent was published to the feed |
settingsFile
MessageType: "settingsFile"
Config: FullClientSettings //
| FullClientSettings | data type | Notes |
|---|---|---|
| ID | int | //unique database ID |
| LoggingLevel | int | //What logging level we are running at |
| LoggingOutput | string | //Whether we are outputting to stdout or to a file |
| Version | int | //what version of the software we are running (currently not used) |
| TFileUploadFolder | string | //Uploaded Torrent files from the client will be stored in this folder |
| SeedRatioStop | float64 | //At what ratio to automatically stop seeding a torrent |
| DefaultMoveFolder | string | //Full path w |
| TorrentWatchFolder | string | //Full path of the folder that is watched every 5 minutes for torrent files to add |
| ClientConnectSettings | struct | //At what ratio to automatically stop seeding a torrent |
clientConnectSettings
Embedded Struct in settingsFile
| clientConnectSettings | data type | Notes |
|---|---|---|
| HTTPAddr | string | //HTTP Port with colon |
| HTTPAddrIP | string | //HTTP IP address that the client connects at |
| UseProxy | bool | //Whether or not we are using a reverse Proxy (like nginx or apache) |
| WebsocketClientPort | int | //HTTPAddr with the colon stripped off |
| BaseURL | string | //Full URL to the your goTorrent server (used with proxy) "derajnet.duckdns.org/gopher/" |
| ClientUsername | string | //the username for the client login |
| ClientPassword | string | //the SHA256 hash string of the password |