1package backend
 2
 3import (
 4	"io"
 5)
 6
 7// HookArg is an argument to a git hook.
 8type HookArg struct {
 9	OldSha  string
10	NewSha  string
11	RefName string
12}
13
14// Hooks provides an interface for git server-side hooks.
15type Hooks interface {
16	PreReceive(stdout io.Writer, stderr io.Writer, repo string, args []HookArg)
17	Update(stdout io.Writer, stderr io.Writer, repo string, arg HookArg)
18	PostReceive(stdout io.Writer, stderr io.Writer, repo string, args []HookArg)
19	PostUpdate(stdout io.Writer, stderr io.Writer, repo string, args ...string)
20}