Documentation ¶
Index ¶
Constants ¶
const (
// SecretCertsName is name of secret where ca-cert, server-cert, server-key will be stored after generation.
SecretCertsName = "tekton-edp-interceptor-certs"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertData ¶
func NewCertData ¶
type EDPInterceptor ¶
type EDPInterceptor struct {
// contains filtered or unexported fields
}
EDPInterceptor is an interceptor for EDP.
func NewEDPInterceptor ¶
func NewEDPInterceptor( c ctrlClient.Reader, gitHubProcessor event_processor.Processor, gitLabProcessor event_processor.Processor, gerritProcessor event_processor.Processor, l *zap.SugaredLogger, ) *EDPInterceptor
NewEDPInterceptor creates a new EDPInterceptor.
func (*EDPInterceptor) Execute ¶
func (i *EDPInterceptor) Execute(r *http.Request) ([]byte, error)
Execute executes the interceptor.
func (*EDPInterceptor) Process ¶
func (i *EDPInterceptor) Process(ctx context.Context, r *triggersv1.InterceptorRequest) *triggersv1.InterceptorResponse
Process processes the interceptor request.
type EDPInterceptorInterface ¶
EDPInterceptorInterface is an interface for EDPInterceptor.
type Error ¶
Error represents a handler error. It provides methods for an HTTP status code and embeds the built-in error interface.
type HTTPError ¶
HTTPError represents an error with an associated HTTP status code.
type SecretService ¶
type SecretService struct {
// contains filtered or unexported fields
}
func NewSecretService ¶
func NewSecretService(client ctrlClient.Client) *SecretService
func (*SecretService) CreateCertsSecret ¶
func (s *SecretService) CreateCertsSecret( ctx context.Context, namespace, interceptorName string, ) (*CertData, error)
CreateCertsSecret creates and returns a CA certificate and certificate and key for the server. serverKey and serverCert are used by the server to establish trust for clients, CA certificate is used by the client to verify the server authentication chain. Certificates are based on Interceptor spec. After generation all certificates are stored in secret: SecretCertsName.
func (*SecretService) UpdateCABundle ¶
func (s *SecretService) UpdateCABundle( ctx context.Context, namespace, interceptorName string, ca []byte, ) error
UpdateCABundle updates Interceptor CaBundle spec with CA certificate.