bot

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.4.0

type Client struct {
	URL string
	// contains filtered or unexported fields
}

Client allows you to chat with chatto through the REST channel Great for testing or integrating with your own tools

func NewClient added in v0.5.1

func NewClient(url string, port int, token string) *Client

NewClient instantiates a new chatto client

func (*Client) CLI added in v0.5.1

func (c *Client) CLI()

CLI starts a command line interface

func (*Client) Submit added in v0.5.1

func (c *Client) Submit(question *query.Question) ([]query.Answer, error)

Submit a question to chatto bot and get an answer

type Server added in v0.5.1

type Server struct {
	// contains filtered or unexported fields
}

Server runs chatto bot

func NewServer added in v0.5.1

func NewServer(path string, port int) *Server

NewServer for running chatto bot

func (*Server) Answer added in v0.7.0

func (s *Server) Answer(question *query.Question) (answers []query.Answer, err error)

Answer passes a querty.Question into the bot to produce answers

func (*Server) RESTHandler added in v0.7.0

func (s *Server) RESTHandler(w http.ResponseWriter, r *http.Request)

RESTHandler passes an incoming http.Request to the REST channel

func (*Server) Run added in v0.5.1

func (s *Server) Run()

Run chatto bot server

func (*Server) SlackHandler added in v0.7.0

func (s *Server) SlackHandler(w http.ResponseWriter, r *http.Request)

SlackHandler passes an incoming http.Request to the Slack channel

func (*Server) TelegramHandler added in v0.7.0

func (s *Server) TelegramHandler(w http.ResponseWriter, r *http.Request)

TelegramHandler passes an incoming http.Request to the Telegram channel

func (*Server) TwilioHandler added in v0.7.0

func (s *Server) TwilioHandler(w http.ResponseWriter, r *http.Request)

TwilioHandler passes an incoming http.Request to the Twilio channel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL