mocks

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 8 Imported by: 0

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) GetDiskSpace added in v0.2.0

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

GetDiskSpace mocks base method

func (*MockDownloader) GetName added in v0.2.0

func (m *MockDownloader) GetName() string

GetName 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) 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) 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) RemoveTorrent added in v0.2.0

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

RemoveTorrent mocks base method

func (*MockDownloader) ResumeTorrent added in v0.2.0

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

ResumeTorrent 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) GetDiskSpace added in v0.2.0

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

GetDiskSpace indicates an expected call of GetDiskSpace

func (*MockDownloaderMockRecorder) GetName added in v0.2.0

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

GetName indicates an expected call of GetName

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) 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) 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) RemoveTorrent added in v0.2.0

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

RemoveTorrent indicates an expected call of RemoveTorrent

func (*MockDownloaderMockRecorder) ResumeTorrent added in v0.2.0

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

ResumeTorrent indicates an expected call of ResumeTorrent

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]) SendTorrentToQbit

func (m *MockPTSiteInter[T]) SendTorrentToQbit(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]) SendTorrentToQbit

func (r *MockPTSiteInterMockRecorder[T]) SendTorrentToQbit(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