factory

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFilesDeleteHandler

func CreateFilesDeleteHandler(g git.Git) http.Handler

CreateFilesDeleteHandler returns an http.Handler for DELETE /api/v1/files/{path}.

func CreateFilesDispatchHandler added in v0.6.2

func CreateFilesDispatchHandler(getH, listH http.Handler) http.Handler

CreateFilesDispatchHandler returns a handler that routes between get and list.

func CreateFilesGetHandler

func CreateFilesGetHandler(g git.Git) http.Handler

CreateFilesGetHandler returns an http.Handler for GET /api/v1/files/{path}.

func CreateFilesListHandler

func CreateFilesListHandler(g git.Git) http.Handler

CreateFilesListHandler returns an http.Handler for GET /api/v1/files/ with glob query param.

func CreateFilesPostHandler

func CreateFilesPostHandler(g git.Git) http.Handler

CreateFilesPostHandler returns an http.Handler for POST /api/v1/files/{path}.

func CreateGatewaySecretMiddleware added in v0.17.0

func CreateGatewaySecretMiddleware(secret string) func(http.Handler) http.Handler

CreateGatewaySecretMiddleware returns a gorilla mux-compatible middleware that validates X-Gateway-Secret and X-Gateway-Initator request headers. Mount with: subrouter.Use(CreateGatewaySecretMiddleware(secret))

func CreateGitClient added in v0.6.4

func CreateGitClient(
	repoPath string,
	m metrics.Metrics,
	currentDateTimeGetter libtime.CurrentDateTimeGetter,
	sshKeyPath git.SSHKeyPath,
) git.Git

CreateGitClient returns a Git implementation for the given repository path.

func CreateHealthzHandler

func CreateHealthzHandler() http.Handler

CreateHealthzHandler returns an http.Handler for GET /healthz.

func CreateMetricsMiddleware added in v0.6.2

func CreateMetricsMiddleware(m metrics.Metrics, next http.Handler) http.Handler

CreateMetricsMiddleware wraps next with Prometheus HTTP request counting.

func CreateReadinessHandler

func CreateReadinessHandler(g git.Git) http.Handler

CreateReadinessHandler returns an http.Handler for GET /readiness.

Types

This section is empty.

Jump to

Keyboard shortcuts

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