Documentation ¶
Overview ¶
Package echo is an reference implementation to provide the simplest form of sarah.CommandProps.
In this package two sarah.CommandPros, SlackProps and GitterProps, are exported. Developer may import this package and refer to those sarah.CommandProps to build echo command.
runner, err := sarah.NewRunner(config, sarah.WithCommandProps(echo.SlackProps), ...)
This example also shows the use of utility method called sarah.StripMessage, which strips string from given message based on given regular expression. e.g. ".echo Hey!" becomes "Hey!"
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GitterProps = sarah.NewCommandPropsBuilder(). BotType(gitter.GITTER). Identifier(identifier). MatchPattern(matchPattern). Func(GitterCommandFunc). InputExample(".echo knock knock"). MustBuild()
GitterProps is a pre-built echo command properties for Slack.
var SlackProps = sarah.NewCommandPropsBuilder(). BotType(slack.SLACK). Identifier(identifier). MatchPattern(matchPattern). Func(SlackCommandFunc). InputExample(".echo knock knock"). MustBuild()
SlackProps is a pre-built echo command properties for Slack.
Functions ¶
func GitterCommandFunc ¶
GitterCommandFunc is a sarah.CommandFunc especially designed for gitter adapter.
func SlackCommandFunc ¶
SlackCommandFunc is a sarah.CommandFunc especially designed for Slack adapter.
Types ¶
This section is empty.