slack

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package slack implements CommsAdapter using the Slack API.

Index

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

func NewClient(token, defaultChannel, standupChannel string) *Client

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

func (c *Client) FetchMentions(ctx context.Context, since time.Time) ([]adapter.Mention, error)

FetchMentions searches for recent messages mentioning spec IDs in configured channels. Requires the Slack search:read scope (available on paid plans).

func (*Client) Notify

func (c *Client) Notify(ctx context.Context, msg adapter.Notification) error

Notify sends a structured notification to a Slack channel.

func (*Client) NotifyUser added in v0.33.0

func (c *Client) NotifyUser(ctx context.Context, handle string, msg adapter.Notification) error

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

func (c *Client) PostStandup(ctx context.Context, standup adapter.StandupReport) error

PostStandup posts a formatted standup to the standup channel.

Jump to

Keyboard shortcuts

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