webhook

package
v0.26.6 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Metadata = plugins.Module{
	Meta: plugins.Meta{
		Name:        modules.PluginNameWebhook,
		Title:       "Webhook插件",
		Version:     "1.0.0",
		Description: "Webhook接收器管理、测试发送与发送记录查询",
	},
	Tables: []string{
		"webhook_receiver",
		"webhook_log_record",
	},
	Menus: []plugins.Menu{
		{
			Key:   "plugin_webhook_index",
			Title: "Webhook插件",
			Icon:  "fa-solid fa-link",
			Order: 50,
			Children: []plugins.Menu{
				{
					Key:         "plugin_webhook_admin",
					Title:       "Webhook管理",
					Icon:        "fa-solid fa-gear",
					Show:        "isPlatformAdmin()==true",
					EventType:   "custom",
					CustomEvent: `() => loadJsonPage("/plugins/webhook/admin")`,
					Order:       100,
				},
				{
					Key:         "plugin_webhook_records",
					Title:       "Webhook记录",
					Icon:        "fa-solid fa-list",
					Show:        "isPlatformAdmin()==true",
					EventType:   "custom",
					CustomEvent: `() => loadJsonPage("/plugins/webhook/records")`,
					Order:       101,
				},
			},
		},
	},
	RunAfter:          []string{modules.PluginNameAI},
	Lifecycle:         &WebhookLifecycle{},
	PluginAdminRouter: route.RegisterPluginAdminRoutes,
}

Functions

This section is empty.

Types

type WebhookLifecycle

type WebhookLifecycle struct{}

func (*WebhookLifecycle) Disable

func (w *WebhookLifecycle) Disable(ctx plugins.BaseContext) error

func (*WebhookLifecycle) Enable

func (*WebhookLifecycle) Install

func (w *WebhookLifecycle) Install(ctx plugins.InstallContext) error

func (*WebhookLifecycle) Start

func (w *WebhookLifecycle) Start(ctx plugins.BaseContext) error

func (*WebhookLifecycle) StartCron

func (w *WebhookLifecycle) StartCron(ctx plugins.BaseContext, spec string) error

func (*WebhookLifecycle) Stop

func (*WebhookLifecycle) Uninstall

func (w *WebhookLifecycle) Uninstall(ctx plugins.UninstallContext) error

func (*WebhookLifecycle) Upgrade

func (w *WebhookLifecycle) Upgrade(ctx plugins.UpgradeContext) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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