Versions in this module Expand all Collapse all v1 v1.10.17 Oct 18, 2021 v1.10.16 Oct 18, 2021 Changes in this version + var ErrJobNotExists = errors.New("job does not exist") + var ErrMissingJobID = errors.New("missing job ID") + func NewEIAuthorizer(db *gorm.DB, ei models.ExternalInitiator) *eiAuthorizer + func NewExternalInitiatorManager(db *gorm.DB, httpclient HTTPClient) *externalInitiatorManager + func ValidatedWebhookSpec(tomlString string, externalInitiatorManager ExternalInitiatorManager) (jb job.Job, err error) + type Authorizer interface + CanRun func(ctx context.Context, config AuthorizerConfig, jobUUID uuid.UUID) (bool, error) + func NewAuthorizer(db *gorm.DB, user *models.User, ei *models.ExternalInitiator) Authorizer + type AuthorizerConfig interface + FeatureExternalInitiators func() bool + type Delegate struct + func NewDelegate(runner pipeline.Runner, externalInitiatorManager ExternalInitiatorManager) *Delegate + func (d *Delegate) AfterJobCreated(jb job.Job) + func (d *Delegate) BeforeJobDeleted(jb job.Job) + func (d *Delegate) JobType() job.Type + func (d *Delegate) ServicesForSpec(spec job.Job) ([]job.Service, error) + func (d *Delegate) WebhookJobRunner() JobRunner + type ExternalInitiatorManager interface + DeleteJob func(jobID models.JobID) error + DeleteJobV2 func(webhookSpecID int32) error + FindExternalInitiatorByName func(name string) (models.ExternalInitiator, error) + Notify func(models.JobSpec) error + NotifyV2 func(webhookSpecID int32) error + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + type JobRunner interface + RunJob func(ctx context.Context, jobUUID uuid.UUID, requestBody string, ...) (int64, error) + type JobSpecNotice struct + JobID models.JobID + Params models.JSON + Type string + func NewJobSpecNotice(initiator models.Initiator, js models.JobSpec) (*JobSpecNotice, error) + type JobSpecNoticeV2 struct + JobID uuid.UUID + Params models.JSON + Type string + type NullExternalInitiatorManager struct + func (NullExternalInitiatorManager) DeleteJob(jobID models.JobID) error + func (NullExternalInitiatorManager) DeleteJobV2(int32) error + func (NullExternalInitiatorManager) FindExternalInitiatorByName(name string) (models.ExternalInitiator, error) + func (NullExternalInitiatorManager) Notify(models.JobSpec) error + func (NullExternalInitiatorManager) NotifyV2(int32) error + type TOMLWebhookSpec struct + ExternalInitiators []TOMLWebhookSpecExternalInitiator + type TOMLWebhookSpecExternalInitiator struct + Name string + Spec models.JSON