diff options
author | Mura Li <typeless@users.noreply.github.com> | 2019-03-27 19:15:23 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-03-27 19:15:23 +0800 |
commit | d77176912bccf1dc0ad93366df55f00fee23b498 (patch) | |
tree | 309fc6350f77f4061360160b88343360d45d5d24 /vendor/github.com/lafriks | |
parent | d578b71d61ee8131e8abf7f538b93d8c6cc6fe6d (diff) | |
download | gitea-d77176912bccf1dc0ad93366df55f00fee23b498.tar.gz gitea-d77176912bccf1dc0ad93366df55f00fee23b498.zip |
Use Go1.11 module (#5743)
* Migrate to go modules
* make vendor
* Update mvdan.cc/xurls
* make vendor
* Update code.gitea.io/git
* make fmt-check
* Update github.com/go-sql-driver/mysql
* make vendor
Diffstat (limited to 'vendor/github.com/lafriks')
-rw-r--r-- | vendor/github.com/lafriks/xormstore/.gitignore | 3 | ||||
-rw-r--r-- | vendor/github.com/lafriks/xormstore/.travis.yml | 19 | ||||
-rw-r--r-- | vendor/github.com/lafriks/xormstore/Gopkg.lock | 75 | ||||
-rw-r--r-- | vendor/github.com/lafriks/xormstore/Gopkg.toml | 50 | ||||
-rw-r--r-- | vendor/github.com/lafriks/xormstore/README.md | 48 | ||||
-rw-r--r-- | vendor/github.com/lafriks/xormstore/test | 70 |
6 files changed, 265 insertions, 0 deletions
diff --git a/vendor/github.com/lafriks/xormstore/.gitignore b/vendor/github.com/lafriks/xormstore/.gitignore new file mode 100644 index 0000000000..862a81f5f9 --- /dev/null +++ b/vendor/github.com/lafriks/xormstore/.gitignore @@ -0,0 +1,3 @@ +vendor/ +debug.test +coverage.txt
\ No newline at end of file diff --git a/vendor/github.com/lafriks/xormstore/.travis.yml b/vendor/github.com/lafriks/xormstore/.travis.yml new file mode 100644 index 0000000000..9b46d82a65 --- /dev/null +++ b/vendor/github.com/lafriks/xormstore/.travis.yml @@ -0,0 +1,19 @@ +sudo: required +services: + - docker + +branches: + only: + - master + +language: go +go: + - "tip" + - "1.8" + - "1.9" + - "1.10" + +script: ./test + +after_success: + - bash <(curl -s https://codecov.io/bash)
\ No newline at end of file diff --git a/vendor/github.com/lafriks/xormstore/Gopkg.lock b/vendor/github.com/lafriks/xormstore/Gopkg.lock new file mode 100644 index 0000000000..0d2cf03cba --- /dev/null +++ b/vendor/github.com/lafriks/xormstore/Gopkg.lock @@ -0,0 +1,75 @@ +# 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 diff --git a/vendor/github.com/lafriks/xormstore/Gopkg.toml b/vendor/github.com/lafriks/xormstore/Gopkg.toml new file mode 100644 index 0000000000..ea71d50eaf --- /dev/null +++ b/vendor/github.com/lafriks/xormstore/Gopkg.toml @@ -0,0 +1,50 @@ + +# 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" diff --git a/vendor/github.com/lafriks/xormstore/README.md b/vendor/github.com/lafriks/xormstore/README.md new file mode 100644 index 0000000000..361c5871fc --- /dev/null +++ b/vendor/github.com/lafriks/xormstore/README.md @@ -0,0 +1,48 @@ +[![GoDoc](https://godoc.org/github.com/lafriks/xormstore?status.svg)](https://godoc.org/github.com/lafriks/xormstore) +[![Build Status](https://travis-ci.org/lafriks/xormstore.svg?branch=master)](https://travis-ci.org/lafriks/xormstore) +[![codecov](https://codecov.io/gh/lafriks/xormstore/branch/master/graph/badge.svg)](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. diff --git a/vendor/github.com/lafriks/xormstore/test b/vendor/github.com/lafriks/xormstore/test new file mode 100644 index 0000000000..4b06eae4e7 --- /dev/null +++ b/vendor/github.com/lafriks/xormstore/test @@ -0,0 +1,70 @@ +#!/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 |