Commit Graph

20 Commits

Author SHA1 Message Date
Chris Darroch
dd8e306e31 all: update go.mod module path with explicit v2
When our go.mod file was introduced in commit
114e85c2002091eb415040923d872f8e4a4bc636 in PR #3208, the module
path chosen did not include a trailing /v2 component.  However,
the Go modules specification now advises that module paths must
have a "major version suffix" which matches the release version.

We therefore add a /v2 suffix to our module path and all its
instances in import paths.

See also https://golang.org/ref/mod#major-version-suffixes for
details regarding the Go module system's major version suffix rule.
2021-08-09 23:18:38 -07:00
brian m. carlson
73b33753c0
locking: use an interface for lock client
Right now, all of our locking happens over HTTP.  However, in the
future, we'll add support for a pure SSH-based protocol, and we'll want
to use a different concrete implementation, so let's make our lockClient
an interface and switch the concrete implementation to httpLockClient.
2021-07-20 19:15:59 +00:00
brian m. carlson
a0998e88ba
locking: return status code instead of HTTP response
Currently the only thing we use in the http.Response object we return
from our locking code is the status code, and in many cases, we don't
even use that.  In the future, we'll add support for a pure SSH-based
protocol in the locking client and that code won't generate an HTTP
response, although it will generate an HTTP-equivalent status code, so
updating the API makes it possible for us to abstract the underlying
transport away.

While we're at it, let's rename the variable to "status" in the tests
for ease of reading.
2021-07-20 19:15:59 +00:00
Marc Strapetz
f7c0a5c80b locking: rename locks.VerifiableLocks to SearchLocksVerifiable
SearchLocks and SearchLocksVerifiable are quite similar; also
API is using struct names like "lockVerifiableRequest".
2019-03-19 17:01:29 +01:00
Preben Ingvaldsen
d101bdb605 lfsapi: extract new lfshttp package
Extract more basic http-related functionality out of lfsapi and
into a new package, lfshttp. Everything is currently functional
aside from authorization.
2018-09-11 14:51:29 -07:00
Taylor Blau
2e1cae8ee6 locking: update schemas correctly 2017-12-14 16:27:25 -05:00
rick olson
fb6bd42fcf locking: update api test for ref param 2017-12-07 09:38:55 -07:00
rick olson
257df970f0 locking: teach UnlockFile() and UnlockFileById() to send remote refspec 2017-12-06 16:29:24 -07:00
rick olson
ff2aa7c2c9 lfsapi: add *git.Configuration to Client 2017-10-25 15:38:13 -06:00
rick olson
ec092d0f4f lfsapi: introduce interface for initializing a Client 2017-10-25 15:33:20 -06:00
Taylor Blau
552b955b3f all: expand config.Environment interface to support multiple values per key 2017-04-12 17:29:11 -04:00
risk danger olson
e3215ecbe6 vendor: Update gojsonschema pkg with new IO loaders 2017-02-13 11:35:45 -07:00
risk danger olson
5dd5425a2f locking: verify against son schema 2017-02-10 14:53:17 -07:00
risk danger olson
799439bb7b stop sending committer when creating locks 2017-02-03 09:58:13 -07:00
risk danger olson
e7de4391c0 locking: update to match finalized api docs 2017-02-02 09:54:41 -07:00
risk danger olson
ff09824d97 locking: add SearchVerifiable() api request 2017-01-30 17:21:56 -07:00
risk danger olson
1f83f952fc lfsapi: Ensure requests include Content-Length header if necessary 2017-01-25 08:59:11 -07:00
risk danger olson
c4e7c1af5c lfsapi: rename Env export to TestEnv 2017-01-06 11:34:43 -07:00
risk danger olson
4ae792d0b2 locking: test Accept and Content-Type request headers 2017-01-04 10:35:51 -07:00
risk danger olson
c65e82f70d lfsapi: basic locking client 2017-01-03 13:05:30 -07:00