mocks

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockDownloader added in v0.2.0

type MockDownloader struct {
	// contains filtered or unexported fields
}

MockDownloader is a mock of Downloader interface

func NewMockDownloader added in v0.2.0

func NewMockDownloader(ctrl *gomock.Controller) *MockDownloader

NewMockDownloader creates a new mock instance

func (*MockDownloader) AddTorrent added in v0.2.0

func (m *MockDownloader) AddTorrent(fileData []byte, category, tags string) error

AddTorrent mocks base method

func (*MockDownloader) AddTorrentEx added in v0.2.0

AddTorrentEx mocks base method

func (*MockDownloader) AddTorrentFileEx added in v0.2.0

func (m *MockDownloader) AddTorrentFileEx(fileData []byte, opt downloader.AddTorrentOptions) (downloader.AddTorrentResult, error)

AddTorrentFileEx mocks base method

func (*MockDownloader) AddTorrentWithPath added in v0.2.0

func (m *MockDownloader) AddTorrentWithPath(fileData []byte, category, tags, downloadPath string) error

AddTorrentWithPath mocks base method

func (*MockDownloader) Authenticate added in v0.2.0

func (m *MockDownloader) Authenticate() error

Authenticate mocks base method

func (*MockDownloader) CanAddTorrent added in v0.2.0

func (m *MockDownloader) CanAddTorrent(ctx context.Context, fileSize int64) (bool, error)

CanAddTorrent mocks base method

func (*MockDownloader) CheckTorrentExists added in v0.2.0

func (m *MockDownloader) CheckTorrentExists(torrentHash string) (bool, error)

CheckTorrentExists mocks base method

func (*MockDownloader) Close added in v0.2.0

func (m *MockDownloader) Close() error

Close mocks base method

func (*MockDownloader) EXPECT added in v0.2.0

EXPECT returns an object that allows the caller to indicate expected use

func (*MockDownloader) GetAllTorrents added in v0.2.0

func (m *MockDownloader) GetAllTorrents() ([]downloader.Torrent, error)

GetAllTorrents mocks base method

func (*MockDownloader) GetClientFreeSpace added in v0.2.0

func (m *MockDownloader) GetClientFreeSpace(ctx context.Context) (int64, error)

GetClientFreeSpace mocks base method

func (*MockDownloader) GetClientLabels added in v0.2.0

func (m *MockDownloader) GetClientLabels() ([]string, error)

GetClientLabels mocks base method

func (*MockDownloader) GetClientPaths added in v0.2.0

func (m *MockDownloader) GetClientPaths() ([]string, error)

GetClientPaths mocks base method

func (*MockDownloader) GetClientStatus added in v0.2.0

func (m *MockDownloader) GetClientStatus() (downloader.ClientStatus, error)

GetClientStatus mocks base method

func (*MockDownloader) GetClientVersion added in v0.2.0

func (m *MockDownloader) GetClientVersion() (string, error)

GetClientVersion mocks base method

func (*MockDownloader) GetDiskInfo added in v0.14.0

func (m *MockDownloader) GetDiskInfo() (downloader.DiskInfo, error)

GetDiskInfo mocks base method

func (*MockDownloader) GetDiskSpace added in v0.2.0

func (m *MockDownloader) GetDiskSpace(ctx context.Context) (int64, error)

GetDiskSpace mocks base method

func (*MockDownloader) GetIncompletePendingBytes added in v0.28.1

func (m *MockDownloader) GetIncompletePendingBytes(ctx context.Context) (int64, error)

GetIncompletePendingBytes mocks base method

func (*MockDownloader) GetName added in v0.2.0

func (m *MockDownloader) GetName() string

GetName mocks base method

func (*MockDownloader) GetSpeedLimit added in v0.14.0

func (m *MockDownloader) GetSpeedLimit() (downloader.SpeedLimit, error)

GetSpeedLimit mocks base method

func (*MockDownloader) GetTorrent added in v0.2.0

func (m *MockDownloader) GetTorrent(id string) (downloader.Torrent, error)

GetTorrent mocks base method

func (*MockDownloader) GetTorrentFiles added in v0.14.0

func (m *MockDownloader) GetTorrentFiles(id string) ([]downloader.TorrentFile, error)

GetTorrentFiles mocks base method

func (*MockDownloader) GetTorrentTrackers added in v0.14.0

func (m *MockDownloader) GetTorrentTrackers(id string) ([]downloader.TorrentTracker, error)

GetTorrentTrackers mocks base method

func (*MockDownloader) GetTorrentsBy added in v0.2.0

func (m *MockDownloader) GetTorrentsBy(filter downloader.TorrentFilter) ([]downloader.Torrent, error)

