Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/jpbruinsslot/slack-term
/ functions
Functions
161 in github.com/jpbruinsslot/slack-term
⨍
Functions
161
◇
Types & classes
19
↓ 31 callers
Method
Sprintf
(format string, a ...interface{})
components/debug.go:65
↓ 10 callers
Method
Println
Println will add the text to the Debug component
components/debug.go:54
↓ 9 callers
Function
actionChangeChannel
(ctx *context.AppContext)
handlers/event.go:509
↓ 7 callers
Method
SetSelectedChannel
SetSelectedChannel sets the SelectedChannel given the index
components/channels.go:234
↓ 4 callers
Method
Clear
Clear will empty the input and move the cursor to the start position
components/input.go:203
↓ 4 callers
Method
CreateMessage
CreateMessage will create a string formatted message that can be rendered in the Chat pane. [23:59] <erroneousboat> Hello world!
service/slack.go:490
↓ 4 callers
Method
FindChannel
(channelID string)
components/channels.go:222
↓ 4 callers
Method
GetMaxItems
GetMaxItems return the maximal amount of items can fit in the Chat component
components/chat.go:165
↓ 4 callers
Method
GetMessages
GetMessages will get messages for a channel, group or im channel delimited by a count. It will return the messages, the thread identifiers (as Channel
service/slack.go:411
↓ 4 callers
Method
MarkAsRead
MarkAsRead will set the channel as read
service/slack.go:269
↓ 4 callers
Method
SetChannels
(channels []ChannelItem)
components/channels.go:204
↓ 4 callers
Method
SetMessages
SetMessages will put the provided messages into the Messages field of the Chat view
components/chat.go:171
↓ 3 callers
Method
ClearMessages
ClearMessages clear the c.Messages
components/chat.go:210
↓ 3 callers
Method
GotoPositionSearch
GotoPosition is used by the search functionality to automatically scroll to a specific location in the channels component
components/channels.go:364
↓ 3 callers
Function
actionInput
(view *views.View, key rune)
handlers/event.go:286
↓ 2 callers
Method
AddMessage
AddMessage adds a single message to Messages
components/chat.go:181
↓ 2 callers
Method
GetChannelName
GetChannelName will return a formatted representation of the name of the channel
components/channels.go:85
↓ 2 callers
Method
GetRuneWidthLeft
GetRuneWidthLeft will get the width of a rune on the left side of the CursorPositionText
components/input.go:184
↓ 2 callers
Method
GetSelectedChannel
Get SelectedChannel returns the ChannelItem that is currently selected
components/channels.go:239
↓ 2 callers
Method
GetText
GetText returns the text currently in the input
components/input.go:212
↓ 2 callers
Method
GotoPosition
GotoPosition is used by to automatically scroll to a specific location in the channels component
components/channels.go:335
↓ 2 callers
Method
MoveCursorDown
MoveCursorDown will increase the SelectedChannel by 1
components/channels.go:252
↓ 2 callers
Method
MoveCursorLeft
MoveCursorLeft will decrease the current CursorPositionText with 1
components/input.go:124
↓ 2 callers
Method
MoveCursorRight
MoveCursorRight will increase the current CursorPositionText with 1
components/input.go:114
↓ 2 callers
Method
MoveCursorTop
MoveCursorTop will move the cursor to the top of the channels
components/channels.go:260
↓ 2 callers
Method
MoveCursorUp
MoveCursorUp will decrease the SelectedChannel by 1
components/channels.go:244
↓ 2 callers
Method
SendReply
SendReply will send a message to a particular thread, specifying the ThreadTimestamp will make it reply to that specific thread. (see: https://api.sla
service/slack.go:318
↓ 2 callers
Method
SetBorderLabel
SetBorderLabel will set Label of the Chat pane to the specified string
components/chat.go:247
↓ 2 callers
Method
SetCommandMode
()
components/mode.go:98
↓ 2 callers
Method
SetPresence
(channelID string, presence string)
components/channels.go:217
↓ 2 callers
Method
ToString
ToString will set the label of the channel, how it will be displayed on screen. Based on the type, different icons are shown, as well as an optional n
components/channels.go:46
↓ 2 callers
Function
actionChangeThread
(ctx *context.AppContext)
handlers/event.go:576
↓ 2 callers
Function
actionRedrawGrid
(ctx *context.AppContext, threads bool, debug bool)
handlers/event.go:228
↓ 2 callers
Function
createNotifyMessage
(ctx *context.AppContext, ev *slack.MessageEvent)
handlers/event.go:783
↓ 2 callers
Function
handleTermboxEvents
(ctx *context.AppContext, ev termbox.Event)
handlers/event.go:92
↓ 1 callers
Method
AddReply
AddReply adds a single reply to a parent thread, it also sets the thread separator
components/chat.go:187
↓ 1 callers
Method
Backspace
Backspace will remove a character in front of the CursorPositionText
components/input.go:86
↓ 1 callers
Method
CalculateOffset
CalculateOffset will, based on the width of the runes on the left of the text cursor, calculate the offset that needs to be used by the Inpute Compone
components/input.go:164
↓ 1 callers
Function
CreateAppContext
CreateAppContext creates an application context which can be passed and referenced througout the application
context/context.go:43
↓ 1 callers
Function
CreateChannelsComponent
CreateChannels is the constructor for the Channels component
components/channels.go:111
↓ 1 callers
Function
CreateChatComponent
CreateChatComponent is the constructor for the Chat struct
components/chat.go:23
↓ 1 callers
Function
CreateConfigFile
(filepath string)
config/config.go:77
↓ 1 callers
Function
CreateDebugComponent
(inputHeight int)
components/debug.go:16
↓ 1 callers
Function
CreateInputComponent
CreateInput is the constructor of the Input struct
components/input.go:18
↓ 1 callers
Method
CreateMessageFromAttachments
CreateMessageFromAttachments will construct an array of strings from the Field values of Attachments of a Message.
service/slack.go:669
↓ 1 callers
Method
CreateMessageFromFiles
CreateMessageFromFiles will create components.Message struct from conversation attached files
service/slack.go:736
↓ 1 callers
Method
CreateMessageFromMessageEvent
(message *slack.MessageEvent, channelID string)
service/slack.go:756
↓ 1 callers
Method
CreateMessageFromReplies
CreateMessageFromReplies will create components.Message struct from the conversation replies from slack. Useful documentation: https://api.slack.com
service/slack.go:611
↓ 1 callers
Function
CreateModeComponent
CreateMode is the constructor of the Mode struct
components/mode.go:19
↓ 1 callers
Function
CreateThreadsComponent
(height int)
components/threads.go:11
↓ 1 callers
Function
CreateView
(config *config.Config, svc *service.SlackService)
views/view.go:21
↓ 1 callers
Method
Delete
Delete will remove a character at the CursorPositionText
components/input.go:106
↓ 1 callers
Method
GetChannels
()
service/slack.go:77
↓ 1 callers
Method
GetContent
()
components/message.go:62
↓ 1 callers
Method
GetMaxWidth
GetMaxWidth returns the maximum number of positions the Input component can display
components/input.go:218
↓ 1 callers
Method
GetMessageByID
CreateMessageByID will construct an array of components.Message with only 1 message, using the message ID (Timestamp). For the choice of history para
service/slack.go:460
↓ 1 callers
Method
GetName
()
components/message.go:55
↓ 1 callers
Method
GetRuneWidthOffsetToCursor
GetRunWidthOffsetToCursor will get the rune width of all the runes from the offset until the text cursor
components/input.go:178
↓ 1 callers
Method
GetRuneWidthRight
GetRuneWidthLeft will get the width of a rune on the right side of the CursorPositionText
components/input.go:190
↓ 1 callers
Method
GetThread
()
components/message.go:48
↓ 1 callers
Method
GetTime
()
components/message.go:40
↓ 1 callers
Method
GetUserPresence
GetUserPresence will get the presence of a specific user
service/slack.go:254
↓ 1 callers
Method
Help
Help shows the usage and key bindings in the chat pane
components/chat.go:326
↓ 1 callers
Function
Initialize
Initialize will start a combination of event handlers and 'background tasks'
handlers/event.go:56
↓ 1 callers
Method
Insert
Insert will insert a given key at the place of the current CursorPositionText
components/input.go:73
↓ 1 callers
Method
IsEmpty
IsEmpty will return true when the input is empty
components/input.go:195
↓ 1 callers
Method
IsNewThread
IsNewThread check whether a message that is going to be added as a child to a parent message, is the first one or not
components/chat.go:200
↓ 1 callers
Method
Jump
Jump to the first channel with a notification
components/channels.go:388
↓ 1 callers
Function
Loading
()
views/load.go:7
↓ 1 callers
Method
MarkAsUnread
(channelID string)
components/channels.go:212
↓ 1 callers
Method
MessageToCells
MessageToCells will convert a Message struct to termui.Cell We're building parts of the message individually, or else DefaultTxBuilder will interpret
components/chat.go:278
↓ 1 callers
Method
MessagesToCells
MessagesToCells is a wrapper around MessageToCells to use for a slice of of type Message
components/chat.go:253
↓ 1 callers
Method
MoveCursorBottom
MoveCursorBottom will move the cursor to the bottom of the channels
components/channels.go:267
↓ 1 callers
Function
NewSlackService
NewSlackService is the constructor for the SlackService and will initialize the RTM and a Client
service/slack.go:35
↓ 1 callers
Method
Refresh
()
views/view.go:91
↓ 1 callers
Method
ScrollDown
ScrollDown enables us to scroll through the channel list when it overflows
components/channels.go:294
↓ 1 callers
Method
ScrollDown
ScrollDown will render the chat messages based on the Offset of the Chat pane. Offset is 0 when scrolled down. (we loop backwards over the array, so
components/chat.go:237
↓ 1 callers
Method
ScrollLeft
()
components/input.go:133
↓ 1 callers
Method
ScrollRight
()
components/input.go:146
↓ 1 callers
Method
ScrollUp
ScrollUp enables us to scroll through the channel list when it overflows
components/channels.go:282
↓ 1 callers
Method
ScrollUp
ScrollUp will render the chat messages based on the Offset of the Chat pane. Offset is 0 when scrolled down. (we loop backwards over the array, so we
components/chat.go:221
↓ 1 callers
Method
Search
Search will search through the channels to find a channel, when a match has been found the selected channel will then be the channel that has been fou
components/channels.go:308
↓ 1 callers
Method
SearchNext
SearchNext allows us to cycle through the c.SearchMatches
components/channels.go:370
↓ 1 callers
Method
SearchPrev
SearchPrev allows us to cycle through the c.SearchMatches
components/channels.go:379
↓ 1 callers
Method
SendCommand
SendCommand will send a specific command to slack. First we check wether we are dealing with a command, and if it is one of the supported ones. NOTE:
service/slack.go:347
↓ 1 callers
Method
SendMessage
SendMessage will send a message to a particular channel
service/slack.go:295
↓ 1 callers
Method
SetInsertMode
()
components/mode.go:93
↓ 1 callers
Method
SetSearchMode
()
components/mode.go:103
↓ 1 callers
Method
SetUserAsActive
Set current user presence to active
service/slack.go:264
↓ 1 callers
Function
SortMessages
(msgs map[string]Message)
components/message.go:81
↓ 1 callers
Function
actionCommandMode
(ctx *context.AppContext)
handlers/event.go:418
↓ 1 callers
Function
actionKeyEvent
(ctx *context.AppContext, ev termbox.Event)
handlers/event.go:187
↓ 1 callers
Function
actionNewMessage
actionNewMessage will set the new message indicator for a channel, and if configured will also display a desktop notification
handlers/event.go:654
↓ 1 callers
Function
actionResizeEvent
(ctx *context.AppContext, ev termbox.Event)
handlers/event.go:210
↓ 1 callers
Function
actionSearch
actionSearch will search through the channels based on the users input. A time is implemented to make sure the actual searching and changing of channe
handlers/event.go:386
↓ 1 callers
Function
actionSetPresence
(ctx *context.AppContext, channelID string, presence string)
handlers/event.go:671
↓ 1 callers
Function
actionSetPresenceAll
actionPresenceAll will set the presence of the user list. Because the requests to the endpoint are rate limited we implement a timeout here.
handlers/event.go:678
↓ 1 callers
Method
colorizeName
(styleName string)
components/message.go:66
↓ 1 callers
Method
createChannelItem
(chn slack.Channel)
service/slack.go:848
↓ 1 callers
Function
eventHandler
eventHandler will handle events created by the user
handlers/event.go:69
next →
1–100 of 161, ranked by callers