{"modulePath":"github.com/apache/answer-plugins/notification-slack","version":"v1.0.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package slack_notification\n\n## Variables\n\n```go\nvar Info embed.FS\n```\n\n## Types\n\n```go\ntype Notification struct {\n\tConfig          *NotificationConfig\n\tUserConfigCache *UserConfigCache\n}\n```\n\n```go\nfunc (n *Notification) ConfigFields() []plugin.ConfigField\n```\n\n```go\nfunc (n *Notification) ConfigReceiver(config []byte) error\n```\n\n```go\nfunc (n *Notification) GetNewQuestionSubscribers() (userIDs []string)\n```\nGetNewQuestionSubscribers returns the subscribers of the new question notification\n\n```go\nfunc (n *Notification) Info() plugin.Info\n```\n\n```go\nfunc (n *Notification) Notify(msg plugin.NotificationMessage)\n```\nNotify sends a notification to the user\n\n```go\nfunc (n *Notification) UserConfigFields() []plugin.ConfigField\n```\n\n```go\nfunc (n *Notification) UserConfigReceiver(userID string, config []byte) error\n```\n\n```go\ntype NotificationConfig struct {\n\tNotification bool `json:\"notification\"`\n}\n```\n\n```go\ntype UserConfig struct {\n\tWebhookURL                   string `json:\"webhook_url\"`\n\tInboxNotifications           bool   `json:\"inbox_notifications\"`\n\tAllNewQuestions              bool   `json:\"all_new_questions\"`\n\tNewQuestionsForFollowingTags bool   `json:\"new_questions_for_following_tags\"`\n\tUpvotedAnswers               bool   `json:\"upvoted_answers\"`\n\tDownvotedAnswers             bool   `json:\"downvoted_answers\"`\n\tUpdatedQuestions             bool   `json:\"updated_questions\"`\n\tUpdatedAnswers               bool   `json:\"updated_answers\"`\n}\n```\n\n```go\ntype UserConfigCache struct {\n\tsync.Mutex\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewUserConfigCache() *UserConfigCache\n```\n\n```go\nfunc (ucc *UserConfigCache) SetUserConfig(userID string, config *UserConfig)\n```\n\n```go\ntype WebhookReq struct {\n\tBlocks []struct {\n\t\tType string `json:\"type\"`\n\t\tText struct {\n\t\t\tType string `json:\"type\"`\n\t\t\tText string `json:\"text\"`\n\t\t} `json:\"text\"`\n\t} `json:\"blocks\"`\n}\n```\n\n```go\nfunc NewWebhookReq(content string) *WebhookReq\n```\n\n","path":"github.com/apache/answer-plugins/notification-slack","name":"slack_notification","synopsis":"","isRedistributable":true}
