Documentation ¶
Index ¶
- Constants
- Variables
- func NewBadRequestError(msg string, a ...interface{}) error
- type BadRequestError
- type CommitHandler
- type DiffHandler
- type GetBlocksHandler
- type GetCommitHandler
- type GetRefsHandler
- type GetRowsHandler
- type GetTableHandler
- type ReceivePackHandler
- type ReceivePackSession
- type ReceivePackSessionMap
- type ReceivePackSessionStore
- type UploadPackHandler
- type UploadPackSession
- type UploadPackSessionMap
- type UploadPackSessionStore
Constants ¶
View Source
const ( CTCSV = "text/csv" CTBlocksBinary = "application/x-wrgl-blocks-binary" )
View Source
const ( CTUploadPackResult = "application/x-wrgl-upload-pack-result" CTPackfile = "application/x-wrgl-packfile" )
View Source
const (
CTReceivePackResult = "application/x-wrgl-receive-pack-result"
)
View Source
const PathCommit = "/commits/"
View Source
const PathReceivePack = "/receive-pack/"
View Source
const PathRefs = "/refs/"
View Source
const PathUploadPack = "/upload-pack/"
Variables ¶
View Source
var CTJSON = "application/json"
Functions ¶
func NewBadRequestError ¶
Types ¶
type BadRequestError ¶
type BadRequestError struct {
Message string
}
func (*BadRequestError) Error ¶
func (e *BadRequestError) Error() string
type CommitHandler ¶
type CommitHandler struct {
// contains filtered or unexported fields
}
func NewCommitHandler ¶
func NewCommitHandler(db objects.Store, rs ref.Store) *CommitHandler
func (*CommitHandler) ServeHTTP ¶
func (h *CommitHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type DiffHandler ¶
type DiffHandler struct {
// contains filtered or unexported fields
}
func NewDiffHandler ¶
func NewDiffHandler(db objects.Store) *DiffHandler
func (*DiffHandler) ServeHTTP ¶
func (h *DiffHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetBlocksHandler ¶
type GetBlocksHandler struct {
// contains filtered or unexported fields
}
func NewGetBlocksHandler ¶
func NewGetBlocksHandler(db objects.Store) *GetBlocksHandler
func (*GetBlocksHandler) ServeHTTP ¶
func (h *GetBlocksHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetCommitHandler ¶
type GetCommitHandler struct {
// contains filtered or unexported fields
}
func NewGetCommitHandler ¶
func NewGetCommitHandler(db objects.Store) *GetCommitHandler
func (*GetCommitHandler) ServeHTTP ¶
func (h *GetCommitHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetRefsHandler ¶
type GetRefsHandler struct {
// contains filtered or unexported fields
}
func NewGetRefsHandler ¶
func NewGetRefsHandler(rs ref.Store) *GetRefsHandler
func (*GetRefsHandler) ServeHTTP ¶
func (h *GetRefsHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetRowsHandler ¶
type GetRowsHandler struct {
// contains filtered or unexported fields
}
func NewGetRowsHandler ¶
func NewGetRowsHandler(db objects.Store) *GetRowsHandler
func (*GetRowsHandler) ServeHTTP ¶
func (h *GetRowsHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetTableHandler ¶
type GetTableHandler struct {
// contains filtered or unexported fields
}
func NewGetTableHandler ¶
func NewGetTableHandler(db objects.Store) *GetTableHandler
func (*GetTableHandler) ServeHTTP ¶
func (h *GetTableHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type ReceivePackHandler ¶
type ReceivePackHandler struct {
// contains filtered or unexported fields
}
func NewReceivePackHandler ¶
func NewReceivePackHandler(db objects.Store, rs ref.Store, c *conf.Config, sessions ReceivePackSessionStore) *ReceivePackHandler
func (*ReceivePackHandler) ServeHTTP ¶
func (h *ReceivePackHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
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 ¶ added in v0.3.1
type ReceivePackSessionMap struct {
// contains filtered or unexported fields
}
func NewReceivePackSessionMap ¶ added in v0.3.1
func NewReceivePackSessionMap() *ReceivePackSessionMap
func (*ReceivePackSessionMap) Delete ¶ added in v0.3.1
func (m *ReceivePackSessionMap) Delete(sid uuid.UUID)
func (*ReceivePackSessionMap) Get ¶ added in v0.3.1
func (m *ReceivePackSessionMap) Get(sid uuid.UUID) (ses *ReceivePackSession, ok bool)
func (*ReceivePackSessionMap) Set ¶ added in v0.3.1
func (m *ReceivePackSessionMap) Set(sid uuid.UUID, ses *ReceivePackSession)
type ReceivePackSessionStore ¶ added in v0.3.1
type ReceivePackSessionStore interface { Set(sid uuid.UUID, ses *ReceivePackSession) Get(sid uuid.UUID) (ses *ReceivePackSession, ok bool) Delete(sid uuid.UUID) }
type UploadPackHandler ¶
type UploadPackHandler struct {
// contains filtered or unexported fields
}
func NewUploadPackHandler ¶
func NewUploadPackHandler(db objects.Store, rs ref.Store, sessions UploadPackSessionStore, maxPackfileSize uint64) *UploadPackHandler
func (*UploadPackHandler) ServeHTTP ¶
func (h *UploadPackHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
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 ¶ added in v0.3.1
type UploadPackSessionMap struct {
// contains filtered or unexported fields
}
func NewUploadPackSessionMap ¶ added in v0.3.1
func NewUploadPackSessionMap() *UploadPackSessionMap
func (*UploadPackSessionMap) Delete ¶ added in v0.3.1
func (m *UploadPackSessionMap) Delete(sid uuid.UUID)
func (*UploadPackSessionMap) Get ¶ added in v0.3.1
func (m *UploadPackSessionMap) Get(sid uuid.UUID) (ses *UploadPackSession, ok bool)
func (*UploadPackSessionMap) Set ¶ added in v0.3.1
func (m *UploadPackSessionMap) Set(sid uuid.UUID, ses *UploadPackSession)
type UploadPackSessionStore ¶ added in v0.3.1
type UploadPackSessionStore interface { Set(sid uuid.UUID, ses *UploadPackSession) Get(sid uuid.UUID) (ses *UploadPackSession, ok bool) Delete(sid uuid.UUID) }
Source Files ¶
- commit_handler.go
- diff_handler.go
- errors.go
- get_blocks_handler.go
- get_commit_handler.go
- get_refs_handler.go
- get_rows_handler.go
- get_table_handler.go
- receive_pack_handler.go
- receive_pack_session.go
- receive_pack_session_map.go
- response.go
- upload_pack_handler.go
- upload_pack_session.go
- upload_pack_session_map.go
Click to show internal directories.
Click to hide internal directories.