Documentation
¶
Index ¶
- func AddPeer(peer data.Peer) error
- func CheckTorrentAccessList(torrentID int, userID int) (bool, error)
- func EncodePeerListAndRespond(w http.ResponseWriter, interval int, peerList []data.Peer) error
- func GetHTTPRequestIP(r *http.Request) (string, error)
- func GetTorrentIdByHash(hash string) (int, error)
- func LoadPeers(torrentID int, peer_id string) ([]data.Peer, error)
- func RemovePeer(peer data.Peer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckTorrentAccessList ¶
Check torrent access rights based on torrent_access_list table
func EncodePeerListAndRespond ¶
Takes peer list array and send bencoded response
func GetHTTPRequestIP ¶
Get the IP address of the request
func GetTorrentIdByHash ¶
Gets the database ID for a torrent based on its info_hash
func RemovePeer ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.