gitWebhook

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 14 Imported by: 1 module, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, gitWebhookRepository repository.GitWebhookRepository,
	ciHandlerService trigger.HandlerService) *GitWebhookServiceImpl

func (*GitWebhookServiceImpl) HandleGitWebhook

func (impl *GitWebhookServiceImpl) HandleGitWebhook(gitWebhookRequest gitSensor.CiPipelineMaterial) (int, error)

type WebhookSecretValidator

type WebhookSecretValidator interface {
	ValidateSecret(r *http.Request, secretInUrl string, requestBodyBytes []byte, gitHost *bean2.GitHostRequest) bool
}

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 *bean2.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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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