Documentation
¶
Overview ¶
Package slack implements CommsAdapter using the Slack API.
Index ¶
- type Client
- func (c *Client) FetchMentions(ctx context.Context, since time.Time) ([]adapter.Mention, error)
- func (c *Client) Notify(ctx context.Context, msg adapter.Notification) error
- func (c *Client) NotifyUser(ctx context.Context, handle string, msg adapter.Notification) error
- func (c *Client) PostStandup(ctx context.Context, standup adapter.StandupReport) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements adapter.CommsAdapter using the Slack API.
func NewClient ¶
NewClient creates a Slack CommsAdapter. token is a Slack Bot Token (xoxb-...). defaultChannel is the channel for general notifications (e.g., "#platform"). standupChannel is for standup posts.
func (*Client) FetchMentions ¶
FetchMentions searches for recent messages mentioning spec IDs in configured channels. Requires the Slack search:read scope (available on paid plans).
func (*Client) NotifyUser ¶ added in v0.33.0
NotifyUser sends a direct message to a specific Slack user, resolving handle against the workspace's user list (matched by Slack username or display name, case-insensitively, tolerant of a leading '@'). Returns adapter.ErrRecipientUnknown when the handle does not resolve to a user, so the caller can fall back to a channel broadcast.
func (*Client) PostStandup ¶
PostStandup posts a formatted standup to the standup channel.