events

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultEventHandler

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

DefaultEventHandler is the default CI event handler.

func NewDefaultEventHandler

func NewDefaultEventHandler(logger *slog.Logger) DefaultEventHandler

NewDefaultEventHandler returns a new default event handler.

func (*DefaultEventHandler) Firing

func (r *DefaultEventHandler) Firing(p *project.Project, events map[string]cue.Value) bool

Fires returns true if any of the given events are firing.

type Event

type Event interface {
	// Firing returns true if the event is firing.
	Firing(p *project.Project, config cue.Value) (bool, error)
}

Event represents a CI event.

type EventHandler

type EventHandler interface {
	// Firing returns true if any of the events are firing for the given events.
	Firing(p *project.Project, events map[string]cue.Value) bool
}

EventHandler handles CI events.

type EventType

type EventType string

EventType represents a CI event type.

const (
	MergeEventName EventType = "merge"
	TagEventName   EventType = "tag"
)

type MergeEvent

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

MergeEvent fires when a merge occurs to the default branch.

func (*MergeEvent) Firing

func (m *MergeEvent) Firing(p *project.Project, config cue.Value) (bool, error)

type MergeEventConfig

type MergeEventConfig struct {
	Branch string `json:"branch"`
}

MergeEventConfig is the configuration for the MergeEvent.

type TagEvent

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

TagEvent fires when a tag is pushed.

func (*TagEvent) Firing

func (t *TagEvent) Firing(p *project.Project, config cue.Value) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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