slack

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PostIDInvalidChannel represents the post ID for issues with invalid channel ID
	PostIDInvalidChannel    = "INVALID_CHANNEL_ID"
	SlackErrIsArchived      = "is_archived"
	SlackErrChannelNotFound = "channel_not_found"
	SlackErrMessageNotFound = "message_not_found"
	SlackErrCantDelete      = "cant_delete_message"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(commandHandler FifoQueueProducer, cacheStore store.StoreInterface, logger types.Logger, metrics types.Metrics, cfg *config.ManagerConfig, managerSettings *models.ManagerSettingsWrapper) *Client

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, issue *models.Issue, reason string, updateIfMessageHasReplies bool, sem *semaphore.Weighted) error

func (*Client) DeletePost

func (c *Client) DeletePost(ctx context.Context, channelID, ts string) error

func (*Client) GetChannelName

func (c *Client) GetChannelName(ctx context.Context, channelID string) string

func (*Client) GetUserInfo

func (c *Client) GetUserInfo(ctx context.Context, userID string) (*slack.User, error)

func (*Client) IsAlertChannel

func (c *Client) IsAlertChannel(ctx context.Context, channelID string) (bool, string, error)

func (*Client) OpenModal

func (c *Client) OpenModal(ctx context.Context, triggerID string, request slack.ModalViewRequest) error

func (*Client) PostEphemeral

func (c *Client) PostEphemeral(ctx context.Context, channelID, userID string, options ...slack.MsgOption) (string, error)

func (*Client) RunSocketMode

func (c *Client) RunSocketMode(ctx context.Context) error

func (*Client) SendResponse

func (c *Client) SendResponse(ctx context.Context, channelID, responseURL, responseType, text string) error

func (*Client) SetIssueFinder

func (c *Client) SetIssueFinder(issueFinder IssueFinder)

func (*Client) Update

func (c *Client) Update(ctx context.Context, channelID string, allChannelIssues []*models.Issue) error

func (*Client) UpdateSingleIssue

func (c *Client) UpdateSingleIssue(ctx context.Context, issue *models.Issue, reason string) error

func (*Client) UpdateSingleIssueWithThrottling

func (c *Client) UpdateSingleIssueWithThrottling(ctx context.Context, issue *models.Issue, reason string, issuesInChannel int) error

func (*Client) UserIsInGroup

func (c *Client) UserIsInGroup(ctx context.Context, groupID, userID string) bool

type FifoQueueProducer

type FifoQueueProducer interface {
	Send(ctx context.Context, slackChannelID, dedupID, body string) error
}

type IssueFinder

type IssueFinder interface {
	FindIssueBySlackPost(ctx context.Context, channelID string, slackPostID string, includeArchived bool) *models.Issue
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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