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 model.Hash20
}
type TorrentPersistence ¶
type TorrentPersistence interface {
GetTorrent(ctx context.Context, infoHash model.Hash20) (torrent model.Torrent, err error)
GetTorrents(ctx context.Context, infoHashes ...model.Hash20) (torrents []model.Torrent, missingInfoHashes []model.Hash20, err error)
PutTorrent(ctx context.Context, torrent model.Torrent) error
TorrentExists(ctx context.Context, infoHash model.Hash20) (bool, error)
// GetPersistedInfoHashes returns the subset of provided hashes that are persisted in the database.
GetPersistedInfoHashes(ctx context.Context, infoHashesToCheck []model.Hash20) ([]model.Hash20, error)
}
Click to show internal directories.
Click to hide internal directories.