processor

package
v3.0.0-...-fed599b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

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 Channels

type Channels interface {
	// Channels is called for each channel chunk that is retrieved.
	Channels(ctx context.Context, channels []slack.Channel) error
}

type Conversations

type Conversations interface {
	Messenger
	Filer
	ChannelInformer

	io.Closer
}

Conversations is the interface for conversation fetching with files.

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
}

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.

type Printer

type Printer struct{}

func (*Printer) ChannelInfo

func (d *Printer) ChannelInfo(_ context.Context, ch *slack.Channel, threadID string) error

func (*Printer) ChannelUsers

func (d *Printer) ChannelUsers(_ context.Context, ch string, threadTS string, u []string) error

func (*Printer) Close

func (d *Printer) Close() error

func (*Printer) Files

func (d *Printer) Files(_ context.Context, ch *slack.Channel, parent slack.Message, files []slack.File) error

func (*Printer) Messages

func (d *Printer) Messages(ctx context.Context, channelID string, numThreads int, isLast bool, messages []slack.Message) error

func (*Printer) ThreadMessages

func (d *Printer) ThreadMessages(ctx context.Context, channelID string, parent slack.Message, threadOnly, isLast bool, replies []slack.Message) error

type Searcher

type Searcher interface {
	MessageSearcher
	FileSearcher
}

Searcher is the combined interface for searching messages and files.

type Users

type Users interface {
	// Users method is called for each user chunk that is retrieved.
	Users(ctx context.Context, users []slack.User) error
}

type WorkspaceInfo

type WorkspaceInfo interface {
	WorkspaceInfo(context.Context, *slack.AuthTestResponse) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL