Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRecordNotFound = gorm.ErrRecordNotFound
Functions ¶
This section is empty.
Types ¶
type ContentPersistence ¶
type Persistence ¶
type Persistence interface { TorrentPersistence ContentPersistence }
type Result ¶
type Result struct { fx.Out Persistence Persistence }
type TorrentContentRef ¶
type TorrentContentRef struct { model.ContentRef InfoHash protocol.ID }
type TorrentPersistence ¶
type TorrentPersistence interface { GetTorrent(ctx context.Context, infoHash protocol.ID) (torrent model.Torrent, err error) GetTorrents(ctx context.Context, infoHashes ...protocol.ID) (torrents []model.Torrent, missingInfoHashes []protocol.ID, err error) PutTorrent(ctx context.Context, torrent model.Torrent) error TorrentExists(ctx context.Context, infoHash protocol.ID) (bool, error) // GetPersistedInfoHashes returns the subset of provided hashes that are persisted in the database. GetPersistedInfoHashes(ctx context.Context, infoHashesToCheck []protocol.ID) ([]protocol.ID, error) }
Click to show internal directories.
Click to hide internal directories.