Documentation
¶
Index ¶
- Variables
- func AddExtractor(name string, e Extractor)
- func AddSearcher(name string, s Searcher)
- func AddSuggestor(name string, s Suggestor)
- func Suggest(cfg Config, input string) ([]string, error)
- type Config
- type ConfigTypeError
- type Data
- type Error
- type Extractor
- type Provider
- type ProviderConfig
- type Searcher
- type Suggestor
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddExtractor ¶
func AddSearcher ¶
func AddSuggestor ¶
Types ¶
type Config ¶
type Config map[string]ProviderConfig
func DefaultConfig ¶
func DefaultConfig() Config
func (Config) CheckValidity ¶
type ConfigTypeError ¶
func (*ConfigTypeError) Error ¶
func (e *ConfigTypeError) Error() string
type Data ¶
type Data struct { // Each instance of this struct should be reconstructable by calling // Extract() on the SourceUrl // String values are "" if not present SourceUrl string StreamUrl string // may expire, see Expires Title string PlaylistUrl string PlaylistTitle string Description string Uploader string Duration int // in seconds; -1 if unknown Expires time.Time // when StreamUrl expires OfficialArtist bool // only for sites that have non-music (e.g. YouTube); search results only }
type Extractor ¶
type Extractor interface { Provider Matches(cfg ProviderConfig, input string) bool Extract(cfg ProviderConfig, input string) ([]Data, error) }
type Provider ¶
type Provider interface {
DefaultConfig() ProviderConfig
}
type ProviderConfig ¶
Click to show internal directories.
Click to hide internal directories.