Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WireSet = wire.NewSet( ProvideTriggerer, )
WireSet provides a wire set for this package.
Functions ¶
Types ¶
type Hook ¶
type Hook struct {
Parent int64 `json:"parent"`
Trigger string `json:"trigger"`
TriggeredBy int64 `json:"triggered_by"`
Action enum.TriggerAction `json:"action"`
Link string `json:"link"`
Timestamp int64 `json:"timestamp"`
Title string `json:"title"`
Message string `json:"message"`
Before string `json:"before"`
After string `json:"after"`
Ref string `json:"ref"`
Fork string `json:"fork"`
Source string `json:"source"`
Target string `json:"target"`
AuthorLogin string `json:"author_login"`
AuthorName string `json:"author_name"`
AuthorEmail string `json:"author_email"`
AuthorAvatar string `json:"author_avatar"`
Debug bool `json:"debug"`
Cron string `json:"cron"`
Sender string `json:"sender"`
Params map[string]string `json:"params"`
}
Hook represents the payload of a post-commit hook.
type Triggerer ¶
type Triggerer interface {
Trigger(ctx context.Context, pipeline *types.Pipeline, hook *Hook) (*types.Execution, error)
}
Triggerer is responsible for triggering a Execution from an incoming hook (could be manual or webhook). If an execution is skipped a nil value is returned.
func New ¶
func New( executionStore store.ExecutionStore, checkStore store.CheckStore, stageStore store.StageStore, pipelineStore store.PipelineStore, tx dbtx.Transactor, repoStore store.RepoStore, urlProvider url.Provider, scheduler scheduler.Scheduler, fileService file.Service, converterService converter.Service, templateStore store.TemplateStore, pluginStore store.PluginStore, publicAccess publicaccess.Service, ) Triggerer
func ProvideTriggerer ¶
func ProvideTriggerer( executionStore store.ExecutionStore, checkStore store.CheckStore, stageStore store.StageStore, tx dbtx.Transactor, pipelineStore store.PipelineStore, fileService file.Service, converterService converter.Service, scheduler scheduler.Scheduler, repoStore store.RepoStore, urlProvider url.Provider, templateStore store.TemplateStore, pluginStore store.PluginStore, publicAccess publicaccess.Service, ) Triggerer
ProvideTriggerer provides a triggerer which can execute builds.
Click to show internal directories.
Click to hide internal directories.