slack

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 27 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
	TeamID 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) Send

func (*ChannelSender) ServeMessageAction added in v0.29.0

func (s *ChannelSender) ServeMessageAction(w http.ResponseWriter, req *http.Request)

func (*ChannelSender) SetReceiver added in v0.29.0

func (s *ChannelSender) SetReceiver(r notification.Receiver)

func (*ChannelSender) TeamID added in v0.28.0

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

type Config

type Config struct {
	BaseURL   string
	UserStore *user.Store
}

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