Documentation ¶
Index ¶
- func Engines() []string
- func RegisterEngine(name string, new_engine func() Engine)
- type API
- func (a *API) Name() string
- func (a *API) ParseHTML(h string) ([]Result, error)
- func (a *API) ParseResponse(response *http.Response) ([]Result, error)
- func (a *API) Search(query interface{}) (*http.Response, error)
- func (a *API) Start() error
- func (a API) String() string
- func (a *API) Usage()
- func (a *API) Version() string
- type Engine
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func Use ¶
Use(...) returns engine if registered
returns error if not found
returns error if engine.Start() returns error
func UseWithoutStart ¶
UseWithoutStart(...) like Use(...) but not call Start()
returns error if not found
func (*API) ParseResponse ¶
ParseResponse parses returned response from .SearchContext(...) or .Search(...) methods
type Engine ¶
type Engine interface { // Use(...) call it when want to use it Start() error // Version returns engine version Version() string // Description of engine Description() string // Usage prints usage of engine Usage() // SearchContext searchs query and returns response Search(query interface{}) (*http.Response, error) // ParseResponse parses returned response from .Search(...) method ParseResponse(response *http.Response) ([]Result, error) // ParseHTML parses html responsed from google ParseHTML(h string) ([]Result, error) }
Click to show internal directories.
Click to hide internal directories.