Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPHandler ¶
type HTTPHandler struct {
Webhook *github.Webhook
CommonHandler *httphandleroptions.HTTPHandler
Topic kafkaconsumer.KafkaTopicIdentifier
}
HTTPHandler represents github http handler functionality.
func New ¶
func New(options ...Option) (*HTTPHandler, error)
New instantiates new http handler for github webhook.
func (HTTPHandler) ParseRequestHeaders ¶
func (HTTPHandler) ParseRequestHeaders(h http.Header) *RequestHeaders
ParseRequestHeaders parses incoming http headers and sets header values.
type Handler ¶
type Handler interface {
ParseRequestHeaders(h http.Header) *RequestHeaders
}
Handler defines http handler behaviours.
type Option ¶
type Option func(*HTTPHandler) error
Option represents option function type.
func WithCommonHandler ¶
func WithCommonHandler(h *httphandleroptions.HTTPHandler) Option
WithCommonHandler sets common handler.
func WithTopic ¶
func WithTopic(s kafkaconsumer.KafkaTopicIdentifier) Option
WithTopic sets topic name to consume.
Click to show internal directories.
Click to hide internal directories.