event

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

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