Documentation ¶
Index ¶
- Constants
- func ExtractTicketFrom401(resp *http.Response) (asUri, ticket string)
- func FindRemoteFor(db objects.Store, rs ref.Store, sum []byte) (string, error)
- func IsHTTPError(err error, statusCode int, message string) bool
- type Client
- func (c *Client) Commit(branch, message, fileName string, file io.Reader, primaryKey []string, ...) (cr *payload.CommitResponse, err error)
- func (c *Client) CommitTransaction(id uuid.UUID, opts ...RequestOption) (resp *http.Response, err error)
- func (c *Client) CreateTransaction(req *payload.CreateTransactionRequest, opts ...RequestOption) (ctr *payload.CreateTransactionResponse, err error)
- func (c *Client) Diff(sum1, sum2 []byte, opts ...RequestOption) (dr *payload.DiffResponse, err error)
- func (c *Client) DiscardTransaction(id uuid.UUID, opts ...RequestOption) (resp *http.Response, err error)
- func (c *Client) ErrHTTP(resp *http.Response) error
- func (c *Client) GarbageCollect(opts ...RequestOption) (resp *http.Response, err error)
- func (c *Client) GetBlocks(commit string, start, end int, format payload.BlockFormat, columns bool, ...) (resp *http.Response, err error)
- func (c *Client) GetCommit(sum []byte, opts ...RequestOption) (cr *payload.Commit, err error)
- func (c *Client) GetCommitProfile(sum []byte, opts ...RequestOption) (tblProf *objects.TableProfile, err error)
- func (c *Client) GetCommits(head string, maxDepth int, opts ...RequestOption) (gcr *payload.GetCommitsResponse, err error)
- func (c *Client) GetHead(branch string, opts ...RequestOption) (com *payload.Commit, err error)
- func (c *Client) GetObjects(tables [][]byte, opts ...RequestOption) (pr *packfile.PackfileReader, err error)
- func (c *Client) GetRefs(prefixes, notPrefixes []string, opts ...RequestOption) (m map[string][]byte, err error)
- func (c *Client) GetRows(commit string, offsets []int, opts ...RequestOption) (resp *http.Response, err error)
- func (c *Client) GetTable(sum []byte, opts ...RequestOption) (tr *payload.GetTableResponse, err error)
- func (c *Client) GetTableBlocks(sum []byte, start, end int, format payload.BlockFormat, columns bool, ...) (resp *http.Response, err error)
- func (c *Client) GetTableProfile(sum []byte, opts ...RequestOption) (tblProf *objects.TableProfile, err error)
- func (c *Client) GetTableRows(sum []byte, offsets []int, opts ...RequestOption) (resp *http.Response, err error)
- func (c *Client) GetTransaction(id uuid.UUID, opts ...RequestOption) (gtr *payload.GetTransactionResponse, err error)
- func (c *Client) JsonRequest(method, path string, req any, opts ...RequestOption) (*http.Response, error)
- func (c *Client) PostMultipartForm(path string, value map[string][]string, files map[string]formFile, ...) (*http.Response, error)
- func (c *Client) PostReceivePack(updates map[string]*payload.Update, tableHaves [][]byte, opts ...RequestOption) (*http.Response, error)
- func (c *Client) PostUploadPack(req *payload.UploadPackRequest, opts ...RequestOption) (upr *payload.UploadPackResponse, pr *packfile.PackfileReader, err error)
- func (c *Client) Request(method, path string, body *ReplayableBuffer, headers map[string]string, ...) (resp *http.Response, err error)
- func (c *Client) ResetCookies() (err error)
- type ClientOption
- func WithCookies(cookies []*http.Cookie) ClientOption
- func WithForceAuthenticate() ClientOption
- func WithHeader(header http.Header) ClientOption
- func WithRelyingPartyToken(rpt string) ClientOption
- func WithTransport(transport http.RoundTripper) ClientOption
- func WithUMATicketHandler(...) ClientOption
- type ErrUnauthorized
- type HTTPError
- type ReceivePackSession
- type RemoteFinder
- type ReplayableBuffer
- func (b *ReplayableBuffer) Close() error
- func (b *ReplayableBuffer) Len() int64
- func (b *ReplayableBuffer) Read(p []byte) (n int, err error)
- func (b *ReplayableBuffer) Reset()
- func (b *ReplayableBuffer) Seek(offset int64, whence int) (int64, error)
- func (b *ReplayableBuffer) Write(p []byte) (n int, err error)
- type RequestOption
- type ShallowCommitError
- type UploadPackOption
- func WithUploadPackDepth(n int) UploadPackOption
- func WithUploadPackHavesPerRoundTrip(n int) UploadPackOption
- func WithUploadPackProgressBar(bar pbar.Bar) UploadPackOption
- func WithUploadPackReceiverOptions(opts ...apiutils.ObjectReceiveOption) UploadPackOption
- func WithUploadPackRequestOptions(opts ...RequestOption) UploadPackOption
- type UploadPackSession
Constants ¶
View Source
const ( CTJSON = "application/json" CTPackfile = "application/x-wrgl-packfile" )
Variables ¶
This section is empty.
Functions ¶
func ExtractTicketFrom401 ¶ added in v0.13.4
func FindRemoteFor ¶ added in v0.10.4
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CommitTransaction ¶ added in v0.10.1
func (*Client) CreateTransaction ¶ added in v0.10.1
func (c *Client) CreateTransaction(req *payload.CreateTransactionRequest, opts ...RequestOption) (ctr *payload.CreateTransactionResponse, err error)
func (*Client) Diff ¶
func (c *Client) Diff(sum1, sum2 []byte, opts ...RequestOption) (dr *payload.DiffResponse, err error)
func (*Client) DiscardTransaction ¶ added in v0.10.1
func (*Client) GarbageCollect ¶ added in v0.10.1
func (c *Client) GarbageCollect(opts ...RequestOption) (resp *http.Response, err error)
func (*Client) GetBlocks ¶
func (c *Client) GetBlocks(commit string, start, end int, format payload.BlockFormat, columns bool, opts ...RequestOption) (resp *http.Response, err error)
func (*Client) GetCommitProfile ¶ added in v0.8.0
func (c *Client) GetCommitProfile(sum []byte, opts ...RequestOption) (tblProf *objects.TableProfile, err error)
func (*Client) GetCommits ¶
func (c *Client) GetCommits(head string, maxDepth int, opts ...RequestOption) (gcr *payload.GetCommitsResponse, err error)
func (*Client) GetObjects ¶ added in v0.8.4
func (c *Client) GetObjects(tables [][]byte, opts ...RequestOption) (pr *packfile.PackfileReader, err error)
func (*Client) GetTable ¶
func (c *Client) GetTable(sum []byte, opts ...RequestOption) (tr *payload.GetTableResponse, err error)
func (*Client) GetTableBlocks ¶ added in v0.7.3
func (c *Client) GetTableBlocks(sum []byte, start, end int, format payload.BlockFormat, columns bool, opts ...RequestOption) (resp *http.Response, err error)
func (*Client) GetTableProfile ¶ added in v0.8.0
func (c *Client) GetTableProfile(sum []byte, opts ...RequestOption) (tblProf *objects.TableProfile, err error)
func (*Client) GetTableRows ¶ added in v0.7.3
func (*Client) GetTransaction ¶ added in v0.10.1
func (c *Client) GetTransaction(id uuid.UUID, opts ...RequestOption) (gtr *payload.GetTransactionResponse, err error)
func (*Client) JsonRequest ¶ added in v0.13.0
func (*Client) PostMultipartForm ¶
func (*Client) PostReceivePack ¶ added in v0.11.0
func (*Client) PostUploadPack ¶
func (c *Client) PostUploadPack(req *payload.UploadPackRequest, opts ...RequestOption) (upr *payload.UploadPackResponse, pr *packfile.PackfileReader, err error)
func (*Client) Request ¶
func (c *Client) Request(method, path string, body *ReplayableBuffer, headers map[string]string, opts ...RequestOption) (resp *http.Response, err error)
func (*Client) ResetCookies ¶ added in v0.13.2
type ClientOption ¶ added in v0.7.0
type ClientOption func(c *Client)
func WithCookies ¶
func WithCookies(cookies []*http.Cookie) ClientOption
func WithForceAuthenticate ¶ added in v0.13.0
func WithForceAuthenticate() ClientOption
func WithHeader ¶
func WithHeader(header http.Header) ClientOption
func WithRelyingPartyToken ¶ added in v0.13.0
func WithRelyingPartyToken(rpt string) ClientOption
func WithTransport ¶ added in v0.7.0
func WithTransport(transport http.RoundTripper) ClientOption
func WithUMATicketHandler ¶ added in v0.13.0
type ErrUnauthorized ¶ added in v0.13.0
type ErrUnauthorized struct {}
func (*ErrUnauthorized) Error ¶ added in v0.13.0
func (err *ErrUnauthorized) Error() string
type ReceivePackSession ¶
type ReceivePackSession struct {
// contains filtered or unexported fields
}
func NewReceivePackSession ¶
type RemoteFinder ¶ added in v0.10.4
type RemoteFinder struct {
// contains filtered or unexported fields
}
func NewRemoteFinder ¶ added in v0.10.4
func (*RemoteFinder) Close ¶ added in v0.10.4
func (f *RemoteFinder) Close() error
func (*RemoteFinder) FindRemoteFor ¶ added in v0.10.4
func (f *RemoteFinder) FindRemoteFor(sum []byte) (string, error)
type ReplayableBuffer ¶ added in v0.13.0
type ReplayableBuffer struct {
// contains filtered or unexported fields
}
func NewReplayableBuffer ¶ added in v0.13.0
func NewReplayableBuffer() *ReplayableBuffer
func (*ReplayableBuffer) Close ¶ added in v0.13.0
func (b *ReplayableBuffer) Close() error
func (*ReplayableBuffer) Len ¶ added in v0.13.0
func (b *ReplayableBuffer) Len() int64
func (*ReplayableBuffer) Read ¶ added in v0.13.0
func (b *ReplayableBuffer) Read(p []byte) (n int, err error)
func (*ReplayableBuffer) Reset ¶ added in v0.13.0
func (b *ReplayableBuffer) Reset()
type RequestOption ¶
func WithRequestCookies ¶ added in v0.7.0
func WithRequestCookies(cookies []*http.Cookie) RequestOption
func WithRequestHeader ¶ added in v0.7.0
func WithRequestHeader(header http.Header) RequestOption
func WithRequestProgressBar ¶ added in v0.13.0
func WithRequestProgressBar(barContainer pbar.Container, total int64, message string) RequestOption
type ShallowCommitError ¶ added in v0.8.4
func NewShallowCommitError ¶ added in v0.8.4
func (*ShallowCommitError) CommitSums ¶ added in v0.10.4
func (e *ShallowCommitError) CommitSums() [][]byte
func (*ShallowCommitError) Error ¶ added in v0.8.4
func (e *ShallowCommitError) Error() string
type UploadPackOption ¶ added in v0.11.0
type UploadPackOption func(ses *UploadPackSession)
func WithUploadPackDepth ¶ added in v0.11.0
func WithUploadPackDepth(n int) UploadPackOption
func WithUploadPackHavesPerRoundTrip ¶ added in v0.11.0
func WithUploadPackHavesPerRoundTrip(n int) UploadPackOption
func WithUploadPackProgressBar ¶ added in v0.11.0
func WithUploadPackProgressBar(bar pbar.Bar) UploadPackOption
func WithUploadPackReceiverOptions ¶ added in v0.11.0
func WithUploadPackReceiverOptions(opts ...apiutils.ObjectReceiveOption) UploadPackOption
func WithUploadPackRequestOptions ¶ added in v0.11.0
func WithUploadPackRequestOptions(opts ...RequestOption) UploadPackOption
type UploadPackSession ¶
type UploadPackSession struct {
// contains filtered or unexported fields
}
func NewUploadPackSession ¶
func NewUploadPackSession(db objects.Store, rs ref.Store, c *Client, advertised [][]byte, opts ...UploadPackOption) (*UploadPackSession, error)
func (*UploadPackSession) Start ¶
func (n *UploadPackSession) Start() ([][]byte, error)
Click to show internal directories.
Click to hide internal directories.