Documentation
¶
Index ¶
- type Avatars
- type ChannelInformer
- type Channels
- type Conversations
- func AppendChannelInformer(c Conversations, ci ...ChannelInformer) Conversations
- func AppendFiler(c Conversations, ff ...Filer) Conversations
- func AppendMessenger(c Conversations, mm ...Messenger) Conversations
- func PrependChannelInformer(c Conversations, ci ...ChannelInformer) Conversations
- func PrependFiler(c Conversations, ff ...Filer) Conversations
- func PrependMessenger(c Conversations, mm ...Messenger) Conversations
- type FileSearcher
- type Filer
- type JointChannels
- type JointConversations
- func (w *JointConversations) ChannelInfo(ctx context.Context, ci *slack.Channel, threadID string) error
- func (w *JointConversations) ChannelUsers(ctx context.Context, channelID string, threadTS string, users []string) error
- func (w *JointConversations) Close() error
- func (w *JointConversations) Files(ctx context.Context, channel *slack.Channel, parent slack.Message, ...) error
- func (w *JointConversations) Messages(ctx context.Context, channelID string, numThreads int, isLast bool, ...) error
- func (w *JointConversations) ThreadMessages(ctx context.Context, channelID string, parent slack.Message, ...) error
- type JointFilers
- type JointMessengers
- type JointUsers
- type MessageSearcher
- type Messenger
- type NopAvatars
- type NopChannels
- type NopFiler
- type Printer
- func (d *Printer) ChannelInfo(_ context.Context, ch *slack.Channel, threadID string) error
- func (d *Printer) ChannelUsers(_ context.Context, ch string, threadID string, u []string) error
- func (d *Printer) Close() error
- func (d *Printer) Files(_ context.Context, ch *slack.Channel, parent slack.Message, files []slack.File) error
- func (d *Printer) Messages(ctx context.Context, channelID string, numThreads int, isLast bool, ...) error
- func (d *Printer) ThreadMessages(ctx context.Context, channelID string, parent slack.Message, ...) error
- type Searcher
- type Users
- type WorkspaceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelInformer ¶
type ChannelInformer interface {
// ChannelInfo is called for each channel that is retrieved. ChannelInfo
// will be called for each direct thread link, and in this case, threadID
// will be set to the parent message's timestamp.
ChannelInfo(ctx context.Context, ci *slack.Channel, threadID string) error
ChannelUsers(ctx context.Context, channelID string, threadTS string, users []string) error
}
type Conversations ¶
type Conversations interface {
Messenger
Filer
ChannelInformer
io.Closer
}
Conversations is the interface for conversation fetching with files.
func AppendChannelInformer ¶ added in v3.1.0
func AppendChannelInformer(c Conversations, ci ...ChannelInformer) Conversations
PrependChannelInformer prepends the ChannelInformer to the Conversations.
func AppendFiler ¶ added in v3.1.0
func AppendFiler(c Conversations, ff ...Filer) Conversations
PrependFiler prepends the Filer to the Conversations.
func AppendMessenger ¶ added in v3.1.0
func AppendMessenger(c Conversations, mm ...Messenger) Conversations
PrependMessenger prepends the Messenger to the Conversations.
func PrependChannelInformer ¶ added in v3.1.0
func PrependChannelInformer(c Conversations, ci ...ChannelInformer) Conversations
PrependChannelInformer prepends the ChannelInformer to the Conversations.
func PrependFiler ¶ added in v3.1.0
func PrependFiler(c Conversations, ff ...Filer) Conversations
PrependFiler prepends the Filer to the Conversations.
func PrependMessenger ¶ added in v3.1.0
func PrependMessenger(c Conversations, mm ...Messenger) Conversations
PrependMessenger prepends the Messenger to the Conversations.
type FileSearcher ¶
type FileSearcher interface {
// SearchFiles is called for each of the file chunks that are retrieved.
SearchFiles(ctx context.Context, query string, files []slack.File) error
// Filer is embedded here to allow for the Files method to be called.
Filer
}
FileSearcher is the interface for searching files.
type Filer ¶
type Filer interface {
// Files method is called for each file that is retrieved. The parent message is
// passed in as well.
Files(ctx context.Context, channel *slack.Channel, parent slack.Message, ff []slack.File) error
io.Closer
}
func JoinFilers ¶ added in v3.1.0
JoinFilers joins multiple Filer processors into one.
type JointChannels ¶ added in v3.1.0
type JointChannels struct {
// contains filtered or unexported fields
}
JointChannels is a processor that joins multiple Channels processors into one.
func JoinChannels ¶ added in v3.1.0
func JoinChannels(procs ...Channels) *JointChannels
JoinChannels joins multiple Channels processors into one. Processors are called in the order they are passed in.
func (*JointChannels) Close ¶ added in v3.1.0
func (c *JointChannels) Close() error
type JointConversations ¶ added in v3.1.0
type JointConversations struct {
// contains filtered or unexported fields
}
JointConversations is a processor that joins multiple processors. TODO: It's done in a crude way, maybe there's a more elegant way to do this.
func (*JointConversations) ChannelInfo ¶ added in v3.1.0
func (w *JointConversations) ChannelInfo(ctx context.Context, ci *slack.Channel, threadID string) error
ChannelInfo executes the prepended ChannelInfo processors and then forwards the call to the Conversations processor.
func (*JointConversations) ChannelUsers ¶ added in v3.1.0
func (w *JointConversations) ChannelUsers(ctx context.Context, channelID string, threadTS string, users []string) error
ChannelUsers executes the prepended ChannelUsers processors and then forwards the call to the Conversations processor.
func (*JointConversations) Close ¶ added in v3.1.0
func (w *JointConversations) Close() error
Close closes all the io.Closer instances in the slice.
func (*JointConversations) Files ¶ added in v3.1.0
func (w *JointConversations) Files(ctx context.Context, channel *slack.Channel, parent slack.Message, ff []slack.File) error
Files executes the prepended Files processors and then forwards the call to the Conversations processor.
func (*JointConversations) Messages ¶ added in v3.1.0
func (w *JointConversations) Messages(ctx context.Context, channelID string, numThreads int, isLast bool, messages []slack.Message) error
Messages executes the prepended Messages processors and then forwards the call to the Conversations processor.
func (*JointConversations) ThreadMessages ¶ added in v3.1.0
func (w *JointConversations) ThreadMessages(ctx context.Context, channelID string, parent slack.Message, threadOnly, isLast bool, replies []slack.Message) error
ThreadMessages executes the prepended ThreadMessages processors and then forwards the call to the Conversations processor.
type JointFilers ¶ added in v3.1.0
type JointFilers struct {
// contains filtered or unexported fields
}
func (*JointFilers) Close ¶ added in v3.1.0
func (f *JointFilers) Close() error
type JointMessengers ¶ added in v3.1.0
type JointMessengers struct {
// contains filtered or unexported fields
}
type JointUsers ¶ added in v3.1.0
type JointUsers struct {
// contains filtered or unexported fields
}
JointUser is a processor that joins multiple Users processors.
func JoinUsers ¶ added in v3.1.0
func JoinUsers(procs ...Users) *JointUsers
JoinUsers joins multiple Users processors into one.
func (*JointUsers) Close ¶ added in v3.1.0
func (u *JointUsers) Close() error
type MessageSearcher ¶
type MessageSearcher interface {
// SearchMessages is called for each message chunk that is retrieved.
SearchMessages(ctx context.Context, query string, messages []slack.SearchMessage) error
ChannelInformer
}
MessageSearcher is the interface for searching messages.
type Messenger ¶
type Messenger interface {
// Messages method is called for each message that is retrieved.
Messages(ctx context.Context, channelID string, numThreads int, isLast bool, messages []slack.Message) error
// ThreadMessages method is called for each of the thread messages that are
// retrieved. The parent message is passed in as well.
ThreadMessages(ctx context.Context, channelID string, parent slack.Message, threadOnly, isLast bool, replies []slack.Message) error
}
Messenger is the interface that implements only the message fetching.
func JoinMessenger ¶ added in v3.1.0
JoinMessengers joins multiple Messenger processors into one.
type NopAvatars ¶ added in v3.1.0
type NopAvatars struct{}
func (*NopAvatars) Close ¶ added in v3.1.0
func (n *NopAvatars) Close() error
type NopChannels ¶ added in v3.1.0
type NopChannels struct{}
type Printer ¶
type Printer struct{}
func (*Printer) ChannelInfo ¶
func (*Printer) ChannelUsers ¶
type Searcher ¶
type Searcher interface {
MessageSearcher
FileSearcher
}
Searcher is the combined interface for searching messages and files.
type WorkspaceInfo ¶
type WorkspaceInfo interface {
WorkspaceInfo(context.Context, *slack.AuthTestResponse) error
}