Documentation ¶
Index ¶
- Variables
- func GetCurrentEmojiNamesOnSlackPost(GetSlackPostEmojisResponse []slack.ItemReaction) []string
- func GetEmojisToReactWith(text string) (emojis []string)
- func GetSlackMessageBlock(userId string) (SlackMessageBlock []slack.Block)
- func ProcessRequest(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
- type Slack
- func (s *Slack) GetCurrentEmojisOnSlackPost(msgRef slack.ItemRef) ([]slack.ItemReaction, error)
- func (s *Slack) PostSlackMessage(message string, channel string) error
- func (s *Slack) ProcessSlackCallbackEvent(innerEvent slackevents.EventsAPIInnerEvent) error
- func (s *Slack) ReactToSlackPost(text string, timestamp string, channel string) error
- func (s *Slack) WelcomeNewSlackUser(slackUser string, channel string) error
- type SlackMessage
- type SlackMessages
- type SlackText
Constants ¶
This section is empty.
Variables ¶
View Source
var GetEmojiMatches = func(emoji string, keywords []string, text string, emojis []string) []string { for _, keyword := range keywords { if strings.Contains(strings.ToLower(text), strings.ToLower(keyword)) && !common.ArrayContainsItem(emojis, emoji) { emojis = append(emojis, emoji) } } return emojis }
View Source
var GetKeyWordsMap = func() (keywordsMap map[string][]string) { return map[string][]string{ "kubernetes": {"kube", "kubernetes", "k8s"}, "docker": {"docker", "containers", "container"}, "aws": {"aws", "lambda", "ec2", "cloudwatch", "codebuild", "kinesis streams", "redshift", "appsync", "ebs", "elasticsarch", "amazon", "s3"}, "aww-yeah": {"congratulations", "daami", "way to go", "hurray", "success", "successfully", "kadaa", "sure, will do"}, "arab": {"congratulations", "daami", "way to go", "hurray", "success", "successfully", "kadaa", "sure, will do"}, "celebrate": {"congratulations", "daami", "way to go", "hurray", "success", "successfully", "kadaa", "sure, will do"}, "graph_ql": {"graphql", "graphene", "api query"}, "mongo_db": {"mongo", "mongodb", "db", "database"}, "python": {"python3", "python", "programming"}, "github": {"github", "git", "version control", "versioning", "source control"}, "git": {"github", "git", "version control", "versioning", "source control"}, "react1": {"reactjs", "react"}, "nodejs": {"nodejs", "node"}, "javascript": {"javascript", "programming"}, "security": {"secure", "security", "threat", "hacking", "hacker", "hackers", "enterprise security", "threat vector"}, "youtube": {"youtube"}, "linkedin": {"linkedin"}, "typescript": {"typescript"}, "google": {"google"}, } }
Functions ¶
func GetCurrentEmojiNamesOnSlackPost ¶
func GetCurrentEmojiNamesOnSlackPost(GetSlackPostEmojisResponse []slack.ItemReaction) []string
func GetEmojisToReactWith ¶
func GetSlackMessageBlock ¶
func ProcessRequest ¶
func ProcessRequest(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)
Types ¶
type Slack ¶
type Slack struct {
// contains filtered or unexported fields
}
func GetSlackApiClient ¶
func (*Slack) GetCurrentEmojisOnSlackPost ¶
func (*Slack) PostSlackMessage ¶
func (*Slack) ProcessSlackCallbackEvent ¶
func (s *Slack) ProcessSlackCallbackEvent(innerEvent slackevents.EventsAPIInnerEvent) error
func (*Slack) ReactToSlackPost ¶
type SlackMessage ¶
func AddUserIdToSlackMessage ¶
func AddUserIdToSlackMessage(userId string, SlackMessage SlackMessage) SlackMessage
func GetRandomMessage ¶
func GetRandomMessage() SlackMessage
func GetSlackMessage ¶
func GetSlackMessage(userId string) SlackMessage
type SlackMessages ¶
type SlackMessages struct {
Messages []SlackMessage `json:"messages"`
}
func GetSlackMessages ¶
func GetSlackMessages() SlackMessages
Click to show internal directories.
Click to hide internal directories.