Documentation
¶
Overview ¶
Package processor provides a generic interface for processing requests using a list of processors.
Index ¶
- func Process(logger *slog.Logger, req any, processors ...Processor) (*promotion.Bus, error)
- type AuthRequest
- type FeedbackRequest
- type Option
- type Processor
- func NewAuthValidatorProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
- func NewCheckRunFeedbackProcessor(githubController *github.Controller, opts ...Option) Processor
- func NewCheckSuiteEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
- func NewCommitStatusFeedbackProcessor(githubController *github.Controller, opts ...Option) Processor
- func NewDeploymentStatusEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
- func NewDynamicPromotionPreProcessor(githubController *github.Controller, opts ...Option) Processor
- func NewFastForwarderPostProcessor(githubController *github.Controller, opts ...Option) Processor
- func NewPullRequestEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
- func NewPullRequestReviewEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
- func NewPushEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
- func NewS3UploaderPostProcessor(awsController *aws.Controller, opts ...Option) Processor
- func NewStatusEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
- func NewWorkflowRunEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthRequest ¶
type AuthRequest struct { Body []byte Headers map[string]string EventProcessors map[event.Type][]Processor }
AuthRequest is a struct that represents an authentication request.
type FeedbackRequest ¶
FeedbackRequest is a struct that represents a feedback request.
type Option ¶
type Option = func(Processor)
Option is a function that applies an option to a Processor.
type Processor ¶
Processor is an interface that defines a method to process a request.
func NewAuthValidatorProcessor ¶
func NewAuthValidatorProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
NewAuthValidatorProcessor initializes and returns a new Processor for validating authentication against Controller operations. It accepts a Controller and optional configuration options to customize its behavior.
func NewCheckRunFeedbackProcessor ¶
func NewCheckRunFeedbackProcessor(githubController *github.Controller, opts ...Option) Processor
NewCheckRunFeedbackProcessor creates a new processor for handling feedback from check run events.
func NewCheckSuiteEventProcessor ¶
func NewCheckSuiteEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
NewCheckSuiteEventProcessor initializes a Processor for handling check suite events with optional configurations.
func NewCommitStatusFeedbackProcessor ¶
func NewCommitStatusFeedbackProcessor(githubController *github.Controller, opts ...Option) Processor
NewCommitStatusFeedbackProcessor creates a new processor for handling feedback from commit status checks.
func NewDeploymentStatusEventProcessor ¶
func NewDeploymentStatusEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
NewDeploymentStatusEventProcessor initializes a Processor for handling deployment status events with optional configurations.
func NewDynamicPromotionPreProcessor ¶
func NewDynamicPromotionPreProcessor(githubController *github.Controller, opts ...Option) Processor
NewDynamicPromotionPreProcessor initializes and returns a Processor for handling dynamic promotion, applying the given options.
func NewFastForwarderPostProcessor ¶
func NewFastForwarderPostProcessor(githubController *github.Controller, opts ...Option) Processor
NewFastForwarderPostProcessor constructs a Processor instance for handling Controller status events with optional configurations.
func NewPullRequestEventProcessor ¶
func NewPullRequestEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
NewPullRequestEventProcessor creates and returns a Processor to handle pull request events, initialized with given Controller controller and options.
func NewPullRequestReviewEventProcessor ¶
func NewPullRequestReviewEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
NewPullRequestReviewEventProcessor initializes a Processor for handling pull request review events with optional configurations.
func NewPushEventProcessor ¶
func NewPushEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
NewPushEventProcessor creates a push event processor with an optional configuration and attaches a Controller controller to it.
func NewS3UploaderPostProcessor ¶
func NewS3UploaderPostProcessor(awsController *aws.Controller, opts ...Option) Processor
NewS3UploaderPostProcessor constructs a Processor instance for handling S3 upload post-processing with optional configurations.
func NewStatusEventProcessor ¶
func NewStatusEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
NewStatusEventProcessor constructs a Processor instance for handling Controller status events with optional configurations.
func NewWorkflowRunEventProcessor ¶
func NewWorkflowRunEventProcessor(githubController *internalGitHub.Controller, opts ...Option) Processor
NewWorkflowRunEventProcessor initializes a Processor for handling workflow run events with optional configurations.