Documentation
¶
Overview ¶
Package know queries different knowledge providers and parses their result. Partially supported are currently Google and Wolfram Alpha.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Google = NewGoogleProvider() Wolfram = NewWolframProvider() )
Functions ¶
func Ask ¶
Ask asks all currently supported providers the same question and returns their answers on a channel. The channels are closed when all providers are finished. Empty answer and error channels signify a successful query, but no provider could answer that question.
func AskProviders ¶
AskProviders asks all specified providers the same question and returns their answers and errors on a channel. The channels are closed when all providers are finished. Empty answer and error channels signify a successful query, but no provider could answer that question.
func RegisterProvider ¶
func RegisterProvider(p Provider)
RegisterProvider registers a new provider which is used in the default set of providers.
Types ¶
type GoogleProvider ¶
type GoogleProvider struct {
Debugf func(format string, v ...interface{})
}
func NewGoogleProvider ¶
func NewGoogleProvider() *GoogleProvider
func (*GoogleProvider) Name ¶
func (p *GoogleProvider) Name() string
type WolframProvider ¶
type WolframProvider struct {
ApiKey string
}
func NewWolframProvider ¶
func NewWolframProvider() *WolframProvider
func (*WolframProvider) Name ¶
func (p *WolframProvider) Name() string
func (*WolframProvider) SetApiKey ¶
func (p *WolframProvider) SetApiKey(key string)