webhook

package
v3.6.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const UpDateEventStatus = "console_update_event_status"
View Source
const UpdateEventCodeVersion = "console_update_event_code_version"

Variables

This section is empty.

Functions

func InitManager

func InitManager(conf conf.WebHookConf, log *logrus.Entry) error

Types

type Manager

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

func GetManager

func GetManager() *Manager

func (*Manager) GetWebhook

func (m *Manager) GetWebhook(name string) *WebHook

func (*Manager) Regist

func (m *Manager) Regist(w *WebHook)

Regist 注册

func (*Manager) RunWebhook

func (m *Manager) RunWebhook(name string, body []byte)

func (*Manager) RunWebhookWithParameter

func (m *Manager) RunWebhookWithParameter(name string, body []byte, parameter map[string]interface{})

type WebHook

type WebHook struct {
	EndPoint         string
	RequestParameter map[string]interface{}
	RequestBody      []byte
	RequestHeader    map[string]string
	Name             string
	Method           string
}

func (*WebHook) Run

func (w *WebHook) Run() error

Run 执行

Jump to

Keyboard shortcuts

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