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