Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Authenticate(email, password string, opts ...RequestOption) (token string, err error)
- func (c *Client) Commit(branch, message, authorEmail, authorName string, file io.Reader, ...) (cr *payload.CommitResponse, err error)
- func (c *Client) Diff(sum1, sum2 []byte, opts ...RequestOption) (dr *payload.DiffResponse, err error)
- func (c *Client) ErrHTTP(resp *http.Response) error
- func (c *Client) GetBlocks(sum []byte, start, end int, format payload.BlockFormat, opts ...RequestOption) (resp *http.Response, err error)
- func (c *Client) GetCommit(sum []byte, opts ...RequestOption) (cr *payload.Commit, err error)
- func (c *Client) GetCommits(ref string, minDepth, maxDepth int, opts ...RequestOption) (gcr *payload.GetCommitsResponse, err error)
- func (c *Client) GetConfig(opts ...RequestOption) (cfg *conf.Config, err error)
- func (c *Client) GetHead(branch string, opts ...RequestOption) (com *payload.Commit, err error)
- func (c *Client) GetRefs(opts ...RequestOption) (m map[string][]byte, err error)
- func (c *Client) GetRows(sum []byte, 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) PostMultipartForm(path string, value map[string][]string, files map[string]io.Reader, ...) (*http.Response, error)
- func (c *Client) PostUpdatesToReceivePack(updates map[string]*payload.Update, opts ...RequestOption) (*http.Response, error)
- func (c *Client) PostUploadPack(wants, haves [][]byte, done bool, opts ...RequestOption) (acks [][]byte, pr *encoding.PackfileReader, err error)
- func (c *Client) PutConfig(cfg *conf.Config, opts ...RequestOption) (resp *http.Response, err error)
- func (c *Client) Request(method, path string, body io.Reader, headers map[string]string, ...) (resp *http.Response, err error)
- type HTTPError
- type ReceivePackSession
- type RequestOption
- type UploadPackSession
Constants ¶
View Source
const ( CTJSON = "application/json" CTPackfile = "application/x-wrgl-packfile" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Authenticate ¶ added in v0.4.0
func (c *Client) Authenticate(email, password string, opts ...RequestOption) (token string, err error)
func (*Client) Commit ¶ added in v0.3.11
func (c *Client) Commit(branch, message, authorEmail, authorName string, file io.Reader, primaryKey []string, opts ...RequestOption) (cr *payload.CommitResponse, err error)
func (*Client) Diff ¶ added in v0.3.11
func (c *Client) Diff(sum1, sum2 []byte, opts ...RequestOption) (dr *payload.DiffResponse, err error)
func (*Client) GetBlocks ¶ added in v0.3.11
func (c *Client) GetBlocks(sum []byte, start, end int, format payload.BlockFormat, opts ...RequestOption) (resp *http.Response, err error)
func (*Client) GetCommits ¶ added in v0.4.0
func (c *Client) GetCommits(ref string, minDepth, maxDepth int, opts ...RequestOption) (gcr *payload.GetCommitsResponse, err error)
func (*Client) GetConfig ¶ added in v0.4.8
func (c *Client) GetConfig(opts ...RequestOption) (cfg *conf.Config, err error)
func (*Client) GetRefs ¶
func (c *Client) GetRefs(opts ...RequestOption) (m map[string][]byte, err error)
func (*Client) GetTable ¶ added in v0.3.11
func (c *Client) GetTable(sum []byte, opts ...RequestOption) (tr *payload.GetTableResponse, err error)
func (*Client) PostMultipartForm ¶ added in v0.3.11
func (*Client) PostUpdatesToReceivePack ¶
func (*Client) PostUploadPack ¶
func (c *Client) PostUploadPack(wants, haves [][]byte, done bool, opts ...RequestOption) (acks [][]byte, pr *encoding.PackfileReader, err error)
type HTTPError ¶ added in v0.4.0
func NewHTTPError ¶ added in v0.4.0
type ReceivePackSession ¶
type ReceivePackSession struct {
// contains filtered or unexported fields
}
func NewReceivePackSession ¶
type RequestOption ¶ added in v0.3.12
func WithAuthorization ¶ added in v0.4.0
func WithAuthorization(token string) RequestOption
func WithHeader ¶ added in v0.3.12
func WithHeader(header http.Header) RequestOption
type UploadPackSession ¶
type UploadPackSession struct {
// contains filtered or unexported fields
}
func NewUploadPackSession ¶
func NewUploadPackSession(db objects.Store, rs ref.Store, c *Client, advertised [][]byte, havesPerRoundTrip int, opts ...RequestOption) (*UploadPackSession, error)
func (*UploadPackSession) Start ¶
func (n *UploadPackSession) Start() ([][]byte, error)
Click to show internal directories.
Click to hide internal directories.