slack

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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