api

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

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

func NewBadRequestError(msg string, a ...interface{}) error

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 NewReceivePackSession(db objects.Store, rs ref.Store, c *conf.Config, id uuid.UUID) *ReceivePackSession

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

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 NewUploadPackSession(db objects.Store, rs ref.Store, id uuid.UUID, maxPackfileSize uint64) *UploadPackSession

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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL