webhook

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	GetWebhook() *conf.Webhook
}

type Group

type Group struct {
	// contains filtered or unexported fields
}

func NewGroup

func NewGroup(ctx context.Context, group string, hooks []Webhook, delayMs int64) *Group

func (*Group) Callback

func (g *Group) Callback(event fsnotify.Event) error

func (*Group) Group

func (g *Group) Group() string

type MessageWebhook

type MessageWebhook struct {
	// contains filtered or unexported fields
}

func NewMessageWebhook

func NewMessageWebhook(conf *conf.WebhookItem, db *wechatdb.DB, host string) *MessageWebhook

func (*MessageWebhook) Do

func (m *MessageWebhook) Do(event fsnotify.Event)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(config Config) *Service

func (*Service) GetHooks

func (s *Service) GetHooks(ctx context.Context, db *wechatdb.DB) []*Group

type Webhook

type Webhook interface {
	Do(event fsnotify.Event)
}

Jump to

Keyboard shortcuts

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