slack

package
v0.1.48 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SendSlackChannelComponent = "send_slack_channel"
	PortSuccess               = "success"
	PortError                 = "error"
	PortIn                    = "in"
)

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.NodePort

type ChannelSenderSettings

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

type Message

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

type SendChannelRequest

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

type SendSlackChannelContext

type SendSlackChannelContext any

type SendSlackChannelError

type SendSlackChannelError struct {
	Context SendSlackChannelContext `json:"context"`
	Error   string                  `json:"error"`
	Send    Message                 `json:"sent"`
}

type SendSlackChannelSuccess

type SendSlackChannelSuccess struct {
	Context SendSlackChannelContext `json:"context"`
	Sent    Message                 `json:"sent"`
}

Jump to

Keyboard shortcuts

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