blob: cde3ffe3bf04c57f8a042ed4340205cf52ed45bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package models
import ()
type migratable interface {
MigrateSchema() error
}
type torrentSearcher interface {
TorrentsByHash(hash Infohash) (*Torrent, error)
TorrentsByName(query string, offset, limit int) ([]*Torrent, error)
TorrentsByTags(tags []string, offset, limit int) ([]*Torrent, error)
}
type PeerStore interface {
SavePeer(*Peer) error
RemovePeer(*Peer) error
}
type TorrentStore interface {
SaveTorrent(*Torrent) error
RemoveTorrent(*Torrent) error
RemovePeer(*Peer) error
}
type InfohashStore interface {
PendingInfohashes(int) ([]*Peer, error)
}
|