Documentation ¶
Index ¶
- type AOL
- func (a *AOL) Desc(i int) (string, error)
- func (a *AOL) Each(eachCb func(int) error) error
- func (a *AOL) Init() error
- func (a *AOL) Link(i int) (string, error)
- func (*AOL) Name() string
- func (a *AOL) SetKeyword(keyword string)
- func (a *AOL) SetPage(page int)
- func (a *AOL) SetUserAgent(ua string)
- func (a *AOL) Title(i int) (string, error)
- type Bing
- func (b *Bing) Desc(i int) (string, error)
- func (b *Bing) Each(eachCb func(int) error) error
- func (b *Bing) Init() error
- func (b *Bing) Link(i int) (string, error)
- func (b *Bing) Name() string
- func (b *Bing) SetKeyword(keyword string)
- func (b *Bing) SetPage(page int)
- func (b *Bing) SetUserAgent(ua string)
- func (b *Bing) Title(i int) (string, error)
- type DDG
- func (d *DDG) Desc(i int) (string, error)
- func (d *DDG) Each(eachCb func(int) error) error
- func (d *DDG) Init() error
- func (d *DDG) Link(i int) (string, error)
- func (d *DDG) Name() string
- func (d *DDG) SetKeyword(keyword string)
- func (d *DDG) SetPage(page int)
- func (d *DDG) SetUserAgent(ua string)
- func (d *DDG) Title(i int) (string, error)
- type Engine
- type Google
- func (g *Google) Desc(i int) (string, error)
- func (g *Google) Each(eachCb func(int) error) error
- func (g *Google) Init() error
- func (g *Google) Link(i int) (string, error)
- func (g *Google) Name() string
- func (g *Google) SetKeyword(keyword string)
- func (g *Google) SetPage(page int)
- func (g *Google) SetUserAgent(ua string)
- func (g *Google) Title(i int) (string, error)
- type Options
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AOL ¶
type AOL struct {
// contains filtered or unexported fields
}
func (*AOL) SetKeyword ¶
SetKeyword sets the keyword for searching
func (*AOL) SetUserAgent ¶
SetUserAgent sets the user agent to use for the request
type Bing ¶
type Bing struct {
// contains filtered or unexported fields
}
Bing represents the Bing search engine
func (*Bing) SetKeyword ¶
SetKeyword sets the keyword for searching
func (*Bing) SetUserAgent ¶
SetUserAgent sets the user agent to use for the request
type DDG ¶
type DDG struct {
// contains filtered or unexported fields
}
DDG represents the DuckDuckGo search engine
func (*DDG) SetKeyword ¶
SetKeyword sets the keyword for searching
func (*DDG) SetUserAgent ¶
SetUserAgent sets the user agent for the request
type Engine ¶
type Engine interface { // Set search keyword for engine SetKeyword(string) // Set User Agent. If string is empty, // an acceptable will should be used. SetUserAgent(string) // Set page number to search SetPage(int) // Initialize engine (make requests, set variables, etc.) Init() error // Run function for each search result, // inputting index Each(func(int) error) error // Get title from index given by Each() Title(int) (string, error) // Get link from index given by Each() Link(int) (string, error) // Get description from index given by Each() Desc(int) (string, error) // Return shortened name of search engine. // Should be lowercase (e.g. google, ddg, bing) Name() string }
Engine represents a search engine for web results (not images, shopping, erc.)
type Google ¶
type Google struct {
// contains filtered or unexported fields
}
Google represents the Google search engine
func (*Google) SetKeyword ¶
SetKeyword sets the keyword for searching
func (*Google) SetUserAgent ¶
SetUserAgent sets the user agent for the request
Click to show internal directories.
Click to hide internal directories.