event

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 5 Imported by: 1 module, 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

Overview

Package event 事件信息

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	EventData

	// 事件集合,key为事件名称
	Events map[string]*apistructs.GittarRegisterHookRequest
	// contains filtered or unexported fields
}

Event 事件结构体

func New

func New(options ...Option) *Event

New Event

func (*Event) Register

func (e *Event) Register(ed *EventData) error

Register 注册 gittar 事件

type EventData

type EventData struct {
	// 事件名称
	Name string
	// 回调的路径
	Path string
	// 是否push触发,默认为true
	IsPush bool
}

EventData 注册事件的数据结构

type Option

type Option func(*Event)

Option Event 类型定义

func WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

Jump to

Keyboard shortcuts

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