Versions in this module Expand all Collapse all v3 v3.0.0 Aug 15, 2020 Changes in this version + const SLACK + var ErrNonSupportedEvent = xerrors.New("event not supported") + func DefaultEventsPayloadHandler(_ context.Context, config *Config, payload *eventsapi.EventWrapper, ...) + func DefaultRTMPayloadHandler(_ context.Context, config *Config, payload rtmapi.DecodedPayload, ...) + func EventToInput(e interface{}) (sarah.Input, error) + func IsThreadMessage(input *Input) bool + func NewResponse(input sarah.Input, msg string, options ...RespOption) (*sarah.CommandResponse, error) + type Adapter struct + func NewAdapter(config *Config, options ...AdapterOption) (*Adapter, error) + func (adapter *Adapter) BotType() sarah.BotType + func (adapter *Adapter) Run(ctx context.Context, enqueueInput func(sarah.Input) error, ...) + func (adapter *Adapter) SendMessage(ctx context.Context, output sarah.Output) + type AdapterOption func(adapter *Adapter) + func WithEventsPayloadHandler(...) AdapterOption + func WithRTMPayloadHandler(...) AdapterOption + func WithSlackClient(client SlackClient) AdapterOption + type Config struct + AbortCommand string + AppSecret string + HelpCommand string + ListenPort int + PingInterval time.Duration + RequestTimeout time.Duration + RetryPolicy *retry.Policy + SendingQueueSize uint + Token string + func NewConfig() *Config + type Input struct + func (i *Input) Message() string + func (i *Input) ReplyTo() sarah.OutputDestination + func (i *Input) SenderKey() string + func (i *Input) SentAt() time.Time + type RespOption func(*respOptions) + func RespAsThreadReply(asReply bool) RespOption + func RespReplyBroadcast(broadcast bool) RespOption + func RespWithAttachments(attachments []*webapi.MessageAttachment) RespOption + func RespWithLinkNames(linkNames int) RespOption + func RespWithNext(fnc sarah.ContextualFunc) RespOption + func RespWithNextSerializable(arg *sarah.SerializableArgument) RespOption + func RespWithParse(mode webapi.ParseMode) RespOption + func RespWithUnfurlLinks(unfurl bool) RespOption + func RespWithUnfurlMedia(unfurl bool) RespOption + type SlackClient interface + ConnectRTM func(ctx context.Context) (rtmapi.Connection, error) + PostMessage func(ctx context.Context, message *webapi.PostMessage) (*webapi.APIResponse, error) + RunServer func(ctx context.Context, receiver eventsapi.EventReceiver) <-chan error Other modules containing this package github.com/oklahomer/go-sarah github.com/oklahomer/go-sarah/v2 github.com/oklahomer/go-sarah/v4