slack

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Signature added in v0.30.1

func Signature(signingSecret string, ts time.Time, data []byte) string

Signature generates a signature for a Slack request.

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