Documentation
¶
Overview ¶
Package frontendtest supplies configurable fakes for protocol implementations.
Index ¶
- type Artwork
- func (Artwork) ImageURLFunc() frontend.ImageURLFunc
- func (Artwork) List(context.Context, frontend.ArtworkRequest) ([]frontend.Image, bool, error)
- func (Artwork) PaletteCache() frontend.ArtworkPaletteCache
- func (Artwork) PosterRenderer() frontend.TitlePosterRenderer
- func (Artwork) Read(context.Context, frontend.ArtworkRequest, frontend.Image, ...) ([]byte, string, error)
- func (Artwork) RemoteCache() frontend.ArtworkImageCache
- type Capabilities
- type Experience
- func (f Experience) Ancestors(c context.Context, v *core.Viewer, d core.Device, k core.RatingKey) ([]core.Title, error)
- func (f Experience) ArrangeHome(_ context.Context, _ core.Recommender, _ *core.User, _ core.HubContext, ...) ([]int, error)
- func (f Experience) CatalogSource() core.Catalog
- func (f Experience) Children(c context.Context, v *core.Viewer, d core.Device, k core.RatingKey, ...) (core.Page, error)
- func (f Experience) Collections(c context.Context, v *core.Viewer, d core.Device, q frontend.CollectionQuery) (frontend.CollectionPage, error)
- func (f Experience) CollectionsSource() core.Collections
- func (f Experience) ContinueFilter(_ core.State, ...) func(context.Context, *core.User, []core.Title) []core.Title
- func (f Experience) DashboardSource() frontend.Dashboard
- func (f Experience) DetailExtras(context.Context, frontend.ExtrasSource, *core.Title, string, map[int]bool) ([]frontend.ExtraClip, error)
- func (f Experience) DiscoveryFeatures() *frontend.DiscoveryFeatures
- func (f Experience) DiscoverySearch(*frontend.DiscoveryFeatures) func(context.Context, *core.User, string, int) ([]core.Title, bool)
- func (f Experience) EntityFavorites(c context.Context, v *core.Viewer, refs []frontend.FavoriteRef) (map[frontend.FavoriteRef]bool, error)
- func (f Experience) EpisodeOrderSource() frontend.EpisodeOrder
- func (f Experience) Facets(c context.Context, v *core.Viewer, d core.Device, id, name string) ([]core.FacetValue, error)
- func (f Experience) FamiliarFrom(any) func(context.Context, *core.User, []core.RatingKey) map[core.RatingKey]int
- func (f Experience) FavoriteShowsFunc() func(context.Context, *core.User) (map[core.RatingKey]bool, error)
- func (f Experience) FilterAvailableFunc() func(context.Context, []core.Title) []core.Title
- func (f Experience) HomeRevision(context.Context, *core.User) (frontend.HomeRevision, bool, error)
- func (f Experience) Item(c context.Context, r frontend.ItemRequest) (frontend.ItemDetail, error)
- func (f Experience) ItemArtwork(c context.Context, v *core.Viewer, d core.Device, k core.RatingKey) ([]frontend.Image, bool, error)
- func (f Experience) JudgedOnFactsFunc() func(context.Context) func(core.Title) bool
- func (f Experience) LibraryCount(c context.Context, v *core.Viewer, id string) (int, error)
- func (Experience) LibraryGUIDs() frontend.LibraryGUIDs
- func (f Experience) LibraryItems(c context.Context, v *core.Viewer, d core.Device, id string, ...) (core.Page, error)
- func (Experience) LibraryMetadata() frontend.LibraryMetadata
- func (f Experience) LibraryTitles() (string, string)
- func (Experience) Markers(context.Context, core.RatingKey, core.MediaInfo) ([]frontend.MarkerRange, error)
- func (f Experience) MergeShareFilter(filter, _ core.Filter) (core.Filter, bool)
- func (f Experience) NamedFacetIDs(c context.Context, v *core.Viewer, d core.Device, key core.RatingKey, ...) (map[string]string, error)
- func (f Experience) NewContinue(frontend.ContinueOptions) frontend.Continue
- func (f Experience) NewContinueDeck(frontend.ContinueDeckOptions) frontend.ContinueDeck
- func (f Experience) NewDetailRelated(frontend.DetailRelatedOptions) frontend.DetailRelated
- func (f Experience) NewDiscoverySelection(frontend.DiscoverySelectionOptions) frontend.DiscoverySelection
- func (f Experience) NewEpisodeBatch(frontend.EpisodeBatchOptions) frontend.EpisodeBatch
- func (f Experience) NewHomeSelection(frontend.HomeSelectionOptions) frontend.HomeSelection
- func (f Experience) NewPlaylistSelection(frontend.PlaylistSelectionOptions) frontend.PlaylistSelection
- func (f Experience) NewPostPlaySelection(frontend.PostPlaySelectionOptions) frontend.PostPlaySelection
- func (f Experience) NewRecent(frontend.RecentOptions) frontend.Recent
- func (f Experience) NewRowSelection(frontend.RowSelectionOptions) frontend.RowSelection
- func (f Experience) NewScopedCollection(frontend.ScopedCollectionOptions) frontend.ScopedCollection
- func (f Experience) NewTrackPreferenceSelector(frontend.TrackPreferenceSelectorOptions) frontend.TrackPreferenceSelector
- func (f Experience) NoProviderWait(ctx context.Context) context.Context
- func (f Experience) NotInterested(c context.Context, v *core.Viewer, d core.Device, q frontend.PageQuery) (frontend.NotInterestedPage, error)
- func (f Experience) NotInterestedItem(c context.Context, v *core.Viewer, d core.Device, k core.RatingKey) (frontend.NotInterestedEntry, error)
- func (f Experience) PersonFacetIDs(c context.Context, v *core.Viewer, d core.Device, key core.RatingKey, ...) (map[int64]string, error)
- func (f Experience) PlaybackMarkerRanges(context.Context, frontend.MarkerRanges, core.RatingKey, core.MediaInfo) ([]frontend.MarkerRange, error)
- func (f Experience) PlaylistsSource() core.Playlists
- func (f Experience) PrioritizeAvailableFunc() func(context.Context, []core.Title) []core.Title
- func (f Experience) RecommenderSource() core.Recommender
- func (f Experience) RemoveFromContinue(c context.Context, v *core.Viewer, k core.RatingKey) error
- func (f Experience) ReportRowInteraction(c context.Context, interaction frontend.RowInteraction) error
- func (f Experience) RequestDatabaseObservation(context.Context) (int64, time.Duration)
- func (f Experience) ResolveEventSubject(c context.Context, v *core.Viewer, d core.Device, ref frontend.FavoriteRef) (frontend.ResolvedEventSubject, error)
- func (f Experience) ResolveExternal(c context.Context, v *core.Viewer, d core.Device, r frontend.ExternalRequest) (core.RatingKey, error)
- func (f Experience) ResolveFacet(c context.Context, v *core.Viewer, d core.Device, view, kind, id string) (core.FacetValue, error)
- func (f Experience) ResourcesSource() frontend.ResourceStatistics
- func (f Experience) Rows(c context.Context, r frontend.RowRequest) ([]frontend.Row, error)
- func (f Experience) SameDayUnavailable(context.Context, *core.Title, time.Time, ...) bool
- func (f Experience) Search(c context.Context, v *core.Viewer, d core.Device, s string, ...) (frontend.SearchPage, error)
- func (f Experience) SearchFor(frontend.SearchSources, frontend.Visibility, func(*core.User) bool) frontend.Search
- func (f Experience) SearchSources() frontend.SearchSources
- func (f Experience) SeasonNextEpisode([]core.Title, map[core.RatingKey]core.WatchStatus, time.Time, ...) *core.Title
- func (f Experience) SetEntityFavorite(c context.Context, v *core.Viewer, ref frontend.FavoriteRef, on bool) error
- func (f Experience) SetFavorite(c context.Context, v *core.Viewer, k core.RatingKey, on bool) error
- func (f Experience) SetLikes(c context.Context, v *core.Viewer, k core.RatingKey, likes *bool) error
- func (f Experience) SetNotInterested(c context.Context, v *core.Viewer, k core.RatingKey, on bool) error
- func (f Experience) SetPlayed(c context.Context, v *core.Viewer, k core.RatingKey) error
- func (f Experience) SetRating(c context.Context, v *core.Viewer, k core.RatingKey, rating float64) error
- func (f Experience) SetUnplayed(c context.Context, v *core.Viewer, k core.RatingKey) error
- func (f Experience) SetWatchlist(c context.Context, v *core.Viewer, k core.RatingKey, on bool) error
- func (f Experience) ShowOnDeck([]core.Title, map[core.RatingKey]core.WatchStatus, func(*core.Title) bool) *core.Title
- func (f Experience) Similar(c context.Context, v *core.Viewer, d core.Device, k core.RatingKey, ...) (frontend.SearchPage, error)
- func (f Experience) StateSource() core.State
- func (f Experience) StatisticsDefaults(d frontend.Dashboard, r frontend.ResourceStatistics, _ func() time.Time) (frontend.Dashboard, frontend.ResourceStatistics)
- func (f Experience) UserData(c context.Context, v *core.Viewer, k []core.RatingKey) (map[core.RatingKey]core.WatchStatus, error)
- func (f Experience) VibeSearchSource() frontend.VibeSearcher
- func (f Experience) Views(c context.Context, v *core.Viewer) ([]frontend.View, error)
- type GrantDeviceIdentity
- type Identity
- func (f Identity) Accept(ctx context.Context, token string) (*core.Viewer, frontend.CredentialAcceptance, error)
- func (f Identity) ActiveUser(context.Context, int64) (*core.User, error)
- func (f Identity) IssueDelegation(context.Context, int64) (string, error)
- func (f Identity) IssueRefresh(ctx context.Context, token string, d core.Device) (string, error)
- func (f Identity) PublicViewers(ctx context.Context) ([]frontend.PublicViewer, error)
- func (f Identity) QuickConnectApprove(ctx context.Context, viewer *core.Viewer, code string) error
- func (f Identity) QuickConnectDetails(ctx context.Context, secret string) (frontend.QuickConnectDetails, error)
- func (f Identity) QuickConnectInitiate(ctx context.Context, d core.Device) (string, string, error)
- func (f Identity) QuickConnectPoll(ctx context.Context, secret string) (string, error)
- func (f Identity) QuickConnectStatus(ctx context.Context, secret string) (bool, error)
- func (f Identity) ReceiptCurrent(context.Context, frontend.CredentialAcceptance) error
- func (f Identity) Refresh(ctx context.Context, token string, d core.Device) (string, string, error)
- func (f Identity) Resolve(ctx context.Context, credential string) (*core.Viewer, error)
- func (f Identity) ResolveDevice(ctx context.Context, credential string, device core.Device) (*core.Viewer, time.Time, error)
- func (f Identity) Revoke(ctx context.Context, grant string) error
- func (f Identity) SetupComplete() bool
- func (f Identity) SignIn(ctx context.Context, user, password string, d core.Device) (string, error)
- func (f Identity) Users(context.Context) ([]core.User, error)
- func (f Identity) ViewerTimes(ctx context.Context, credential string, viewerID int64) (frontend.ViewerTimes, error)
- type ImageGrants
- func (f ImageGrants) Issue(ctx context.Context, req frontend.ImageGrantRequest) (string, error)
- func (f ImageGrants) IssueBatch(ctx context.Context, req frontend.ImageBatchRequest) ([]frontend.ImageBatchItem, error)
- func (f ImageGrants) Revoke(ctx context.Context, credential, secret string) error
- func (f ImageGrants) Serve(w http.ResponseWriter, r *http.Request, secret string)
- type LiveTV
- func (f LiveTV) AllChannels(context.Context) ([]frontend.LiveTVChannel, error)
- func (f LiveTV) AllowedChannel(context.Context, *frontend.User, string) (frontend.LiveTVChannel, error)
- func (f LiveTV) AllowedChannels(context.Context, *frontend.User) ([]frontend.LiveTVChannel, error)
- func (f LiveTV) AuthenticateMediaGrant(*http.Request, func(context.Context, int64) *frontend.User) (*frontend.User, bool)
- func (f LiveTV) Channel(context.Context, string) (frontend.LiveTVChannel, error)
- func (f LiveTV) ChannelForViewer(context.Context, *frontend.User, string) (frontend.LiveTVChannel, error)
- func (f LiveTV) ChannelPermitted(context.Context, *frontend.User, string) (bool, error)
- func (f LiveTV) Channels(ctx context.Context, v *core.Viewer) ([]frontend.LiveChannel, error)
- func (f LiveTV) Guide(ctx context.Context, v *core.Viewer, q frontend.LiveGuideQuery) ([]frontend.LiveProgramme, error)
- func (f LiveTV) GuideChannelLogo(context.Context, frontend.LiveTVChannel) string
- func (f LiveTV) GuideForChannels(context.Context, *frontend.User, time.Time, time.Time, []string) ([]frontend.LiveTVProgramme, error)
- func (f LiveTV) GuideWindow(context.Context, *frontend.User, time.Time, time.Time) ([]frontend.LiveTVProgramme, error)
- func (f LiveTV) LineupChangedFor(*frontend.User) time.Time
- func (f LiveTV) LogoKey() []byte
- func (f LiveTV) NoteClientActivity()
- func (f LiveTV) ResolveChannelGUID(ctx context.Context, v *core.Viewer, id string) (frontend.LiveChannel, error)
- func (f LiveTV) ResolveProgrammeGUID(ctx context.Context, v *core.Viewer, id string, q frontend.LiveGuideQuery) (frontend.LiveProgramme, error)
- func (f LiveTV) ServeDASH(http.ResponseWriter, *http.Request, string, *frontend.User) error
- func (f LiveTV) ServeDASHPart(w http.ResponseWriter, r *http.Request, _ string, _ *frontend.User, _, _ int, ...)
- func (f LiveTV) ServeHTTP(http.ResponseWriter, *http.Request, string, *frontend.User) error
- func (f LiveTV) ServePlaylist(w http.ResponseWriter, r *http.Request, _ string, _ *frontend.User)
- func (f LiveTV) ServeRelaySegment(w http.ResponseWriter, r *http.Request, _ string, _ int, _ *frontend.User)
- func (f LiveTV) ServeResource(w http.ResponseWriter, r *http.Request, _, _ string, _ *frontend.User)
- func (f LiveTV) ServeXMLTV(w http.ResponseWriter, r *http.Request, _ *frontend.User)
- func (f LiveTV) Session(context.Context, string, *frontend.User) (frontend.LiveTVSessionInfo, error)
- func (f LiveTV) Sessions(context.Context, *frontend.User) []frontend.LiveTVSessionInfo
- func (f LiveTV) Stop(context.Context, string, *frontend.User) error
- func (f LiveTV) TuneWithSession(context.Context, *frontend.User, string, frontend.ClientCaps, string) (frontend.LiveTVSessionInfo, error)
- func (f LiveTV) ViewingSessions() []*frontend.PlaySession
- func (f LiveTV) VisibleTo(context.Context, *frontend.User) bool
- type Preferences
- func (f Preferences) Delete(ctx context.Context, v *core.Viewer, client, key string) error
- func (f Preferences) Get(ctx context.Context, v *core.Viewer, client, key string) (json.RawMessage, error)
- func (f Preferences) Put(ctx context.Context, v *core.Viewer, client, key string, data json.RawMessage) error
- type Sessions
- func (Sessions) CancelTrickplay(string)
- func (f Sessions) Capabilities(c context.Context, a frontend.SessionAccess) (frontend.SessionCapabilities, error)
- func (f Sessions) Command(c context.Context, actor *core.Viewer, id string, cmd frontend.Command) error
- func (f Sessions) Events(c context.Context, s frontend.EventScope) (<-chan frontend.Event, error)
- func (f Sessions) Markers(c context.Context, a frontend.SessionAccess, id string) (frontend.SessionMarkers, error)
- func (f Sessions) Open(c context.Context, r frontend.OpenRequest) (frontend.Session, error)
- func (f Sessions) Plan(c context.Context, r frontend.PlanRequest) (frontend.PlayPlan, error)
- func (f Sessions) Recover(c context.Context, id, url string, at time.Duration) error
- func (f Sessions) Report(c context.Context, a frontend.SessionAccess, id string, t frontend.Timeline) error
- func (f Sessions) ReportItemProgress(c context.Context, a frontend.SessionAccess, item core.RatingKey, ...) error
- func (f Sessions) ReportSample(ctx context.Context, a frontend.SessionAccess, id string, ...) (frontend.ReportOutcome, error)
- func (f Sessions) ServeMedia(w http.ResponseWriter, r *http.Request)
- func (f Sessions) Sessions(c context.Context, a frontend.SessionAccess) ([]frontend.Session, error)
- func (f Sessions) StartStream(c context.Context, a frontend.SessionAccess, id string, ...) (string, error)
- func (f Sessions) Stop(c context.Context, a frontend.SessionAccess, id string) error
- func (f Sessions) SubtitleURL(c context.Context, a frontend.SessionAccess, id string, index int, ...) (string, error)
- func (f Sessions) TranscodeFor(c context.Context, id string) (core.HLSSession, bool)
- func (Sessions) TrickplayAvailable(string) bool
- func (Sessions) TrickplayBIF(string) ([]byte, bool)
- func (Sessions) TrickplayFrame(string, time.Duration) ([]byte, bool)
- func (f Sessions) UpdateCapabilities(c context.Context, a frontend.SessionAccess, v frontend.SessionCapabilities) error
- type TrackPreferences
- func (TrackPreferences) ForgetChoice(context.Context, int64, core.RatingKey, string) error
- func (f TrackPreferences) Get(ctx context.Context, v *core.Viewer) (frontend.TrackPreferences, error)
- func (TrackPreferences) GetRules(context.Context, int64) (frontend.PlaybackPreferenceRules, error)
- func (TrackPreferences) HasViewerRules(context.Context, int64) (bool, error)
- func (TrackPreferences) PreloadChoices(context.Context, int64, []core.RatingKey) error
- func (TrackPreferences) Remember(context.Context, int64, core.RatingKey, string, *core.StreamInfo) error
- func (TrackPreferences) Select(context.Context, int64, core.RatingKey, core.MediaInfo, string) (frontend.PlaybackPreferenceSelection, error)
- func (f TrackPreferences) SetSubtitle(ctx context.Context, v *core.Viewer, languages []string, mode string) error
- type VirtualPaths
- func (f VirtualPaths) Base(ctx context.Context, r *http.Request) (string, error)
- func (f VirtualPaths) Path(ctx context.Context, v *core.Viewer, d core.Device, key core.RatingKey) (string, error)
- func (f VirtualPaths) Paths(ctx context.Context, v *core.Viewer, d core.Device, keys []core.RatingKey) (map[core.RatingKey]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artwork ¶
type Artwork struct{}
Artwork is a default fake for frontend.Artwork.
func (Artwork) ImageURLFunc ¶
func (Artwork) ImageURLFunc() frontend.ImageURLFunc
func (Artwork) PaletteCache ¶
func (Artwork) PaletteCache() frontend.ArtworkPaletteCache
func (Artwork) PosterRenderer ¶
func (Artwork) PosterRenderer() frontend.TitlePosterRenderer
func (Artwork) RemoteCache ¶
func (Artwork) RemoteCache() frontend.ArtworkImageCache
type Capabilities ¶
type Capabilities struct {
BuildFunc func(context.Context, frontend.CapabilityRequest) (frontend.CapabilityResult, error)
ApplyClientRulesFunc func(frontend.HostQualityConfig, core.ClientCaps, *core.Viewer, string) core.ClientCaps
}
Capabilities is a configurable fake for the host capability provider.
func (Capabilities) ApplyClientRules ¶
func (f Capabilities) ApplyClientRules(q frontend.HostQualityConfig, c core.ClientCaps, v *core.Viewer, media string) core.ClientCaps
func (Capabilities) Build ¶
func (f Capabilities) Build(ctx context.Context, req frontend.CapabilityRequest) (frontend.CapabilityResult, error)
type Experience ¶
type Experience struct {
CollectionsFunc func(context.Context, *core.Viewer, core.Device, frontend.CollectionQuery) (frontend.CollectionPage, error)
NotInterestedFunc func(context.Context, *core.Viewer, core.Device, frontend.PageQuery) (frontend.NotInterestedPage, error)
NotInterestedItemFunc func(context.Context, *core.Viewer, core.Device, core.RatingKey) (frontend.NotInterestedEntry, error)
ResolveExternalFunc func(context.Context, *core.Viewer, core.Device, frontend.ExternalRequest) (core.RatingKey, error)
ResolveEventSubjectFunc func(context.Context, *core.Viewer, core.Device, frontend.FavoriteRef) (frontend.ResolvedEventSubject, error)
SetNotInterestedFunc func(context.Context, *core.Viewer, core.RatingKey, bool) error
NamedFacetIDsFunc func(context.Context, *core.Viewer, core.Device, core.RatingKey, string, []string) (map[string]string, error)
PersonFacetIDsFunc func(context.Context, *core.Viewer, core.Device, core.RatingKey, []int64) (map[int64]string, error)
ResolveFacetFunc func(context.Context, *core.Viewer, core.Device, string, string, string) (core.FacetValue, error)
SetLikesFunc func(context.Context, *core.Viewer, core.RatingKey, *bool) error
SetEntityFavoriteFunc func(context.Context, *core.Viewer, frontend.FavoriteRef, bool) error
EntityFavoritesFunc func(context.Context, *core.Viewer, []frontend.FavoriteRef) (map[frontend.FavoriteRef]bool, error)
SimilarFunc func(context.Context, *core.Viewer, core.Device, core.RatingKey, frontend.ItemQuery) (frontend.SearchPage, error)
AncestorsFunc func(context.Context, *core.Viewer, core.Device, core.RatingKey) ([]core.Title, error)
FacetsFunc func(context.Context, *core.Viewer, core.Device, string, string) ([]core.FacetValue, error)
LibraryItemsFunc func(context.Context, *core.Viewer, core.Device, string, frontend.ItemQuery) (core.Page, error)
LibraryCountFunc func(context.Context, *core.Viewer, string) (int, error)
SetPlayedFunc func(context.Context, *core.Viewer, core.RatingKey) error
SetUnplayedFunc func(context.Context, *core.Viewer, core.RatingKey) error
SetWatchlistFunc func(context.Context, *core.Viewer, core.RatingKey, bool) error
SetFavoriteFunc func(context.Context, *core.Viewer, core.RatingKey, bool) error
SetRatingFunc func(context.Context, *core.Viewer, core.RatingKey, float64) error
RemoveFromContinueFunc func(context.Context, *core.Viewer, core.RatingKey) error
ReportRowInteractionFunc func(context.Context, frontend.RowInteraction) error
ViewsFunc func(context.Context, *core.Viewer) ([]frontend.View, error)
RowsFunc func(context.Context, frontend.RowRequest) ([]frontend.Row, error)
ItemFunc func(context.Context, frontend.ItemRequest) (frontend.ItemDetail, error)
ItemArtworkFunc func(context.Context, *core.Viewer, core.Device, core.RatingKey) ([]frontend.Image, bool, error)
ChildrenFunc func(context.Context, *core.Viewer, core.Device, core.RatingKey, frontend.ItemQuery) (core.Page, error)
SearchFunc func(context.Context, *core.Viewer, core.Device, string, frontend.ItemQuery) (frontend.SearchPage, error)
UserDataFunc func(context.Context, *core.Viewer, []core.RatingKey) (map[core.RatingKey]core.WatchStatus, error)
}
Experience implements frontend.Experience with optional function hooks.
func (Experience) ArrangeHome ¶
func (f Experience) ArrangeHome(_ context.Context, _ core.Recommender, _ *core.User, _ core.HubContext, _ string, rows []core.Hub, _ []core.NeutralHomeRow) ([]int, error)
func (Experience) CatalogSource ¶
func (f Experience) CatalogSource() core.Catalog
func (Experience) Collections ¶
func (f Experience) Collections(c context.Context, v *core.Viewer, d core.Device, q frontend.CollectionQuery) (frontend.CollectionPage, error)
func (Experience) CollectionsSource ¶
func (f Experience) CollectionsSource() core.Collections
func (Experience) ContinueFilter ¶
func (Experience) DashboardSource ¶
func (f Experience) DashboardSource() frontend.Dashboard
func (Experience) DetailExtras ¶
func (Experience) DiscoveryFeatures ¶
func (f Experience) DiscoveryFeatures() *frontend.DiscoveryFeatures
func (Experience) DiscoverySearch ¶
func (Experience) EntityFavorites ¶
func (f Experience) EntityFavorites(c context.Context, v *core.Viewer, refs []frontend.FavoriteRef) (map[frontend.FavoriteRef]bool, error)
func (Experience) EpisodeOrderSource ¶
func (f Experience) EpisodeOrderSource() frontend.EpisodeOrder
func (Experience) FamiliarFrom ¶
func (Experience) FavoriteShowsFunc ¶
func (Experience) FilterAvailableFunc ¶
func (Experience) HomeRevision ¶
func (f Experience) HomeRevision(context.Context, *core.User) (frontend.HomeRevision, bool, error)
func (Experience) Item ¶
func (f Experience) Item(c context.Context, r frontend.ItemRequest) (frontend.ItemDetail, error)
func (Experience) ItemArtwork ¶
func (Experience) JudgedOnFactsFunc ¶
func (Experience) LibraryCount ¶
func (Experience) LibraryGUIDs ¶
func (Experience) LibraryGUIDs() frontend.LibraryGUIDs
func (Experience) LibraryItems ¶
func (Experience) LibraryMetadata ¶
func (Experience) LibraryMetadata() frontend.LibraryMetadata
func (Experience) LibraryTitles ¶
func (f Experience) LibraryTitles() (string, string)
func (Experience) Markers ¶
func (Experience) Markers(context.Context, core.RatingKey, core.MediaInfo) ([]frontend.MarkerRange, error)
func (Experience) MergeShareFilter ¶
func (Experience) NamedFacetIDs ¶
func (Experience) NewContinue ¶
func (f Experience) NewContinue(frontend.ContinueOptions) frontend.Continue
func (Experience) NewContinueDeck ¶
func (f Experience) NewContinueDeck(frontend.ContinueDeckOptions) frontend.ContinueDeck
func (Experience) NewDetailRelated ¶
func (f Experience) NewDetailRelated(frontend.DetailRelatedOptions) frontend.DetailRelated
func (Experience) NewDiscoverySelection ¶
func (f Experience) NewDiscoverySelection(frontend.DiscoverySelectionOptions) frontend.DiscoverySelection
func (Experience) NewEpisodeBatch ¶
func (f Experience) NewEpisodeBatch(frontend.EpisodeBatchOptions) frontend.EpisodeBatch
func (Experience) NewHomeSelection ¶
func (f Experience) NewHomeSelection(frontend.HomeSelectionOptions) frontend.HomeSelection
func (Experience) NewPlaylistSelection ¶
func (f Experience) NewPlaylistSelection(frontend.PlaylistSelectionOptions) frontend.PlaylistSelection
func (Experience) NewPostPlaySelection ¶
func (f Experience) NewPostPlaySelection(frontend.PostPlaySelectionOptions) frontend.PostPlaySelection
func (Experience) NewRecent ¶
func (f Experience) NewRecent(frontend.RecentOptions) frontend.Recent
func (Experience) NewRowSelection ¶
func (f Experience) NewRowSelection(frontend.RowSelectionOptions) frontend.RowSelection
func (Experience) NewScopedCollection ¶
func (f Experience) NewScopedCollection(frontend.ScopedCollectionOptions) frontend.ScopedCollection
func (Experience) NewTrackPreferenceSelector ¶
func (f Experience) NewTrackPreferenceSelector(frontend.TrackPreferenceSelectorOptions) frontend.TrackPreferenceSelector
func (Experience) NoProviderWait ¶
func (f Experience) NoProviderWait(ctx context.Context) context.Context
func (Experience) NotInterested ¶
func (Experience) NotInterestedItem ¶
func (Experience) PersonFacetIDs ¶
func (Experience) PlaybackMarkerRanges ¶
func (f Experience) PlaybackMarkerRanges(context.Context, frontend.MarkerRanges, core.RatingKey, core.MediaInfo) ([]frontend.MarkerRange, error)
func (Experience) PlaylistsSource ¶
func (f Experience) PlaylistsSource() core.Playlists
func (Experience) PrioritizeAvailableFunc ¶
func (Experience) RecommenderSource ¶
func (f Experience) RecommenderSource() core.Recommender
func (Experience) RemoveFromContinue ¶
func (Experience) ReportRowInteraction ¶
func (f Experience) ReportRowInteraction(c context.Context, interaction frontend.RowInteraction) error
func (Experience) RequestDatabaseObservation ¶
func (Experience) ResolveEventSubject ¶
func (f Experience) ResolveEventSubject(c context.Context, v *core.Viewer, d core.Device, ref frontend.FavoriteRef) (frontend.ResolvedEventSubject, error)
func (Experience) ResolveExternal ¶
func (Experience) ResolveFacet ¶
func (Experience) ResourcesSource ¶
func (f Experience) ResourcesSource() frontend.ResourceStatistics
func (Experience) Rows ¶
func (f Experience) Rows(c context.Context, r frontend.RowRequest) ([]frontend.Row, error)
func (Experience) SameDayUnavailable ¶
func (Experience) SearchFor ¶
func (f Experience) SearchFor(frontend.SearchSources, frontend.Visibility, func(*core.User) bool) frontend.Search
func (Experience) SearchSources ¶
func (f Experience) SearchSources() frontend.SearchSources
func (Experience) SeasonNextEpisode ¶
func (Experience) SetEntityFavorite ¶
func (f Experience) SetEntityFavorite(c context.Context, v *core.Viewer, ref frontend.FavoriteRef, on bool) error
func (Experience) SetFavorite ¶
func (Experience) SetNotInterested ¶
func (Experience) SetUnplayed ¶
func (Experience) SetWatchlist ¶
func (Experience) ShowOnDeck ¶
func (Experience) StateSource ¶
func (f Experience) StateSource() core.State
func (Experience) StatisticsDefaults ¶
func (f Experience) StatisticsDefaults(d frontend.Dashboard, r frontend.ResourceStatistics, _ func() time.Time) (frontend.Dashboard, frontend.ResourceStatistics)
func (Experience) VibeSearchSource ¶
func (f Experience) VibeSearchSource() frontend.VibeSearcher
type GrantDeviceIdentity ¶
type GrantDeviceIdentity struct {
Identity
ResolveGrantDeviceFunc func(context.Context, string, string) (*core.Viewer, core.Device, time.Time, error)
}
GrantDeviceIdentity opts a fake identity into the optional grant-device API.
type Identity ¶
type Identity struct {
IssueRefreshFunc func(context.Context, string, core.Device) (string, error)
RefreshFunc func(context.Context, string, core.Device) (string, string, error)
ResolveFunc func(context.Context, string) (*core.Viewer, error)
ResolveDeviceFunc func(context.Context, string, core.Device) (*core.Viewer, time.Time, error)
ViewerTimesFunc func(context.Context, string, int64) (frontend.ViewerTimes, error)
PublicViewersFunc func(context.Context) ([]frontend.PublicViewer, error)
SignInFunc func(context.Context, string, string, core.Device) (string, error)
InitiateFunc func(context.Context, core.Device) (string, string, error)
StatusFunc func(context.Context, string) (bool, error)
DetailsFunc func(context.Context, string) (frontend.QuickConnectDetails, error)
PollFunc func(context.Context, string) (string, error)
ApproveFunc func(context.Context, *core.Viewer, string) error
RevokeFunc func(context.Context, string) error
SetupCompleteFunc func() bool
}
Identity implements a configurable surface-bound identity for protocol tests.
func (Identity) ActiveUser ¶
func (Identity) IssueDelegation ¶
func (Identity) IssueRefresh ¶
func (Identity) PublicViewers ¶
func (Identity) QuickConnectApprove ¶
func (Identity) QuickConnectDetails ¶
func (Identity) QuickConnectInitiate ¶
func (Identity) QuickConnectPoll ¶
func (Identity) QuickConnectStatus ¶
func (Identity) ReceiptCurrent ¶
func (Identity) ResolveDevice ¶
func (Identity) SetupComplete ¶
func (Identity) ViewerTimes ¶
type ImageGrants ¶
type ImageGrants struct {
IssueFunc func(context.Context, frontend.ImageGrantRequest) (string, error)
IssueBatchFunc func(context.Context, frontend.ImageBatchRequest) ([]frontend.ImageBatchItem, error)
RevokeFunc func(context.Context, string, string) error
ServeFunc func(http.ResponseWriter, *http.Request, string)
}
ImageGrants provides optional hooks for scoped individual and batch grants.
func (ImageGrants) Issue ¶
func (f ImageGrants) Issue(ctx context.Context, req frontend.ImageGrantRequest) (string, error)
func (ImageGrants) IssueBatch ¶
func (f ImageGrants) IssueBatch(ctx context.Context, req frontend.ImageBatchRequest) ([]frontend.ImageBatchItem, error)
func (ImageGrants) Revoke ¶
func (f ImageGrants) Revoke(ctx context.Context, credential, secret string) error
func (ImageGrants) Serve ¶
func (f ImageGrants) Serve(w http.ResponseWriter, r *http.Request, secret string)
type LiveTV ¶
type LiveTV struct {
ChannelsFunc func(context.Context, *core.Viewer) ([]frontend.LiveChannel, error)
GuideFunc func(context.Context, *core.Viewer, frontend.LiveGuideQuery) ([]frontend.LiveProgramme, error)
ResolveChannelFunc func(context.Context, *core.Viewer, string) (frontend.LiveChannel, error)
ResolveProgrammeFunc func(context.Context, *core.Viewer, string, frontend.LiveGuideQuery) (frontend.LiveProgramme, error)
}
LiveTV is a configurable fake for viewer-scoped live television.
func (LiveTV) AllChannels ¶
func (LiveTV) AllowedChannel ¶
func (LiveTV) AllowedChannels ¶
func (LiveTV) AuthenticateMediaGrant ¶
func (LiveTV) ChannelForViewer ¶
func (LiveTV) ChannelPermitted ¶
func (LiveTV) Guide ¶
func (f LiveTV) Guide(ctx context.Context, v *core.Viewer, q frontend.LiveGuideQuery) ([]frontend.LiveProgramme, error)
func (LiveTV) GuideChannelLogo ¶
func (LiveTV) GuideForChannels ¶
func (LiveTV) GuideWindow ¶
func (LiveTV) NoteClientActivity ¶
func (f LiveTV) NoteClientActivity()
func (LiveTV) ResolveChannelGUID ¶
func (LiveTV) ResolveProgrammeGUID ¶
func (LiveTV) ServeDASHPart ¶
func (LiveTV) ServePlaylist ¶
func (LiveTV) ServeRelaySegment ¶
func (LiveTV) ServeResource ¶
func (LiveTV) ServeXMLTV ¶
func (LiveTV) TuneWithSession ¶
func (LiveTV) ViewingSessions ¶
func (f LiveTV) ViewingSessions() []*frontend.PlaySession
type Preferences ¶
type Preferences struct {
GetFunc func(context.Context, *core.Viewer, string, string) (json.RawMessage, error)
PutFunc func(context.Context, *core.Viewer, string, string, json.RawMessage) error
DeleteFunc func(context.Context, *core.Viewer, string, string) error
}
Preferences is a configurable fake for protocol presentation state.
type Sessions ¶
type Sessions struct {
PlanFunc func(context.Context, frontend.PlanRequest) (frontend.PlayPlan, error)
OpenFunc func(context.Context, frontend.OpenRequest) (frontend.Session, error)
StartStreamFunc func(context.Context, frontend.SessionAccess, string, frontend.StreamRequest) (string, error)
SubtitleURLFunc func(context.Context, frontend.SessionAccess, string, int, string) (string, error)
MarkersFunc func(context.Context, frontend.SessionAccess, string) (frontend.SessionMarkers, error)
ServeMediaFunc func(http.ResponseWriter, *http.Request)
ReportSampleFunc func(context.Context, frontend.SessionAccess, string, frontend.ProgressSample) (frontend.ReportOutcome, error)
ReportFunc func(context.Context, frontend.SessionAccess, string, frontend.Timeline) error
ReportItemFunc func(context.Context, frontend.SessionAccess, core.RatingKey, frontend.Timeline) error
StopFunc func(context.Context, frontend.SessionAccess, string) error
CommandFunc func(context.Context, *core.Viewer, string, frontend.Command) error
UpdateCapabilitiesFunc func(context.Context, frontend.SessionAccess, frontend.SessionCapabilities) error
CapabilitiesFunc func(context.Context, frontend.SessionAccess) (frontend.SessionCapabilities, error)
SessionsFunc func(context.Context, frontend.SessionAccess) ([]frontend.Session, error)
RecoverFunc func(context.Context, string, string, time.Duration) error
TranscodeForFunc func(context.Context, string) (core.HLSSession, bool)
EventsFunc func(context.Context, frontend.EventScope) (<-chan frontend.Event, error)
}
Sessions implements frontend.Sessions with optional function hooks.
func (Sessions) CancelTrickplay ¶
func (Sessions) Capabilities ¶
func (f Sessions) Capabilities(c context.Context, a frontend.SessionAccess) (frontend.SessionCapabilities, error)
func (Sessions) Markers ¶
func (f Sessions) Markers(c context.Context, a frontend.SessionAccess, id string) (frontend.SessionMarkers, error)
func (Sessions) ReportItemProgress ¶
func (Sessions) ReportSample ¶
func (f Sessions) ReportSample(ctx context.Context, a frontend.SessionAccess, id string, sample frontend.ProgressSample) (frontend.ReportOutcome, error)
func (Sessions) ServeMedia ¶
func (f Sessions) ServeMedia(w http.ResponseWriter, r *http.Request)
func (Sessions) StartStream ¶
func (f Sessions) StartStream(c context.Context, a frontend.SessionAccess, id string, r frontend.StreamRequest) (string, error)
func (Sessions) SubtitleURL ¶
func (Sessions) TranscodeFor ¶
func (Sessions) TrickplayAvailable ¶
func (Sessions) TrickplayFrame ¶
func (Sessions) UpdateCapabilities ¶
func (f Sessions) UpdateCapabilities(c context.Context, a frontend.SessionAccess, v frontend.SessionCapabilities) error
type TrackPreferences ¶
type TrackPreferences struct {
GetFunc func(context.Context, *core.Viewer) (frontend.TrackPreferences, error)
SetFunc func(context.Context, *core.Viewer, []string, string) error
}
TrackPreferences is a configurable fake for shared viewer track settings.
func (TrackPreferences) ForgetChoice ¶
func (TrackPreferences) Get ¶
func (f TrackPreferences) Get(ctx context.Context, v *core.Viewer) (frontend.TrackPreferences, error)
func (TrackPreferences) GetRules ¶
func (TrackPreferences) GetRules(context.Context, int64) (frontend.PlaybackPreferenceRules, error)
func (TrackPreferences) HasViewerRules ¶
func (TrackPreferences) PreloadChoices ¶
func (TrackPreferences) Remember ¶
func (TrackPreferences) Remember(context.Context, int64, core.RatingKey, string, *core.StreamInfo) error
func (TrackPreferences) SetSubtitle ¶
type VirtualPaths ¶
type VirtualPaths struct {
PathFunc func(context.Context, *core.Viewer, core.Device, core.RatingKey) (string, error)
PathsFunc func(context.Context, *core.Viewer, core.Device, []core.RatingKey) (map[core.RatingKey]string, error)
BaseFunc func(context.Context, *http.Request) (string, error)
}
VirtualPaths supplies configurable viewer-scoped virtual paths.