Versions in this module Expand all Collapse all v0 v0.2.1 Sep 24, 2020 Changes in this version + const BranchCreateAction + const BranchDeleteAction + const BranchPushAction + const TagCreateAction + const TagDeleteAction + var ErrAlreadyStarted = errors.New("server has already been started") + var ErrNoListener = errors.New("cannot call Serve() before Listen()") + type HookScripts struct + PostReceive string + PreReceive string + Update string type SSH + func (s *SSH) Address() string + func (s *SSH) Listen(bind string) error + func (s *SSH) Serve() error + func (s *SSH) Stop() error v0.2.0 Oct 20, 2018 Changes in this version + const Version + const ZeroSHA + func IsForcePush(hook *HookInfo) (bool, error) + func ReadCommitMessage(sha string) (string, error) + type Config struct + Auth bool + AutoCreate bool + AutoHooks bool + Dir string + GitPath string + GitUser string + Hooks map[string][]byte + KeyDir string + func (c *Config) KeyPath() string + func (c *Config) Setup() error + type Credential struct + Password string + Username string + type GitCommand struct + Command string + Original string + Repo string + func ParseGitCommand(cmd string) (*GitCommand, error) + type HookInfo struct + NewRev string + OldRev string + Ref string + RefName string + RefType string + RepoName string + RepoPath string + func ReadHookInput(input io.Reader) (*HookInfo, error) + func (h *HookInfo) Action() string + type PublicKey struct + Content string + Fingerprint string + Id string + Name string + type Receiver struct + Debug bool + HandlerFunc func(*HookInfo, string) error + MasterOnly bool + TmpDir string + func (r *Receiver) Handle(reader io.Reader) error + type Request struct + RepoName string + RepoPath string + type SSH struct + PublicKeyLookupFunc func(string) (*PublicKey, error) + func NewSSH(config Config) *SSH + func (s *SSH) ListenAndServe(bind string) error + type Server struct + AuthFunc func(Credential, *Request) (bool, error) + func New(cfg Config) *Server + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) + func (s *Server) Setup() error