GetTorrentsBy mocks base method

func (*MockDownloader) GetType added in v0.2.0

GetType mocks base method

func (*MockDownloader) IsHealthy added in v0.2.0

func (m *MockDownloader) IsHealthy() bool

IsHealthy mocks base method

func (*MockDownloader) PauseTorrent added in v0.2.0

func (m *MockDownloader) PauseTorrent(id string) error

PauseTorrent mocks base method

func (*MockDownloader) PauseTorrents added in v0.14.0

func (m *MockDownloader) PauseTorrents(ids []string) error

PauseTorrents mocks base method

func (*MockDownloader) Ping added in v0.2.0

func (m *MockDownloader) Ping() (bool, error)

Ping mocks base method

func (*MockDownloader) ProcessSingleTorrentFile added in v0.2.0

func (m *MockDownloader) ProcessSingleTorrentFile(ctx context.Context, filePath, category, tags string) error

ProcessSingleTorrentFile mocks base method

func (*MockDownloader) RecheckTorrent added in v0.14.0

func (m *MockDownloader) RecheckTorrent(id string) error

RecheckTorrent mocks base method

func (*MockDownloader) RemoveTorrent added in v0.2.0

func (m *MockDownloader) RemoveTorrent(id string, removeData bool) error

RemoveTorrent mocks base method

func (*MockDownloader) RemoveTorrents added in v0.14.0

func (m *MockDownloader) RemoveTorrents(ids []string, removeData bool) error

RemoveTorrents mocks base method

func (*MockDownloader) ResumeTorrent added in v0.2.0

func (m *MockDownloader) ResumeTorrent(id string) error

ResumeTorrent mocks base method

func (*MockDownloader) ResumeTorrents added in v0.14.0

func (m *MockDownloader) ResumeTorrents(ids []string) error

ResumeTorrents mocks base method

func (*MockDownloader) SetSpeedLimit added in v0.14.0

func (m *MockDownloader) SetSpeedLimit(limit downloader.SpeedLimit) error

SetSpeedLimit mocks base method

func (*MockDownloader) SetTorrentCategory added in v0.14.0

func (m *MockDownloader) SetTorrentCategory(id, category string) error

SetTorrentCategory mocks base method

func (*MockDownloader) SetTorrentSavePath added in v0.14.0

func (m *MockDownloader) SetTorrentSavePath(id, path string) error

SetTorrentSavePath mocks base method

func (*MockDownloader) SetTorrentTags added in v0.14.0

func (m *MockDownloader) SetTorrentTags(id, tags string) error

SetTorrentTags mocks base method

type MockDownloaderMockRecorder added in v0.2.0

type MockDownloaderMockRecorder struct {
	// contains filtered or unexported fields
}

MockDownloaderMockRecorder is the mock recorder for MockDownloader

func (*MockDownloaderMockRecorder) AddTorrent added in v0.2.0

func (mr *MockDownloaderMockRecorder) AddTorrent(fileData, category, tags any) *gomock.Call

AddTorrent indicates an expected call of AddTorrent

func (*MockDownloaderMockRecorder) AddTorrentEx added in v0.2.0

func (mr *MockDownloaderMockRecorder) AddTorrentEx(url, opt any) *gomock.Call

AddTorrentEx indicates an expected call of AddTorrentEx

func (*MockDownloaderMockRecorder) AddTorrentFileEx added in v0.2.0

func (mr *MockDownloaderMockRecorder) AddTorrentFileEx(fileData, opt any) *gomock.Call

AddTorrentFileEx indicates an expected call of AddTorrentFileEx

func (*MockDownloaderMockRecorder) AddTorrentWithPath added in v0.2.0

func (mr *MockDownloaderMockRecorder) AddTorrentWithPath(fileData, category, tags, downloadPath any) *gomock.Call

AddTorrentWithPath indicates an expected call of AddTorrentWithPath

func (*MockDownloaderMockRecorder) Authenticate added in v0.2.0

func (mr *MockDownloaderMockRecorder) Authenticate() *gomock.Call

Authenticate indicates an expected call of Authenticate

func (*MockDownloaderMockRecorder) CanAddTorrent added in v0.2.0

func (mr *MockDownloaderMockRecorder) CanAddTorrent(ctx, fileSize any) *gomock.Call

CanAddTorrent indicates an expected call of CanAddTorrent

func (*MockDownloaderMockRecorder) CheckTorrentExists added in v0.2.0

func (mr *MockDownloaderMockRecorder) CheckTorrentExists(torrentHash any) *gomock.Call

CheckTorrentExists indicates an expected call of CheckTorrentExists

