updated comments of QueryTorrents()
and GetTorrent()
in persistence/interface
This commit is contained in:
parent
5c4d96402d
commit
ad839ae554
@ -17,14 +17,13 @@ type Database interface {
|
|||||||
// GetNumberOfTorrents returns the number of torrents saved in the database. Might be an
|
// GetNumberOfTorrents returns the number of torrents saved in the database. Might be an
|
||||||
// approximation.
|
// approximation.
|
||||||
GetNumberOfTorrents() (uint, error)
|
GetNumberOfTorrents() (uint, error)
|
||||||
// QueryTorrents returns @n torrents
|
// QueryTorrents returns @pageSize amount of torrents,
|
||||||
// * that are discovered before the @timePoint if @isAfter is false, else that are
|
// * that are discovered before @discoveredOnBefore
|
||||||
// discovered after the @timePoint,
|
// * that match the @query if it's not empty, else all torrents
|
||||||
// * that match the @query if it's not empty,
|
// * ordered by the @orderBy in ascending order if @ascending is true, else in descending order
|
||||||
// ordered by the @orderBy in ascending order if @isDescending is false, else in descending
|
// after skipping (@page * @pageSize) torrents that also fits the criteria above.
|
||||||
// order.
|
|
||||||
QueryTorrents(query string, discoveredOnBefore int64, orderBy orderingCriteria, ascending bool, page uint, pageSize uint) ([]TorrentMetadata, error)
|
QueryTorrents(query string, discoveredOnBefore int64, orderBy orderingCriteria, ascending bool, page uint, pageSize uint) ([]TorrentMetadata, error)
|
||||||
// GetTorrents returns the TorrentExtMetadata for the torrent of the given InfoHash. Might return
|
// GetTorrents returns the TorrentExtMetadata for the torrent of the given InfoHash. Will return
|
||||||
// nil, nil if the torrent does not exist in the database.
|
// nil, nil if the torrent does not exist in the database.
|
||||||
GetTorrent(infoHash []byte) (*TorrentMetadata, error)
|
GetTorrent(infoHash []byte) (*TorrentMetadata, error)
|
||||||
GetFiles(infoHash []byte) ([]File, error)
|
GetFiles(infoHash []byte) ([]File, error)
|
||||||
|
Loading…
Reference in New Issue
Block a user