Documentation ¶
Index ¶
- Variables
- func RangeActorFactory(f func(string, ActorFactory))
- func RangeMovieFactory(f func(string, MovieFactory))
- func RegisterActorFactory[T ActorProvider](name string, factory func() T)
- func RegisterMovieFactory[T MovieProvider](name string, factory func() T)
- type ActorFactory
- type ActorProvider
- type ActorSearcher
- type Fetcher
- type MovieFactory
- type MovieProvider
- type MovieSearcher
- type Provider
- type RequestTimeoutSetter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidID = errors.New(http.StatusBadRequest, "invalid id") ErrInvalidURL = errors.New(http.StatusBadRequest, "invalid url") ErrInvalidKeyword = errors.New(http.StatusBadRequest, "invalid keyword") ErrInfoNotFound = errors.New(http.StatusNotFound, "info not found") ErrImageNotFound = errors.New(http.StatusNotFound, "image not found") ErrProviderNotFound = errors.New(http.StatusNotFound, "provider not found") ErrIncompleteMetadata = errors.New(http.StatusInternalServerError, "incomplete metadata") )
Functions ¶
func RangeActorFactory ¶
func RangeActorFactory(f func(string, ActorFactory))
func RangeMovieFactory ¶
func RangeMovieFactory(f func(string, MovieFactory))
func RegisterActorFactory ¶
func RegisterActorFactory[T ActorProvider](name string, factory func() T)
func RegisterMovieFactory ¶
func RegisterMovieFactory[T MovieProvider](name string, factory func() T)
Types ¶
type ActorFactory ¶
type ActorFactory = func() ActorProvider
type ActorProvider ¶
type ActorSearcher ¶
type ActorSearcher interface { // SearchActor searches matched actor/s. SearchActor(keyword string) ([]*model.ActorSearchResult, error) }
type MovieFactory ¶
type MovieFactory = func() MovieProvider
type MovieProvider ¶
type MovieSearcher ¶
type Provider ¶
type Provider interface { // Name returns the name of the provider. Name() string // Priority returns the matching priority of the provider. Priority() int // URL returns the base url of the provider. URL() *url.URL // NormalizeID normalizes ID to conform to standard. NormalizeID(id string) string // ParseIDFromURL parses ID from given URL. ParseIDFromURL(rawURL string) (string, error) }
type RequestTimeoutSetter ¶
Click to show internal directories.
Click to hide internal directories.