slack

package
v0.0.0-...-a3f9da2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindChannelMentions

func FindChannelMentions(msg string) []string

func FindEscapedUserAndChannelMentions

func FindEscapedUserAndChannelMentions(msg string) map[string][]string

func FindUserMentions

func FindUserMentions(msg string) []string

func GetChannelInfo

func GetChannelInfo(channelId string) (*slack.Channel, error)

func GetUserInfo

func GetUserInfo(userId string) (*slack.User, error)

func HandleChallengeEvent

func HandleChallengeEvent(body []byte) (string, error)

func HandleSlashCommand

func HandleSlashCommand(message string, userId string, db *sql.DB) (string, error)

func LookupUserAndChannelNames

func LookupUserAndChannelNames(escapedUsers []string, escapedChannels []string) (map[string]string, error)

func PostAckToSlack

func PostAckToSlack(channelID string, message string) error

func UnescapeChannelId

func UnescapeChannelId(escapedChannel string) string

func UnescapeUserAndChannelMentions

func UnescapeUserAndChannelMentions(msg string, userAndChannelNames map[string]string) string

func UnescapeUserId

func UnescapeUserId(escapedUser string) string

func ValidateRequestSignature

func ValidateRequestSignature(headers http.Header, body []byte, secret string) error

func ValidateVerificationToken

func ValidateVerificationToken(requestToken string) bool

support for verification tokens is deprecated in Slack, but it's a quick way to add authorization

Types

This section is empty.

Jump to

Keyboard shortcuts

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