Documentation
¶
Index ¶
- func GetHistoryParams(beginTimestamp, endTimestamp time.Time) *slack.HistoryParameters
- func IsInterestedMessage(m slack.Message) bool
- func PrintMessagesToStdoutAsNdjson(channelName string, buf []slack.Message)
- func ReadMessages(api *slack.Client, channelId string, historyParams *slack.HistoryParameters) []slack.Message
- func ToUnixSeconds(m *slack.Message) string
- type ChannelMessages
- type ChannelsValue
- type ElasticSearchAction
- type ElasticSearchActionIndex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHistoryParams ¶
func GetHistoryParams(beginTimestamp, endTimestamp time.Time) *slack.HistoryParameters
Returns `HistoryParameters` with Oldest and Latest set to the given time range.
func IsInterestedMessage ¶
Returns true if it's the top most message.
func PrintMessagesToStdoutAsNdjson ¶
Print messages to Stdout so that it can be redirected to temp.log, which will later be sent to ElasticSearch.
func ReadMessages ¶
func ReadMessages(api *slack.Client, channelId string, historyParams *slack.HistoryParameters, ) []slack.Message
Returns the messages posted in channel.
func ToUnixSeconds ¶
Extracts unix seconds from the slack message. (not safe).
Types ¶
type ChannelMessages ¶
type ChannelMessages struct { Channel string `json:"channel"` // unix epoch Datetime string `json:"datetime"` Message *slack.Message `json:"message"` }
Final export format.
type ChannelsValue ¶
This is used as a flag fed to the CLI. For example,
--flags=general,bots,...
func (ChannelsValue) Set ¶
func (s ChannelsValue) Set(value string) error
Set defines how to parse flag value and populates its own fields.
func (ChannelsValue) String ¶
func (s ChannelsValue) String() string
type ElasticSearchAction ¶
type ElasticSearchAction struct { Index *ElasticSearchActionIndex `json:"index,omitempty"` Create *ElasticSearchActionIndex `json:"create,omitempty"` Delete *ElasticSearchActionIndex `json:"delete,omitempty"` }
This represetns an action/command row in the ndjson format sent to ElasticSearch.
Click to show internal directories.
Click to hide internal directories.