webhook

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2025 License: MIT Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscordWebhook

type DiscordWebhook struct {
	Enabled  bool
	Events   []string
	URL      string
	Username string
}

func (*DiscordWebhook) Contains added in v1.0.8

func (d *DiscordWebhook) Contains(event string) bool

func (*DiscordWebhook) GetEnabled added in v1.0.8

func (d *DiscordWebhook) GetEnabled() bool

func (*DiscordWebhook) GetEvents added in v1.0.8

func (d *DiscordWebhook) GetEvents() []string

func (*DiscordWebhook) Send

func (d *DiscordWebhook) Send(message string) error

type MattermostWebhook

type MattermostWebhook struct {
	Enabled  bool
	Events   []string
	URL      string
	Username string
	IconURL  string
}

func (*MattermostWebhook) Contains added in v1.0.8

func (m *MattermostWebhook) Contains(event string) bool

func (*MattermostWebhook) GetEnabled added in v1.0.8

func (m *MattermostWebhook) GetEnabled() bool

func (*MattermostWebhook) GetEvents added in v1.0.8

func (m *MattermostWebhook) GetEvents() []string

func (*MattermostWebhook) Send

func (m *MattermostWebhook) Send(message string) error

type SlackWebhook

type SlackWebhook struct {
	Enabled bool
	Events  []string
	URL     string
}

func (*SlackWebhook) Contains added in v1.0.8

func (s *SlackWebhook) Contains(event string) bool

func (*SlackWebhook) GetEnabled added in v1.0.8

func (s *SlackWebhook) GetEnabled() bool

func (*SlackWebhook) GetEvents added in v1.0.8

func (s *SlackWebhook) GetEvents() []string

func (*SlackWebhook) Send

func (s *SlackWebhook) Send(message string) error

type Webhook

type Webhook interface {
	Send(message string) error
	GetEnabled() bool
	GetEvents() []string
	Contains(event string) bool
}

func Register added in v1.0.8

func Register(enabled bool, url string, provider string, events []string) *Webhook

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL