 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
      View Source
      
  const ( TAG = iota + 1 PUSH FETCH PUSH_FORCE )
Possible event types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorNoAccess ¶
type ErrorNoAccess struct {
	// Path to directory of repo accessed
	Dir string
}
    func (*ErrorNoAccess) Error ¶
func (e *ErrorNoAccess) Error() string
type Event ¶
type Event struct {
	// One of tag/push/fetch
	Type EventType `json:"type"`
	// SHA of commit
	Commit string `json:"commit"`
	// Path to bare repo
	Dir string
	////
	// Set for pushes or tagging
	////
	Tag    string `json:"tag,omitempty"`
	Last   string `json:"last,omitempty"`
	Branch string `json:"branch,omitempty"`
	// Error contains the error that happened (if any)
	// during this action/event
	Error error
	// Http stuff
	Request *http.Request
}
    An event (triggered on push/pull)
type GitHttp ¶
type GitHttp struct {
	// Root directory to serve repos from
	ProjectRoot string
	// Path to git binary
	GitBinPath string
	// Access rules
	UploadPack  bool
	ReceivePack bool
	// Event handling functions
	EventHandler func(ev Event)
}
    func (*GitHttp) Init ¶
Build root directory if doesn't exist
type GitReader ¶
type GitReader struct {
	// Underlaying reader (to relay calls to)
	io.ReadCloser
	// Error
	GitError error
}
    GitReader scans for errors in the output of a git command
type HandlerReq ¶
type RpcReader ¶
type RpcReader struct {
	// Underlaying reader (to relay calls to)
	io.ReadCloser
	// Rpc type (upload-pack or receive-pack)
	Rpc string
	// List of events RpcReader has picked up through scanning
	// these events do not contain the "Dir" attribute
	Events []Event
	// contains filtered or unexported fields
}
    RpcReader scans for events in the incoming rpc request data
type Service ¶
type Service struct {
	Method  string
	Handler func(HandlerReq) error
	Rpc     string
}
    
       Source Files
      ¶
      Source Files
      ¶
    
- errors.go
- events.go
- git_reader.go
- githttp.go
- routing.go
- rpc_reader.go
- utils.go
 Click to show internal directories. 
   Click to hide internal directories.