Documentation ¶
Index ¶
- func AuthenticateMiddleware(getAuthnS func(r *http.Request) auth.AuthnStore) func(handler http.Handler) http.Handler
- func AuthorizeMiddleware(getAuthzS func(r *http.Request) auth.AuthzStore, pathPrefix *regexp.Regexp, ...) func(handler http.Handler) http.Handler
- func CommitPayload(com *objects.Commit) *payload.Commit
- func SetClaims(r *http.Request, claims *auth.Claims) *http.Request
- type ReceivePackSession
- type ReceivePackSessionMap
- type ReceivePackSessionStore
- type Server
- type ServerOption
- type UploadPackSession
- type UploadPackSessionMap
- type UploadPackSessionStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateMiddleware ¶ added in v0.4.2
func AuthorizeMiddleware ¶ added in v0.4.2
Types ¶
type ReceivePackSession ¶
type ReceivePackSession struct {
// contains filtered or unexported fields
}
func NewReceivePackSession ¶
func (*ReceivePackSession) ServeHTTP ¶
func (s *ReceivePackSession) ServeHTTP(rw http.ResponseWriter, r *http.Request) bool
ServeHTTP receives, saves objects and update refs, returns true when session is finished and can be removed.
type ReceivePackSessionMap ¶
type ReceivePackSessionMap struct {
// contains filtered or unexported fields
}
func NewReceivePackSessionMap ¶
func NewReceivePackSessionMap() *ReceivePackSessionMap
func (*ReceivePackSessionMap) Delete ¶
func (m *ReceivePackSessionMap) Delete(sid uuid.UUID)
func (*ReceivePackSessionMap) Get ¶
func (m *ReceivePackSessionMap) Get(sid uuid.UUID) (ses *ReceivePackSession, ok bool)
func (*ReceivePackSessionMap) Set ¶
func (m *ReceivePackSessionMap) Set(sid uuid.UUID, ses *ReceivePackSession)
type ReceivePackSessionStore ¶
type ReceivePackSessionStore interface { Set(sid uuid.UUID, ses *ReceivePackSession) Get(sid uuid.UUID) (ses *ReceivePackSession, ok bool) Delete(sid uuid.UUID) }
type Server ¶ added in v0.4.0
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶ added in v0.4.0
func NewServer( rootPath *regexp.Regexp, getAuthnS func(r *http.Request) auth.AuthnStore, getDB func(r *http.Request) objects.Store, getRS func(r *http.Request) ref.Store, getConfS func(r *http.Request) conf.Store, getUpSession func(r *http.Request) UploadPackSessionStore, getRPSession func(r *http.Request) ReceivePackSessionStore, opts ...ServerOption, ) *Server
type ServerOption ¶ added in v0.4.0
type ServerOption func(s *Server)
func WithDebug ¶ added in v0.5.0
func WithDebug(w io.Writer) ServerOption
func WithPostCommitCallback ¶ added in v0.3.16
type UploadPackSession ¶
type UploadPackSession struct {
// contains filtered or unexported fields
}
func NewUploadPackSession ¶
func (*UploadPackSession) ServeHTTP ¶
func (s *UploadPackSession) ServeHTTP(rw http.ResponseWriter, r *http.Request) bool
ServeHTTP negotiates which commits to be sent and send them in one or more packfiles, returns true when this session is completed and should be removed.
type UploadPackSessionMap ¶
type UploadPackSessionMap struct {
// contains filtered or unexported fields
}
func NewUploadPackSessionMap ¶
func NewUploadPackSessionMap() *UploadPackSessionMap
func (*UploadPackSessionMap) Delete ¶
func (m *UploadPackSessionMap) Delete(sid uuid.UUID)
func (*UploadPackSessionMap) Get ¶
func (m *UploadPackSessionMap) Get(sid uuid.UUID) (ses *UploadPackSession, ok bool)
func (*UploadPackSessionMap) Set ¶
func (m *UploadPackSessionMap) Set(sid uuid.UUID, ses *UploadPackSession)
type UploadPackSessionStore ¶
type UploadPackSessionStore interface { Set(sid uuid.UUID, ses *UploadPackSession) Get(sid uuid.UUID) (ses *UploadPackSession, ok bool) Delete(sid uuid.UUID) }
Source Files ¶
- authenticate_handler.go
- commit_handler.go
- diff_handler.go
- get_blocks_handler.go
- get_commit_handler.go
- get_commits_handler.go
- get_config_handler.go
- get_head_handler.go
- get_refs_handler.go
- get_rows_handler.go
- get_table_handler.go
- middlewares.go
- put_config_handler.go
- receive_pack_handler.go
- receive_pack_session.go
- receive_pack_session_map.go
- response.go
- server.go
- upload_pack_handler.go
- upload_pack_session.go
- upload_pack_session_map.go
Click to show internal directories.
Click to hide internal directories.