pipelinewebhooksvc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxDeliveryBodyBytes = pipelinerun.MaxEventInputBytes
)

Variables

View Source
var (
	ErrInvalidDelivery    = xerror.InvalidInput(xerror.PipelineTrigger)
	ErrVerificationFailed = xerror.New(xerror.KindUnauthorized, "PIPELINE_WEBHOOK_VERIFICATION_FAILED", "pipeline webhook verification failed")
	ErrDeliveryConflict   = xerror.New(xerror.KindAlreadyExists, "PIPELINE_WEBHOOK_DELIVERY_CONFLICT", "pipeline webhook delivery identity conflict")
	ErrReplayUnavailable  = xerror.New(xerror.KindInvalidInput, "PIPELINE_WEBHOOK_REPLAY_UNAVAILABLE", "pipeline webhook delivery replay is unavailable")
)

Functions

This section is empty.

Types

type AcceptRequest

type AcceptRequest struct {
	ReceiverID, KeyVersion, Timestamp, DeliveryID, Signature string
	Body                                                     []byte
}

type Acceptance

type Acceptance struct{ Replay bool }

type DeliveryDiagnostic

type DeliveryDiagnostic struct {
	ReceiverID, DeliveryID, PayloadDigest, Status string
	TriggerSlug, PipelineSlug                     slug.Slug
	TriggerRevision                               int64
	PayloadSizeBytes                              int64
	MappedInputNames                              []string
	LinkedRunSlug                                 *slug.Slug
	AttemptNumber, DuplicateCount                 int
	FailureKind, FailureReason                    *string
	NextRetryAt, StartedAt, CompletedAt           *time.Time
	ReceivedAt, UpdatedAt                         time.Time
	LastDuplicateAt                               *time.Time
	ReplayAvailable                               bool
	ReplayUnavailableReason                       *string
}

type Producer

type Producer interface {
	EnqueuePipelineWebhookDelivery(context.Context, postgres.DBTX, jobs.PipelineWebhookDeliveryArgs) (queue.QueuedJob, error)
}

type SecretResolver

type SecretResolver interface {
	ResolvePipelineWebhookSecret(context.Context, credentialssvc.ResolvePipelineWebhookSecretParams) ([]byte, error)
}

type Service

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

func (*Service) Accept

func (s *Service) Accept(ctx context.Context, request AcceptRequest) (Acceptance, error)

func (*Service) ExecuteDelivery

func (s *Service) ExecuteDelivery(ctx context.Context, args jobs.PipelineWebhookDeliveryArgs) error

func (*Service) GetDelivery

func (s *Service) GetDelivery(ctx context.Context, orgSlug, projectSlug, environmentSlug, triggerSlug slug.Slug, deliveryID string) (DeliveryDiagnostic, error)

func (*Service) ListDeliveries

func (s *Service) ListDeliveries(ctx context.Context, orgSlug, projectSlug, environmentSlug, triggerSlug slug.Slug, req model.ListRequest) (model.ListResponse[DeliveryDiagnostic], error)

func (*Service) ReplayDelivery

func (s *Service) ReplayDelivery(ctx context.Context, orgSlug, projectSlug, environmentSlug, triggerSlug slug.Slug, deliveryID string) (DeliveryDiagnostic, error)

Jump to

Keyboard shortcuts

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