Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel interface { // ReceiveMessage from the channel ReceiveMessage(body []byte) (*messages.Receive, error) // ReceiveMessages from the channel. Starts a long running process, receives questions and sends them to the receiveChan ReceiveMessages(receiveChan chan messages.Receive) // SendMessage to the channel SendMessage(response *messages.Response) error // ValidateCallback validates a callback to the channel ValidateCallback(r *http.Request) bool // String returns the channel's name String() string }
Channel interface implements a channel to send and receive messages on
type Config ¶
type Config struct { Telegram telegram.Config `mapstructure:"telegram"` Twilio twilio.Config `mapstructure:"twilio"` Slack slack.Config `mapstructure:"slack"` REST rest.Config `mapstructure:"rest"` }
Config struct combines all available client configurations
func LoadConfig ¶
LoadConfig loads channels configuration from chn.yml
Directories ¶
Path | Synopsis |
---|---|
Package mockchannels is a generated GoMock package.
|
Package mockchannels is a generated GoMock package. |
mockslack
Package mockslack is a generated GoMock package.
|
Package mockslack is a generated GoMock package. |
mocktelegram
Package mocktelegram is a generated GoMock package.
|
Package mocktelegram is a generated GoMock package. |
mocktwilio
Package mocktwilio is a generated GoMock package.
|
Package mocktwilio is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.