//go:generate easyjson -all12package rpc34// StatusInfo represents response of aria2.tellStatus5type StatusInfo struct {6Gid string `json:"gid"` // GID of the download.7Status string `json:"status"` // active for currently downloading/seeding downloads. waiting for downloads in the queue; download is not started. paused for paused downloads. error for downloads that were stopped because of error. complete for stopped and completed downloads. removed for the downloads removed by user.8TotalLength string `json:"totalLength"` // Total length of the download in bytes.9CompletedLength string `json:"completedLength"` // Completed length of the download in bytes.10UploadLength string `json:"uploadLength"` // Uploaded length of the download in bytes.11BitField string `json:"bitfield"` // Hexadecimal representation of the download progress. The highest bit corresponds to the piece at index 0. Any set bits indicate loaded pieces, while unset bits indicate not yet loaded and/or missing pieces. Any overflow bits at the end are set to zero. When the download was not started yet, this key will not be included in the response.12DownloadSpeed string `json:"downloadSpeed"` // Download speed of this download measured in bytes/sec.13UploadSpeed string `json:"uploadSpeed"` // Upload speed of this download measured in bytes/sec.14InfoHash string `json:"infoHash"` // InfoHash. BitTorrent only.15NumSeeders string `json:"numSeeders"` // The number of seeders aria2 has connected to. BitTorrent only.16Seeder string `json:"seeder"` // true if the local endpoint is a seeder. Otherwise, false. BitTorrent only.17PieceLength string `json:"pieceLength"` // Piece length in bytes.18NumPieces string `json:"numPieces"` // The number of pieces.19Connections string `json:"connections"` // The number of peers/servers aria2 has connected to.20ErrorCode string `json:"errorCode"` // The code of the last error for this item, if any. The value is a string. The error codes are defined in the EXIT STATUS section. This value is only available for stopped/completed downloads.21ErrorMessage string `json:"errorMessage"` // The (hopefully) human-readable error message associated to errorCode.22FollowedBy []string `json:"followedBy"` // List of GIDs which are generated as the result of this download. For example, when aria2 downloads a Metalink file, it generates downloads described in the Metalink (see the --follow-metalink option). This value is useful to track auto-generated downloads. If there are no such downloads, this key will not be included in the response.23BelongsTo string `json:"belongsTo"` // GID of a parent download. Some downloads are a part of another download. For example, if a file in a Metalink has BitTorrent resources, the downloads of ".torrent" files are parts of that parent. If this download has no parent, this key will not be included in the response.24Dir string `json:"dir"` // Directory to save files.25Files []FileInfo `json:"files"` // Returns the list of files. The elements of this list are the same structs used in aria2.getFiles() method.26BitTorrent struct {27AnnounceList [][]string `json:"announceList"` // List of lists of announce URIs. If the torrent contains announce and no announce-list, announce is converted to the announce-list format.28Comment string `json:"comment"` // The comment of the torrent. comment.utf-8 is used if available.29CreationDate int64 `json:"creationDate"` // The creation time of the torrent. The value is an integer since the epoch, measured in seconds.30Mode string `json:"mode"` // File mode of the torrent. The value is either single or multi.31Info struct {32Name string `json:"name"` // name in info dictionary. name.utf-8 is used if available.33} `json:"info"` // Struct which contains data from Info dictionary. It contains following keys.34} `json:"bittorrent"` // Struct which contains information retrieved from the .torrent (file). BitTorrent only. It contains following keys.35}3637// URIInfo represents an element of response of aria2.getUris38type URIInfo struct {39URI string `json:"uri"` // URI40Status string `json:"status"` // 'used' if the URI is in use. 'waiting' if the URI is still waiting in the queue.41}4243// FileInfo represents an element of response of aria2.getFiles44type FileInfo struct {45Index string `json:"index"` // Index of the file, starting at 1, in the same order as files appear in the multi-file torrent.46Path string `json:"path"` // File path.47Length string `json:"length"` // File size in bytes.48CompletedLength string `json:"completedLength"` // Completed length of this file in bytes. Please note that it is possible that sum of completedLength is less than the completedLength returned by the aria2.tellStatus() method. This is because completedLength in aria2.getFiles() only includes completed pieces. On the other hand, completedLength in aria2.tellStatus() also includes partially completed pieces.49Selected string `json:"selected"` // true if this file is selected by --select-file option. If --select-file is not specified or this is single-file torrent or not a torrent download at all, this value is always true. Otherwise false.50URIs []URIInfo `json:"uris"` // Returns a list of URIs for this file. The element type is the same struct used in the aria2.getUris() method.51}5253// PeerInfo represents an element of response of aria2.getPeers54type PeerInfo struct {55PeerId string `json:"peerId"` // Percent-encoded peer ID.56IP string `json:"ip"` // IP address of the peer.57Port string `json:"port"` // Port number of the peer.58BitField string `json:"bitfield"` // Hexadecimal representation of the download progress of the peer. The highest bit corresponds to the piece at index 0. Set bits indicate the piece is available and unset bits indicate the piece is missing. Any spare bits at the end are set to zero.59AmChoking string `json:"amChoking"` // true if aria2 is choking the peer. Otherwise false.60PeerChoking string `json:"peerChoking"` // true if the peer is choking aria2. Otherwise false.61DownloadSpeed string `json:"downloadSpeed"` // Download speed (byte/sec) that this client obtains from the peer.62UploadSpeed string `json:"uploadSpeed"` // Upload speed(byte/sec) that this client uploads to the peer.63Seeder string `json:"seeder"` // true if this peer is a seeder. Otherwise false.64}6566// ServerInfo represents an element of response of aria2.getServers67type ServerInfo struct {68Index string `json:"index"` // Index of the file, starting at 1, in the same order as files appear in the multi-file metalink.69Servers []struct {70URI string `json:"uri"` // Original URI.71CurrentURI string `json:"currentUri"` // This is the URI currently used for downloading. If redirection is involved, currentUri and uri may differ.72DownloadSpeed string `json:"downloadSpeed"` // Download speed (byte/sec)73} `json:"servers"` // A list of structs which contain the following keys.74}7576// GlobalStatInfo represents response of aria2.getGlobalStat77type GlobalStatInfo struct {78DownloadSpeed string `json:"downloadSpeed"` // Overall download speed (byte/sec).79UploadSpeed string `json:"uploadSpeed"` // Overall upload speed(byte/sec).80NumActive string `json:"numActive"` // The number of active downloads.81NumWaiting string `json:"numWaiting"` // The number of waiting downloads.82NumStopped string `json:"numStopped"` // The number of stopped downloads in the current session. This value is capped by the --max-download-result option.83NumStoppedTotal string `json:"numStoppedTotal"` // The number of stopped downloads in the current session and not capped by the --max-download-result option.84}8586// VersionInfo represents response of aria2.getVersion87type VersionInfo struct {88Version string `json:"version"` // Version number of aria2 as a string.89Features []string `json:"enabledFeatures"` // List of enabled features. Each feature is given as a string.90}9192// SessionInfo represents response of aria2.getSessionInfo93type SessionInfo struct {94Id string `json:"sessionId"` // Session ID, which is generated each time when aria2 is invoked.95}9697// Method is an element of parameters used in system.multicall98type Method struct {99Name string `json:"methodName"` // Method name to call100Params []interface{} `json:"params"` // Array containing parameters to the method call101}102103104