forked from forgejo/forgejo
Migrate to dep (#3972)
* Update makefile to use dep * Migrate to dep * Fix some deps * Try to find a better version for golang.org/x/net * Try to find a better version for golang.org/x/oauth2
This commit is contained in:
parent
d7fd9bf7bb
commit
3f3383dc0a
281 changed files with 12024 additions and 32676 deletions
75
vendor/github.com/lafriks/xormstore/Gopkg.lock
generated
vendored
75
vendor/github.com/lafriks/xormstore/Gopkg.lock
generated
vendored
|
@ -1,75 +0,0 @@
|
|||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/denisenkom/go-mssqldb"
|
||||
packages = ["."]
|
||||
revision = "ee492709d4324cdcb051d2ac266b77ddc380f5c5"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/go-sql-driver/mysql"
|
||||
packages = ["."]
|
||||
revision = "a0583e0143b1624142adab07e0e97fe106d99561"
|
||||
version = "v1.3"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/go-xorm/builder"
|
||||
packages = ["."]
|
||||
revision = "488224409dd8aa2ce7a5baf8d10d55764a913738"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/go-xorm/core"
|
||||
packages = ["."]
|
||||
revision = "da1adaf7a28ca792961721a34e6e04945200c890"
|
||||
version = "v0.5.7"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/go-xorm/xorm"
|
||||
packages = ["."]
|
||||
revision = "1933dd69e294c0a26c0266637067f24dbb25770c"
|
||||
version = "v0.6.4"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/gorilla/context"
|
||||
packages = ["."]
|
||||
revision = "1ea25387ff6f684839d82767c1733ff4d4d15d0a"
|
||||
version = "v1.1"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/gorilla/securecookie"
|
||||
packages = ["."]
|
||||
revision = "e59506cc896acb7f7bf732d4fdf5e25f7ccd8983"
|
||||
version = "v1.1.1"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/gorilla/sessions"
|
||||
packages = ["."]
|
||||
revision = "ca9ada44574153444b00d3fd9c8559e4cc95f896"
|
||||
version = "v1.1"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "github.com/lib/pq"
|
||||
packages = [".","oid"]
|
||||
revision = "88edab0803230a3898347e77b474f8c1820a1f20"
|
||||
|
||||
[[projects]]
|
||||
name = "github.com/mattn/go-sqlite3"
|
||||
packages = ["."]
|
||||
revision = "6c771bb9887719704b210e87e934f08be014bdb1"
|
||||
version = "v1.6.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/crypto"
|
||||
packages = ["md4"]
|
||||
revision = "c7dcf104e3a7a1417abc0230cb0d5240d764159d"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
inputs-digest = "bba98a94e8c6668ae9556b4978bbffdfc5d4d535d522c8865465335bfaa2fc70"
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
50
vendor/github.com/lafriks/xormstore/Gopkg.toml
generated
vendored
50
vendor/github.com/lafriks/xormstore/Gopkg.toml
generated
vendored
|
@ -1,50 +0,0 @@
|
|||
|
||||
# Gopkg.toml example
|
||||
#
|
||||
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
|
||||
# for detailed Gopkg.toml documentation.
|
||||
#
|
||||
# required = ["github.com/user/thing/cmd/thing"]
|
||||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project"
|
||||
# version = "1.0.0"
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project2"
|
||||
# branch = "dev"
|
||||
# source = "github.com/myfork/project2"
|
||||
#
|
||||
# [[override]]
|
||||
# name = "github.com/x/y"
|
||||
# version = "2.4.0"
|
||||
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/go-sql-driver/mysql"
|
||||
version = "1.3.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/go-xorm/xorm"
|
||||
version = "0.6.4"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gorilla/context"
|
||||
version = "1.1.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gorilla/securecookie"
|
||||
version = "1.1.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gorilla/sessions"
|
||||
version = "1.1.0"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/lib/pq"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/mattn/go-sqlite3"
|
||||
version = "1.6.0"
|
48
vendor/github.com/lafriks/xormstore/README.md
generated
vendored
48
vendor/github.com/lafriks/xormstore/README.md
generated
vendored
|
@ -1,48 +0,0 @@
|
|||
[](https://godoc.org/github.com/lafriks/xormstore)
|
||||
[](https://travis-ci.org/lafriks/xormstore)
|
||||
[](https://codecov.io/gh/lafriks/xormstore)
|
||||
|
||||
#### XORM backend for gorilla sessions
|
||||
|
||||
go get github.com/lafriks/xormstore
|
||||
|
||||
#### Example
|
||||
|
||||
```go
|
||||
// initialize and setup cleanup
|
||||
store := xormstore.New(engine, []byte("secret"))
|
||||
// db cleanup every hour
|
||||
// close quit channel to stop cleanup
|
||||
quit := make(chan struct{})
|
||||
go store.PeriodicCleanup(1*time.Hour, quit)
|
||||
```
|
||||
|
||||
```go
|
||||
// in HTTP handler
|
||||
func handlerFunc(w http.ResponseWriter, r *http.Request) {
|
||||
session, err := store.Get(r, "session")
|
||||
session.Values["user_id"] = 123
|
||||
store.Save(r, w, session)
|
||||
http.Error(w, "", http.StatusOK)
|
||||
}
|
||||
```
|
||||
|
||||
For more details see [xormstore godoc documentation](https://godoc.org/github.com/lafriks/xormstore).
|
||||
|
||||
#### Testing
|
||||
|
||||
Just sqlite3 tests:
|
||||
|
||||
go test
|
||||
|
||||
All databases using docker:
|
||||
|
||||
./test
|
||||
|
||||
If docker is not local (docker-machine etc):
|
||||
|
||||
DOCKER_IP=$(docker-machine ip dev) ./test
|
||||
|
||||
#### License
|
||||
|
||||
xormstore is licensed under the MIT license. See [LICENSE](LICENSE) for the full license text.
|
70
vendor/github.com/lafriks/xormstore/test
generated
vendored
70
vendor/github.com/lafriks/xormstore/test
generated
vendored
|
@ -1,70 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
DOCKER_IP=${DOCKER_IP:-127.0.0.1}
|
||||
|
||||
sqlite3() {
|
||||
DATABASE_URI="sqlite3://file:dummy?mode=memory&cache=shared" go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic
|
||||
return $?
|
||||
}
|
||||
|
||||
postgres10() {
|
||||
ID=$(docker run -p 5432 -d postgres:10-alpine)
|
||||
PORT=$(docker port "$ID" 5432 | cut -d : -f 2)
|
||||
DATABASE_URI="postgres://user=postgres password=postgres dbname=postgres host=$DOCKER_IP port=$PORT sslmode=disable" go test -v -race -cover
|
||||
S=$?
|
||||
docker rm -vf "$ID" > /dev/null
|
||||
return $S
|
||||
}
|
||||
|
||||
postgres96() {
|
||||
ID=$(docker run -p 5432 -d postgres:9.6-alpine)
|
||||
PORT=$(docker port "$ID" 5432 | cut -d : -f 2)
|
||||
DATABASE_URI="postgres://user=postgres password=postgres dbname=postgres host=$DOCKER_IP port=$PORT sslmode=disable" go test -v -race -cover
|
||||
S=$?
|
||||
docker rm -vf "$ID" > /dev/null
|
||||
return $S
|
||||
}
|
||||
|
||||
postgres94() {
|
||||
ID=$(docker run -p 5432 -d postgres:9.4-alpine)
|
||||
PORT=$(docker port "$ID" 5432 | cut -d : -f 2)
|
||||
DATABASE_URI="postgres://user=postgres password=postgres dbname=postgres host=$DOCKER_IP port=$PORT sslmode=disable" go test -v -race -cover
|
||||
S=$?
|
||||
docker rm -vf "$ID" > /dev/null
|
||||
return $S
|
||||
}
|
||||
|
||||
mysql57() {
|
||||
ID=$(docker run \
|
||||
-e MYSQL_ROOT_PASSWORD=root \
|
||||
-e MYSQL_USER=mysql \
|
||||
-e MYSQL_PASSWORD=mysql \
|
||||
-e MYSQL_DATABASE=mysql \
|
||||
-p 3306 -d mysql:5.7)
|
||||
PORT=$(docker port "$ID" 3306 | cut -d : -f 2)
|
||||
DATABASE_URI="mysql://mysql:mysql@tcp($DOCKER_IP:$PORT)/mysql?charset=utf8&parseTime=True" go test -v -race -cover
|
||||
S=$?
|
||||
docker rm -vf "$ID" > /dev/null
|
||||
return $S
|
||||
}
|
||||
|
||||
mariadb10() {
|
||||
ID=$(docker run \
|
||||
-e MYSQL_ROOT_PASSWORD=root \
|
||||
-e MYSQL_USER=mysql \
|
||||
-e MYSQL_PASSWORD=mysql \
|
||||
-e MYSQL_DATABASE=mysql \
|
||||
-p 3306 -d mariadb:10)
|
||||
PORT=$(docker port "$ID" 3306 | cut -d : -f 2)
|
||||
DATABASE_URI="mysql://mysql:mysql@tcp($DOCKER_IP:$PORT)/mysql?charset=utf8&parseTime=True" go test -v -race -cover
|
||||
S=$?
|
||||
docker rm -vf "$ID" > /dev/null
|
||||
return $S
|
||||
}
|
||||
|
||||
sqlite3 || exit 1
|
||||
postgres94 || exit 1
|
||||
postgres96 || exit 1
|
||||
postgres10 || exit 1
|
||||
mysql57 || exit 1
|
||||
mariadb10 || exit 1
|
Loading…
Add table
Add a link
Reference in a new issue