Documentation ¶
Index ¶
Constants ¶
View Source
const ( SECRET_VALIDATOR_SHA1 string = "SHA-1" SECRET_VALIDATOR_URL_APPEND string = "URL_APPEND" SECRET_VALIDATOR_PLAIN_TEXT string = "PLAIN_TEXT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitWebhookService ¶
type GitWebhookService interface {
HandleGitWebhook(gitWebhookRequest gitSensor.CiPipelineMaterial) (int, error)
}
type GitWebhookServiceImpl ¶
type GitWebhookServiceImpl struct {
// contains filtered or unexported fields
}
func NewGitWebhookServiceImpl ¶
func NewGitWebhookServiceImpl(Logger *zap.SugaredLogger, ciHandler pipeline.CiHandler, gitWebhookRepository repository.GitWebhookRepository) *GitWebhookServiceImpl
func (*GitWebhookServiceImpl) HandleGitWebhook ¶
func (impl *GitWebhookServiceImpl) HandleGitWebhook(gitWebhookRequest gitSensor.CiPipelineMaterial) (int, error)
type WebhookSecretValidator ¶
type WebhookSecretValidatorImpl ¶
type WebhookSecretValidatorImpl struct {
// contains filtered or unexported fields
}
func NewWebhookSecretValidatorImpl ¶
func NewWebhookSecretValidatorImpl(Logger *zap.SugaredLogger) *WebhookSecretValidatorImpl
func (*WebhookSecretValidatorImpl) ValidateSecret ¶
func (impl *WebhookSecretValidatorImpl) ValidateSecret(r *http.Request, secretInUrl string, requestBodyBytes []byte, gitHost *pipeline.GitHostRequest) bool
Validate secret for some predefined algorithms : SHA1, URL_APPEND, PLAIN_TEXT URL_APPEND : Secret will come in URL (last path param of URL) PLAIN_TEXT : Plain text value in request header SHA1 : SHA1 encrypted text in request header
Click to show internal directories.
Click to hide internal directories.