gitreceive

package
v0.0.0-...-b90bf7d Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2015 License: MIT Imports: 14 Imported by: 0

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)

Jump to

Keyboard shortcuts

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