slack

package
v0.1.121 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SendSlackChannelComponent = "send_slack_channel"
	PortResponse              = "response"
	PortError                 = "error"
	PortRequest               = "request"
)

Variables

View Source
var SenderDefaultSettings = ChannelSenderSettings{}

Functions

This section is empty.

Types

type ChannelSender

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

func (*ChannelSender) GetInfo

func (t *ChannelSender) GetInfo() module.ComponentInfo

func (*ChannelSender) Handle

func (t *ChannelSender) Handle(ctx context.Context, responseHandler module.Handler, port string, msg interface{}) error

func (*ChannelSender) Instance

func (t *ChannelSender) Instance() module.Component

func (*ChannelSender) Ports

func (t *ChannelSender) Ports() []module.Port

type ChannelSenderSettings

type ChannelSenderSettings struct {
	EnableSuccessPort bool `json:"enableSuccessPort" required:"true" title:"Enable Success port" description:""`
	EnableErrorPort   bool `` /* 150-byte string literal not displayed */
}

type Message

type Message struct {
	ChannelID  string `json:"channelID" required:"true" minLength:"1" title:"ChannelID" description:""`
	SlackToken string `json:"slackToken" required:"true" minLength:"1" title:"Slack token" description:"Bot User OAuth Token"`
	Text       string `json:"text" required:"true" minLength:"1" title:"Message text" format:"textarea"`
}

type SendChannelRequest

type SendChannelRequest struct {
	Context SendSlackChannelContext `json:"context" configurable:"true" title:"Context"`
	Message Message                 `json:"slack_message" required:"true" title:"Slack Message"`
}

type SendSlackChannelContext

type SendSlackChannelContext any

type SendSlackChannelError

type SendSlackChannelError struct {
	Request SendChannelRequest `json:"request"`
	Error   string             `json:"error"`
}

type SendSlackChannelSuccess

type SendSlackChannelSuccess struct {
	Request SendChannelRequest `json:"request"`
	Sent    Message            `json:"sent"`
}

Jump to

Keyboard shortcuts

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