Documentation ¶
Overview ¶
Package capture provides dummy implementations of some of the plugin services that capture data fed into them in order to allow validation in tests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmojiReactionCaptor ¶
EmojiReactionCaptor captures emoji reactions recorded by invocations of AddReaction. It only supports recording emojis for one given channel and timestamp
func NewEmojiReactor ¶
func NewEmojiReactor() (emojiReactionCaptor *EmojiReactionCaptor)
NewEmojiReactor returns a new EmojiReactionCaptor with an initialized emojis array
func (*EmojiReactionCaptor) AddReaction ¶
func (e *EmojiReactionCaptor) AddReaction(name string, item slack.ItemRef) error
AddReaction captures the addition of an emoji reaction with the given named emoji to the given item
type FileUploadCaptor ¶
type FileUploadCaptor struct { FileUploads []slack.FileUploadParameters // contains filtered or unexported fields }
FileUploadCaptor captures file uploads recorded by invocations of UploadFile
func NewFileUploader ¶
func NewFileUploader() (fileUploadCaptor *FileUploadCaptor)
NewFileUploader returns a new FileUploadCaptor with an initialized array of FileUploads
func (*FileUploadCaptor) UploadFile ¶
func (f *FileUploadCaptor) UploadFile(params slack.FileUploadParameters) (file *slack.File, err error)
UploadFile tracks a file upload for post-execution validation
type RealTimeSenderCaptor ¶
RealTimeSenderCaptor holds messages sent to it keyed by channel ID
func NewRealTimeSender ¶
func NewRealTimeSender() (rtms *RealTimeSenderCaptor)
NewRealTimeSender returns a new initialized RealTimeSenderCaptor instance
func (*RealTimeSenderCaptor) NewOutgoingMessage ¶
func (rtms *RealTimeSenderCaptor) NewOutgoingMessage(text string, channelID string, options ...slack.RTMsgOption) *slack.OutgoingMessage
NewOutgoingMessage captures the details of a sent message (the message itself and the channel it's sent to) The returned OutgoingMessage has only the channel ID and text set on it