search

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: GPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	YOUTUBE_SOURCE    = YouTubeSource{}
	SOUNDCLOUD_SOURCE = SoundCloudSource{}
)

Functions

This section is empty.

Types

type SearchResult added in v0.0.2

type SearchResult struct {
	Title, Uploader, URL, Duration, ID string
	Live                               bool
	SourceName                         string
	Extra                              []string
}
func Search(query string, limit int, sources ...SearchSource) []*SearchResult

type SearchSource added in v0.0.2

type SearchSource interface {
	Search(query string, limit int) []*SearchResult
}

type SoundCloudSource added in v0.0.2

type SoundCloudSource struct{}

func (SoundCloudSource) Search added in v0.0.2

func (s SoundCloudSource) Search(query string, limit int) (results []*SearchResult)

type YouTubeSource added in v0.0.2

type YouTubeSource struct {
}

func (YouTubeSource) Search added in v0.0.2

func (s YouTubeSource) Search(searchTerm string, limit int) (results []*SearchResult)

Jump to

Keyboard shortcuts

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