Documentation
¶
Overview ¶
Package mock provides a configurable mock subtitle provider for functional testing. It registers as a normal provider ("mock") and its behavior is controlled entirely through config settings:
- mode: "static" (default), "error", "timeout", "rate_limit", "auth_error", "empty", "slow", "flaky", "season_pack"
- delay_ms: artificial latency per Search/Download call (default 0)
- result_count: number of results to return in static mode (default 3)
- languages: comma-separated language codes to return results for (default: all requested)
- error_message: custom error message for error modes
- flaky_rate: failure probability 0.0-1.0 for flaky mode (default 0.5)
- score_base: base score for returned subtitles (default 50)
- include_hash: return hash-matched results (default false)
- hearing_impaired: return HI-flagged results (default false)
- forced: return forced-flagged results (default false)
- download_error: if set, Download returns this error instead of data
- subtitle_content: custom SRT content for downloads (default: generated)
The mock provider is only registered when the "mock" provider is enabled in config. It never makes network calls.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Schema ¶
func Schema() []api.ProviderSchemaField
Schema returns the UI schema fields for the mock provider settings page.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.