1package hooks23import (4 "context"5 "io"6)78// HookArg is an argument to a git hook.9type HookArg struct {10 OldSha string11 NewSha string12 RefName string13}1415// Hooks provides an interface for git server-side hooks.16type Hooks interface {17 PreReceive(ctx context.Context, stdout io.Writer, stderr io.Writer, repo string, args []HookArg)18 Update(ctx context.Context, stdout io.Writer, stderr io.Writer, repo string, arg HookArg)19 PostReceive(ctx context.Context, stdout io.Writer, stderr io.Writer, repo string, args []HookArg)20 PostUpdate(ctx context.Context, stdout io.Writer, stderr io.Writer, repo string, args ...string)21}