webhook

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 5 Imported by: 0

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