slack

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID   string
	Name string
}

Channel contains information about a Slack channel.

type ChannelSender

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

func NewChannelSender

func NewChannelSender(ctx context.Context, cfg Config) (*ChannelSender, error)

func (*ChannelSender) Channel

func (s *ChannelSender) Channel(ctx context.Context, channelID string) (*Channel, error)

Channel will lookup a single Slack channel for the bot.

func (*ChannelSender) ListChannels

func (s *ChannelSender) ListChannels(ctx context.Context) ([]Channel, error)

ListChannels will return a list of channels visible to the slack bot.

func (*ChannelSender) ListenResponse

func (s *ChannelSender) ListenResponse() <-chan *notification.MessageResponse

func (*ChannelSender) ListenStatus

func (s *ChannelSender) ListenStatus() <-chan *notification.MessageStatus

func (*ChannelSender) Send

func (*ChannelSender) Status

func (s *ChannelSender) Status(ctx context.Context, id, providerID string) (*notification.MessageStatus, error)

type Config

type Config struct {
	BaseURL string
}

Config contains values used for the Slack notification sender.

Jump to

Keyboard shortcuts

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