func (*MockDownloaderMockRecorder) Close added in v0.2.0

func (mr *MockDownloaderMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockDownloaderMockRecorder) GetAllTorrents added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetAllTorrents() *gomock.Call

GetAllTorrents indicates an expected call of GetAllTorrents

func (*MockDownloaderMockRecorder) GetClientFreeSpace added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetClientFreeSpace(ctx any) *gomock.Call

GetClientFreeSpace indicates an expected call of GetClientFreeSpace

func (*MockDownloaderMockRecorder) GetClientLabels added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetClientLabels() *gomock.Call

GetClientLabels indicates an expected call of GetClientLabels

func (*MockDownloaderMockRecorder) GetClientPaths added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetClientPaths() *gomock.Call

GetClientPaths indicates an expected call of GetClientPaths

func (*MockDownloaderMockRecorder) GetClientStatus added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetClientStatus() *gomock.Call

GetClientStatus indicates an expected call of GetClientStatus

func (*MockDownloaderMockRecorder) GetClientVersion added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetClientVersion() *gomock.Call

GetClientVersion indicates an expected call of GetClientVersion

func (*MockDownloaderMockRecorder) GetDiskInfo added in v0.14.0

func (mr *MockDownloaderMockRecorder) GetDiskInfo() *gomock.Call

func (*MockDownloaderMockRecorder) GetDiskSpace added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetDiskSpace(ctx any) *gomock.Call

GetDiskSpace indicates an expected call of GetDiskSpace

func (*MockDownloaderMockRecorder) GetIncompletePendingBytes added in v0.28.1

func (mr *MockDownloaderMockRecorder) GetIncompletePendingBytes(ctx any) *gomock.Call

GetIncompletePendingBytes indicates an expected call of GetIncompletePendingBytes

func (*MockDownloaderMockRecorder) GetName added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetName() *gomock.Call

GetName indicates an expected call of GetName

func (*MockDownloaderMockRecorder) GetSpeedLimit added in v0.14.0

func (mr *MockDownloaderMockRecorder) GetSpeedLimit() *gomock.Call

func (*MockDownloaderMockRecorder) GetTorrent added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetTorrent(id any) *gomock.Call

GetTorrent indicates an expected call of GetTorrent

func (*MockDownloaderMockRecorder) GetTorrentFiles added in v0.14.0

func (mr *MockDownloaderMockRecorder) GetTorrentFiles(id any) *gomock.Call

func (*MockDownloaderMockRecorder) GetTorrentTrackers added in v0.14.0

func (mr *MockDownloaderMockRecorder) GetTorrentTrackers(id any) *gomock.Call

func (*MockDownloaderMockRecorder) GetTorrentsBy added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetTorrentsBy(filter any) *gomock.Call

GetTorrentsBy indicates an expected call of GetTorrentsBy

func (*MockDownloaderMockRecorder) GetType added in v0.2.0

func (mr *MockDownloaderMockRecorder) GetType() *gomock.Call

GetType indicates an expected call of GetType

func (*MockDownloaderMockRecorder) IsHealthy added in v0.2.0

func (mr *MockDownloaderMockRecorder) IsHealthy() *gomock.Call

IsHealthy indicates an expected call of IsHealthy

func (*MockDownloaderMockRecorder) PauseTorrent added in v0.2.0

func (mr *MockDownloaderMockRecorder) PauseTorrent(id any) *gomock.Call

PauseTorrent indicates an expected call of PauseTorrent

func (*MockDownloaderMockRecorder) PauseTorrents added in v0.14.0

func (mr *MockDownloaderMockRecorder) PauseTorrents(ids any) *gomock.Call

func (*MockDownloaderMockRecorder) Ping added in v0.2.0

Ping indicates an expected call of Ping

func (*MockDownloaderMockRecorder) ProcessSingleTorrentFile added in v0.2.0

func (mr *MockDownloaderMockRecorder) ProcessSingleTorrentFile(ctx, filePath, category, tags any) *gomock.Call

ProcessSingleTorrentFile indicates an expected call of ProcessSingleTorrentFile

func (*MockDownloaderMockRecorder) RecheckTorrent added in v0.14.0

func (mr *MockDownloaderMockRecorder) RecheckTorrent(id any) *gomock.Call

func (*MockDownloaderMockRecorder) RemoveTorrent added in v0.2.0

func (mr *MockDownloaderMockRecorder) RemoveTorrent(id, removeData any) *gomock.Call

RemoveTorrent indicates an expected call of RemoveTorrent

func (*MockDownloaderMockRecorder) RemoveTorrents added in v0.14.0

