Documentation ¶
Overview ¶
Package gitreceive handles 'smart' Git HTTP requests for Pebblescape in a net/http compatible way. Derived from https://gitlab.com/gitlab-org/gitlab-git-http-server.
Index ¶
Constants ¶
View Source
const PrereceiveHookTmpl = `` /* 464-byte string literal not displayed */
PrereceiveHookTmpl is the template for the pre-receive hook that is created in the git repo on every push.
Variables ¶
View Source
var GitServices = [...]gitService{
{"GET", "/info/refs", handleGetInfoRefs, ""},
{"POST", "/git-upload-pack", handlePostRPC, "git-upload-pack"},
{"POST", "/git-receive-pack", handlePostRPC, "git-receive-pack"},
}
GitServices speficies all paths this handler processes.
Functions ¶
This section is empty.
Types ¶
type GitHandler ¶
type GitHandler struct {
// contains filtered or unexported fields
}
GitHandler holds the configuration for a Git HTTP handler.
func NewGitHandler ¶
func NewGitHandler(repoRoot, cachePath string) *GitHandler
NewGitHandler returns a new net/http compatible handler.
func (*GitHandler) ServeHTTP ¶
func (h *GitHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.