Documentation
¶
Index ¶
Constants ¶
View Source
const ( ComponentName = "slack_interaction" InteractionPort = "interaction" ErrorPort = "error" RequestPort = "request" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component implements the Slack interaction receiver
func (*Component) GetInfo ¶
func (c *Component) GetInfo() module.ComponentInfo
type Error ¶
type Error struct {
Context Context `json:"context,omitempty" configurable:"true" title:"Context"`
Error string `json:"error" title:"Error"`
}
Error output
type Header ¶
type Header struct {
Key string `json:"key" required:"true" title:"Key"`
Value string `json:"value" required:"true" title:"Value"`
}
Header matches HTTP Server's header format
type Interaction ¶
type Interaction struct {
Context Context `json:"context,omitempty" configurable:"true" title:"Context"`
ActionID string `json:"actionId" title:"Action ID" description:"Button action identifier (e.g. logs, restart)"`
ActionValue string `json:"actionValue" title:"Action Value" description:"Value embedded in the button"`
UserID string `json:"userId" title:"User ID" description:"Slack user ID who clicked"`
UserName string `json:"userName" title:"User Name" description:"Slack username who clicked"`
ChannelID string `json:"channelId" title:"Channel ID" description:"Channel where interaction happened"`
ResponseURL string `json:"responseUrl" format:"uri" title:"Response URL" description:"URL to send follow-up messages"`
TriggerID string `json:"triggerId" title:"Trigger ID" description:"ID for opening modals"`
}
Interaction is the parsed Block Kit interaction payload
type Request ¶
type Request struct {
Context Context `json:"context,omitempty" configurable:"true" title:"Context" description:"Arbitrary context to pass through to output"`
// Credentials - from edge config
SigningSecret string `` /* 127-byte string literal not displayed */
SkipVerify bool `json:"skipVerify,omitempty" configurable:"true" title:"Skip Verify" description:"Skip signature verification (for testing)"`
// HTTP request data - matches HTTP Server Request format
RequestURI string `json:"requestURI,omitempty" title:"Request URI"`
Method string `json:"method,omitempty" title:"Method"`
Headers []Header `json:"headers,omitempty" title:"Headers" description:"HTTP headers from the request"`
Body string `json:"body" required:"true" title:"Body" description:"Raw request body"`
}
Request is compatible with HTTP Server's Request output
Click to show internal directories.
Click to hide internal directories.