Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Remote ¶
type Remote interface { Reaction(message models.Message, rule models.Rule, bot *models.Bot) Read(inputMsgs chan<- models.Message, rules map[string]models.Rule, bot *models.Bot) Send(message models.Message, bot *models.Bot) Name() string }
Remote - this interface allows us to keep the bot "remote agnostic" meaning that the bot should not care about what specific remote (e.g. Slack or Discord) it is reading/sending messages from. It is up to the developer to implement the details of how messages should be read/sent in the specific package for the remote (e.g. see '/remote/slack/remote.go') Each remote will share generic functions as seen below that will be evoked by the bot (e.g. see '/core/remotes.go' or '/core/outputs.go'), and each function will be implemented in detail within its specific remote package.
func FromContext ¶
FromContext returns the Remote associated with this context.
Click to show internal directories.
Click to hide internal directories.