webhook_handler

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 9 Imported by: ? modules, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleWebhook

func HandleWebhook(ctx *context.Context, wh *WebhookHandlerImpl) ([]*common.WorkflowsBatch, error)

func IsFileExists

func IsFileExists(ctx *context.Context, wh *WebhookHandlerImpl, path string, file string) bool

Types

type Trigger

type Trigger struct {
	Events    *[]string `yaml:"events"`
	Branches  *[]string `yaml:"branches"`
	OnStart   *[]string `yaml:"onStart"`
	Templates *[]string `yaml:"templates"`
	OnExit    *[]string `yaml:"onExit"`
	Config    string    `yaml:"config" default:"default"`
}

type WebhookHandler

type WebhookHandler interface {
	RegisterTriggers(ctx *context.Context) error
	PrepareBatchForMatchingTriggers(ctx *context.Context) ([]*common.WorkflowsBatch, error)
}

type WebhookHandlerImpl

type WebhookHandlerImpl struct {
	Triggers *[]Trigger
	Payload  *git_provider.WebhookPayload
	// contains filtered or unexported fields
}

func NewWebhookHandler

func NewWebhookHandler(cfg *conf.GlobalConfig, clients *clients.Clients, payload *git_provider.WebhookPayload) (*WebhookHandlerImpl, error)

func (*WebhookHandlerImpl) PrepareBatchForMatchingTriggers

func (wh *WebhookHandlerImpl) PrepareBatchForMatchingTriggers(ctx *context.Context) ([]*common.WorkflowsBatch, error)

func (*WebhookHandlerImpl) RegisterTriggers

func (wh *WebhookHandlerImpl) RegisterTriggers(ctx *context.Context) error

Jump to

Keyboard shortcuts

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