Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIMessage ¶
type APIMessage struct {
Type string `json:"type"`
User string `json:"user,omitempty"`
Text string `json:"text"`
TS string `json:"ts"`
BotID string `json:"bot_id,omitempty"`
}
APIMessage is a raw Slack message from the API.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Slack Bot API client.
func (*Client) ListMessages ¶
ListMessages returns recent messages from the configured Slack channel.
func (*Client) SendMessage ¶
SendMessage sends a text message to the configured Slack channel.
func (*Client) SetHTTPDoer ¶
SetHTTPDoer replaces the HTTP client used for API requests.
type Config ¶
type Config struct {
Name string `mapstructure:"name"`
Token string `mapstructure:"token"`
Channel string `mapstructure:"channel"`
Description string `mapstructure:"description"`
}
Config holds the configuration for a single Slack instance.
func LoadConfigs ¶
LoadConfigs reads a .humanconfig YAML file from dir and returns the list of configured Slack instances. Returns nil and no error if the file does not exist.
type Instance ¶
Instance represents a configured Slack bot ready for use.
func LoadInstances ¶
LoadInstances reads config, applies env overrides, creates clients, and returns ready-to-use Slack instances.
type MessageSummary ¶
type MessageSummary struct {
User string `json:"user"`
Text string `json:"text"`
TS string `json:"ts"`
}
MessageSummary is the CLI output type for the list command.