func (mr *MockDownloaderMockRecorder) RemoveTorrents(ids, removeData any) *gomock.Call

func (*MockDownloaderMockRecorder) ResumeTorrent added in v0.2.0

func (mr *MockDownloaderMockRecorder) ResumeTorrent(id any) *gomock.Call

ResumeTorrent indicates an expected call of ResumeTorrent

func (*MockDownloaderMockRecorder) ResumeTorrents added in v0.14.0

func (mr *MockDownloaderMockRecorder) ResumeTorrents(ids any) *gomock.Call

func (*MockDownloaderMockRecorder) SetSpeedLimit added in v0.14.0

func (mr *MockDownloaderMockRecorder) SetSpeedLimit(limit any) *gomock.Call

func (*MockDownloaderMockRecorder) SetTorrentCategory added in v0.14.0

func (mr *MockDownloaderMockRecorder) SetTorrentCategory(id, category any) *gomock.Call

func (*MockDownloaderMockRecorder) SetTorrentSavePath added in v0.14.0

func (mr *MockDownloaderMockRecorder) SetTorrentSavePath(id, path any) *gomock.Call

func (*MockDownloaderMockRecorder) SetTorrentTags added in v0.14.0

func (mr *MockDownloaderMockRecorder) SetTorrentTags(id, tags any) *gomock.Call

type MockPTSiteInter

type MockPTSiteInter[T models.ResType] struct {
	// contains filtered or unexported fields
}

func NewMockPTSiteInter

func NewMockPTSiteInter[T models.ResType](ctrl *gomock.Controller) *MockPTSiteInter[T]

func (*MockPTSiteInter[T]) Context

func (m *MockPTSiteInter[T]) Context() context.Context

func (*MockPTSiteInter[T]) DownloadTorrent

func (m *MockPTSiteInter[T]) DownloadTorrent(url, title, dir string) (string, error)

func (*MockPTSiteInter[T]) EXPECT

func (m *MockPTSiteInter[T]) EXPECT() *MockPTSiteInterMockRecorder[T]

func (*MockPTSiteInter[T]) GetTorrentDetails

func (m *MockPTSiteInter[T]) GetTorrentDetails(item *gofeed.Item) (*models.APIResponse[T], error)

func (*MockPTSiteInter[T]) IsEnabled

func (m *MockPTSiteInter[T]) IsEnabled() bool

func (*MockPTSiteInter[T]) MaxRetries

func (m *MockPTSiteInter[T]) MaxRetries() int

func (*MockPTSiteInter[T]) RetryDelay

func (m *MockPTSiteInter[T]) RetryDelay() time.Duration

func (*MockPTSiteInter[T]) SendTorrentToDownloader added in v0.6.0

func (m *MockPTSiteInter[T]) SendTorrentToDownloader(ctx context.Context, rssCfg models.RSSConfig) error

type MockPTSiteInterMockRecorder

type MockPTSiteInterMockRecorder[T models.ResType] struct {
	// contains filtered or unexported fields
}

func (*MockPTSiteInterMockRecorder[T]) Context

func (r *MockPTSiteInterMockRecorder[T]) Context() *gomock.Call

func (*MockPTSiteInterMockRecorder[T]) DownloadTorrent

func (r *MockPTSiteInterMockRecorder[T]) DownloadTorrent(url, title, dir any) *gomock.Call

func (*MockPTSiteInterMockRecorder[T]) GetTorrentDetails

func (r *MockPTSiteInterMockRecorder[T]) GetTorrentDetails(item any) *gomock.Call

func (*MockPTSiteInterMockRecorder[T]) IsEnabled

func (r *MockPTSiteInterMockRecorder[T]) IsEnabled() *gomock.Call

func (*MockPTSiteInterMockRecorder[T]) MaxRetries

func (r *MockPTSiteInterMockRecorder[T]) MaxRetries() *gomock.Call

func (*MockPTSiteInterMockRecorder[T]) RetryDelay

func (r *MockPTSiteInterMockRecorder[T]) RetryDelay() *gomock.Call

func (*MockPTSiteInterMockRecorder[T]) SendTorrentToDownloader added in v0.6.0

func (r *MockPTSiteInterMockRecorder[T]) SendTorrentToDownloader(ctx, rssCfg any) *gomock.Call

type QbitMock

type QbitMock struct {
	// contains filtered or unexported fields
}

func (*QbitMock) GetActiveDownloadTasks

func (q *QbitMock) GetActiveDownloadTasks(ctx context.Context) (map[string]any, int, error)

func (*QbitMock) ProcessSingleTorrentFile

func (q *QbitMock) ProcessSingleTorrentFile(ctx context.Context, path, category, tags string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL