client

package
v0.0.0-...-5193e6c Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessagePoster

type MessagePoster interface {
	PostMessage(channel string, params ...slack.MsgOption) (string, string, error)
}

type RichMessage

type RichMessage struct {
	Username        string             `json:"username"`
	Parse           string             `json:"parse"`
	ThreadTimestamp string             `json:"thread_ts"`
	ReplyBroadcast  bool               `json:"reply_broadcast"`
	LinkNames       int                `json:"link_names"`
	Attachments     []slack.Attachment `json:"attachments"`
	UnfurlLinks     bool               `json:"unfurl_links"`
	UnfurlMedia     bool               `json:"unfurl_media"`
	IconURL         string             `json:"icon_url"`
	IconEmoji       string             `json:"icon_emoji"`
	Markdown        bool               `json:"mrkdwn,omitempty"`
	EscapeText      bool               `json:"escape_text"`
	ChannelID       string             `json:"channel"`
	Text            string             `json:"text"`
}

func (RichMessage) Post

func (m RichMessage) Post(rtm MessagePoster) (respChannel string, respTimestamp string, err error)

type Slack

type Slack interface {
	SendMessage(message, channelId, threadTimestamp string)
	SendRichMessage(rm RichMessage) (respChannel string, respTimestamp string, err error)
	IncomingMessages() <-chan flyte.Event
	// GetConversations is a heavy call used to fetch data about all channels in a workspace
	// intended to be cached, not called each time this is needed
	GetConversations() ([]types.Conversation, error)
}

our slack implementation makes consistent use of channel id

func NewSlack

func NewSlack(token string) Slack

Jump to

Keyboard shortcuts

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