087db1de70
Since we're about to do a v3.0.0 release, let's bump the version to v3. Make this change automatically with the following command to avoid any missed items: git grep -l github.com/git-lfs/git-lfs/v2 | \ xargs sed -i -e 's!github.com/git-lfs/git-lfs/v2!github.com/git-lfs/git-lfs/v3!g'
56 lines
1.5 KiB
Go
56 lines
1.5 KiB
Go
package lfsapi
|
|
|
|
import (
|
|
"io"
|
|
"net/http"
|
|
|
|
"github.com/git-lfs/git-lfs/v3/config"
|
|
"github.com/git-lfs/git-lfs/v3/creds"
|
|
"github.com/git-lfs/git-lfs/v3/lfshttp"
|
|
)
|
|
|
|
func (c *Client) NewRequest(method string, e lfshttp.Endpoint, suffix string, body interface{}) (*http.Request, error) {
|
|
return c.client.NewRequest(method, e, suffix, body)
|
|
}
|
|
|
|
// Do sends an HTTP request to get an HTTP response. It wraps net/http, adding
|
|
// extra headers, redirection handling, and error reporting.
|
|
func (c *Client) Do(req *http.Request) (*http.Response, error) {
|
|
return c.client.Do(req)
|
|
}
|
|
|
|
// do performs an *http.Request respecting redirects, and handles the response
|
|
// as defined in c.handleResponse. Notably, it does not alter the headers for
|
|
// the request argument in any way.
|
|
func (c *Client) do(req *http.Request, remote string, via []*http.Request) (*http.Response, error) {
|
|
return c.client.Do(req)
|
|
}
|
|
|
|
func (c *Client) doWithAccess(req *http.Request, remote string, via []*http.Request, mode creds.AccessMode) (*http.Response, error) {
|
|
return c.client.DoWithAccess(req, mode)
|
|
}
|
|
|
|
func (c *Client) LogRequest(r *http.Request, reqKey string) *http.Request {
|
|
return c.client.LogRequest(r, reqKey)
|
|
}
|
|
|
|
func (c *Client) GitEnv() config.Environment {
|
|
return c.client.GitEnv()
|
|
}
|
|
|
|
func (c *Client) OSEnv() config.Environment {
|
|
return c.client.OSEnv()
|
|
}
|
|
|
|
func (c *Client) ConcurrentTransfers() int {
|
|
return c.client.ConcurrentTransfers
|
|
}
|
|
|
|
func (c *Client) LogHTTPStats(w io.WriteCloser) {
|
|
c.client.LogHTTPStats(w)
|
|
}
|
|
|
|
func (c *Client) Close() error {
|
|
return c.client.Close()
|
|
}
|