Versions in this module Expand all Collapse all v0 v0.19.4 May 24, 2023 Changes in this version + func Deliver(ctx context.Context, t *webhook_model.HookTask) error + func GetDingtalkPayload(p api.Payloader, event webhook_module.HookEventType, _ string) (api.Payloader, error) + func GetDiscordPayload(p api.Payloader, event webhook_module.HookEventType, meta string) (api.Payloader, error) + func GetFeishuPayload(p api.Payloader, event webhook_module.HookEventType, _ string) (api.Payloader, error) + func GetMSTeamsPayload(p api.Payloader, event webhook_module.HookEventType, _ string) (api.Payloader, error) + func GetMatrixPayload(p api.Payloader, event webhook_module.HookEventType, meta string) (api.Payloader, error) + func GetPackagistPayload(p api.Payloader, event webhook_module.HookEventType, meta string) (api.Payloader, error) + func GetSlackPayload(p api.Payloader, event webhook_module.HookEventType, meta string) (api.Payloader, error) + func GetTelegramPayload(p api.Payloader, event webhook_module.HookEventType, _ string) (api.Payloader, error) + func GetWechatworkPayload(p api.Payloader, event webhook_module.HookEventType, _ string) (api.Payloader, error) + func Init() error + func IsValidHookTaskType(name string) bool + func IsValidSlackChannel(name string) bool + func MatrixLinkFormatter(url, text string) string + func MatrixLinkToRef(repoURL, ref string) string + func NewNotifier() base.Notifier + func PrepareWebhook(ctx context.Context, w *webhook_model.Webhook, ...) error + func PrepareWebhooks(ctx context.Context, source EventSource, event webhook_module.HookEventType, ...) error + func ReplayHookTask(ctx context.Context, w *webhook_model.Webhook, uuid string) error + func SlackLinkFormatter(url, text string) string + func SlackLinkToRef(repoURL, ref string) string + func SlackShortTextFormatter(s string) string + func SlackTextFormatter(s string) string + func ToHook(repoLink string, w *webhook_model.Webhook) (*api.Hook, error) + type DingtalkPayload dingtalk.Payload + func (d *DingtalkPayload) Create(p *api.CreatePayload) (api.Payloader, error) + func (d *DingtalkPayload) Delete(p *api.DeletePayload) (api.Payloader, error) + func (d *DingtalkPayload) Fork(p *api.ForkPayload) (api.Payloader, error) + func (d *DingtalkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) + func (d *DingtalkPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) + func (d *DingtalkPayload) JSONPayload() ([]byte, error) + func (d *DingtalkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) + func (d *DingtalkPayload) Push(p *api.PushPayload) (api.Payloader, error) + func (d *DingtalkPayload) Release(p *api.ReleasePayload) (api.Payloader, error) + func (d *DingtalkPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) + func (d *DingtalkPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) + func (d *DingtalkPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) + type DiscordEmbed struct + Author DiscordEmbedAuthor + Color int + Description string + Fields []DiscordEmbedField + Footer DiscordEmbedFooter + Title string + URL string + type DiscordEmbedAuthor struct + IconURL string + Name string + URL string + type DiscordEmbedField struct + Name string + Value string + type DiscordEmbedFooter struct + Text string + type DiscordMeta struct + IconURL string + Username string + func GetDiscordHook(w *webhook_model.Webhook) *DiscordMeta + type DiscordPayload struct + AvatarURL string + Content string + Embeds []DiscordEmbed + TTS bool + Username string + Wait bool + func (d *DiscordPayload) Create(p *api.CreatePayload) (api.Payloader, error) + func (d *DiscordPayload) Delete(p *api.DeletePayload) (api.Payloader, error) + func (d *DiscordPayload) Fork(p *api.ForkPayload) (api.Payloader, error) + func (d *DiscordPayload) Issue(p *api.IssuePayload) (api.Payloader, error) + func (d *DiscordPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) + func (d *DiscordPayload) JSONPayload() ([]byte, error) + func (d *DiscordPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) + func (d *DiscordPayload) Push(p *api.PushPayload) (api.Payloader, error) + func (d *DiscordPayload) Release(p *api.ReleasePayload) (api.Payloader, error) + func (d *DiscordPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) + func (d *DiscordPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) + func (d *DiscordPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) + type EventSource struct + Owner *user_model.User + Repository *repo_model.Repository + type FeishuPayload struct + Content struct{ ... } + MsgType string + func (f *FeishuPayload) Create(p *api.CreatePayload) (api.Payloader, error) + func (f *FeishuPayload) Delete(p *api.DeletePayload) (api.Payloader, error) + func (f *FeishuPayload) Fork(p *api.ForkPayload) (api.Payloader, error) + func (f *FeishuPayload) Issue(p *api.IssuePayload) (api.Payloader, error) + func (f *FeishuPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) + func (f *FeishuPayload) JSONPayload() ([]byte, error) + func (f *FeishuPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) + func (f *FeishuPayload) Push(p *api.PushPayload) (api.Payloader, error) + func (f *FeishuPayload) Release(p *api.ReleasePayload) (api.Payloader, error) + func (f *FeishuPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) + func (f *FeishuPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) + func (f *FeishuPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) + type MSTeamsAction struct + Name string + Targets []MSTeamsActionTarget + Type string + type MSTeamsActionTarget struct + Os string + URI string + type MSTeamsFact struct + Name string + Value string + type MSTeamsPayload struct + Context string + PotentialAction []MSTeamsAction + Sections []MSTeamsSection + Summary string + ThemeColor string + Title string + Type string + func (m *MSTeamsPayload) Create(p *api.CreatePayload) (api.Payloader, error) + func (m *MSTeamsPayload) Delete(p *api.DeletePayload) (api.Payloader, error) + func (m *MSTeamsPayload) Fork(p *api.ForkPayload) (api.Payloader, error) + func (m *MSTeamsPayload) Issue(p *api.IssuePayload) (api.Payloader, error) + func (m *MSTeamsPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) + func (m *MSTeamsPayload) JSONPayload() ([]byte, error) + func (m *MSTeamsPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) + func (m *MSTeamsPayload) Push(p *api.PushPayload) (api.Payloader, error) + func (m *MSTeamsPayload) Release(p *api.ReleasePayload) (api.Payloader, error) + func (m *MSTeamsPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) + func (m *MSTeamsPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) + func (m *MSTeamsPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) + type MSTeamsSection struct + ActivityImage string + ActivitySubtitle string + ActivityTitle string + Facts []MSTeamsFact + Text string + type MatrixMeta struct + HomeserverURL string + MessageType int + Room string + func GetMatrixHook(w *webhook_model.Webhook) *MatrixMeta + type MatrixPayload struct + Body string + Commits []*api.PayloadCommit + Format string + FormattedBody string + MsgType string + func (m *MatrixPayload) Create(p *api.CreatePayload) (api.Payloader, error) + func (m *MatrixPayload) Delete(p *api.DeletePayload) (api.Payloader, error) + func (m *MatrixPayload) Fork(p *api.ForkPayload) (api.Payloader, error) + func (m *MatrixPayload) Issue(p *api.IssuePayload) (api.Payloader, error) + func (m *MatrixPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) + func (m *MatrixPayload) JSONPayload() ([]byte, error) + func (m *MatrixPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) + func (m *MatrixPayload) Push(p *api.PushPayload) (api.Payloader, error) + func (m *MatrixPayload) Release(p *api.ReleasePayload) (api.Payloader, error) + func (m *MatrixPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) + func (m *MatrixPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) + func (m *MatrixPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) + type PackagistMeta struct + APIToken string + PackageURL string + Username string + func GetPackagistHook(w *webhook_model.Webhook) *PackagistMeta + type PackagistPayload struct + PackagistRepository struct{ ... } + func (f *PackagistPayload) Create(_ *api.CreatePayload) (api.Payloader, error) + func (f *PackagistPayload) Delete(_ *api.DeletePayload) (api.Payloader, error) + func (f *PackagistPayload) Fork(_ *api.ForkPayload) (api.Payloader, error) + func (f *PackagistPayload) Issue(_ *api.IssuePayload) (api.Payloader, error) + func (f *PackagistPayload) IssueComment(_ *api.IssueCommentPayload) (api.Payloader, error) + func (f *PackagistPayload) JSONPayload() ([]byte, error) + func (f *PackagistPayload) PullRequest(_ *api.PullRequestPayload) (api.Payloader, error) + func (f *PackagistPayload) Push(_ *api.PushPayload) (api.Payloader, error) + func (f *PackagistPayload) Release(_ *api.ReleasePayload) (api.Payloader, error) + func (f *PackagistPayload) Repository(_ *api.RepositoryPayload) (api.Payloader, error) + func (f *PackagistPayload) Review(_ *api.PullRequestPayload, _ webhook_module.HookEventType) (api.Payloader, error) + func (f *PackagistPayload) Wiki(_ *api.WikiPayload) (api.Payloader, error) + type PayloadConvertor interface + Create func(*api.CreatePayload) (api.Payloader, error) + Delete func(*api.DeletePayload) (api.Payloader, error) + Fork func(*api.ForkPayload) (api.Payloader, error) + Issue func(*api.IssuePayload) (api.Payloader, error) + IssueComment func(*api.IssueCommentPayload) (api.Payloader, error) + PullRequest func(*api.PullRequestPayload) (api.Payloader, error) + Push func(*api.PushPayload) (api.Payloader, error) + Release func(*api.ReleasePayload) (api.Payloader, error) + Repository func(*api.RepositoryPayload) (api.Payloader, error) + Review func(*api.PullRequestPayload, webhook_module.HookEventType) (api.Payloader, error) + Wiki func(*api.WikiPayload) (api.Payloader, error) + type SlackAttachment struct + Color string + Fallback string + Text string + Title string + TitleLink string + type SlackMeta struct + Channel string + Color string + IconURL string + Username string + func GetSlackHook(w *webhook_model.Webhook) *SlackMeta + type SlackPayload struct + Attachments []SlackAttachment + Channel string + Color string + IconURL string + LinkNames int + Text string + UnfurlLinks int + Username string + func (s *SlackPayload) Create(p *api.CreatePayload) (api.Payloader, error) + func (s *SlackPayload) Delete(p *api.DeletePayload) (api.Payloader, error) + func (s *SlackPayload) Fork(p *api.ForkPayload) (api.Payloader, error) + func (s *SlackPayload) Issue(p *api.IssuePayload) (api.Payloader, error) + func (s *SlackPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) + func (s *SlackPayload) JSONPayload() ([]byte, error) + func (s *SlackPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) + func (s *SlackPayload) Push(p *api.PushPayload) (api.Payloader, error) + func (s *SlackPayload) Release(p *api.ReleasePayload) (api.Payloader, error) + func (s *SlackPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) + func (s *SlackPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) + func (s *SlackPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) + type TelegramMeta struct + BotToken string + ChatID string + func GetTelegramHook(w *webhook_model.Webhook) *TelegramMeta + type TelegramPayload struct + DisableWebPreview bool + Message string + ParseMode string + func (t *TelegramPayload) Create(p *api.CreatePayload) (api.Payloader, error) + func (t *TelegramPayload) Delete(p *api.DeletePayload) (api.Payloader, error) + func (t *TelegramPayload) Fork(p *api.ForkPayload) (api.Payloader, error) + func (t *TelegramPayload) Issue(p *api.IssuePayload) (api.Payloader, error) + func (t *TelegramPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) + func (t *TelegramPayload) JSONPayload() ([]byte, error) + func (t *TelegramPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) + func (t *TelegramPayload) Push(p *api.PushPayload) (api.Payloader, error) + func (t *TelegramPayload) Release(p *api.ReleasePayload) (api.Payloader, error) + func (t *TelegramPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) + func (t *TelegramPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) + func (t *TelegramPayload) Wiki(p *api.WikiPayload) (api.Payloader, error) + type WechatworkPayload struct + Markdown struct{ ... } + Msgtype string + Text struct{ ... } + func (f *WechatworkPayload) Create(p *api.CreatePayload) (api.Payloader, error) + func (f *WechatworkPayload) Delete(p *api.DeletePayload) (api.Payloader, error) + func (f *WechatworkPayload) Fork(p *api.ForkPayload) (api.Payloader, error) + func (f *WechatworkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) + func (f *WechatworkPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) + func (f *WechatworkPayload) JSONPayload() ([]byte, error) + func (f *WechatworkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) + func (f *WechatworkPayload) Push(p *api.PushPayload) (api.Payloader, error) + func (f *WechatworkPayload) Release(p *api.ReleasePayload) (api.Payloader, error) + func (f *WechatworkPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) + func (f *WechatworkPayload) Review(p *api.PullRequestPayload, event webhook_module.HookEventType) (api.Payloader, error) + func (f *WechatworkPayload) SetSecret(_ string) + func (f *WechatworkPayload) Wiki(p *api.WikiPayload) (api.Payloader, error)