Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchAnswer ¶
FetchAnswer fetches the answer for the question
func StartEngine ¶
StartEngine starts the QA Engines
Types ¶
type CacheEngine ¶
type CacheEngine struct {
// contains filtered or unexported fields
}
CacheEngine handles cache
func (*CacheEngine) FetchAnswer ¶
FetchAnswer fetches the answer using cache
func (*CacheEngine) StartEngine ¶
func (c *CacheEngine) StartEngine() error
StartEngine starts the cache engine
type CliEngine ¶
type CliEngine struct { }
CliEngine handles the CLI based qa
func (*CliEngine) FetchAnswer ¶
FetchAnswer fetches the answer using cli
func (*CliEngine) StartEngine ¶
StartEngine starts the cli engine
type DefaultEngine ¶
type DefaultEngine struct { }
DefaultEngine returns default values for all questions
func (*DefaultEngine) FetchAnswer ¶
FetchAnswer fetches the default answers
func (*DefaultEngine) StartEngine ¶
func (c *DefaultEngine) StartEngine() error
StartEngine starts the default qa engine
type Engine ¶
type Engine interface { StartEngine() error FetchAnswer(prob qatypes.Problem) (ans qatypes.Problem, err error) }
Engine defines interface for qa engines
func NewCacheEngine ¶
NewCacheEngine creates a new cache instance
func NewDefaultEngine ¶
func NewDefaultEngine() Engine
NewDefaultEngine creates a new instance of default engine
func NewHTTPRESTEngine ¶
NewHTTPRESTEngine creates a new instance of Http REST engine
type HTTPRESTEngine ¶
type HTTPRESTEngine struct {
// contains filtered or unexported fields
}
HTTPRESTEngine handles qa using HTTP REST services
func (*HTTPRESTEngine) FetchAnswer ¶
FetchAnswer fetches the answer using a REST service
func (*HTTPRESTEngine) StartEngine ¶
func (h *HTTPRESTEngine) StartEngine() error
StartEngine starts the QA Engine