Documentation ¶
Overview ¶
Package viewer implements the logic to view the slackdump files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sourcer ¶
type Sourcer interface { // Name should return the name of the retriever underlying media, i.e. // directory or archive. Name() string // Type should return the type of the retriever, i.e. "chunk" or "export". Type() string // Channels should return all channels. Channels() ([]slack.Channel, error) // Users should return all users. Users() ([]slack.User, error) // AllMessages should return all messages for the given channel id. AllMessages(channelID string) ([]slack.Message, error) // AllThreadMessages should return all messages for the given tuple // (channelID, threadID). AllThreadMessages(channelID, threadID string) ([]slack.Message, error) // ChannelInfo should return the channel information for the given channel // id. ChannelInfo(channelID string) (*slack.Channel, error) // FS should return the filesystem with file attachments. FS() fs.FS // File should return the path of the file within the filesystem returned // by FS(). File(fileID string, filename string) (string, error) }
Sourcer is an interface for retrieving data from different sources.
type Viewer ¶
type Viewer struct {
// contains filtered or unexported fields
}
Viewer is the slackdump viewer.
func New ¶
New creates new viewer instance. Once Viewer.ListenAndServe is called, the viewer will start serving the web interface on the given address. The address should be in the form of ":8080". The viewer will use the given Sourcer to retrieve the data, see "source" package for available options. It will initialise the logger from the context.
func (*Viewer) ListenAndServe ¶
Click to show internal directories.
Click to hide internal directories.