mock

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 5 Imported by: 0 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 CollectionProvider

type CollectionProvider struct {
	GetPersonFunc            func(ctx context.Context, personID int) (*tmdb.Person, error)
	GetPersonFilmographyFunc func(ctx context.Context, personID int, personType string) ([]tmdb.FilmographyItem, error)
	SearchPeopleFunc         func(ctx context.Context, query string) ([]tmdb.PersonSearchResult, error)
	SearchFranchisesFunc     func(ctx context.Context, query string) ([]tmdb.FranchiseSearchResult, error)
	GetFranchiseFunc         func(ctx context.Context, collectionID int) (*tmdb.FranchiseDetail, error)
}

CollectionProvider is a configurable mock of collection.MetadataProvider.

func (*CollectionProvider) GetFranchise

func (m *CollectionProvider) GetFranchise(ctx context.Context, collectionID int) (*tmdb.FranchiseDetail, error)

func (*CollectionProvider) GetPerson

func (m *CollectionProvider) GetPerson(ctx context.Context, personID int) (*tmdb.Person, error)

func (*CollectionProvider) GetPersonFilmography

func (m *CollectionProvider) GetPersonFilmography(ctx context.Context, personID int, personType string) ([]tmdb.FilmographyItem, error)

func (*CollectionProvider) SearchFranchises

func (m *CollectionProvider) SearchFranchises(ctx context.Context, query string) ([]tmdb.FranchiseSearchResult, error)

func (*CollectionProvider) SearchPeople

func (m *CollectionProvider) SearchPeople(ctx context.Context, query string) ([]tmdb.PersonSearchResult, error)

type DownloadClient

type DownloadClient struct {
	AddFunc           func(ctx context.Context, r plugin.Release) (string, error)
	StatusFunc        func(ctx context.Context, clientItemID string) (plugin.QueueItem, error)
	GetQueueFunc      func(ctx context.Context) ([]plugin.QueueItem, error)
	RemoveFunc        func(ctx context.Context, clientItemID string, deleteFiles bool) error
	TestFunc          func(ctx context.Context) error
	SetSeedLimitsFunc func(ctx context.Context, clientItemID string, ratioLimit float64, seedTimeSecs int) error

	Calls []string
	// contains filtered or unexported fields
}

DownloadClient is a configurable mock of plugin.DownloadClient.

func (*DownloadClient) Add

func (*DownloadClient) GetCalls

func (m *DownloadClient) GetCalls() []string

GetCalls returns a snapshot of recorded calls (thread-safe).

func (*DownloadClient) GetQueue

func (m *DownloadClient) GetQueue(ctx context.Context) ([]plugin.QueueItem, error)

func (*DownloadClient) Name

func (m *DownloadClient) Name() string

func (*DownloadClient) Protocol

func (m *DownloadClient) Protocol() plugin.Protocol

func (*DownloadClient) Remove

func (m *DownloadClient) Remove(ctx context.Context, clientItemID string, deleteFiles bool) error

func (*DownloadClient) SetSeedLimits

func (m *DownloadClient) SetSeedLimits(ctx context.Context, clientItemID string, ratioLimit float64, seedTimeSecs int) error

func (*DownloadClient) Status

func (m *DownloadClient) Status(ctx context.Context, clientItemID string) (plugin.QueueItem, error)

func (*DownloadClient) Test

func (m *DownloadClient) Test(ctx context.Context) error

type TMDBClient

type TMDBClient struct {
	SearchMoviesFunc func(ctx context.Context, query string, year int) ([]tmdb.SearchResult, error)
	GetMovieFunc     func(ctx context.Context, tmdbID int) (*tmdb.MovieDetail, error)

	Calls []string
}

TMDBClient is a configurable mock of movie.MetadataProvider.

func (*TMDBClient) GetMovie

func (m *TMDBClient) GetMovie(ctx context.Context, tmdbID int) (*tmdb.MovieDetail, error)

func (*TMDBClient) SearchMovies

func (m *TMDBClient) SearchMovies(ctx context.Context, query string, year int) ([]tmdb.SearchResult, error)

Jump to

Keyboard shortcuts

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