Documentation
¶
Index ¶
Constants ¶
View Source
const ( CreateIssueAction = "issue_create" CreateIssueModal = "issue_create_modal" MoveIssueAction = "issue_move" MoveIssueModal = "issue_move_modal" ViewIssueAction = "view_issue_details" ViewIssueActionModal = "view_issue_details_modal" // #nosec G101 ConfirmWebhookModal = "confirm_webhook_modal" WebhookActionIDPrefix = "webhook_action" OptionButtonActionIDPrefix = "option_button_action" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FifoQueueProducer ¶
type IssueFinder ¶
type SlackAPIClient ¶
type SlackAPIClient interface {
PostEphemeral(ctx context.Context, channelID, userID string, options ...slackapi.MsgOption) (string, error)
GetUserInfo(ctx context.Context, user string) (*slackapi.User, error)
UserIsInGroup(ctx context.Context, groupID, userID string) bool
SendResponse(ctx context.Context, channelID, responseURL, responseType, text string) error
OpenModal(ctx context.Context, triggerID string, request slackapi.ModalViewRequest) error
IsAlertChannel(ctx context.Context, channelID string) (bool, string, error)
}
type SocketModeClient ¶
type SocketModeClient interface {
Ack(req socketmode.Request, payload ...any)
RunContext(ctx context.Context) error
Events() chan socketmode.Event
}
SocketModeClient defines the interface for the SocketMode client used by the handlers.
type SocketModeHandler ¶
type SocketModeHandler struct {
// contains filtered or unexported fields
}
SocketModeHandler handles Slack Socket Mode events and interactions.
func NewSocketModeHandler ¶
func NewSocketModeHandler(apiClient SlackAPIClient, socketModeClient SocketModeClient, commandQueue FifoQueueProducer, issueFinder IssueFinder, cacheStore store.StoreInterface, cfg *config.ManagerConfig, managerSettings *models.ManagerSettingsWrapper, logger types.Logger, ) *SocketModeHandler
NewSocketModeHandler creates a new SocketModeHandler.
func (*SocketModeHandler) RunEventLoop ¶
func (r *SocketModeHandler) RunEventLoop(ctx context.Context) error
RunEventLoop starts the Socket Mode event loop. It blocks until the context is cancelled or an error occurs. During graceful shutdown, it waits for all in-flight handlers to complete up to the configured drain timeout.
type SocketModeHandlerFunc ¶
type SocketModeHandlerFunc func(context.Context, *socketmode.Event, SocketModeClient)
SocketModeHandlerFunc defines a function to handle socketmode events.
Click to show internal directories.
Click to hide internal directories.