send

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName = "send_slack_channel"
	ResponsePort  = "response"
	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
}

func (*Component) GetInfo

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

func (*Component) Handle

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

func (*Component) Instance

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

func (*Component) Ports

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

type Context

type Context any

type Error

type Error struct {
	Context Context `json:"context"`
	Error   string  `json:"error"`
}

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 Request

type Request struct {
	Context Context `json:"context,omitempty" configurable:"true" title:"Context"`
	Message Message `json:"slack_message" required:"true" title:"Slack Message"`
}

type Response

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

type Settings

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

Jump to

Keyboard shortcuts

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