Documentation
¶
Overview ¶
Package handler provides a generic interface for processing requests using a list of processors.
Index ¶
- type Handler
- type Option
- func WithAuthMode(authMode string) Option
- func WithContext(ctx context.Context) Option
- func WithLambdaPayloadType(payloadType string) Option
- func WithLogger(logger *slog.Logger) Option
- func WithSSMKey(key string) Option
- func WithToken(token string) Option
- func WithWebhookSecret(secret string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the main handler for the promotion app.
func NewPromotionHandler ¶
NewPromotionHandler creates a new promotion handler instance.
func (*Handler) GetLambdaPayloadType ¶
GetLambdaPayloadType returns the lambda payload type.
type Option ¶
type Option func(*Handler)
Option is a functional option for the handler.
func WithAuthMode ¶
WithAuthMode sets the authentication mode for the handler. It is applied as a functional option during initialization.
func WithContext ¶
WithContext sets the context for the handler.
func WithLambdaPayloadType ¶
WithLambdaPayloadType sets the lambda payload type for a Handler instance.
func WithLogger ¶
WithLogger sets the logger instance for the handler.
func WithSSMKey ¶
WithSSMKey sets the SSM key for retrieving credentials and adds it as an option to the handler configuration.
func WithWebhookSecret ¶
WithWebhookSecret configures the handler with a webhook secret for request validation.