Documentation ¶
Overview ¶
Package search provides search engines using a common interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Google ¶ added in v3.1.1
type Google struct { APIKey string // api key enabled for the custom search api CX string // custom search engine id. If empty a default is used. }
Google implements Searcher for Google custom search engines.
type Result ¶ added in v3.1.0
type Result struct {
URL string // url of the search result.
}
Result represents a search result.
type Searcher ¶ added in v3.1.0
type Searcher interface { // Search searches for results using the query. // It returns a channel which sends the results. // To stop searching, cancel the context. Search(ctx context.Context, query string) <-chan Result }
Searcher provides an interface for query-based searching.
Click to show internal directories.
Click to hide internal directories.