Documentation
¶
Index ¶
- Constants
- type Attachment
- type Field
- type Notifier
- func (notifier *Notifier) Close() error
- func (notifier *Notifier) DispatchAccountUpdatedEvent(userId string, userSettings bson.Raw, event *events.AccountUpdated) error
- func (notifier *Notifier) DispatchAccountWitnessVotedEvent(userId string, userSettings bson.Raw, event *events.AccountWitnessVoted) error
- func (notifier *Notifier) DispatchCommentPublishedEvent(userId string, userSettings bson.Raw, event *events.CommentPublished) error
- func (notifier *Notifier) DispatchCommentVotedEvent(userId string, userSettings bson.Raw, event *events.CommentVoted) error
- func (notifier *Notifier) DispatchStoryPublishedEvent(userId string, userSettings bson.Raw, event *events.StoryPublished) error
- func (notifier *Notifier) DispatchStoryVotedEvent(userId string, userSettings bson.Raw, event *events.StoryVoted) error
- func (notifier *Notifier) DispatchTransferMadeEvent(userId string, userSettings bson.Raw, event *events.TransferMade) error
- func (notifier *Notifier) DispatchUserFollowStatusChangedEvent(userId string, userSettings bson.Raw, event *events.UserFollowStatusChanged) error
- func (notifier *Notifier) DispatchUserMentionedEvent(userId string, userSettings bson.Raw, event *events.UserMentioned) error
- type NotifierOption
- type Payload
- type Settings
Constants ¶
View Source
const DefaultMaxConcurrentRequests = 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct { Fallback string `json:"fallback"` Color string `json:"color,omitempty"` Pretext string `json:"pretext,omitempty"` AuthorName string `json:"author_name,omitempty"` AuthorLink string `json:"author_link,omitempty"` AuthorIcon string `json:"author_icon,omitempty"` Title string `json:"title,omitempty"` TitleLink string `json:"title_link,omitempty"` Text string `json:"text,omitempty"` Fields []*Field `json:"fields,omitempty"` ImageURL string `json:"image_url,omitempty"` ThumbURL string `json:"thumb_url,omitempty"` Timestamp uint64 `json:"ts,omitempty"` }
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶
func NewNotifier(opts ...NotifierOption) *Notifier
func (*Notifier) DispatchAccountUpdatedEvent ¶ added in v0.4.0
func (*Notifier) DispatchAccountWitnessVotedEvent ¶ added in v0.8.0
func (*Notifier) DispatchCommentPublishedEvent ¶
func (*Notifier) DispatchCommentVotedEvent ¶
func (*Notifier) DispatchStoryPublishedEvent ¶
func (*Notifier) DispatchStoryVotedEvent ¶
func (*Notifier) DispatchTransferMadeEvent ¶ added in v0.3.0
func (*Notifier) DispatchUserFollowStatusChangedEvent ¶ added in v0.7.0
func (*Notifier) DispatchUserMentionedEvent ¶ added in v0.2.0
type NotifierOption ¶
type NotifierOption func(*Notifier)
func SetMaxConcurrentRequests ¶ added in v0.3.0
func SetMaxConcurrentRequests(maxConcurrentRequests uint) NotifierOption
func SetWebhookTimeout ¶
func SetWebhookTimeout(timeout time.Duration) NotifierOption
type Payload ¶
type Payload struct { Text string `json:"text,omitempty"` Attachments []*Attachment `json:"attachments,omitempty"` }
Click to show internal directories.
Click to hide internal directories.