Documentation ¶
Index ¶
- type Notification
- func (n *Notification) ConfigFields() []plugin.ConfigField
- func (n *Notification) ConfigReceiver(config []byte) error
- func (n *Notification) GetNewQuestionSubscribers() (userIDs []string)
- func (n *Notification) Info() plugin.Info
- func (n *Notification) Notify(msg plugin.NotificationMessage)
- func (n *Notification) UserConfigFields() []plugin.ConfigField
- func (n *Notification) UserConfigReceiver(userID string, config []byte) error
- type NotificationConfig
- type UserConfig
- type UserConfigCache
- type WebhookReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notification ¶
type Notification struct { Config *NotificationConfig UserConfigCache *UserConfigCache }
func (*Notification) ConfigFields ¶
func (n *Notification) ConfigFields() []plugin.ConfigField
func (*Notification) ConfigReceiver ¶
func (n *Notification) ConfigReceiver(config []byte) error
func (*Notification) GetNewQuestionSubscribers ¶
func (n *Notification) GetNewQuestionSubscribers() (userIDs []string)
GetNewQuestionSubscribers returns the subscribers of the new question notification
func (*Notification) Info ¶
func (n *Notification) Info() plugin.Info
func (*Notification) Notify ¶
func (n *Notification) Notify(msg plugin.NotificationMessage)
Notify sends a notification to the user
func (*Notification) UserConfigFields ¶
func (n *Notification) UserConfigFields() []plugin.ConfigField
func (*Notification) UserConfigReceiver ¶
func (n *Notification) UserConfigReceiver(userID string, config []byte) error
type NotificationConfig ¶
type NotificationConfig struct {
Notification bool `json:"notification"`
}
type UserConfig ¶
type UserConfigCache ¶
func NewUserConfigCache ¶
func NewUserConfigCache() *UserConfigCache
func (*UserConfigCache) SetUserConfig ¶
func (ucc *UserConfigCache) SetUserConfig(userID string, config *UserConfig)
type WebhookReq ¶
type WebhookReq struct { Blocks []struct { Type string `json:"type"` Text struct { Type string `json:"type"` Text string `json:"text"` } `json:"text"` } `json:"blocks"` }
func NewWebhookReq ¶
func NewWebhookReq(content string) *WebhookReq
Click to show internal directories.
Click to hide internal directories.