mirror of
https://github.com/gomods/athens
synced 2026-02-03 12:10:32 +00:00
Upgrade Buffalo (#789)
* Upgrade buffalo * Switch to go modules everywhere * Fixes from buffalo fix * Add missing modules from module list * Update vendored modules in /vendor * Stop using vendor directory for tests * Check go.mod and go.sum files on verify * Upgrade Buffalo from v0.13.0 to v0.13.1 * Fix test for new Buffalo Allow for new Buffalo code * Add test for endpoint with trailing slash
This commit is contained in:
committed by
Aaron Schlesinger
parent
ccf59405cf
commit
d26b99d41c
@@ -19,7 +19,7 @@ setup-dev-env:
|
||||
verify:
|
||||
./scripts/check_gofmt.sh
|
||||
./scripts/check_golint.sh
|
||||
# ./scripts/check_deps.sh TODO: comment back when we stop using vendor.
|
||||
./scripts/check_deps.sh
|
||||
./scripts/check_conflicts.sh
|
||||
|
||||
.PHONY: test
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/gobuffalo/buffalo"
|
||||
"github.com/gobuffalo/buffalo/middleware"
|
||||
"github.com/gobuffalo/buffalo/middleware/csrf"
|
||||
"github.com/gobuffalo/buffalo/middleware/ssl"
|
||||
"github.com/gobuffalo/buffalo/render"
|
||||
csrf "github.com/gobuffalo/mw-csrf"
|
||||
forcessl "github.com/gobuffalo/mw-forcessl"
|
||||
paramlogger "github.com/gobuffalo/mw-paramlogger"
|
||||
"github.com/gomods/athens/pkg/config"
|
||||
"github.com/gomods/athens/pkg/log"
|
||||
mw "github.com/gomods/athens/pkg/middleware"
|
||||
@@ -109,13 +109,13 @@ func App(conf *config.Config) (*buffalo.App, error) {
|
||||
}
|
||||
|
||||
// Automatically redirect to SSL
|
||||
app.Use(ssl.ForceSSL(secure.Options{
|
||||
app.Use(forcessl.Middleware(secure.Options{
|
||||
SSLRedirect: conf.Proxy.ForceSSL,
|
||||
SSLProxyHeaders: map[string]string{"X-Forwarded-Proto": "https"},
|
||||
}))
|
||||
|
||||
if ENV == "development" {
|
||||
app.Use(middleware.ParameterLogger)
|
||||
app.Use(paramlogger.ParameterLogger)
|
||||
}
|
||||
|
||||
initializeAuth(app)
|
||||
|
||||
+30
-23
@@ -3,32 +3,39 @@
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"repository": "github.com/gobuffalo/buffalo",
|
||||
"dependencies": {
|
||||
"babel-cli": "~6.26.0",
|
||||
"babel-core": "~6.26.0",
|
||||
"babel-loader": "~7.1.2",
|
||||
"babel-preset-env": "~1.6",
|
||||
"bootstrap": "4",
|
||||
"bootstrap-sass": "~3.3.7",
|
||||
"clean-webpack-plugin": "~0.1.17",
|
||||
"copy-webpack-plugin": "4.5",
|
||||
"css-loader": "~0.28.4",
|
||||
"expose-loader": "~0.7.3",
|
||||
"extract-text-webpack-plugin": "3.0.2",
|
||||
"file-loader": "~1.1.6",
|
||||
"bootstrap": "4.1.3",
|
||||
"popper.js": "^1.14.4",
|
||||
"font-awesome": "~4.7.0",
|
||||
"jquery": "~3.2.1",
|
||||
"jquery-ujs": "~1.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.0.0",
|
||||
"@babel/core": "^7.0.0",
|
||||
"@babel/preset-env": "^7.0.0",
|
||||
"babel-loader": "^8.0.0-beta.6",
|
||||
|
||||
|
||||
"css-loader": "~1.0.0",
|
||||
"expose-loader": "~0.7.5",
|
||||
"file-loader": "~2.0.0",
|
||||
"gopherjs-loader": "^0.0.1",
|
||||
"jquery": "~3.3",
|
||||
"jquery-ujs": "~1.2.2",
|
||||
"node-sass": "~4.7.2",
|
||||
"sass-loader": "~7.1.0",
|
||||
"style-loader": "~0.23.0",
|
||||
"url-loader": "~1.1.1",
|
||||
|
||||
"npm-install-webpack-plugin": "4.0.5",
|
||||
"path": "~0.12.7",
|
||||
"popper.js": "~1.14",
|
||||
"sass-loader": "~6.0.6",
|
||||
"style-loader": "~0.20.1",
|
||||
"uglifyjs-webpack-plugin": "1",
|
||||
"url-loader": "~0.6.2",
|
||||
"webpack": "~3.10.0",
|
||||
"webpack-manifest-plugin": "~1.2.1"
|
||||
"uglifyjs-webpack-plugin": "~1.3.0",
|
||||
"mini-css-extract-plugin": "^0.4.2",
|
||||
"webpack-clean-obsolete-chunks": "^0.4.0",
|
||||
"copy-webpack-plugin": "~4.5.2",
|
||||
|
||||
"webpack": "~4.5.0",
|
||||
"webpack-cli": "3.1.0",
|
||||
"webpack-livereload-plugin":"2.1.1",
|
||||
"webpack-manifest-plugin": "~2.0.0",
|
||||
"node-sass": "~4.9.0"
|
||||
}
|
||||
}
|
||||
|
||||
+77
-83
@@ -1,12 +1,15 @@
|
||||
var webpack = require("webpack");
|
||||
var glob = require("glob");
|
||||
var CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
var ExtractTextPlugin = require("extract-text-webpack-plugin");
|
||||
var ManifestPlugin = require("webpack-manifest-plugin");
|
||||
var PROD = process.env.NODE_ENV || "development";
|
||||
var CleanWebpackPlugin = require("clean-webpack-plugin");
|
||||
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
||||
const Webpack = require("webpack");
|
||||
const Glob = require("glob");
|
||||
const path = require("path");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const ManifestPlugin = require("webpack-manifest-plugin");
|
||||
const CleanObsoleteChunks = require('webpack-clean-obsolete-chunks');
|
||||
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
|
||||
const LiveReloadPlugin = require('webpack-livereload-plugin');
|
||||
|
||||
const configurator = {
|
||||
entries: function(){
|
||||
var entries = {
|
||||
application: [
|
||||
'./node_modules/jquery-ujs/src/rails.js',
|
||||
@@ -14,9 +17,13 @@ var entries = {
|
||||
],
|
||||
}
|
||||
|
||||
glob.sync("./assets/*/*.*").reduce((_, entry) => {
|
||||
let key = entry.replace(/(\.\/assets\/(js|css|go)\/)|\.(js|s[ac]ss|go)/g, '')
|
||||
if(key.startsWith("_") || (/(js|s[ac]ss|go)$/i).test(entry) == false) {
|
||||
Glob.sync("./assets/*/*.*").forEach((entry) => {
|
||||
if (entry === './assets/css/application.scss') {
|
||||
return
|
||||
}
|
||||
|
||||
let key = entry.replace(/(\.\/assets\/(src|js|css|go)\/)|\.(ts|js|s[ac]ss|go)/g, '')
|
||||
if(key.startsWith("_") || (/(ts|js|s[ac]ss|go)$/i).test(entry) == false) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -27,90 +34,77 @@ glob.sync("./assets/*/*.*").reduce((_, entry) => {
|
||||
|
||||
entries[key].push(entry)
|
||||
})
|
||||
return entries
|
||||
},
|
||||
|
||||
module.exports = {
|
||||
entry: entries,
|
||||
output: {
|
||||
filename: "[name].[hash].js",
|
||||
path: `${__dirname}/public/assets`
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin([
|
||||
"public/assets"
|
||||
], {
|
||||
verbose: false,
|
||||
}),
|
||||
new webpack.ProvidePlugin({
|
||||
$: "jquery",
|
||||
jQuery: "jquery"
|
||||
}),
|
||||
new ExtractTextPlugin("[name].[hash].css"),
|
||||
new CopyWebpackPlugin(
|
||||
[{
|
||||
from: "./assets",
|
||||
to: ""
|
||||
}], {
|
||||
copyUnmodified: true,
|
||||
ignore: ["css/**", "js/**"]
|
||||
}
|
||||
),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true,
|
||||
debug: false
|
||||
}),
|
||||
new ManifestPlugin({
|
||||
fileName: "manifest.json"
|
||||
})
|
||||
],
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.jsx?$/,
|
||||
loader: "babel-loader",
|
||||
exclude: /node_modules/
|
||||
plugins() {
|
||||
var plugins = [
|
||||
new CleanObsoleteChunks(),
|
||||
new Webpack.ProvidePlugin({$: "jquery",jQuery: "jquery"}),
|
||||
new MiniCssExtractPlugin({filename: "[name].[contenthash].css"}),
|
||||
new CopyWebpackPlugin([{from: "./assets",to: ""}], {copyUnmodified: true,ignore: ["css/**", "js/**", "src/**"] }),
|
||||
new Webpack.LoaderOptionsPlugin({minimize: true,debug: false}),
|
||||
new ManifestPlugin({fileName: "manifest.json"})
|
||||
];
|
||||
|
||||
return plugins
|
||||
},
|
||||
|
||||
moduleOptions: function() {
|
||||
return {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s[ac]ss$/,
|
||||
use: ExtractTextPlugin.extract({
|
||||
fallback: "style-loader",
|
||||
use: [{
|
||||
loader: "css-loader",
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
},
|
||||
{
|
||||
loader: "sass-loader",
|
||||
options: {
|
||||
sourceMap: true
|
||||
}
|
||||
}
|
||||
use: [
|
||||
MiniCssExtractPlugin.loader,
|
||||
{ loader: "css-loader", options: {sourceMap: true}},
|
||||
{ loader: "sass-loader", options: {sourceMap: true}}
|
||||
]
|
||||
})
|
||||
},
|
||||
{ test: /\.tsx?$/, use: "ts-loader", exclude: /node_modules/},
|
||||
{ test: /\.jsx?$/,loader: "babel-loader",exclude: /node_modules/ },
|
||||
{ test: /\.(woff|woff2|ttf|svg)(\?v=\d+\.\d+\.\d+)?$/,use: "url-loader"},
|
||||
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,use: "file-loader" },
|
||||
{
|
||||
test: require.resolve("jquery"),
|
||||
use: "expose-loader?jQuery!expose-loader?$"
|
||||
},
|
||||
{
|
||||
test: /\.go$/,
|
||||
use: "gopherjs-loader"
|
||||
}
|
||||
{ test: require.resolve("jquery"),use: "expose-loader?jQuery!expose-loader?$"},
|
||||
{ test: /\.go$/, use: "gopherjs-loader"}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
if (PROD != "development") {
|
||||
module.exports.plugins.push(
|
||||
new UglifyJSPlugin({
|
||||
sourceMap: true,
|
||||
uglifyOptions: {
|
||||
mangle: false,
|
||||
output: {
|
||||
beautify: true
|
||||
buildConfig: function(){
|
||||
const env = process.env.NODE_ENV || "development";
|
||||
|
||||
var config = {
|
||||
mode: env,
|
||||
entry: configurator.entries(),
|
||||
output: {filename: "[name].[hash].js", path: `${__dirname}/public/assets`},
|
||||
plugins: configurator.plugins(),
|
||||
module: configurator.moduleOptions(),
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js', '.json']
|
||||
}
|
||||
}
|
||||
|
||||
if( env === "development" ){
|
||||
config.plugins.push(new LiveReloadPlugin({appendScriptTag: true}))
|
||||
return config
|
||||
}
|
||||
|
||||
const uglifier = new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
beautify: false,
|
||||
mangle: {keep_fnames: true},
|
||||
output: {comments: false},
|
||||
compress: {}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
config.optimization = {
|
||||
minimizer: [uglifier]
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = configurator.buildConfig()
|
||||
+2273
-1800
File diff suppressed because it is too large
Load Diff
@@ -5,54 +5,47 @@ require (
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.6.0
|
||||
github.com/Azure/azure-pipeline-go v0.0.0-20180607212504-7571e8eb0876 // indirect
|
||||
github.com/Azure/azure-storage-blob-go v0.0.0-20180727221336-197d1c0aea1b
|
||||
github.com/BurntSushi/toml v0.3.0
|
||||
github.com/BurntSushi/toml v0.3.1
|
||||
github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895 // indirect
|
||||
github.com/DataDog/opencensus-go-exporter-datadog v0.0.0-20180917103902-e6c7f767dc57
|
||||
github.com/aws/aws-sdk-go v1.15.24
|
||||
github.com/codegangsta/negroni v0.3.0 // indirect
|
||||
github.com/fatih/color v1.7.0
|
||||
github.com/globalsign/mgo v0.0.0-20180828104044-6f9f54af1356
|
||||
github.com/go-playground/locales v0.12.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.16.0 // indirect
|
||||
github.com/gobuffalo/buffalo v0.12.6
|
||||
github.com/gobuffalo/envy v1.6.4
|
||||
github.com/gobuffalo/packr v1.13.3 // indirect
|
||||
github.com/gobuffalo/buffalo v0.13.1
|
||||
github.com/gobuffalo/envy v1.6.5
|
||||
github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b
|
||||
github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130
|
||||
github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e
|
||||
github.com/gobuffalo/suite v2.1.6+incompatible
|
||||
github.com/gobuffalo/uuid v2.0.3+incompatible // indirect
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
|
||||
github.com/google/go-cmp v0.2.0
|
||||
github.com/google/martian v2.1.0+incompatible // indirect
|
||||
github.com/googleapis/gax-go v2.0.0+incompatible // indirect
|
||||
github.com/gopherjs/gopherjs v0.0.0-20180825215210-0210a2f0f73c // indirect
|
||||
github.com/hashicorp/go-multierror v1.0.0
|
||||
github.com/hpcloud/tail v1.0.0 // indirect
|
||||
github.com/jtolds/gls v4.2.1+incompatible // indirect
|
||||
github.com/kelseyhightower/envconfig v1.3.0
|
||||
github.com/kr/pretty v0.1.0 // indirect
|
||||
github.com/kr/pty v1.1.3 // indirect
|
||||
github.com/markbates/goth v1.46.0
|
||||
github.com/markbates/grift v1.0.1
|
||||
github.com/markbates/willie v1.0.6
|
||||
github.com/markbates/grift v1.0.4
|
||||
github.com/markbates/willie v1.0.9
|
||||
github.com/minio/minio-go v6.0.5+incompatible
|
||||
github.com/mitchellh/go-homedir v1.0.0
|
||||
github.com/onsi/ginkgo v1.6.0 // indirect
|
||||
github.com/onsi/gomega v1.4.1 // indirect
|
||||
github.com/philhofer/fwd v1.0.0 // indirect
|
||||
github.com/rs/cors v1.5.0
|
||||
github.com/sirupsen/logrus v1.0.6
|
||||
github.com/sirupsen/logrus v1.1.1
|
||||
github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf // indirect
|
||||
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a // indirect
|
||||
github.com/spf13/afero v1.1.1
|
||||
github.com/spf13/afero v1.1.2
|
||||
github.com/stretchr/testify v1.2.2
|
||||
github.com/tinylib/msgp v1.0.2 // indirect
|
||||
github.com/unrolled/secure v0.0.0-20180618144512-8287f3899c8e
|
||||
github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f
|
||||
go.opencensus.io v0.17.0
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
|
||||
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf
|
||||
gopkg.in/DataDog/dd-trace-go.v1 v1.3.0 // indirect
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
|
||||
gopkg.in/fsnotify.v1 v1.4.7 // indirect
|
||||
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
|
||||
gopkg.in/go-playground/validator.v9 v9.20.2
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
)
|
||||
|
||||
@@ -2,39 +2,46 @@ cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ=
|
||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.6.0 h1:U0FQWsZU3aO8W+BrZc88T8fdd24qe3Phawa9V9oaVUE=
|
||||
contrib.go.opencensus.io/exporter/stackdriver v0.6.0/go.mod h1:QeFzMJDAw8TXt5+aRaSuE8l5BwaMIOIlaVkBOPRuMuw=
|
||||
dmitri.shuralyov.com/text/kebabcase v0.0.0-20180217051803-40e40b42552a/go.mod h1:3YpR/7A6nvWHA/oFH66Hp/dJ5A2gM63I3xkA/3FV6tY=
|
||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999 h1:sihTnRgTOUSCQz0iS0pjZuFQy/z7GXCJgSBg3+rZKHw=
|
||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||
github.com/Azure/azure-pipeline-go v0.0.0-20180607212504-7571e8eb0876 h1:3c3mGlhASTJh6H6Ba9EHv2FDSmEUyJuJHR6UD7b+YuE=
|
||||
github.com/Azure/azure-pipeline-go v0.0.0-20180607212504-7571e8eb0876/go.mod h1:XA1kFWRVhSK+KNFiOhfv83Fv8L9achrP7OxIzeTn1Yg=
|
||||
github.com/Azure/azure-storage-blob-go v0.0.0-20180727221336-197d1c0aea1b h1:7cOe9XtL/0qFd/jb0whfm5NoRmhEcVU3bZ65zUZUz54=
|
||||
github.com/Azure/azure-storage-blob-go v0.0.0-20180727221336-197d1c0aea1b/go.mod h1:x2mtS6O3mnMEZOJp7d7oldh8IvatBrMfReiyQ+cKgKY=
|
||||
github.com/BurntSushi/toml v0.3.0 h1:e1/Ivsx3Z0FVTV0NSOv/aVgbUWyQuzj7DDnFblkRvsY=
|
||||
github.com/BurntSushi/toml v0.3.0/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895 h1:dmc/C8bpE5VkQn65PNbbyACDC8xw8Hpp/NEurdPmQDQ=
|
||||
github.com/DataDog/datadog-go v0.0.0-20180822151419-281ae9f2d895/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||
github.com/DataDog/opencensus-go-exporter-datadog v0.0.0-20180917103902-e6c7f767dc57 h1:V1H8VVVxLALfaPLvAFCPoa0AN5nVPAqEu2UvH+QP3Vc=
|
||||
github.com/DataDog/opencensus-go-exporter-datadog v0.0.0-20180917103902-e6c7f767dc57/go.mod h1:gMGUEe16aZh0QN941HgDjwrdjU4iTthPoz2/AtDRADE=
|
||||
github.com/ajg/form v0.0.0-20160802194845-cc2954064ec9 h1:fJ4XPqxuZfm11zauw9XX7c30P8xwDyucdWu8H6Htrxs=
|
||||
github.com/ajg/form v0.0.0-20160802194845-cc2954064ec9/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=
|
||||
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f h1:zvClvFQwU++UpIUBGC8YmDlfhUrweEy1R1Fj1gu5iIM=
|
||||
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/aws/aws-sdk-go v1.15.24 h1:xLAdTA/ore6xdPAljzZRed7IGqQgC+nY+ERS5vaj4Ro=
|
||||
github.com/aws/aws-sdk-go v1.15.24/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
|
||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7 h1:XFqp7VFIbbJO1hlpGbzo45NVYWVIM2eMD9MAxrOTVzU=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
|
||||
github.com/codegangsta/negroni v0.3.0 h1:ByBtJaE0u71x6Ebli7lm95c8oCkrmF88+s5qB2o6j8I=
|
||||
github.com/codegangsta/negroni v0.3.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0=
|
||||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
|
||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c h1:2zRrJWIt/f9c9HhNHAgrRgq0San5gRRUJTBXLkchal0=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
|
||||
github.com/codegangsta/negroni v1.0.0 h1:+aYywywx4bnKXWvoWtRfJ91vC59NbEhEY03sZjQhbVY=
|
||||
github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d h1:lDrio3iIdNb0Gw9CgH7cQF+iuB5mOOjdJ9ERNJCBgb4=
|
||||
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU=
|
||||
github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/globalsign/mgo v0.0.0-20180828104044-6f9f54af1356 h1:5bNaeqHyuxTGYlx42mevVN+R0TGdOrwj8MQl0yo1260=
|
||||
@@ -47,37 +54,107 @@ github.com/go-playground/universal-translator v0.16.0 h1:X++omBR/4cE2MNg91AoC3rm
|
||||
github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
|
||||
github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/gobuffalo/buffalo v0.12.6 h1:7IOTNj/VW/MhFzcFjTCB9jKxOphbZEAFlg1iksALexk=
|
||||
github.com/gobuffalo/buffalo v0.12.6/go.mod h1:kp1qgfbzOQGfN+iXKPiVsKHXx16/XsnF9eB8nZawdEs=
|
||||
github.com/gobuffalo/envy v1.6.3/go.mod h1:gOxUQY+OEwqH1a2m25Sqax1GIhj31tPNOIdFzj8QThs=
|
||||
github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY=
|
||||
github.com/gobuffalo/buffalo v0.13.0 h1:Fyn55HJULJpFPMUNx9lrPK31qvr37+bpNGFbpAOauGI=
|
||||
github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4=
|
||||
github.com/gobuffalo/buffalo v0.13.1 h1:bzmGB8ZwCjFVym+2adHfoWWyNR246rQLrORn8cUc1zg=
|
||||
github.com/gobuffalo/buffalo v0.13.1/go.mod h1:K9c22KLfDz7obgxvHv1amvJtCQEZNiox9+q6FDJ1Zcs=
|
||||
github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs=
|
||||
github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4=
|
||||
github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY=
|
||||
github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.1 h1:o5sDfAaAm3oTytazmpWkgu9BTQ3TNmYiSFrlKSuvznU=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.1/go.mod h1:/XZt7UuuDnx5P4v3cStK0+XoYiNOA2f0wDIsm1oLJQA=
|
||||
github.com/gobuffalo/buffalo-pop v1.0.5 h1:8aXdBlo9MEKFGHyl489+28Jw7Ud59Th1U+5Ayu1wNL0=
|
||||
github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8=
|
||||
github.com/gobuffalo/buffalo-pop v1.1.2/go.mod h1:czNLXcYbg5/fjr+uht0NyjZaQ0V2W23H1jzyORgCzQ4=
|
||||
github.com/gobuffalo/envy v1.6.4 h1:kxamN+VYjPMzEdjc2mn4CIKiuYXGxc8VIwXJNixFlNY=
|
||||
github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc=
|
||||
github.com/gobuffalo/fizz v1.0.7 h1:xvG4eDlZvwzFq1cUk13VsveNNBHAIxOBDYBW3MGCLtg=
|
||||
github.com/gobuffalo/fizz v1.0.7/go.mod h1:fbtmvB0dcsGJUxM/S8biqkQtvykqPQGdkcg94zVu8GA=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.0 h1:e2dK+SoHgOc/vfXuYMdXwEg2vAUlFzp8SBRwTOXckQ0=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.0/go.mod h1:c8/8gRnd6MSyyk+fp6E8O8cUTHd7P2cnDnH4G7o91l0=
|
||||
github.com/gobuffalo/makr v1.1.1 h1:IZXL0NMtPDCuzINbsCLjzo8/KYi2j/ySSyzeSn4B7Ds=
|
||||
github.com/gobuffalo/makr v1.1.1/go.mod h1:1Ga9O4Gqd5xXc+AoI3eLwgu7k+gWamSUXd2Ps942KkM=
|
||||
github.com/gobuffalo/packr v1.13.1/go.mod h1:m3J/Q/tkaODAQq3r6NyWhDhJs2cVZS/lU0+0Edmfv3c=
|
||||
github.com/gobuffalo/packr v1.13.3 h1:XjxS2G7cI2kb1KtGwO+ziCdB/D0kAuU/eG3BAieQT+4=
|
||||
github.com/gobuffalo/packr v1.13.3/go.mod h1:qdqw8AgJyKw60qj56fnEBiS9fIqqCaP/vWJQvR4Jcss=
|
||||
github.com/gobuffalo/plush v0.0.0-20180810170812-274552812256 h1:F0IV6ybT9TYIXHVICqIHKcjCNvJuicTL3WwoE8kNuuI=
|
||||
github.com/gobuffalo/plush v0.0.0-20180810170812-274552812256/go.mod h1:vdLIKHIw/7fnuNo9clH7hkIP50T27JgtfrcD2mnqIBM=
|
||||
github.com/gobuffalo/pop v0.0.0-20180810203029-9f8bf0c11920 h1:O4TZPudnJq5ic4v/lCMotk8+o/pfsCGNzXMcBaFoWq8=
|
||||
github.com/gobuffalo/pop v0.0.0-20180810203029-9f8bf0c11920/go.mod h1:rYdFIDMO4v9I4SK6BQ3q+vnd5HlQnTtlY/ANF7wKzGM=
|
||||
github.com/gobuffalo/envy v1.6.5 h1:X3is06x7v0nW2xiy2yFbbIjwHz57CD6z6MkvqULTCm8=
|
||||
github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
|
||||
github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw=
|
||||
github.com/gobuffalo/events v1.0.7 h1:WaIpqghQOUUdAE3W4LjmOnBvXvZw3XQjSnF1JGHVbMI=
|
||||
github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ=
|
||||
github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs=
|
||||
github.com/gobuffalo/events v1.1.1 h1:qVNM1t3w0pjU/WltTrB0gv/fjA4SrVW3W/BsMMbZbc4=
|
||||
github.com/gobuffalo/events v1.1.1/go.mod h1:Ia9OgHMco9pEhJaPrPQJ4u4+IZlkxYVco2VbJ2XgnAE=
|
||||
github.com/gobuffalo/fizz v1.0.12 h1:JJOkmlStog5AiBL434UoGMJ896p3MnTnzedFVaZSF3k=
|
||||
github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc=
|
||||
github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683 h1:uHrn7kCcU0zQ8snv1ogsNttxXZagNBr/gtYUf9LPr4Q=
|
||||
github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514 h1:TNe8Qea9CDvWb/wjx1KjucC6ymiPqA1CEP3NT8rGXOg=
|
||||
github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g=
|
||||
github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181019144442-df0a36fdd146 h1:4NAxHRgszMndVm7VFsT1+txhpBR3vYrjDxfYQEUsFJI=
|
||||
github.com/gobuffalo/genny v0.0.0-20181019144442-df0a36fdd146/go.mod h1:IyRrGrQb/sbHu/0z9i5mbpZroIsdxjCYfj+zFiFiWZQ=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.5 h1:YvGVf7yj1akgsb+qc64Q0WX8uhpuZSibChbqOMRSAqE=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY=
|
||||
github.com/gobuffalo/httptest v1.0.2 h1:LWp2khlgA697h4BIYWW2aRxvB93jMnBrbakQ/r2KLzs=
|
||||
github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E=
|
||||
github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42 h1:tq9N5+ixqRBFPZqoHP8IyaMtB0drLlnC5VQgEFyKrIA=
|
||||
github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w=
|
||||
github.com/gobuffalo/makr v1.1.5 h1:lOlpv2iz0dNa4qse0ZYQgbtT+ybwVxWEAcOZbcPmeYc=
|
||||
github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw=
|
||||
github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
|
||||
github.com/gobuffalo/mapi v1.0.1 h1:JRuTiZzDEZhBHkFiHTxJkYRT6CbYuL0K/rn+1byJoEA=
|
||||
github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
|
||||
github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM=
|
||||
github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3 h1:RPWDSAeQeNddUkOM1qM2PkyBYaaX1GAJZX/7zx+18mU=
|
||||
github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE=
|
||||
github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0=
|
||||
github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56 h1:SUFp8EbFjlKXkvqstoxPWx3nVPV3BSKZTswQNTZFaik=
|
||||
github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No=
|
||||
github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b h1:A13B4mhcFQcjPJ1GFBrh61B4Qo87fZa82FfTt9LX/QU=
|
||||
github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo=
|
||||
github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130 h1:v94+IGhlBro0Lz1gOR3lrdAVSZ0mJF2NxsdppKd7FnI=
|
||||
github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ=
|
||||
github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6 h1:pZhsgF8RXEngHdibuRNOXNk1pL0K9rFa5HOcvURNTQ4=
|
||||
github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4=
|
||||
github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e h1:TsmUXyHjj5ReuN1AJjEVukf72J6AfRTF2CfTEaqVLT8=
|
||||
github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME=
|
||||
github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c=
|
||||
github.com/gobuffalo/packr v1.13.7 h1:2uZgLd6b/W4yRBZV/ScaORxZLNGMHO0VCvqQNkKukNA=
|
||||
github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24=
|
||||
github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.20+incompatible h1:FgLKw/zwd8IY8lAqfSuVNuHopR7jKVSs6yjJKeBajzU=
|
||||
github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/pop v4.8.4+incompatible h1:5v15ZgICK3MFTU90QRqCaqDUf4wcriIbws1hqpYL2Xo=
|
||||
github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4=
|
||||
github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4=
|
||||
github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug=
|
||||
github.com/gobuffalo/release v1.0.51/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug=
|
||||
github.com/gobuffalo/shoulders v1.0.1 h1:BqVJBUXlBWAf+WLhXijVk3SCpp75LXrVBiIkOCzZbNc=
|
||||
github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA=
|
||||
github.com/gobuffalo/suite v2.1.6+incompatible h1:yeDu7Yak32Rd4+ddj0i6lSk+0HTZsJ/lZDJfUa7T1t0=
|
||||
github.com/gobuffalo/suite v2.1.6+incompatible/go.mod h1:VCaZ8EgrnJKbt0QGkrEKIMsJlWFxMXWYSHXqjH2UJJE=
|
||||
github.com/gobuffalo/tags v2.0.6+incompatible h1:ROoAxfy9HW4i0plbJ+vw8whEs8J1KWpFJRa7CHRPb4M=
|
||||
github.com/gobuffalo/tags v2.0.6+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
|
||||
github.com/gobuffalo/uuid v2.0.0+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/tags v2.0.11+incompatible h1:zLkaontB8lWefU+DX38mzPLRKFGTJL8FKb9JnKMt0Z0=
|
||||
github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
|
||||
github.com/gobuffalo/uuid v2.0.3+incompatible h1:W83ymTRbzM+XNntIsjC8j63FyzGytcfKTudU1Cg6xyk=
|
||||
github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/validate v2.0.0+incompatible h1:KllrOhUUzAeTil8MaaQorZOH0Bx6KOvi8mRVlwFHRA4=
|
||||
github.com/gobuffalo/validate v2.0.0+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM=
|
||||
github.com/gobuffalo/x v0.0.0-20180117215853-11ca13c05abd h1:0AiAe/jaKqMCar/zjOQFewW33iOLsCD6lPbqYlTcr2Q=
|
||||
github.com/gobuffalo/x v0.0.0-20180117215853-11ca13c05abd/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc=
|
||||
github.com/gobuffalo/uuid v2.0.4+incompatible h1:m56JXViLiZaacKcx00GwfAc9dSLkp3akw/V6bOoJ1PA=
|
||||
github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/validate v2.0.3+incompatible h1:6f4JCEz11Zi6iIlexMv7Jz10RBPvgI795AOaubtCwTE=
|
||||
github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM=
|
||||
github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc=
|
||||
github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7 h1:N0iqtKwkicU8M2rLirTDJxdwuL8I2/8MjMlEayaNSgE=
|
||||
github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY=
|
||||
github.com/gofrs/uuid v3.1.0+incompatible h1:q2rtkjaKT4YEr6E1kamy0Ha4RtepWlQBedyHx0uzKwA=
|
||||
github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
||||
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
|
||||
@@ -98,68 +175,102 @@ github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyC
|
||||
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
|
||||
github.com/gorilla/sessions v1.1.1 h1:YMDmfaK68mUixINzY/XjscuJ47uXFWSSHzFbBQM0PrE=
|
||||
github.com/gorilla/sessions v1.1.1/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
|
||||
github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
|
||||
github.com/gorilla/sessions v1.1.3 h1:uXoZdcdA5XdXF3QzuSlheVRUvjl+1rKY7zBXL68L9RU=
|
||||
github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
|
||||
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
|
||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
|
||||
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
|
||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 h1:vr3AYkKovP8uR8AvSGGUK1IDqRa5lAAvEkZG1LKaCRc=
|
||||
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
|
||||
github.com/jackc/pgx v3.2.0+incompatible h1:0Vihzu20St42/UDsvZGdNE6jak7oi/UOeMzwMPHkgFY=
|
||||
github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0 h1:5B0uxl2lzNRVkJVg+uGHxWtRt4C0Wjc6kJKo5XYx8xE=
|
||||
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU=
|
||||
github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA=
|
||||
github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
|
||||
github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc=
|
||||
github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
|
||||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE=
|
||||
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
||||
github.com/karrick/godirwalk v1.7.5 h1:JQFiMR65pT543bkWP46+k194gS999qo/OYccos9cOXg=
|
||||
github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/kelseyhightower/envconfig v1.3.0 h1:IvRS4f2VcIQy6j4ORGIf9145T/AsUB+oY8LyvN8BXNM=
|
||||
github.com/kelseyhightower/envconfig v1.3.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
|
||||
github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/lib/pq v0.0.0-20180523175426-90697d60dd84 h1:it29sI2IM490luSc3RAhp5WuCYnc6RtbfLVAB7nmC5M=
|
||||
github.com/lib/pq v0.0.0-20180523175426-90697d60dd84/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/markbates/deplist v1.0.2/go.mod h1:ZerU6FuDYMFbdh+BdCNmce+SexbmOZd/ftnrcxVyNXQ=
|
||||
github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM=
|
||||
github.com/markbates/deplist v1.0.5 h1:BKTJDTV5EynLGvTyONdgYVvV34DWq20mJAfGBCP+AYs=
|
||||
github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM=
|
||||
github.com/markbates/going v1.0.0/go.mod h1:I6mnB4BPnEeqo85ynXIx1ZFLLbtiLHNXVgWeFO9OGOA=
|
||||
github.com/markbates/going v1.0.1 h1:IFDakPS7ROqx1rESYPSZmURUTwI4HWuM5waQIFCUZZQ=
|
||||
github.com/markbates/going v1.0.1/go.mod h1:I6mnB4BPnEeqo85ynXIx1ZFLLbtiLHNXVgWeFO9OGOA=
|
||||
github.com/markbates/going v1.0.2 h1:uNQHDDfMRNOUmuxDbPbvatyw4wr4UOSUZkGkdkcip1o=
|
||||
github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c=
|
||||
github.com/markbates/goth v1.46.0 h1:UCPxdYdkmG/SpA/QQY6cLzRjHdvwdRVAoFHgxyPsFvg=
|
||||
github.com/markbates/goth v1.46.0/go.mod h1:vOvF9V44wREdp5qcvaht/jnZcNFgpFd0ljcErYRECcM=
|
||||
github.com/markbates/grift v0.0.0-20180319170132-76f93617a788/go.mod h1:6qyNEZSY8v6duE2tBtO/tPgBvxhT7g7DnQoIYpEyCfw=
|
||||
github.com/markbates/grift v1.0.0/go.mod h1:6qyNEZSY8v6duE2tBtO/tPgBvxhT7g7DnQoIYpEyCfw=
|
||||
github.com/markbates/grift v1.0.1 h1:n3yUdXi+qdChTRvVCbRmD9iMLjSzv7ainzW3qYTP284=
|
||||
github.com/markbates/grift v1.0.1/go.mod h1:aC7s7OfCOzc2WCafmTm7wI3cfGFA/8opYhdTGlIAmmo=
|
||||
github.com/markbates/grift v1.0.4 h1:JjTyhlgPtgEnyHNvVn5lk21zWQbWD3cGE0YdyvvbZYg=
|
||||
github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs=
|
||||
github.com/markbates/hmax v1.0.0 h1:yo2N0gBoCnUMKhV/VRLHomT6Y9wUm+oQQENuWJqCdlM=
|
||||
github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c=
|
||||
github.com/markbates/inflect v1.0.0 h1:gTffXSQCc+WaIvBcI/IItJQMOemietXr5EIKLXDYqI4=
|
||||
github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88=
|
||||
github.com/markbates/refresh v1.4.1 h1:+kEJt7Bz6Bn/pjmnbFHhyAEnO+mW0POtyqsVyK62o3A=
|
||||
github.com/markbates/refresh v1.4.1/go.mod h1:og/05QDfszH/SCl3w8VI2Or990yna0wS2lqRcJoDqAg=
|
||||
github.com/markbates/inflect v1.0.1 h1:t3WOiMLsNqn0Vvw87evC70WSawzHZcwMETn53rL1bBw=
|
||||
github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk=
|
||||
github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4 h1:Mlji5gkcpzkqTROyE4ZxZ8hN7osunMb2RuGVrbvMvCc=
|
||||
github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/refresh v1.4.10 h1:6EZ/vvVpWiam8OTIhrhfV9cVJR/NvScvcCiqosbTkbA=
|
||||
github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc=
|
||||
github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI=
|
||||
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
github.com/markbates/sigtx v1.0.0 h1:y/xtkBvNPRjD4KeEplf4w9rJVSc23/xl+jXYGowTwy0=
|
||||
github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc=
|
||||
github.com/markbates/willie v1.0.6 h1:VguZshKlOyixOjcEdtlWxzCgr7AZE/3u+2bai9Ik1wY=
|
||||
github.com/markbates/willie v1.0.6/go.mod h1:XtK+fmQ7tgVMIVAS1ghwuqVPup3GtgrNY3UCvUlPdzM=
|
||||
github.com/markbates/willie v1.0.9 h1:394PpHImWjScL9X2VRCDXJAcc77sHsSr3w3sOnL/DVc=
|
||||
github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w=
|
||||
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4=
|
||||
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
|
||||
github.com/microcosm-cc/bluemonday v1.0.0 h1:dr58SIfmOwOVr+m4Ye1xLWv8Dk9OFwXAtYnbJSmJ65k=
|
||||
github.com/microcosm-cc/bluemonday v1.0.0/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
|
||||
github.com/microcosm-cc/bluemonday v1.0.1 h1:SIYunPjnlXcW+gVfvm0IlSeR5U3WZUOLfVmqg85Go44=
|
||||
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
|
||||
github.com/minio/minio-go v6.0.5+incompatible h1:qxQQW40lV2vuE9i6yYmt90GSJlT1YrMenWrjM6nZh0Q=
|
||||
github.com/minio/minio-go v6.0.5+incompatible/go.mod h1:7guKYtitv8dktvNUGrhzmNlA5wrAABTQXCoesZdFQO8=
|
||||
github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v0.0.0-20180801233206-58046073cbff/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/monoculum/formam v0.0.0-20170619223434-99ca9dcbaca6 h1:7HrW8yWJwvJBlfIsITNtkInQ8AgVUuSzrUm20AtBCkg=
|
||||
github.com/monoculum/formam v0.0.0-20170619223434-99ca9dcbaca6/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q=
|
||||
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba h1:FEJJhVHSH+Kyxa5qNe/7dprlZbFcj2TG51OWIouhwls=
|
||||
github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q=
|
||||
github.com/mrjones/oauth v0.0.0-20180629183705-f4e24b6d100c/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM=
|
||||
github.com/nicksnyder/go-i18n v1.10.0 h1:5AzlPKvXBH4qBzmZ09Ua9Gipyruv6uApMcrNZdo96+Q=
|
||||
github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q=
|
||||
@@ -167,6 +278,8 @@ github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v1.4.1 h1:PZSj/UFNaVp3KxrzHOcS7oyuWA7LoOY/77yCTEFu21U=
|
||||
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I=
|
||||
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
|
||||
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
@@ -186,15 +299,18 @@ github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273 h1:agujYaXJSxSo1
|
||||
github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
|
||||
github.com/rs/cors v1.5.0 h1:dgSHE6+ia18arGOTIYQKKGWLvEbGvmbNE6NfxhoNHUY=
|
||||
github.com/rs/cors v1.5.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU=
|
||||
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516 h1:ofR1ZdrNSkiWcMsRrubK9tb2/SlZVWttAfqUjJi6QYc=
|
||||
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs=
|
||||
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE=
|
||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM=
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc=
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
|
||||
github.com/shurcooL/graphql v0.0.0-20180514000029-62c9ce094e75/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg=
|
||||
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b h1:vYEG87HxbU6dXj5npkeulCS96Dtz5xg3jcfCgpcvbIw=
|
||||
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU=
|
||||
github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8 h1:xLQlo0Ghg8zBaQi+tjpK+z/WLjbg/BhAWP9pYgqo/LQ=
|
||||
@@ -205,6 +321,9 @@ github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 h1:
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s=
|
||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
|
||||
github.com/sirupsen/logrus v1.1.1 h1:VzGj7lhU7KEB9e9gMpAV/v5XT2NVSvLJhJLCWbnkgXg=
|
||||
github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
|
||||
github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf h1:6V1qxN6Usn4jy8unvggSJz/NC790tefw8Zdy6OZS5co=
|
||||
github.com/smartystreets/assertions v0.0.0-20180820201707-7c9eb446e3cf/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
||||
github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a h1:JSvGDIbmil4Ui/dDdFBExb7/cmkNjyX5F97oglmvCDo=
|
||||
@@ -213,43 +332,75 @@ github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9
|
||||
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8=
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
|
||||
github.com/spf13/afero v1.1.1 h1:Lt3ihYMlE+lreX1GS4Qw4ZsNpYQLxIXKBTEOXm3nt6I=
|
||||
github.com/spf13/afero v1.1.1/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/cast v1.2.0 h1:HHl1DSRbEQN2i8tJmtS6ViPyHx35+p51amrdsiTCrkg=
|
||||
github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
|
||||
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/viper v1.2.1 h1:bIcUwXqLseLF3BDAZduuNfekWG87ibtFxi59Bq+oI9M=
|
||||
github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/tinylib/msgp v1.0.2 h1:DfdQrzQa7Yh2es9SuLkixqxuXS2SxsdYn0KbdrOGWD8=
|
||||
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||
github.com/unrolled/secure v0.0.0-20180618144512-8287f3899c8e h1:tgJKQPcQriVRZoTd6NXN3jITyBs6vR1H+0JsulRuX6s=
|
||||
github.com/unrolled/secure v0.0.0-20180618144512-8287f3899c8e/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
|
||||
github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
|
||||
github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f h1:ltz/eIXkYWdMCZbu3Rb+bUmWVTm5AqM0QM8o0uKir4U=
|
||||
github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
|
||||
go.opencensus.io v0.17.0 h1:2Cu88MYg+1LU+WVD+NWwYhyP0kKgRlN9QjWGaX0jKTE=
|
||||
go.opencensus.io v0.17.0/go.mod h1:mp1VrMQxhlqqDpKvH4UcQUa4YwlzNmymAjPrDdfxNpI=
|
||||
golang.org/x/crypto v0.0.0-20180808211826-de0752318171 h1:vYogbvSFj2YXcjQxFHu/rASSOt9sLytpCaSkiwQ135I=
|
||||
golang.org/x/crypto v0.0.0-20180808211826-de0752318171/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e h1:IzypfodbhbnViNUO/MEh0FzCUooG97cIGfdggUrUSyU=
|
||||
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/net v0.0.0-20180706051357-32a936f46389/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180808004115-f9ce57c11b24/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180811021610-c39426892332 h1:efGso+ep0DjyCBJPjvoz0HI6UldX4Md2F1rZFe1ir0E=
|
||||
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1 h1:Y/KGZSOdz/2r0WJ9Mkmz6NJBusp0kiNx1Cn82lzJQ6w=
|
||||
golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181017193950-04a2e542c03f h1:4pRM7zYwpBjCnfA1jRmhItLxYJkaEnsmuAcRtA347DA=
|
||||
golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/oauth2 v0.0.0-20180620175406-ef147856a6dd h1:QQhib242ErYDSMitlBm8V7wYCm/1a25hV8qMadIKLPA=
|
||||
golang.org/x/oauth2 v0.0.0-20180620175406-ef147856a6dd/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180616030259-6c888cc515d3/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180814072032-4e1fef560951 h1:VfGaXvV9wRnTJreeGDE0FWEDiQP1WWUDmutCjCThDz8=
|
||||
golang.org/x/sys v0.0.0-20180814072032-4e1fef560951/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e h1:o3PsSEY8E4eXWkXrIP9YJALUkVZqzHJT5DOasTyn8Vs=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba h1:nZJIJPGow0Kf9bU9QTc1U6OXbs/7Hu4e+cNv+hxH+Zc=
|
||||
golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181019084534-8f1d3d21f81b h1:1fwLBm/LiKBxPaIo6hz5bUsYvch6D9fswnXX8kcr+vk=
|
||||
golang.org/x/sys v0.0.0-20181019084534-8f1d3d21f81b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181019005945-6adeb8aab2de/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf h1:rjxqQmxjyqerRKEj+tZW+MCm4LgpFXu18bsEoCMgDsk=
|
||||
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/appengine v1.1.0 h1:igQkv0AAhEIvTEpD5LIpAfav2eeVO9HBTjvKHVJPRSs=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
google.golang.org/appengine v1.2.0 h1:S0iUepdCWODXRvtE+gcRDd15L+k+k1AiHlMiMjefH24=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw=
|
||||
google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/grpc v1.14.0 h1:ArxJuB1NWfPY6r9Gp9gqwplT0Ge7nqv9msgu03lHLmo=
|
||||
@@ -260,7 +411,6 @@ gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNat
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||
@@ -271,9 +421,8 @@ gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXa
|
||||
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
|
||||
gopkg.in/go-playground/validator.v9 v9.20.2 h1:6AVDyt8bk0FDiSYSeWivUfzqEjHyVSCMRkpTr6ZCIgk=
|
||||
gopkg.in/go-playground/validator.v9 v9.20.2/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
|
||||
gopkg.in/mail.v2 v2.0.0-20180301192024-63235f23494b/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=
|
||||
gopkg.in/russross/blackfriday.v1 v1.5.1 h1:/G8rrKhg8HTP6/VLtuQLbNSXHUzpDdNqZS5umeauNvc=
|
||||
gopkg.in/russross/blackfriday.v1 v1.5.1/go.mod h1:NAEMj3mL3YDCD1Mxuzav3y8y68EZs2OnJ9xdWYLES00=
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
|
||||
gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
|
||||
|
||||
@@ -63,13 +63,16 @@ func Test_FilterMiddleware(t *testing.T) {
|
||||
app := middlewareFilterApp(conf.FilterFile, conf.Proxy.GlobalEndpoint)
|
||||
w := willie.New(app)
|
||||
|
||||
// Public, expects to be redirected to the global registry endpoint
|
||||
res := w.Request("/github.com/gomods/athens/@v/list").Get()
|
||||
// Public, expects to be redirected to the global registry endpoint, with and without a trailing slash
|
||||
paths := []string{"/github.com/gomods/athens/@v/list/", "/github.com/gomods/athens/@v/list"}
|
||||
for _, path := range paths {
|
||||
res := w.Request(path).Get()
|
||||
r.Equal(303, res.Code)
|
||||
r.Equal(conf.Proxy.GlobalEndpoint+"/github.com/gomods/athens/@v/list", res.HeaderMap.Get("Location"))
|
||||
r.Equal(conf.Proxy.GlobalEndpoint+"/github.com/gomods/athens/@v/list/", res.HeaderMap.Get("Location"))
|
||||
}
|
||||
|
||||
// Excluded, expects a 403
|
||||
res = w.Request("/github.com/athens-artifacts/no-tags/@v/list").Get()
|
||||
res := w.Request("/github.com/athens-artifacts/no-tags/@v/list").Get()
|
||||
r.Equal(403, res.Code)
|
||||
|
||||
// Private, the proxy is working and returns a 200
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
# Run the linter on everything except generated code
|
||||
set -euo pipefail
|
||||
|
||||
GO111MODULE=off golint -set_exit_status $(GO111MODULE=off go list ./... | grep -v '/mocks')
|
||||
GO111MODULE=on golint -set_exit_status $(GO111MODULE=on go list ./... | grep -v '/mocks')
|
||||
|
||||
@@ -21,6 +21,6 @@ true)
|
||||
rm -r $TMPDIR
|
||||
;;
|
||||
*)
|
||||
GO111MODULE=off go get github.com/gobuffalo/buffalo/buffalo
|
||||
GO111MODULE=on go get github.com/gobuffalo/buffalo/buffalo
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
# Ensure that the tools needed to build locally are present
|
||||
set -xeuo pipefail
|
||||
|
||||
GO111MODULE=off go get golang.org/x/lint/golint
|
||||
GO111MODULE=on go get golang.org/x/lint/golint
|
||||
|
||||
./scripts/get_buffalo.sh
|
||||
|
||||
@@ -18,4 +18,4 @@ export GO111MODULE=on
|
||||
|
||||
# Run the unit tests with the race detector and code coverage enabled
|
||||
set -xeuo pipefail
|
||||
go test -mod=vendor -race -coverprofile cover.out -covermode atomic ./...
|
||||
go test -mod=readonly -race -coverprofile cover.out -covermode atomic ./...
|
||||
|
||||
+17
-10
@@ -1,14 +1,21 @@
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
Copyright (c) 2013 TOML authors
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
+1
-1
@@ -775,7 +775,7 @@ func lexDatetime(lx *lexer) stateFn {
|
||||
return lexDatetime
|
||||
}
|
||||
switch r {
|
||||
case '-', 'T', ':', '.', 'Z':
|
||||
case '-', 'T', ':', '.', 'Z', '+':
|
||||
return lexDatetime
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -28,6 +28,7 @@ Usage
|
||||
|
||||
```go
|
||||
import "github.com/ajg/form"
|
||||
// or: "gopkg.in/ajg/form.v1"
|
||||
```
|
||||
|
||||
Given a type like the following...
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
CRDB
|
||||
====
|
||||
|
||||
`crdb` is a wrapper around the logic for issuing SQL transactions which performs
|
||||
retries (as required by CockroachDB).
|
||||
|
||||
Note that unfortunately there is no generic way of extracting a pg error code;
|
||||
the library has to recognize driver-dependent error types. We currently support
|
||||
`github.com/lib/pq` and `github.com/jackc/pgx`.
|
||||
+26
-7
@@ -20,6 +20,7 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/jackc/pgx"
|
||||
"github.com/lib/pq"
|
||||
)
|
||||
|
||||
@@ -64,7 +65,9 @@ import (
|
||||
// return nil
|
||||
// })
|
||||
//
|
||||
func ExecuteTx(ctx context.Context, db *sql.DB, txopts *sql.TxOptions, fn func(*sql.Tx) error) error {
|
||||
func ExecuteTx(
|
||||
ctx context.Context, db *sql.DB, txopts *sql.TxOptions, fn func(*sql.Tx) error,
|
||||
) error {
|
||||
// Start a transaction.
|
||||
tx, err := db.BeginTx(ctx, txopts)
|
||||
if err != nil {
|
||||
@@ -115,19 +118,35 @@ func ExecuteInTx(ctx context.Context, tx Tx, fn func() error) (err error) {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
// We got an error; let's see if it's a retryable one and, if so, restart. We look
|
||||
// for either the standard PG errcode SerializationFailureError:40001 or the Cockroach extension
|
||||
// errcode RetriableError:CR000. The Cockroach extension has been removed server-side, but support
|
||||
// for it has been left here for now to maintain backwards compatibility.
|
||||
pqErr, ok := errorCause(err).(*pq.Error)
|
||||
if retryable := ok && (pqErr.Code == "CR000" || pqErr.Code == "40001"); !retryable {
|
||||
// We got an error; let's see if it's a retryable one and, if so, restart.
|
||||
// We look for either:
|
||||
// - the standard PG errcode SerializationFailureError:40001 or
|
||||
// - the Cockroach extension errcode RetriableError:CR000. This extension
|
||||
// has been removed server-side, but support for it has been left here for
|
||||
// now to maintain backwards compatibility.
|
||||
code := errCode(err)
|
||||
if retryable := (code == "CR000" || code == "40001"); !retryable {
|
||||
if released {
|
||||
err = newAmbiguousCommitError(err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
if _, retryErr := tx.ExecContext(ctx, "ROLLBACK TO SAVEPOINT cockroach_restart"); retryErr != nil {
|
||||
return newTxnRestartError(retryErr, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func errCode(err error) string {
|
||||
switch t := errorCause(err).(type) {
|
||||
case *pq.Error:
|
||||
return string(t.Code)
|
||||
|
||||
case pgx.PgError:
|
||||
return t.Code
|
||||
|
||||
default:
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -1,6 +1,8 @@
|
||||
language: go
|
||||
go:
|
||||
- 1.7.x
|
||||
- 1.8.x
|
||||
- 1.9.x
|
||||
- tip
|
||||
sudo: false
|
||||
before_install:
|
||||
|
||||
+2
-2
@@ -81,8 +81,8 @@ n := s.Names() // Get a []string
|
||||
f := s.Field(name) // Get a *Field based on the given field name
|
||||
f, ok := s.FieldOk(name) // Get a *Field based on the given field name
|
||||
n := s.Name() // Get the struct name
|
||||
h := s.HasZero() // Check if any field is initialized
|
||||
z := s.IsZero() // Check if all fields are initialized
|
||||
h := s.HasZero() // Check if any field is uninitialized
|
||||
z := s.IsZero() // Check if all fields are uninitialized
|
||||
```
|
||||
|
||||
### Field methods
|
||||
|
||||
+2
-4
@@ -203,9 +203,7 @@ func (s *Struct) Values() []interface{} {
|
||||
if IsStruct(val.Interface()) && !tagOpts.Has("omitnested") {
|
||||
// look out for embedded structs, and convert them to a
|
||||
// []interface{} to be added to the final values slice
|
||||
for _, embeddedVal := range Values(val.Interface()) {
|
||||
t = append(t, embeddedVal)
|
||||
}
|
||||
t = append(t, Values(val.Interface())...)
|
||||
} else {
|
||||
t = append(t, val.Interface())
|
||||
}
|
||||
@@ -573,7 +571,7 @@ func (s *Struct) nested(val reflect.Value) interface{} {
|
||||
break
|
||||
}
|
||||
|
||||
slices := make([]interface{}, val.Len(), val.Len())
|
||||
slices := make([]interface{}, val.Len())
|
||||
for x := 0; x < val.Len(); x++ {
|
||||
slices[x] = s.nested(val.Index(x))
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import "strings"
|
||||
// tagOptions contains a slice of tag options
|
||||
type tagOptions []string
|
||||
|
||||
// Has returns true if the given optiton is available in tagOptions
|
||||
// Has returns true if the given option is available in tagOptions
|
||||
func (t tagOptions) Has(opt string) bool {
|
||||
for _, tagOpt := range t {
|
||||
if tagOpt == opt {
|
||||
|
||||
+1
@@ -2912,6 +2912,7 @@ func (p *Pipe) SetMaxTime(d time.Duration) *Pipe {
|
||||
return p
|
||||
}
|
||||
|
||||
|
||||
// Collation allows to specify language-specific rules for string comparison,
|
||||
// such as rules for lettercase and accent marks.
|
||||
// When specifying collation, the locale field is mandatory; all other collation
|
||||
|
||||
Generated
Vendored
+3
-1
@@ -1,4 +1,6 @@
|
||||
Copyright (c) 2014 Nick Snyder https://github.com/nicksnyder
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright © 2018 Mark Bates
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package plugins
|
||||
|
||||
// Command that the plugin supplies
|
||||
type Command struct {
|
||||
// Name "foo"
|
||||
Name string `json:"name"`
|
||||
// UseCommand "bar"
|
||||
UseCommand string `json:"use_command"`
|
||||
// BuffaloCommand "generate"
|
||||
BuffaloCommand string `json:"buffalo_command"`
|
||||
// Description "generates a foo"
|
||||
Description string `json:"description"`
|
||||
Aliases []string `json:"aliases"`
|
||||
Binary string `json:"-"`
|
||||
}
|
||||
|
||||
// Commands is a slice of Command
|
||||
type Commands []Command
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package plugins
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
|
||||
"github.com/gobuffalo/envy"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
func Decorate(c Command) *cobra.Command {
|
||||
cc := &cobra.Command{
|
||||
Use: c.Name,
|
||||
Short: fmt.Sprintf("[PLUGIN] %s", c.Description),
|
||||
Aliases: c.Aliases,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
plugCmd := c.Name
|
||||
if c.UseCommand != "" {
|
||||
plugCmd = c.UseCommand
|
||||
}
|
||||
|
||||
ax := []string{plugCmd}
|
||||
if plugCmd == "-" {
|
||||
ax = []string{}
|
||||
}
|
||||
|
||||
ax = append(ax, args...)
|
||||
ex := exec.Command(c.Binary, ax...)
|
||||
if runtime.GOOS != "windows" {
|
||||
ex.Env = append(envy.Environ(), "BUFFALO_PLUGIN=1")
|
||||
}
|
||||
ex.Stdin = os.Stdin
|
||||
ex.Stdout = os.Stdout
|
||||
ex.Stderr = os.Stderr
|
||||
return ex.Run()
|
||||
},
|
||||
}
|
||||
cc.DisableFlagParsing = true
|
||||
return cc
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package plugins
|
||||
|
||||
const (
|
||||
EvtSetupStarted = "buffalo-plugins:setup:started"
|
||||
EvtSetupErr = "buffalo-plugins:setup:err"
|
||||
EvtSetupFinished = "buffalo-plugins:setup:finished"
|
||||
)
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package plugdeps
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/meta"
|
||||
"github.com/karrick/godirwalk"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// ErrMissingConfig is if config/buffalo-plugins.toml file is not found. Use plugdeps#On(app) to test if plugdeps are being used
|
||||
var ErrMissingConfig = errors.Errorf("could not find a buffalo-plugins config file at %s", ConfigPath(meta.New(".")))
|
||||
|
||||
// List all of the plugins the application depeneds on. Will return ErrMissingConfig
|
||||
// if the app is not using config/buffalo-plugins.toml to manage their plugins.
|
||||
// Use plugdeps#On(app) to test if plugdeps are being used.
|
||||
func List(app meta.App) (*Plugins, error) {
|
||||
plugs := New()
|
||||
if app.WithPop {
|
||||
plugs.Add(pop)
|
||||
}
|
||||
|
||||
lp, err := listLocal(app)
|
||||
if err != nil {
|
||||
return plugs, errors.WithStack(err)
|
||||
}
|
||||
plugs.Add(lp.List()...)
|
||||
|
||||
if !On(app) {
|
||||
return plugs, ErrMissingConfig
|
||||
}
|
||||
|
||||
p := ConfigPath(app)
|
||||
tf, err := os.Open(p)
|
||||
if err != nil {
|
||||
return plugs, errors.WithStack(err)
|
||||
}
|
||||
if err := plugs.Decode(tf); err != nil {
|
||||
return plugs, errors.WithStack(err)
|
||||
}
|
||||
|
||||
return plugs, nil
|
||||
}
|
||||
|
||||
func listLocal(app meta.App) (*Plugins, error) {
|
||||
plugs := New()
|
||||
proot := filepath.Join(app.Root, "plugins")
|
||||
if _, err := os.Stat(proot); err != nil {
|
||||
return plugs, nil
|
||||
}
|
||||
err := godirwalk.Walk(proot, &godirwalk.Options{
|
||||
FollowSymbolicLinks: true,
|
||||
Callback: func(path string, info *godirwalk.Dirent) error {
|
||||
if info.IsDir() {
|
||||
return nil
|
||||
}
|
||||
base := filepath.Base(path)
|
||||
if strings.HasPrefix(base, "buffalo-") {
|
||||
plugs.Add(Plugin{
|
||||
Binary: base,
|
||||
Local: "." + strings.TrimPrefix(path, app.Root),
|
||||
})
|
||||
}
|
||||
return nil
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return plugs, errors.WithStack(err)
|
||||
}
|
||||
|
||||
return plugs, nil
|
||||
}
|
||||
|
||||
// ConfigPath returns the path to the config/buffalo-plugins.toml file
|
||||
// relative to the app
|
||||
func ConfigPath(app meta.App) string {
|
||||
return filepath.Join(app.Root, "config", "buffalo-plugins.toml")
|
||||
}
|
||||
|
||||
// On checks for the existence of config/buffalo-plugins.toml if this
|
||||
// file exists its contents will be used to list plugins. If the file is not
|
||||
// found, then the BUFFALO_PLUGIN_PATH and ./plugins folders are consulted.
|
||||
func On(app meta.App) bool {
|
||||
_, err := os.Stat(ConfigPath(app))
|
||||
return err == nil
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package plugdeps
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gobuffalo/meta"
|
||||
)
|
||||
|
||||
// Plugin represents a Go plugin for Buffalo applications
|
||||
type Plugin struct {
|
||||
Binary string `toml:"binary" json:"binary"`
|
||||
GoGet string `toml:"go_get,omitempty" json:"go_get,omitempty"`
|
||||
Local string `toml:"local,omitempty" json:"local,omitempty"`
|
||||
Tags meta.BuildTags `toml:"tags,omitempty" json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// String implementation of fmt.Stringer
|
||||
func (p Plugin) String() string {
|
||||
b, _ := json.Marshal(p)
|
||||
return string(b)
|
||||
}
|
||||
|
||||
func (p Plugin) key() string {
|
||||
return p.Binary + p.GoGet + p.Local
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
package plugdeps
|
||||
|
||||
import (
|
||||
"io"
|
||||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Plugins manages the config/buffalo-plugins.toml file
|
||||
// as well as the plugins available from the file.
|
||||
type Plugins struct {
|
||||
plugins map[string]Plugin
|
||||
moot *sync.RWMutex
|
||||
}
|
||||
|
||||
// Encode the list of plugins, in TOML format, to the reader
|
||||
func (plugs *Plugins) Encode(w io.Writer) error {
|
||||
tp := tomlPlugins{
|
||||
Plugins: plugs.List(),
|
||||
}
|
||||
|
||||
if err := toml.NewEncoder(w).Encode(tp); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Decode the list of plugins, in TOML format, from the reader
|
||||
func (plugs *Plugins) Decode(r io.Reader) error {
|
||||
tp := &tomlPlugins{
|
||||
Plugins: []Plugin{},
|
||||
}
|
||||
if _, err := toml.DecodeReader(r, tp); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
for _, p := range tp.Plugins {
|
||||
plugs.Add(p)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// List of dependent plugins listed in order of Plugin.String()
|
||||
func (plugs *Plugins) List() []Plugin {
|
||||
m := map[string]Plugin{}
|
||||
plugs.moot.RLock()
|
||||
for _, p := range plugs.plugins {
|
||||
m[p.key()] = p
|
||||
}
|
||||
plugs.moot.RUnlock()
|
||||
var pp []Plugin
|
||||
for _, v := range m {
|
||||
pp = append(pp, v)
|
||||
}
|
||||
sort.Slice(pp, func(a, b int) bool {
|
||||
return pp[a].Binary < pp[b].Binary
|
||||
})
|
||||
return pp
|
||||
}
|
||||
|
||||
// Add plugin(s) to the list of dependencies
|
||||
func (plugs *Plugins) Add(pp ...Plugin) {
|
||||
plugs.moot.Lock()
|
||||
for _, p := range pp {
|
||||
plugs.plugins[p.key()] = p
|
||||
}
|
||||
plugs.moot.Unlock()
|
||||
}
|
||||
|
||||
// Remove plugin(s) from the list of dependencies
|
||||
func (plugs *Plugins) Remove(pp ...Plugin) {
|
||||
plugs.moot.Lock()
|
||||
for _, p := range pp {
|
||||
delete(plugs.plugins, p.key())
|
||||
}
|
||||
plugs.moot.Unlock()
|
||||
}
|
||||
|
||||
// New returns a configured *Plugins value
|
||||
func New() *Plugins {
|
||||
plugs := &Plugins{
|
||||
plugins: map[string]Plugin{},
|
||||
moot: &sync.RWMutex{},
|
||||
}
|
||||
plugs.Add(self)
|
||||
return plugs
|
||||
}
|
||||
|
||||
type tomlPlugins struct {
|
||||
Plugins []Plugin `toml:"plugin"`
|
||||
}
|
||||
|
||||
var self = Plugin{
|
||||
Binary: "buffalo-plugins",
|
||||
GoGet: "github.com/gobuffalo/buffalo-plugins",
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package plugdeps
|
||||
|
||||
var pop = Plugin{
|
||||
Binary: "buffalo-pop",
|
||||
GoGet: "github.com/gobuffalo/buffalo-pop",
|
||||
}
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
package plugins
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/buffalo-plugins/plugins/plugdeps"
|
||||
"github.com/gobuffalo/envy"
|
||||
"github.com/gobuffalo/meta"
|
||||
"github.com/karrick/godirwalk"
|
||||
"github.com/markbates/oncer"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
const timeoutEnv = "BUFFALO_PLUGIN_TIMEOUT"
|
||||
|
||||
func timeout() time.Duration {
|
||||
t := time.Second
|
||||
oncer.Do("plugins.timeout", func() {
|
||||
rawTimeout, err := envy.MustGet(timeoutEnv)
|
||||
if err == nil {
|
||||
if parsed, err := time.ParseDuration(rawTimeout); err == nil {
|
||||
t = parsed
|
||||
} else {
|
||||
logrus.Errorf("%q value is malformed assuming default %q: %v", timeoutEnv, t, err)
|
||||
}
|
||||
} else {
|
||||
logrus.Debugf("%q not set, assuming default of %v", timeoutEnv, t)
|
||||
}
|
||||
})
|
||||
return t
|
||||
}
|
||||
|
||||
// List maps a Buffalo command to a slice of Command
|
||||
type List map[string]Commands
|
||||
|
||||
var _list List
|
||||
|
||||
// Available plugins for the `buffalo` command.
|
||||
// It will look in $GOPATH/bin and the `./plugins` directory.
|
||||
// This can be changed by setting the $BUFFALO_PLUGIN_PATH
|
||||
// environment variable.
|
||||
//
|
||||
// Requirements:
|
||||
// * file/command must be executable
|
||||
// * file/command must start with `buffalo-`
|
||||
// * file/command must respond to `available` and return JSON of
|
||||
// plugins.Commands{}
|
||||
//
|
||||
// Limit full path scan with direct plugin path
|
||||
//
|
||||
// If a file/command doesn't respond to being invoked with `available`
|
||||
// within one second, buffalo will assume that it is unable to load. This
|
||||
// can be changed by setting the $BUFFALO_PLUGIN_TIMEOUT environment
|
||||
// variable. It must be set to a duration that `time.ParseDuration` can
|
||||
// process.
|
||||
func Available() (List, error) {
|
||||
var err error
|
||||
oncer.Do("plugins.Available", func() {
|
||||
|
||||
app := meta.New(".")
|
||||
|
||||
if plugdeps.On(app) {
|
||||
_list, err = listPlugDeps(app)
|
||||
return
|
||||
}
|
||||
|
||||
paths := []string{"plugins"}
|
||||
|
||||
from, err := envy.MustGet("BUFFALO_PLUGIN_PATH")
|
||||
if err != nil {
|
||||
from, err = envy.MustGet("GOPATH")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
from = filepath.Join(from, "bin")
|
||||
}
|
||||
|
||||
paths = append(paths, strings.Split(from, string(os.PathListSeparator))...)
|
||||
|
||||
list := List{}
|
||||
for _, p := range paths {
|
||||
if ignorePath(p) {
|
||||
continue
|
||||
}
|
||||
if _, err := os.Stat(p); err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
err := godirwalk.Walk(p, &godirwalk.Options{
|
||||
FollowSymbolicLinks: true,
|
||||
Callback: func(path string, info *godirwalk.Dirent) error {
|
||||
if err != nil {
|
||||
// May indicate a permissions problem with the path, skip it
|
||||
return nil
|
||||
}
|
||||
if info.IsDir() {
|
||||
return nil
|
||||
}
|
||||
base := filepath.Base(path)
|
||||
if strings.HasPrefix(base, "buffalo-") {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout())
|
||||
commands := askBin(ctx, path)
|
||||
cancel()
|
||||
for _, c := range commands {
|
||||
bc := c.BuffaloCommand
|
||||
if _, ok := list[bc]; !ok {
|
||||
list[bc] = Commands{}
|
||||
}
|
||||
c.Binary = path
|
||||
list[bc] = append(list[bc], c)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
_list = list
|
||||
})
|
||||
return _list, err
|
||||
}
|
||||
|
||||
func askBin(ctx context.Context, path string) Commands {
|
||||
commands := Commands{}
|
||||
|
||||
cmd := exec.CommandContext(ctx, path, "available")
|
||||
bb := &bytes.Buffer{}
|
||||
cmd.Stdout = bb
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
return commands
|
||||
}
|
||||
msg := bb.String()
|
||||
for len(msg) > 0 {
|
||||
err = json.NewDecoder(strings.NewReader(msg)).Decode(&commands)
|
||||
if err == nil {
|
||||
return commands
|
||||
}
|
||||
msg = msg[1:]
|
||||
}
|
||||
logrus.Errorf("[PLUGIN] error decoding plugin %s: %s\n%s\n", path, err, msg)
|
||||
return commands
|
||||
}
|
||||
|
||||
func ignorePath(p string) bool {
|
||||
p = strings.ToLower(p)
|
||||
for _, x := range []string{`c:\windows`, `c:\program`} {
|
||||
if strings.HasPrefix(p, x) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func listPlugDeps(app meta.App) (List, error) {
|
||||
list := List{}
|
||||
plugs, err := plugdeps.List(app)
|
||||
if err != nil {
|
||||
return list, err
|
||||
}
|
||||
for _, p := range plugs.List() {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), timeout())
|
||||
bin := p.Binary
|
||||
if len(p.Local) != 0 {
|
||||
bin = p.Local
|
||||
}
|
||||
commands := askBin(ctx, bin)
|
||||
cancel()
|
||||
for _, c := range commands {
|
||||
bc := c.BuffaloCommand
|
||||
if _, ok := list[bc]; !ok {
|
||||
list[bc] = Commands{}
|
||||
}
|
||||
c.Binary = p.Binary
|
||||
list[bc] = append(list[bc], c)
|
||||
}
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package plugins
|
||||
|
||||
const Version = "v1.6.1"
|
||||
+4
@@ -1,2 +1,6 @@
|
||||
coverage:
|
||||
range: "60...70"
|
||||
|
||||
status:
|
||||
project: false
|
||||
patch: false
|
||||
+1
-5
@@ -7,6 +7,7 @@ pkg
|
||||
*.pid
|
||||
coverage
|
||||
coverage.data
|
||||
build/*
|
||||
*.pbxuser
|
||||
*.mode1v3
|
||||
.svn
|
||||
@@ -25,9 +26,4 @@ generated/
|
||||
.vendor/
|
||||
bin/*
|
||||
gin-bin
|
||||
*.sqlite*
|
||||
.idea/
|
||||
.vscode
|
||||
vendor
|
||||
Gopkg.lock
|
||||
.grifter/
|
||||
|
||||
+32
-67
@@ -1,75 +1,40 @@
|
||||
project_name: buffalo
|
||||
release:
|
||||
github:
|
||||
owner: gobuffalo
|
||||
name: buffalo
|
||||
name_template: '{{.Tag}}'
|
||||
brew:
|
||||
commit_author:
|
||||
name: goreleaserbot
|
||||
email: goreleaser@carlosbecker.com
|
||||
install: bin.install "buffalo"
|
||||
# Code generated by github.com/gobuffalo/release. DO NOT EDIT.
|
||||
# Edit .goreleaser.yml.plush instead
|
||||
|
||||
builds:
|
||||
-
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
- linux
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
goarm:
|
||||
- "6"
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
main: ./buffalo/main.go
|
||||
binary: buffalo-no-sqlite
|
||||
hooks:
|
||||
pre: packr
|
||||
post: packr clean
|
||||
-
|
||||
goos:
|
||||
- linux
|
||||
- darwin
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
goarm:
|
||||
- "6"
|
||||
main: ./buffalo/main.go
|
||||
binary: buffalo-with-zbuffalo
|
||||
flags: -tags zbuffalo
|
||||
hooks:
|
||||
pre: packr
|
||||
post: packr clean
|
||||
archive:
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
|
||||
}}v{{ .Arm }}{{ end }}'
|
||||
format: tar.gz
|
||||
files:
|
||||
- licence*
|
||||
- LICENCE*
|
||||
- license*
|
||||
- LICENSE*
|
||||
- readme*
|
||||
- README*
|
||||
- changelog*
|
||||
- CHANGELOG*
|
||||
fpm:
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
|
||||
}}v{{ .Arm }}{{ end }}'
|
||||
bindir: /usr/local/bin
|
||||
snapcraft:
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm
|
||||
}}v{{ .Arm }}{{ end }}'
|
||||
snapshot:
|
||||
name_template: SNAPSHOT-{{ .Commit }}
|
||||
|
||||
checksum:
|
||||
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
|
||||
dist: dist
|
||||
sign:
|
||||
cmd: gpg
|
||||
args:
|
||||
- --output
|
||||
- $signature
|
||||
- --detach-sig
|
||||
- $artifact
|
||||
signature: ${artifact}.sig
|
||||
artifacts: none
|
||||
name_template: 'checksums.txt'
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
|
||||
brew:
|
||||
name: buffalo
|
||||
github:
|
||||
owner: gobuffalo
|
||||
name: homebrew-tap
|
||||
homepage: https://gobuffalo.io
|
||||
description: A Go web development eco-system, designed to make your life easier.
|
||||
install: |
|
||||
bin.install "buffalo-no-sqlite"
|
||||
mv "#{bin}/buffalo-no-sqlite", "#{bin}/buffalo"
|
||||
test: |
|
||||
system "#{bin}/buffalo", "version"
|
||||
|
||||
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
builds:
|
||||
-
|
||||
goos:
|
||||
- darwin
|
||||
- linux
|
||||
- windows
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
main: ./buffalo/main.go
|
||||
binary: buffalo-no-sqlite
|
||||
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
|
||||
snapshot:
|
||||
name_template: "{{ .Tag }}-next"
|
||||
|
||||
changelog:
|
||||
sort: asc
|
||||
filters:
|
||||
exclude:
|
||||
- '^docs:'
|
||||
- '^test:'
|
||||
<%= if (brew) { %>
|
||||
brew:
|
||||
name: buffalo
|
||||
github:
|
||||
owner: gobuffalo
|
||||
name: homebrew-tap
|
||||
homepage: https://gobuffalo.io
|
||||
description: A Go web development eco-system, designed to make your life easier.
|
||||
install: |
|
||||
bin.install "buffalo-no-sqlite"
|
||||
mv "#{bin}/buffalo-no-sqlite", "#{bin}/buffalo"
|
||||
test: |
|
||||
system "#{bin}/buffalo", "version"
|
||||
<% } %>
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mark+gobuffalo@markbates.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
-31
@@ -1,31 +0,0 @@
|
||||
# Contributing to Buffalo
|
||||
|
||||
First, thank you so much for wanting to contribute! It means so much that you care enough to want to contribute. We appreciate every PR from the smallest of typos to the be biggest of features.
|
||||
|
||||
## First time committing to a Go Repo?
|
||||
|
||||
Contributing to a Go project for the first time can be confusing due to import statements requiring a very specific path on disk.
|
||||
|
||||
Please take moment and read this fantastic post on how to easily work with Go repos.
|
||||
|
||||
[https://splice.com/blog/contributing-open-source-git-repositories-go/](https://splice.com/blog/contributing-open-source-git-repositories-go/)
|
||||
|
||||
## Contributing to Buffalo
|
||||
|
||||
1. Check [https://github.com/gobuffalo/buffalo/issues](https://github.com/gobuffalo/buffalo/issues) to make sure you're not working on a duplicate issue or PR.
|
||||
2. If you want to implement a new feature that doesn't have an issue open. Please open one and ask for feedback on the feature before spending a lot of time working on it. It's possible the feature has already been discussed, or it's out of scope, or some other reason that might later prevent a PR from being accepted. The #buffalo channel on gophers.slack.com is a great place to seek this kind of guideance.
|
||||
3. Write your feature/fix and make sure to include tests. Tests are an **absolute** requirement for any pull request. Please make sure to use the same testing style and libraries as the rest of the tests.
|
||||
4. Make sure tests run when doing `go test ./...`. You may need to do `go get -t ./...` first to get the testing dependencies.5. (Optional) There is a much longer set of integration tests that can be run. These will be run by Travis-CI when you open a PR. If you want to run them locally you can by running `$ docker build .`.
|
||||
5. Open a PR against the `development` branch. Do not open one against `master` unless you are explicitly told to. All "unreleased" work happens in the `development` branch.
|
||||
|
||||
## Documentation Welcome
|
||||
|
||||
Hands down the most important, and the most welcome, pull requests are for documentation. We LOVE documentation PRs, and so don't all those that come after you.
|
||||
|
||||
Whether it's GoDoc or prose on [http://gobuffalo.io](http://gobuffalo.io) all documentation is welcome.
|
||||
|
||||
You can submit PRs to change the website and/or docs on [https://github.com/gobuffalo/gobuffalo](https://github.com/gobuffalo/gobuffalo).
|
||||
|
||||
## Thank You
|
||||
|
||||
Once again, we just want to take the chance to say thank you again for wanting to contribute to Buffalo. This is a community project and that means we **need** your help! Thank you so much.
|
||||
+19
-10
@@ -13,31 +13,30 @@ ARG TRAVIS_PULL_REQUEST_SHA
|
||||
ARG TRAVIS_REPO_SLUG
|
||||
ARG TRAVIS_TAG
|
||||
|
||||
RUN buffalo version
|
||||
|
||||
ENV BP=$GOPATH/src/github.com/gobuffalo/buffalo
|
||||
|
||||
RUN rm $(which buffalo)
|
||||
RUN rm -rf $BP
|
||||
RUN mkdir -p $BP
|
||||
WORKDIR $BP
|
||||
ADD . .
|
||||
COPY . .
|
||||
|
||||
RUN go get -v -t ./...
|
||||
RUN make ci-deps
|
||||
|
||||
RUN packr clean
|
||||
RUN gometalinter --vendor --deadline=5m ./... --skip=internal
|
||||
RUN make install
|
||||
|
||||
RUN go test -tags sqlite -race ./...
|
||||
RUN go test -tags sqlite -coverprofile cover.out -covermode count ./...
|
||||
RUN buffalo version
|
||||
|
||||
RUN go test -tags "sqlite integration_test" -race ./...
|
||||
RUN go test -tags "sqlite integration_test" -coverprofile cover.out -covermode count ./...
|
||||
|
||||
RUN if [ -z "$CODECOV_TOKEN" ] ; then \
|
||||
echo codecov not enabled ; \
|
||||
else curl -s https://codecov.io/bash -o codecov && \
|
||||
bash codecov -f cover.out -X fix; fi
|
||||
|
||||
RUN go get -u github.com/alecthomas/gometalinter
|
||||
RUN gometalinter --install
|
||||
RUN gometalinter --vendor --deadline=5m ./... --skip=internal
|
||||
|
||||
WORKDIR $GOPATH/src/
|
||||
|
||||
# START: tests bins are built with tags properly
|
||||
@@ -100,6 +99,10 @@ RUN buffalo g actions ouch build edit
|
||||
RUN buffalo d action -y ouch
|
||||
RUN filetest -c $GOPATH/src/github.com/gobuffalo/buffalo/buffalo/cmd/filetests/destroy_action_all.json
|
||||
|
||||
RUN buffalo g mailer ouch
|
||||
RUN buffalo d mailer -y ouch
|
||||
RUN filetest -c $GOPATH/src/github.com/gobuffalo/buffalo/buffalo/cmd/filetests/destroy_mailer_all.json
|
||||
|
||||
RUN buffalo g actions comments show edit
|
||||
RUN filetest -c $GOPATH/src/github.com/gobuffalo/buffalo/buffalo/cmd/filetests/generate_action_all.json
|
||||
|
||||
@@ -148,3 +151,9 @@ RUN filetest -c $GOPATH/src/github.com/gobuffalo/buffalo/buffalo/cmd/filetests/g
|
||||
RUN rm -rf bin
|
||||
RUN buffalo build -k -e
|
||||
RUN filetest -c $GOPATH/src/github.com/gobuffalo/buffalo/buffalo/cmd/filetests/no_assets_build.json
|
||||
|
||||
RUN go get github.com/gobuffalo/oldapp/0_12_6/...
|
||||
WORKDIR $GOPATH/src/github.com/gobuffalo/oldapp/0_12_6
|
||||
RUN buffalo fix --y
|
||||
RUN filetest -c $GOPATH/src/github.com/gobuffalo/buffalo/buffalo/cmd/filetests/fix_old_app.json
|
||||
RUN buffalo build -static
|
||||
|
||||
+32
-46
@@ -1,58 +1,44 @@
|
||||
FROM golang:latest
|
||||
|
||||
RUN go version
|
||||
RUN go get -v -u github.com/markbates/deplist/deplist
|
||||
|
||||
RUN apt-get update
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
|
||||
RUN apt-get install -y build-essential nodejs
|
||||
RUN apt-get install -y sqlite3 libsqlite3-dev
|
||||
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
|
||||
RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add -
|
||||
RUN apt-get install -y postgresql postgresql-contrib libpq-dev
|
||||
RUN apt-get install -y -q mysql-client
|
||||
RUN apt-get install -y vim
|
||||
|
||||
RUN go get -u github.com/golang/dep/cmd/dep
|
||||
RUN go get -v -u github.com/gobuffalo/makr
|
||||
RUN go get -v -u github.com/gobuffalo/packr
|
||||
RUN go get -v -u github.com/gobuffalo/tags
|
||||
RUN go get -v -u github.com/gobuffalo/pop
|
||||
RUN go get -v -u github.com/gobuffalo/x/...
|
||||
RUN go get -v -u github.com/mattn/go-sqlite3
|
||||
RUN go get -v -u github.com/markbates/filetest
|
||||
RUN go get -v -u github.com/markbates/grift
|
||||
RUN go get -v -u github.com/markbates/inflect
|
||||
RUN go get -v -u github.com/markbates/refresh
|
||||
RUN go get -v -u github.com/markbates/willie
|
||||
RUN go get -v -u github.com/gorilla/sessions
|
||||
RUN go get -v -u golang.org/x/vgo
|
||||
RUN go get -u github.com/alecthomas/gometalinter
|
||||
RUN gometalinter --install
|
||||
|
||||
RUN npm install -g --no-progress yarn
|
||||
RUN yarn config set yarn-offline-mirror /npm-packages-offline-cache
|
||||
RUN yarn config set yarn-offline-mirror-pruning true
|
||||
|
||||
EXPOSE 3000
|
||||
ENV BP=$GOPATH/src/github.com/gobuffalo/buffalo
|
||||
RUN go version
|
||||
|
||||
RUN rm -rfv $BP
|
||||
RUN mkdir -p $BP
|
||||
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash \
|
||||
&& sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' \
|
||||
&& wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y -q build-essential nodejs sqlite3 libsqlite3-dev postgresql postgresql-contrib libpq-dev mysql-client vim \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN service postgresql start && \
|
||||
su -c "psql -c \"ALTER USER postgres WITH PASSWORD 'postgres';\"" - postgres
|
||||
|
||||
RUN go get -u github.com/golang/dep/cmd/dep \
|
||||
&& go get -v -u github.com/gobuffalo/pop \
|
||||
&& go get -v -u github.com/gobuffalo/buffalo-pop \
|
||||
&& go get -v -u github.com/gobuffalo/packr/packr \
|
||||
&& go get -v -u github.com/markbates/filetest \
|
||||
&& go get -v -u github.com/markbates/grift \
|
||||
&& go get -v -u github.com/markbates/refresh \
|
||||
&& go get -u github.com/alecthomas/gometalinter \
|
||||
&& gometalinter --install
|
||||
|
||||
RUN npm install -g --no-progress yarn \
|
||||
&& yarn config set yarn-offline-mirror /npm-packages-offline-cache \
|
||||
&& yarn config set yarn-offline-mirror-pruning true
|
||||
|
||||
|
||||
RUN rm -rfv $BP && mkdir -p $BP
|
||||
WORKDIR $BP
|
||||
|
||||
ADD . .
|
||||
RUN go get -tags "sqlite" -v -t github.com/gobuffalo/buffalo/...
|
||||
RUN make install
|
||||
|
||||
COPY . .
|
||||
RUN make ci-deps && make install
|
||||
|
||||
# cache yarn packages to an offline mirror so they're faster to load. hopefully.
|
||||
RUN grep -v '{{' ./generators/assets/webpack/templates/package.json.tmpl > package.json
|
||||
RUN yarn install --no-progress
|
||||
RUN grep -v '{{' ./generators/assets/webpack/templates/package.json.tmpl > package.json \
|
||||
&& yarn install --no-progress
|
||||
|
||||
RUN buffalo version
|
||||
|
||||
WORKDIR $GOPATH/src
|
||||
|
||||
RUN ls -la /npm-packages-offline-cache
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
FROM golang:alpine
|
||||
EXPOSE 3000
|
||||
ENV BP=$GOPATH/src/github.com/gobuffalo/buffalo
|
||||
RUN apk add --no-cache --upgrade apk-tools \
|
||||
&& apk add --no-cache bash curl openssl git build-base nodejs npm postgresql libpq postgresql-contrib sqlite sqlite-dev mysql-client vim
|
||||
|
||||
RUN go version && go get -v -u github.com/markbates/deplist/deplist
|
||||
|
||||
|
||||
RUN go get -u github.com/golang/dep/cmd/dep \
|
||||
&& go get -v -u github.com/gobuffalo/makr \
|
||||
&& go get -v -u github.com/gobuffalo/packr \
|
||||
&& go get -v -u github.com/gobuffalo/tags \
|
||||
&& go get -v -u github.com/gobuffalo/pop \
|
||||
&& go get -v -u github.com/gobuffalo/x/... \
|
||||
&& go get -v -u github.com/mattn/go-sqlite3 \
|
||||
&& go get -v -u github.com/markbates/filetest \
|
||||
&& go get -v -u github.com/markbates/grift \
|
||||
&& go get -v -u github.com/markbates/inflect \
|
||||
&& go get -v -u github.com/markbates/refresh \
|
||||
&& go get -v -u github.com/gobuffalo/httptest \
|
||||
&& go get -v -u github.com/gorilla/sessions \
|
||||
&& go get -v -u golang.org/x/vgo \
|
||||
&& go get -u github.com/alecthomas/gometalinter \
|
||||
&& gometalinter --install
|
||||
|
||||
RUN npm i -g --no-progress yarn \
|
||||
&& yarn config set yarn-offline-mirror /npm-packages-offline-cache \
|
||||
&& yarn config set yarn-offline-mirror-pruning true
|
||||
|
||||
|
||||
RUN rm -rfv $BP && mkdir -p $BP
|
||||
WORKDIR $BP
|
||||
|
||||
COPY . .
|
||||
RUN make deps && make install
|
||||
|
||||
# cache yarn packages to an offline mirror so they're faster to load. hopefully.
|
||||
RUN grep -v '{{' ./generators/assets/webpack/templates/package.json.tmpl > package.json \
|
||||
&& yarn install --no-progress
|
||||
|
||||
RUN buffalo version
|
||||
|
||||
WORKDIR $GOPATH/src
|
||||
|
||||
RUN ls -la /npm-packages-offline-cache
|
||||
-158
@@ -1,158 +0,0 @@
|
||||
# Gopkg.toml example
|
||||
#
|
||||
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
|
||||
# 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"
|
||||
#
|
||||
# [prune]
|
||||
# non-go = false
|
||||
# go-tests = true
|
||||
# unused-packages = true
|
||||
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/dgrijalva/jwt-go"
|
||||
version = "3.2.0"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/dustin/go-humanize"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/fatih/color"
|
||||
version = "1.7.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gobuffalo/envy"
|
||||
version = "1.6.3"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gobuffalo/github_flavored_markdown"
|
||||
version = "1.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gobuffalo/makr"
|
||||
version = "1.1.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gobuffalo/packr"
|
||||
version = "1.13.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gobuffalo/plush"
|
||||
version = "3.7.13"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gobuffalo/pop"
|
||||
version = "4.6.4"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gobuffalo/tags"
|
||||
version = "2.0.8"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gobuffalo/uuid"
|
||||
version = "2.0.2"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/gobuffalo/x"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gorilla/context"
|
||||
version = "1.1.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gorilla/mux"
|
||||
version = "1.6.2"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gorilla/sessions"
|
||||
version = "1.1.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/markbates/deplist"
|
||||
version = "1.0.2"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/markbates/going"
|
||||
version = "1.0.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/markbates/grift"
|
||||
version = "1.0.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/markbates/inflect"
|
||||
version = "1.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/markbates/refresh"
|
||||
version = "1.4.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/markbates/sigtx"
|
||||
version = "1.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/markbates/willie"
|
||||
version = "1.0.6"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/monoculum/formam"
|
||||
version = "3.0.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/nicksnyder/go-i18n"
|
||||
version = "1.10.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/pkg/errors"
|
||||
version = "0.8.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/sirupsen/logrus"
|
||||
version = "1.0.6"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/spf13/cobra"
|
||||
version = "0.0.3"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/stretchr/testify"
|
||||
version = "1.2.2"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/unrolled/secure"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/crypto"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "golang.org/x/sync"
|
||||
|
||||
[[constraint]]
|
||||
name = "gopkg.in/mail.v2"
|
||||
version = "2.2.0"
|
||||
|
||||
[prune]
|
||||
go-tests = true
|
||||
unused-packages = true
|
||||
-45
@@ -1,45 +0,0 @@
|
||||
Hello! Thank you so much for your interest in Buffalo. The fact you care enough to be here, right now, helping makes us very happy.
|
||||
|
||||
**Pull Requests**: See [CONTRIBUTING.md](https://github.com/gobuffalo/buffalo/blob/master/CONTRIBUTING.md)
|
||||
|
||||
Before opening an issue, please make sure you have checked both [https://gobuffalo.io/en](https://gobuffalo.io/en) and [https://godoc.org/github.com/gobuffalo/buffalo](https://godoc.org/github.com/gobuffalo/buffalo) to see if there are docs, examples, etc... that might solve your problem quicker?
|
||||
|
||||
We also have an amazing [Slack Channel](https://gobuffalo.io/en/docs/slack) that are quick to help and chat with. :)
|
||||
|
||||
---
|
||||
|
||||
OK, you've gotten this far and you need help. That's alright. We're here, and happy, to help.
|
||||
|
||||
To get going we're going to need some information from you. Please be as verbose as you can be. Please. The more information like, full stack traces and error logs, code (we love to see examples!), screenshots, etc... that you can give means it is easier, and faster, for the community to help you out.
|
||||
|
||||
Ready? Let's go (pun totally intended)!
|
||||
|
||||
--- DELETE ABOVE --
|
||||
|
||||
## Steps to Reproduce the Problem
|
||||
|
||||
Please describe in painful detail what you did (so others can play along with you) to get to this point. This includes things like the exact command(s) you used, or the `curl` command you used, that sort of thing.
|
||||
|
||||
1.
|
||||
1.
|
||||
1.
|
||||
|
||||
## Expected Behavior
|
||||
|
||||
What did you what to happen? Tell us a story. We love to read.
|
||||
|
||||
## Actual Behavior
|
||||
|
||||
In the happiest of happy places what should have happened?
|
||||
|
||||
## Info
|
||||
|
||||
Please run `buffalo info` and paste the information below where it says "PASTE_HERE".
|
||||
|
||||
<details>
|
||||
|
||||
```
|
||||
PASTE_HERE
|
||||
```
|
||||
|
||||
</details>
|
||||
+49
-16
@@ -1,25 +1,58 @@
|
||||
TAGS ?= "sqlite"
|
||||
INSTALL ?= install -v -tags ${TAGS} ./...
|
||||
|
||||
GO_BIN ?= go
|
||||
GO_GET ?= $(GO_BIN) get -tags "sqlite" -v -t github.com/gobuffalo/buffalo/...
|
||||
|
||||
ifeq ("$(GO_BIN)","vgo")
|
||||
GO_GET = vgo version
|
||||
endif
|
||||
|
||||
deps:
|
||||
$(GO_BIN) install -v github.com/gobuffalo/packr/packr
|
||||
|
||||
install: deps
|
||||
packr
|
||||
$(GO_GET)
|
||||
$(GO_BIN) $(INSTALL)
|
||||
packr clean
|
||||
$(GO_BIN) install -tags ${TAGS} -v ./buffalo
|
||||
make tidy
|
||||
|
||||
tidy:
|
||||
ifeq ($(GO111MODULE),on)
|
||||
$(GO_BIN) mod tidy
|
||||
else
|
||||
echo skipping go mod tidy
|
||||
endif
|
||||
|
||||
deps:
|
||||
$(GO_BIN) get github.com/gobuffalo/release
|
||||
$(GO_BIN) get github.com/gobuffalo/packr/packr
|
||||
$(GO_BIN) get -tags ${TAGS} -t ./...
|
||||
make tidy
|
||||
|
||||
build:
|
||||
packr
|
||||
$(GO_BIN) build -v .
|
||||
make tidy
|
||||
|
||||
test:
|
||||
$(GO_BIN) test -vet off -tags ${TAGS} ./...
|
||||
packr
|
||||
$(GO_BIN) test -tags ${TAGS} ./...
|
||||
make tidy
|
||||
|
||||
ci-deps:
|
||||
$(GO_BIN) get github.com/gobuffalo/packr/packr
|
||||
$(GO_BIN) get -tags ${TAGS} -t -u -v ./...
|
||||
make tidy
|
||||
|
||||
ci-test:
|
||||
$(GO_BIN) test -vet off -tags ${TAGS} -race -v ./...
|
||||
docker build .
|
||||
docker build . --no-cache
|
||||
|
||||
lint:
|
||||
gometalinter --vendor ./... --deadline=1m --skip=internal
|
||||
|
||||
update:
|
||||
$(GO_BIN) get -u -tags ${TAGS}
|
||||
make tidy
|
||||
packr
|
||||
make test
|
||||
make install
|
||||
make tidy
|
||||
|
||||
release-test:
|
||||
make test
|
||||
make tidy
|
||||
|
||||
release:
|
||||
make tidy
|
||||
release -y -f ./runtime/version.go
|
||||
make tidy
|
||||
|
||||
+8
-53
@@ -11,11 +11,11 @@
|
||||
|
||||
# Buffalo
|
||||
|
||||
Buffalo is a Go web development eco-system. Designed to make the life of a Go web developer easier.
|
||||
A Go web development eco-system, designed to make your life easier.
|
||||
|
||||
Buffalo starts by generating a web project for you that already has everything from front-end (JavaScript, SCSS, etc...) to back-end (database, routing, etc...) already hooked up and ready to run. From there it provides easy APIs to build your web application quickly in Go.
|
||||
Buffalo helps you to generate a web project that already has everything from front-end (JavaScript, SCSS, etc.) to back-end (database, routing, etc.) already hooked up and ready to run. From there it provides easy APIs to build your web application quickly in Go.
|
||||
|
||||
Buffalo isn't just a framework, it's a holistic web development environment and project structure that lets developers get straight to the business of, well, building their business.
|
||||
Buffalo **isn't just a framework**, it's a holistic web development environment and project structure that **lets developers get straight to the business** of, well, building their business.
|
||||
|
||||
> I :heart: web dev in go again - Brian Ketelsen
|
||||
|
||||
@@ -23,55 +23,10 @@ Buffalo isn't just a framework, it's a holistic web development environment and
|
||||
|
||||
Please visit [http://gobuffalo.io](http://gobuffalo.io) for the latest documentation, examples, and more.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
$ go get -u -v github.com/gobuffalo/buffalo/buffalo
|
||||
```
|
||||
|
||||
_NOTE_: Buffalo has a minimum Go dependency of `1.8.1`.
|
||||
|
||||
Buffalo also depends on:
|
||||
- gcc for [go-sqlite3](https://github.com/mattn/go-sqlite3) which is a cgo package.
|
||||
- node and npm for the asset pipeline.
|
||||
|
||||
## Generating a new Project
|
||||
|
||||
Buffalo aims to make building new web applications in Go as simple as possible, and what could be more simple than a new application generator?
|
||||
|
||||
```text
|
||||
$ buffalo new <name>
|
||||
```
|
||||
|
||||
That will generate a whole new Buffalo application that is ready to go. It'll even run `go get` for you to make sure you have all of the necessary dependencies needed to run your application.
|
||||
|
||||
To see a list of available flags for the `new` command, just check out its help.
|
||||
|
||||
```text
|
||||
$ buffalo help new
|
||||
```
|
||||
|
||||
## Running your application
|
||||
|
||||
Buffalo is Go "standards" compliant. That means you can just build your binary and run it. It's that simple.
|
||||
|
||||
### Running your application in Development
|
||||
|
||||
One of the downsides to Go development is the lack of code "reloading". This means as you change your code you need to manually stop your application, rebuild it, and then restart it. Buffalo finds this is annoying and wants to make life better for you.
|
||||
|
||||
```text
|
||||
$ buffalo dev
|
||||
```
|
||||
|
||||
The `dev` command will watch your `.go` and `.html` files by default, rebuild, and restart your binary for you so you don't have to worry about such things. Just run the `dev` command and start coding.
|
||||
|
||||
## Testing your application
|
||||
|
||||
Just like running your application, Buffalo doesn't stop you from using the standard Go tools for testing. Buffalo does ship with a `test` command that will run all of your tests while conveniently skipping that pesky old `./vendor` directory!
|
||||
|
||||
```text
|
||||
$ buffalo test
|
||||
```
|
||||
### Quick Start
|
||||
* [Installation](http://gobuffalo.io/docs/installation)
|
||||
* [Create a new project](http://gobuffalo.io/docs/new-project)
|
||||
* [Examples](http://gobuffalo.io/docs/examples)
|
||||
|
||||
## Shoulders of Giants
|
||||
|
||||
@@ -91,7 +46,7 @@ Buffalo would not be possible if not for all of the great projects it depends on
|
||||
|
||||
### Models/ORM (Optional)
|
||||
|
||||
[github.com/gobuffalo/pop](https://github.com/gobuffalo/pop) - Accessing databases is nothing new in web applications. Pop, and its command line tool, Soda, were chosen because they strike a nice balance between simplifying common tasks, being idiomatic, and giving you the flexibility you need to built your app. Pop and Soda share the same core philosphies as Buffalo so they were a natural choice.
|
||||
[github.com/gobuffalo/pop](https://github.com/gobuffalo/pop) - Accessing databases is nothing new in web applications. Pop, and its command line tool, Soda, were chosen because they strike a nice balance between simplifying common tasks, being idiomatic, and giving you the flexibility you need to built your app. Pop and Soda share the same core philosophies as Buffalo so they were a natural choice.
|
||||
|
||||
### Sessions, Cookies, Websockets, and more...
|
||||
|
||||
|
||||
+61
-69
@@ -1,50 +1,65 @@
|
||||
# github.com/gobuffalo/buffalo Stands on the Shoulders of Giants
|
||||
|
||||
# Buffalo Stands on the Shoulders of Giants
|
||||
|
||||
Buffalo does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them altogether in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
|
||||
github.com/gobuffalo/buffalo does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
|
||||
|
||||
Thank you to the following **GIANTS**:
|
||||
|
||||
|
||||
* [C](https://godoc.org/C)
|
||||
|
||||
* [github.com/BurntSushi/toml](https://godoc.org/github.com/BurntSushi/toml)
|
||||
|
||||
* [github.com/ajg/form](https://godoc.org/github.com/ajg/form)
|
||||
|
||||
* [github.com/cockroachdb/cockroach-go/crdb](https://godoc.org/github.com/cockroachdb/cockroach-go/crdb)
|
||||
|
||||
* [github.com/cockroachdb/cockroach-go/testserver](https://godoc.org/github.com/cockroachdb/cockroach-go/testserver)
|
||||
|
||||
* [github.com/dgrijalva/jwt-go](https://godoc.org/github.com/dgrijalva/jwt-go)
|
||||
|
||||
* [github.com/dustin/go-humanize](https://godoc.org/github.com/dustin/go-humanize)
|
||||
|
||||
* [github.com/fatih/color](https://godoc.org/github.com/fatih/color)
|
||||
|
||||
* [github.com/fatih/color/vendor/github.com/mattn/go-colorable](https://godoc.org/github.com/fatih/color/vendor/github.com/mattn/go-colorable)
|
||||
|
||||
* [github.com/fatih/color/vendor/github.com/mattn/go-isatty](https://godoc.org/github.com/fatih/color/vendor/github.com/mattn/go-isatty)
|
||||
|
||||
* [github.com/fatih/structs](https://godoc.org/github.com/fatih/structs)
|
||||
|
||||
* [github.com/fsnotify/fsnotify](https://godoc.org/github.com/fsnotify/fsnotify)
|
||||
|
||||
* [github.com/go-sql-driver/mysql](https://godoc.org/github.com/go-sql-driver/mysql)
|
||||
|
||||
* [github.com/gobuffalo/buffalo](https://godoc.org/github.com/gobuffalo/buffalo)
|
||||
|
||||
* [github.com/gobuffalo/buffalo-plugins/plugins](https://godoc.org/github.com/gobuffalo/buffalo-plugins/plugins)
|
||||
|
||||
* [github.com/gobuffalo/buffalo-plugins/plugins/plugdeps](https://godoc.org/github.com/gobuffalo/buffalo-plugins/plugins/plugdeps)
|
||||
|
||||
* [github.com/gobuffalo/buffalo/binding](https://godoc.org/github.com/gobuffalo/buffalo/binding)
|
||||
|
||||
* [github.com/gobuffalo/buffalo/render](https://godoc.org/github.com/gobuffalo/buffalo/render)
|
||||
|
||||
* [github.com/gobuffalo/buffalo/servers](https://godoc.org/github.com/gobuffalo/buffalo/servers)
|
||||
|
||||
* [github.com/gobuffalo/buffalo/worker](https://godoc.org/github.com/gobuffalo/buffalo/worker)
|
||||
|
||||
* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy)
|
||||
|
||||
* [github.com/gobuffalo/events](https://godoc.org/github.com/gobuffalo/events)
|
||||
|
||||
* [github.com/gobuffalo/fizz](https://godoc.org/github.com/gobuffalo/fizz)
|
||||
|
||||
* [github.com/gobuffalo/fizz/translators](https://godoc.org/github.com/gobuffalo/fizz/translators)
|
||||
|
||||
* [github.com/gobuffalo/flect](https://godoc.org/github.com/gobuffalo/flect)
|
||||
|
||||
* [github.com/gobuffalo/flect/name](https://godoc.org/github.com/gobuffalo/flect/name)
|
||||
|
||||
* [github.com/gobuffalo/genny](https://godoc.org/github.com/gobuffalo/genny)
|
||||
|
||||
* [github.com/gobuffalo/genny/movinglater/gotools/gomods](https://godoc.org/github.com/gobuffalo/genny/movinglater/gotools/gomods)
|
||||
|
||||
* [github.com/gobuffalo/github_flavored_markdown](https://godoc.org/github.com/gobuffalo/github_flavored_markdown)
|
||||
|
||||
* [github.com/gobuffalo/github_flavored_markdown/internal/russross/blackfriday](https://godoc.org/github.com/gobuffalo/github_flavored_markdown/internal/russross/blackfriday)
|
||||
|
||||
* [github.com/gobuffalo/makr](https://godoc.org/github.com/gobuffalo/makr)
|
||||
|
||||
* [github.com/gobuffalo/packr](https://godoc.org/github.com/gobuffalo/packr)
|
||||
* [github.com/gobuffalo/mapi](https://godoc.org/github.com/gobuffalo/mapi)
|
||||
|
||||
* [github.com/gobuffalo/packr/builder](https://godoc.org/github.com/gobuffalo/packr/builder)
|
||||
* [github.com/gobuffalo/meta](https://godoc.org/github.com/gobuffalo/meta)
|
||||
|
||||
* [github.com/gobuffalo/packr](https://godoc.org/github.com/gobuffalo/packr)
|
||||
|
||||
* [github.com/gobuffalo/plush](https://godoc.org/github.com/gobuffalo/plush)
|
||||
|
||||
@@ -64,16 +79,10 @@ Thank you to the following **GIANTS**:
|
||||
|
||||
* [github.com/gobuffalo/pop/fix](https://godoc.org/github.com/gobuffalo/pop/fix)
|
||||
|
||||
* [github.com/gobuffalo/pop/logging](https://godoc.org/github.com/gobuffalo/pop/logging)
|
||||
|
||||
* [github.com/gobuffalo/pop/nulls](https://godoc.org/github.com/gobuffalo/pop/nulls)
|
||||
|
||||
* [github.com/gobuffalo/pop/slices](https://godoc.org/github.com/gobuffalo/pop/slices)
|
||||
|
||||
* [github.com/gobuffalo/pop/soda/cmd](https://godoc.org/github.com/gobuffalo/pop/soda/cmd)
|
||||
|
||||
* [github.com/gobuffalo/pop/soda/cmd/generate](https://godoc.org/github.com/gobuffalo/pop/soda/cmd/generate)
|
||||
|
||||
* [github.com/gobuffalo/pop/soda/cmd/schema](https://godoc.org/github.com/gobuffalo/pop/soda/cmd/schema)
|
||||
|
||||
* [github.com/gobuffalo/tags](https://godoc.org/github.com/gobuffalo/tags)
|
||||
|
||||
* [github.com/gobuffalo/tags/form](https://godoc.org/github.com/gobuffalo/tags/form)
|
||||
@@ -86,55 +95,69 @@ Thank you to the following **GIANTS**:
|
||||
|
||||
* [github.com/gobuffalo/validate/validators](https://godoc.org/github.com/gobuffalo/validate/validators)
|
||||
|
||||
* [github.com/gobuffalo/x/defaults](https://godoc.org/github.com/gobuffalo/x/defaults)
|
||||
|
||||
* [github.com/gobuffalo/x/httpx](https://godoc.org/github.com/gobuffalo/x/httpx)
|
||||
|
||||
* [github.com/gobuffalo/x/randx](https://godoc.org/github.com/gobuffalo/x/randx)
|
||||
|
||||
* [github.com/gofrs/uuid](https://godoc.org/github.com/gofrs/uuid)
|
||||
|
||||
* [github.com/gorilla/context](https://godoc.org/github.com/gorilla/context)
|
||||
|
||||
* [github.com/gorilla/mux](https://godoc.org/github.com/gorilla/mux)
|
||||
|
||||
* [github.com/gorilla/pat](https://godoc.org/github.com/gorilla/pat)
|
||||
|
||||
* [github.com/gorilla/securecookie](https://godoc.org/github.com/gorilla/securecookie)
|
||||
|
||||
* [github.com/gorilla/sessions](https://godoc.org/github.com/gorilla/sessions)
|
||||
|
||||
* [github.com/jackc/pgx](https://godoc.org/github.com/jackc/pgx)
|
||||
|
||||
* [github.com/jackc/pgx/chunkreader](https://godoc.org/github.com/jackc/pgx/chunkreader)
|
||||
|
||||
* [github.com/jackc/pgx/internal/sanitize](https://godoc.org/github.com/jackc/pgx/internal/sanitize)
|
||||
|
||||
* [github.com/jackc/pgx/pgio](https://godoc.org/github.com/jackc/pgx/pgio)
|
||||
|
||||
* [github.com/jackc/pgx/pgproto3](https://godoc.org/github.com/jackc/pgx/pgproto3)
|
||||
|
||||
* [github.com/jackc/pgx/pgtype](https://godoc.org/github.com/jackc/pgx/pgtype)
|
||||
|
||||
* [github.com/jmoiron/sqlx](https://godoc.org/github.com/jmoiron/sqlx)
|
||||
|
||||
* [github.com/jmoiron/sqlx/reflectx](https://godoc.org/github.com/jmoiron/sqlx/reflectx)
|
||||
|
||||
* [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv)
|
||||
|
||||
* [github.com/kr/pretty](https://godoc.org/github.com/kr/pretty)
|
||||
* [github.com/karrick/godirwalk](https://godoc.org/github.com/karrick/godirwalk)
|
||||
|
||||
* [github.com/kballard/go-shellquote](https://godoc.org/github.com/kballard/go-shellquote)
|
||||
|
||||
* [github.com/lib/pq](https://godoc.org/github.com/lib/pq)
|
||||
|
||||
* [github.com/lib/pq/oid](https://godoc.org/github.com/lib/pq/oid)
|
||||
|
||||
* [github.com/markbates/deplist](https://godoc.org/github.com/markbates/deplist)
|
||||
|
||||
* [github.com/markbates/going/defaults](https://godoc.org/github.com/markbates/going/defaults)
|
||||
|
||||
* [github.com/markbates/going/randx](https://godoc.org/github.com/markbates/going/randx)
|
||||
|
||||
* [github.com/markbates/going/wait](https://godoc.org/github.com/markbates/going/wait)
|
||||
|
||||
* [github.com/markbates/grift/cmd](https://godoc.org/github.com/markbates/grift/cmd)
|
||||
|
||||
* [github.com/markbates/grift/grift](https://godoc.org/github.com/markbates/grift/grift)
|
||||
|
||||
* [github.com/markbates/hmax](https://godoc.org/github.com/markbates/hmax)
|
||||
|
||||
* [github.com/markbates/inflect](https://godoc.org/github.com/markbates/inflect)
|
||||
|
||||
* [github.com/markbates/oncer](https://godoc.org/github.com/markbates/oncer)
|
||||
|
||||
* [github.com/markbates/refresh/refresh](https://godoc.org/github.com/markbates/refresh/refresh)
|
||||
|
||||
* [github.com/markbates/refresh/refresh/web](https://godoc.org/github.com/markbates/refresh/refresh/web)
|
||||
|
||||
* [github.com/markbates/safe](https://godoc.org/github.com/markbates/safe)
|
||||
|
||||
* [github.com/markbates/sigtx](https://godoc.org/github.com/markbates/sigtx)
|
||||
|
||||
* [github.com/markbates/willie](https://godoc.org/github.com/markbates/willie)
|
||||
* [github.com/mattn/go-colorable](https://godoc.org/github.com/mattn/go-colorable)
|
||||
|
||||
* [github.com/mattn/go-sqlite3](https://godoc.org/github.com/mattn/go-sqlite3)
|
||||
* [github.com/mattn/go-isatty](https://godoc.org/github.com/mattn/go-isatty)
|
||||
|
||||
* [github.com/microcosm-cc/bluemonday](https://godoc.org/github.com/microcosm-cc/bluemonday)
|
||||
|
||||
@@ -142,20 +165,6 @@ Thank you to the following **GIANTS**:
|
||||
|
||||
* [github.com/monoculum/formam](https://godoc.org/github.com/monoculum/formam)
|
||||
|
||||
* [github.com/nicksnyder/go-i18n/i18n](https://godoc.org/github.com/nicksnyder/go-i18n/i18n)
|
||||
|
||||
* [github.com/nicksnyder/go-i18n/i18n/bundle](https://godoc.org/github.com/nicksnyder/go-i18n/i18n/bundle)
|
||||
|
||||
* [github.com/nicksnyder/go-i18n/i18n/language](https://godoc.org/github.com/nicksnyder/go-i18n/i18n/language)
|
||||
|
||||
* [github.com/nicksnyder/go-i18n/i18n/translation](https://godoc.org/github.com/nicksnyder/go-i18n/i18n/translation)
|
||||
|
||||
* [github.com/onsi/ginkgo](https://godoc.org/github.com/onsi/ginkgo)
|
||||
|
||||
* [github.com/onsi/gomega](https://godoc.org/github.com/onsi/gomega)
|
||||
|
||||
* [github.com/pelletier/go-toml](https://godoc.org/github.com/pelletier/go-toml)
|
||||
|
||||
* [github.com/pkg/errors](https://godoc.org/github.com/pkg/errors)
|
||||
|
||||
* [github.com/serenize/snaker](https://godoc.org/github.com/serenize/snaker)
|
||||
@@ -180,16 +189,6 @@ Thank you to the following **GIANTS**:
|
||||
|
||||
* [github.com/spf13/pflag](https://godoc.org/github.com/spf13/pflag)
|
||||
|
||||
* [github.com/stretchr/testify/assert](https://godoc.org/github.com/stretchr/testify/assert)
|
||||
|
||||
* [github.com/stretchr/testify/require](https://godoc.org/github.com/stretchr/testify/require)
|
||||
|
||||
* [github.com/stretchr/testify/suite](https://godoc.org/github.com/stretchr/testify/suite)
|
||||
|
||||
* [github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew](https://godoc.org/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/spew)
|
||||
|
||||
* [github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib](https://godoc.org/github.com/stretchr/testify/vendor/github.com/pmezard/go-difflib/difflib)
|
||||
|
||||
* [golang.org/x/crypto/bcrypt](https://godoc.org/golang.org/x/crypto/bcrypt)
|
||||
|
||||
* [golang.org/x/crypto/blowfish](https://godoc.org/golang.org/x/crypto/blowfish)
|
||||
@@ -206,11 +205,4 @@ Thank you to the following **GIANTS**:
|
||||
|
||||
* [golang.org/x/sys/unix](https://godoc.org/golang.org/x/sys/unix)
|
||||
|
||||
* [golang.org/x/tools/cmd/goimports](https://godoc.org/golang.org/x/tools/cmd/goimports)
|
||||
|
||||
* [gopkg.in/check.v1](https://godoc.org/gopkg.in/check.v1)
|
||||
|
||||
* [gopkg.in/russross/blackfriday.v1](https://godoc.org/gopkg.in/russross/blackfriday.v1)
|
||||
|
||||
* [gopkg.in/yaml.v2](https://godoc.org/gopkg.in/yaml.v2)
|
||||
|
||||
|
||||
+21
-6
@@ -5,6 +5,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/envy"
|
||||
"github.com/gobuffalo/events"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@@ -15,33 +16,47 @@ import (
|
||||
type App struct {
|
||||
Options
|
||||
// Middleware returns the current MiddlewareStack for the App/Group.
|
||||
Middleware *MiddlewareStack
|
||||
ErrorHandlers ErrorHandlers
|
||||
Middleware *MiddlewareStack `json:"-"`
|
||||
ErrorHandlers ErrorHandlers `json:"-"`
|
||||
ErrorMiddleware MiddlewareFunc `json:"-"`
|
||||
router *mux.Router
|
||||
moot *sync.Mutex
|
||||
moot *sync.RWMutex
|
||||
routes RouteList
|
||||
root *App
|
||||
children []*App
|
||||
filepaths []string
|
||||
}
|
||||
|
||||
// Muxer returns the underlying mux router to allow
|
||||
// for advance configurations
|
||||
func (a *App) Muxer() *mux.Router {
|
||||
return a.router
|
||||
}
|
||||
|
||||
// New returns a new instance of App and adds some sane, and useful, defaults.
|
||||
func New(opts Options) *App {
|
||||
events.LoadPlugins()
|
||||
envy.Load()
|
||||
opts = optionsWithDefaults(opts)
|
||||
|
||||
a := &App{
|
||||
Options: opts,
|
||||
Middleware: newMiddlewareStack(),
|
||||
ErrorHandlers: ErrorHandlers{
|
||||
404: defaultErrorHandler,
|
||||
500: defaultErrorHandler,
|
||||
},
|
||||
router: mux.NewRouter().StrictSlash(!opts.LooseSlash),
|
||||
moot: &sync.Mutex{},
|
||||
router: mux.NewRouter(),
|
||||
moot: &sync.RWMutex{},
|
||||
routes: RouteList{},
|
||||
children: []*App{},
|
||||
}
|
||||
|
||||
dem := a.defaultErrorMiddleware
|
||||
if a.ErrorMiddleware != nil {
|
||||
dem = a.ErrorMiddleware
|
||||
}
|
||||
a.Middleware = newMiddlewareStack(dem)
|
||||
|
||||
notFoundHandler := func(errorf string, code int) http.HandlerFunc {
|
||||
return func(res http.ResponseWriter, req *http.Request) {
|
||||
c := a.newContext(RouteInfo{}, res, req)
|
||||
|
||||
+11
-23
@@ -4,13 +4,17 @@ clone_folder: c:\gopath\src\github.com\gobuffalo\buffalo
|
||||
|
||||
environment:
|
||||
GOPATH: c:\gopath
|
||||
GO111MODULE: auto
|
||||
matrix:
|
||||
- GOBIN: c:\go
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||
|
||||
services:
|
||||
- mysql
|
||||
- postgresql
|
||||
build:
|
||||
verbosity: normal
|
||||
|
||||
deploy: false
|
||||
|
||||
stack: go 1.11
|
||||
|
||||
install:
|
||||
- cmd: >-
|
||||
@@ -18,28 +22,12 @@ install:
|
||||
|
||||
set PATH=%GOPATH%\bin;%GOBIN%\bin;c:\tools\mingw64\bin;%PATH%
|
||||
|
||||
echo %PATH%
|
||||
|
||||
echo %GOPATH%
|
||||
|
||||
go version
|
||||
|
||||
go env
|
||||
build:
|
||||
verbosity: normal
|
||||
deploy: false
|
||||
|
||||
before_build:
|
||||
- cmd: >-
|
||||
go get -v -u github.com/mattn/go-sqlite3
|
||||
|
||||
go get -v -u -t ./...
|
||||
|
||||
build_script:
|
||||
- cmd: >-
|
||||
go build -v -tags sqlite github.com/gobuffalo/buffalo/buffalo
|
||||
set GO111MODULE=on
|
||||
|
||||
go install -tags sqlite github.com/gobuffalo/buffalo/buffalo
|
||||
go build -v github.com/gobuffalo/buffalo/buffalo
|
||||
|
||||
test_script:
|
||||
- cmd: for /f "" %%G in ('go list github.com/gobuffalo/buffalo/... ^| find /i /v "/vendor/"') do ( go test -tags sqlite %%G & IF ERRORLEVEL == 1 EXIT 1)
|
||||
- set GO111MODULE=on
|
||||
- go test -tags "sqlite integration_test" -race ./...
|
||||
|
||||
+11
-5
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/gobuffalo/pop/nulls"
|
||||
"github.com/gobuffalo/x/httpx"
|
||||
"github.com/markbates/oncer"
|
||||
"github.com/monoculum/formam"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@@ -27,10 +28,10 @@ var binders = map[string]Binder{}
|
||||
var decoder *formam.Decoder
|
||||
var lock = &sync.Mutex{}
|
||||
var timeFormats = []string{
|
||||
"2006-01-02T15:04:05Z07:00",
|
||||
time.RFC3339,
|
||||
"01/02/2006",
|
||||
"2006-01-02",
|
||||
"2006-01-02T03:04",
|
||||
"2006-01-02T15:04",
|
||||
time.ANSIC,
|
||||
time.UnixDate,
|
||||
time.RubyDate,
|
||||
@@ -39,7 +40,6 @@ var timeFormats = []string{
|
||||
time.RFC850,
|
||||
time.RFC1123,
|
||||
time.RFC1123Z,
|
||||
time.RFC3339,
|
||||
time.RFC3339Nano,
|
||||
time.Kitchen,
|
||||
time.Stamp,
|
||||
@@ -51,11 +51,17 @@ var timeFormats = []string{
|
||||
// RegisterTimeFormats allows to add custom time layouts that
|
||||
// the binder will be able to use for decoding.
|
||||
func RegisterTimeFormats(layouts ...string) {
|
||||
timeFormats = append(timeFormats, layouts...)
|
||||
timeFormats = append(layouts, timeFormats...)
|
||||
}
|
||||
|
||||
// RegisterCustomDecorder allows to define custom type decoders.
|
||||
// RegisterCustomDecorder is deprecated. Use RegisterCustomDecoder instead
|
||||
func RegisterCustomDecorder(fn CustomTypeDecoder, types []interface{}, fields []interface{}) {
|
||||
oncer.Deprecate(0, "binding.RegisterCustomDecorder", "Use binding.RegisterCustomDecoder instead")
|
||||
RegisterCustomDecoder(fn, types, fields)
|
||||
}
|
||||
|
||||
// RegisterCustomDecoder allows to define custom type decoders.
|
||||
func RegisterCustomDecoder(fn CustomTypeDecoder, types []interface{}, fields []interface{}) {
|
||||
rawFunc := (func([]string) (interface{}, error))(fn)
|
||||
decoder.RegisterCustomType(rawFunc, types, fields)
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
Package buffalo is a Go web development eco-system, designed to make your life easier.
|
||||
|
||||
Buffalo helps you to generate a web project that already has everything from front-end (JavaScript, SCSS, etc.) to back-end (database, routing, etc.) already hooked up and ready to run. From there it provides easy APIs to build your web application quickly in Go.
|
||||
|
||||
Buffalo **isn't just a framework**, it's a holistic web development environment and project structure that **lets developers get straight to the business** of, well, building their business.
|
||||
*/
|
||||
package buffalo
|
||||
+53
@@ -3,9 +3,12 @@ package buffalo
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"sync"
|
||||
|
||||
"github.com/gobuffalo/buffalo/binding"
|
||||
"github.com/gobuffalo/buffalo/render"
|
||||
"github.com/gobuffalo/x/httpx"
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
// Context holds on to information as you
|
||||
@@ -38,3 +41,53 @@ type Context interface {
|
||||
type ParamValues interface {
|
||||
Get(string) string
|
||||
}
|
||||
|
||||
func (a *App) newContext(info RouteInfo, res http.ResponseWriter, req *http.Request) Context {
|
||||
if ws, ok := res.(*Response); ok {
|
||||
res = ws
|
||||
}
|
||||
params := req.URL.Query()
|
||||
vars := mux.Vars(req)
|
||||
for k, v := range vars {
|
||||
params.Set(k, v)
|
||||
}
|
||||
|
||||
if err := req.ParseForm(); err == nil {
|
||||
for k, v := range req.Form {
|
||||
for _, vv := range v {
|
||||
params.Set(k, vv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
session := a.getSession(req, res)
|
||||
|
||||
ct := httpx.ContentType(req)
|
||||
contextData := map[string]interface{}{
|
||||
"app": a,
|
||||
"env": a.Env,
|
||||
"routes": a.Routes(),
|
||||
"current_route": info,
|
||||
"current_path": req.URL.Path,
|
||||
"contentType": ct,
|
||||
"method": req.Method,
|
||||
}
|
||||
|
||||
for _, route := range a.Routes() {
|
||||
cRoute := route
|
||||
contextData[cRoute.PathName] = cRoute.BuildPathHelper()
|
||||
}
|
||||
|
||||
return &DefaultContext{
|
||||
Context: req.Context(),
|
||||
contentType: ct,
|
||||
response: res,
|
||||
request: req,
|
||||
params: params,
|
||||
logger: a.Logger,
|
||||
session: session,
|
||||
flash: newFlash(session),
|
||||
data: contextData,
|
||||
moot: &sync.RWMutex{},
|
||||
}
|
||||
}
|
||||
|
||||
+14
@@ -45,6 +45,20 @@ func (c *Cookies) SetWithExpirationTime(name, value string, expires time.Time) {
|
||||
http.SetCookie(c.res, &ck)
|
||||
}
|
||||
|
||||
// SetWithPath sets a cookie path on the server in which the cookie will be available on.
|
||||
// If set to '/', the cookie will be available within the entire domain.
|
||||
// If set to '/foo/', the cookie will only be available within the /foo/ directory and
|
||||
// all sub-directories such as /foo/bar/ of domain.
|
||||
func (c *Cookies) SetWithPath(name, value, path string) {
|
||||
ck := http.Cookie{
|
||||
Name: name,
|
||||
Value: value,
|
||||
Path: path,
|
||||
}
|
||||
|
||||
http.SetCookie(c.res, &ck)
|
||||
}
|
||||
|
||||
// Delete sets a header that tells the browser to remove the cookie with the given name.
|
||||
func (c *Cookies) Delete(name string) {
|
||||
ck := http.Cookie{
|
||||
|
||||
+35
-4
@@ -3,6 +3,7 @@ package buffalo
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
@@ -10,6 +11,7 @@ import (
|
||||
"reflect"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/gobuffalo/buffalo/binding"
|
||||
@@ -34,6 +36,7 @@ type DefaultContext struct {
|
||||
contentType string
|
||||
data map[string]interface{}
|
||||
flash *Flash
|
||||
moot *sync.RWMutex
|
||||
}
|
||||
|
||||
// Response returns the original Response for the request.
|
||||
@@ -66,12 +69,16 @@ func (d *DefaultContext) Param(key string) string {
|
||||
// Set a value onto the Context. Any value set onto the Context
|
||||
// will be automatically available in templates.
|
||||
func (d *DefaultContext) Set(key string, value interface{}) {
|
||||
d.moot.Lock()
|
||||
d.data[key] = value
|
||||
d.moot.Unlock()
|
||||
}
|
||||
|
||||
// Value that has previously stored on the context.
|
||||
func (d *DefaultContext) Value(key interface{}) interface{} {
|
||||
if k, ok := key.(string); ok {
|
||||
d.moot.RLock()
|
||||
defer d.moot.RUnlock()
|
||||
if v, ok := d.data[k]; ok {
|
||||
return v
|
||||
}
|
||||
@@ -105,7 +112,7 @@ func (d *DefaultContext) Render(status int, rr render.Renderer) error {
|
||||
d.LogField("render", time.Since(start))
|
||||
}()
|
||||
if rr != nil {
|
||||
data := d.data
|
||||
data := d.Data()
|
||||
pp := map[string]string{}
|
||||
for k, v := range d.params {
|
||||
pp[k] = v[0]
|
||||
@@ -212,13 +219,20 @@ func (d *DefaultContext) Redirect(status int, url string, args ...interface{}) e
|
||||
|
||||
// Data contains all the values set through Get/Set.
|
||||
func (d *DefaultContext) Data() map[string]interface{} {
|
||||
return d.data
|
||||
d.moot.Lock()
|
||||
m := map[string]interface{}{}
|
||||
for k, v := range d.data {
|
||||
m[k] = v
|
||||
}
|
||||
d.moot.Unlock()
|
||||
return m
|
||||
}
|
||||
|
||||
func (d *DefaultContext) String() string {
|
||||
bb := make([]string, 0, len(d.data))
|
||||
data := d.Data()
|
||||
bb := make([]string, 0, len(data))
|
||||
|
||||
for k, v := range d.data {
|
||||
for k, v := range data {
|
||||
if _, ok := v.(RouteHelperFunc); !ok {
|
||||
bb = append(bb, fmt.Sprintf("%s: %s", k, v))
|
||||
}
|
||||
@@ -243,3 +257,20 @@ func (d *DefaultContext) File(name string) (binding.File, error) {
|
||||
}
|
||||
return bf, nil
|
||||
}
|
||||
|
||||
// MarshalJSON implements json marshaling for the context
|
||||
func (d *DefaultContext) MarshalJSON() ([]byte, error) {
|
||||
m := map[string]interface{}{}
|
||||
data := d.Data()
|
||||
for k, v := range data {
|
||||
// don't try and marshal ourself
|
||||
if _, ok := v.(*DefaultContext); ok {
|
||||
continue
|
||||
}
|
||||
if _, err := json.Marshal(v); err == nil {
|
||||
// it can be marshaled, so add it:
|
||||
m[k] = v
|
||||
}
|
||||
}
|
||||
return json.Marshal(m)
|
||||
}
|
||||
|
||||
+79
-9
@@ -1,13 +1,17 @@
|
||||
package buffalo
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/events"
|
||||
"github.com/gobuffalo/plush"
|
||||
"github.com/gobuffalo/x/defaults"
|
||||
"github.com/gobuffalo/x/httpx"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@@ -58,12 +62,19 @@ func (a *App) PanicHandler(next Handler) Handler {
|
||||
if r != nil { //catch
|
||||
switch t := r.(type) {
|
||||
case error:
|
||||
err = errors.WithStack(t)
|
||||
err = t
|
||||
case string:
|
||||
err = errors.WithStack(errors.New(t))
|
||||
err = errors.New(t)
|
||||
default:
|
||||
err = errors.New(fmt.Sprint(t))
|
||||
}
|
||||
err = errors.WithStack(err)
|
||||
events.EmitError(events.ErrPanic, err,
|
||||
map[string]interface{}{
|
||||
"context": c,
|
||||
"app": a,
|
||||
},
|
||||
)
|
||||
eh := a.ErrorHandlers.Get(500)
|
||||
eh(500, err, c)
|
||||
}
|
||||
@@ -72,6 +83,47 @@ func (a *App) PanicHandler(next Handler) Handler {
|
||||
}
|
||||
}
|
||||
|
||||
func (a *App) defaultErrorMiddleware(next Handler) Handler {
|
||||
return func(c Context) error {
|
||||
err := next(c)
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
status := 500
|
||||
// unpack root cause and check for HTTPError
|
||||
cause := errors.Cause(err)
|
||||
switch cause {
|
||||
case sql.ErrNoRows:
|
||||
status = 404
|
||||
default:
|
||||
if h, ok := cause.(HTTPError); ok {
|
||||
status = h.Status
|
||||
}
|
||||
}
|
||||
payload := events.Payload{
|
||||
"context": c,
|
||||
"app": a,
|
||||
}
|
||||
events.EmitError(events.ErrGeneral, err, payload)
|
||||
|
||||
eh := a.ErrorHandlers.Get(status)
|
||||
err = eh(status, err, c)
|
||||
if err != nil {
|
||||
events.Emit(events.Event{
|
||||
Kind: EvtFailureErr,
|
||||
Message: "unable to handle error and giving up",
|
||||
Error: err,
|
||||
Payload: payload,
|
||||
})
|
||||
// things have really hit the fan if we're here!!
|
||||
a.Logger.Error(err)
|
||||
c.Response().WriteHeader(500)
|
||||
c.Response().Write([]byte(err.Error()))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
func productionErrorResponseFor(status int) []byte {
|
||||
if status == http.StatusNotFound {
|
||||
return []byte(prodNotFoundTmpl)
|
||||
@@ -80,8 +132,18 @@ func productionErrorResponseFor(status int) []byte {
|
||||
return []byte(prodErrorTmpl)
|
||||
}
|
||||
|
||||
// ErrorResponse is a used to display errors as JSON or XML
|
||||
type ErrorResponse struct {
|
||||
XMLName xml.Name `json:"-" xml:"response"`
|
||||
Error string `json:"error" xml:"error"`
|
||||
Trace string `json:"trace" xml:"trace"`
|
||||
Code int `json:"code" xml:"code,attr"`
|
||||
}
|
||||
|
||||
func defaultErrorHandler(status int, origErr error, c Context) error {
|
||||
env := c.Value("env")
|
||||
ct := defaults.String(httpx.ContentType(c.Request()), "text/html; charset=utf-8")
|
||||
c.Response().Header().Set("content-type", ct)
|
||||
|
||||
c.Logger().Error(origErr)
|
||||
c.Response().WriteHeader(status)
|
||||
@@ -92,21 +154,29 @@ func defaultErrorHandler(status int, origErr error, c Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
msg := fmt.Sprintf("%+v", origErr)
|
||||
ct := httpx.ContentType(c.Request())
|
||||
trace := fmt.Sprintf("%+v", origErr)
|
||||
switch strings.ToLower(ct) {
|
||||
case "application/json", "text/json", "json":
|
||||
err := json.NewEncoder(c.Response()).Encode(map[string]interface{}{
|
||||
"error": msg,
|
||||
"code": status,
|
||||
err := json.NewEncoder(c.Response()).Encode(&ErrorResponse{
|
||||
Error: errors.Cause(origErr).Error(),
|
||||
Trace: trace,
|
||||
Code: status,
|
||||
})
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
case "application/xml", "text/xml", "xml":
|
||||
err := xml.NewEncoder(c.Response()).Encode(&ErrorResponse{
|
||||
Error: errors.Cause(origErr).Error(),
|
||||
Trace: trace,
|
||||
Code: status,
|
||||
})
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
default:
|
||||
if err := c.Request().ParseForm(); err != nil {
|
||||
msg = fmt.Sprintf("%s\n%s", err.Error(), msg)
|
||||
trace = fmt.Sprintf("%s\n%s", err.Error(), trace)
|
||||
}
|
||||
routes := c.Value("routes")
|
||||
if cd, ok := c.(*DefaultContext); ok {
|
||||
@@ -115,7 +185,7 @@ func defaultErrorHandler(status int, origErr error, c Context) error {
|
||||
}
|
||||
data := map[string]interface{}{
|
||||
"routes": routes,
|
||||
"error": msg,
|
||||
"error": trace,
|
||||
"status": status,
|
||||
"data": c.Data(),
|
||||
"params": c.Params(),
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package buffalo
|
||||
|
||||
const (
|
||||
// EvtAppStart is emitted when buffalo.App#Serve is called
|
||||
EvtAppStart = "buffalo:app:start"
|
||||
// EvtAppStartErr is emitted when an error occurs calling buffalo.App#Serve
|
||||
EvtAppStartErr = "buffalo:app:start:err"
|
||||
|
||||
// EvtAppStop is emitted when buffalo.App#Stop is called
|
||||
EvtAppStop = "buffalo:app:stop"
|
||||
// EvtAppStopErr is emitted when an error occurs calling buffalo.App#Stop
|
||||
EvtAppStopErr = "buffalo:app:stop:err"
|
||||
|
||||
// EvtRouteStarted is emitted when a requested route is being processed
|
||||
EvtRouteStarted = "buffalo:route:started"
|
||||
// EvtRouteFinished is emitted when a requested route is completed
|
||||
EvtRouteFinished = "buffalo:route:finished"
|
||||
// EvtRouteErr is emitted when there is a problem handling processing a route
|
||||
EvtRouteErr = "buffalo:route:err"
|
||||
|
||||
// EvtWorkerStart is emitted when buffalo.App#Serve is called and workers are started
|
||||
EvtWorkerStart = "buffalo:worker:start"
|
||||
// EvtWorkerStartErr is emitted when an error occurs when starting workers
|
||||
EvtWorkerStartErr = "buffalo:worker:start:err"
|
||||
|
||||
// EvtWorkerStop is emitted when buffalo.App#Stop is called and workers are stopped
|
||||
EvtWorkerStop = "buffalo:worker:stop"
|
||||
// EvtWorkerStopErr is emitted when an error occurs when stopping workers
|
||||
EvtWorkerStopErr = "buffalo:worker:stop:err"
|
||||
|
||||
// EvtFailureErr is emitted when something can't be processed at all. it is a bad thing
|
||||
EvtFailureErr = "buffalo:failure:err"
|
||||
)
|
||||
+38
-64
@@ -1,77 +1,51 @@
|
||||
module github.com/gobuffalo/buffalo
|
||||
|
||||
require (
|
||||
dmitri.shuralyov.com/text/kebabcase v0.0.0-20180217051803-40e40b42552a
|
||||
github.com/ajg/form v0.0.0-20160802194845-cc2954064ec9
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7
|
||||
github.com/davecgh/go-spew v1.1.0
|
||||
github.com/codegangsta/negroni v1.0.0 // indirect
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d
|
||||
github.com/dustin/go-humanize v1.0.0
|
||||
github.com/fatih/color v1.7.0
|
||||
github.com/fatih/structs v1.0.0
|
||||
github.com/fsnotify/fsnotify v1.4.7
|
||||
github.com/go-sql-driver/mysql v1.4.0
|
||||
github.com/gobuffalo/envy v1.6.3
|
||||
github.com/gobuffalo/fizz v1.0.7
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.0
|
||||
github.com/gobuffalo/makr v1.1.1
|
||||
github.com/gobuffalo/packr v1.13.1
|
||||
github.com/gobuffalo/plush v0.0.0-20180810170812-274552812256
|
||||
github.com/gobuffalo/pop v0.0.0-20180810203029-9f8bf0c11920
|
||||
github.com/gobuffalo/tags v2.0.6+incompatible
|
||||
github.com/gobuffalo/uuid v2.0.0+incompatible
|
||||
github.com/gobuffalo/validate v2.0.0+incompatible
|
||||
github.com/gobuffalo/x v0.0.0-20180117215853-11ca13c05abd
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.1
|
||||
github.com/gobuffalo/buffalo-pop v1.1.2
|
||||
github.com/gobuffalo/envy v1.6.5
|
||||
github.com/gobuffalo/events v1.1.1
|
||||
github.com/gobuffalo/genny v0.0.0-20181019144442-df0a36fdd146
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.5
|
||||
github.com/gobuffalo/httptest v1.0.2
|
||||
github.com/gobuffalo/makr v1.1.5
|
||||
github.com/gobuffalo/mw-basicauth v1.0.3
|
||||
github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56
|
||||
github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b
|
||||
github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130
|
||||
github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6
|
||||
github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e
|
||||
github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189
|
||||
github.com/gobuffalo/packr v1.13.7
|
||||
github.com/gobuffalo/plush v3.7.20+incompatible
|
||||
github.com/gobuffalo/pop v4.8.4+incompatible
|
||||
github.com/gobuffalo/tags v2.0.11+incompatible
|
||||
github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7
|
||||
github.com/gorilla/context v1.1.1
|
||||
github.com/gorilla/mux v1.6.2
|
||||
github.com/gorilla/securecookie v1.1.1
|
||||
github.com/gorilla/sessions v1.1.1
|
||||
github.com/inconshreveable/mousetrap v1.0.0
|
||||
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0
|
||||
github.com/joho/godotenv v1.2.0
|
||||
github.com/lib/pq v0.0.0-20180523175426-90697d60dd84
|
||||
github.com/markbates/deplist v1.0.2
|
||||
github.com/markbates/going v1.0.1
|
||||
github.com/markbates/grift v1.0.1
|
||||
github.com/markbates/hmax v1.0.0
|
||||
github.com/markbates/inflect v1.0.0
|
||||
github.com/markbates/refresh v1.4.1
|
||||
github.com/gorilla/sessions v1.1.3
|
||||
github.com/markbates/deplist v1.0.5
|
||||
github.com/markbates/grift v1.0.4
|
||||
github.com/markbates/inflect v1.0.1
|
||||
github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4
|
||||
github.com/markbates/refresh v1.4.10
|
||||
github.com/markbates/sigtx v1.0.0
|
||||
github.com/markbates/willie v1.0.6
|
||||
github.com/mattn/go-colorable v0.0.9
|
||||
github.com/mattn/go-isatty v0.0.3
|
||||
github.com/mattn/go-sqlite3 v1.9.0
|
||||
github.com/microcosm-cc/bluemonday v1.0.0
|
||||
github.com/mitchellh/go-homedir v0.0.0-20180801233206-58046073cbff
|
||||
github.com/monoculum/formam v0.0.0-20170619223434-99ca9dcbaca6
|
||||
github.com/nicksnyder/go-i18n v1.10.0
|
||||
github.com/pelletier/go-toml v1.2.0
|
||||
github.com/markbates/willie v1.0.9 // indirect
|
||||
github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba
|
||||
github.com/nicksnyder/go-i18n v1.10.0 // indirect
|
||||
github.com/pkg/errors v0.8.0
|
||||
github.com/pmezard/go-difflib v1.0.0
|
||||
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516
|
||||
github.com/sergi/go-diff v1.0.0
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041
|
||||
github.com/shurcooL/graphql v0.0.0-20180514000029-62c9ce094e75
|
||||
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b
|
||||
github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8
|
||||
github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95
|
||||
github.com/sirupsen/logrus v1.0.6
|
||||
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e
|
||||
github.com/sirupsen/logrus v1.1.1
|
||||
github.com/spf13/cobra v0.0.3
|
||||
github.com/spf13/pflag v1.0.2
|
||||
github.com/spf13/pflag v1.0.3
|
||||
github.com/spf13/viper v1.2.1
|
||||
github.com/stretchr/testify v1.2.2
|
||||
github.com/unrolled/secure v0.0.0-20180618144512-8287f3899c8e
|
||||
golang.org/x/crypto v0.0.0-20180808211826-de0752318171
|
||||
golang.org/x/net v0.0.0-20180811021610-c39426892332
|
||||
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f
|
||||
golang.org/x/sys v0.0.0-20180814072032-4e1fef560951
|
||||
google.golang.org/appengine v1.1.0
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
|
||||
gopkg.in/mail.v2 v2.0.0-20180301192024-63235f23494b
|
||||
gopkg.in/russross/blackfriday.v1 v1.5.1
|
||||
gopkg.in/yaml.v2 v2.2.1
|
||||
golang.org/x/tools v0.0.0-20181019005945-6adeb8aab2de
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
|
||||
gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4
|
||||
)
|
||||
|
||||
+253
-82
@@ -1,111 +1,238 @@
|
||||
dmitri.shuralyov.com/text/kebabcase v0.0.0-20180217051803-40e40b42552a/go.mod h1:3YpR/7A6nvWHA/oFH66Hp/dJ5A2gM63I3xkA/3FV6tY=
|
||||
github.com/ajg/form v0.0.0-20160802194845-cc2954064ec9 h1:fJ4XPqxuZfm11zauw9XX7c30P8xwDyucdWu8H6Htrxs=
|
||||
github.com/ajg/form v0.0.0-20160802194845-cc2954064ec9/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7 h1:XFqp7VFIbbJO1hlpGbzo45NVYWVIM2eMD9MAxrOTVzU=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/Masterminds/semver v1.4.2 h1:WBLTQ37jOCzSLtXNdoo8bNM8876KhNqOKvrlGITgsTc=
|
||||
github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
|
||||
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f h1:zvClvFQwU++UpIUBGC8YmDlfhUrweEy1R1Fj1gu5iIM=
|
||||
github.com/ajg/form v0.0.0-20160822230020-523a5da1a92f/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
||||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
|
||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c h1:2zRrJWIt/f9c9HhNHAgrRgq0San5gRRUJTBXLkchal0=
|
||||
github.com/cockroachdb/cockroach-go v0.0.0-20181001143604-e0a95dfd547c/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
|
||||
github.com/codegangsta/negroni v1.0.0 h1:+aYywywx4bnKXWvoWtRfJ91vC59NbEhEY03sZjQhbVY=
|
||||
github.com/codegangsta/negroni v1.0.0/go.mod h1:v0y3T5G7Y1UlFfyxFn/QLRU4a2EuNau2iZY63YTKWo0=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
||||
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d h1:lDrio3iIdNb0Gw9CgH7cQF+iuB5mOOjdJ9ERNJCBgb4=
|
||||
github.com/dustin/go-humanize v0.0.0-20180713052910-9f541cc9db5d/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU=
|
||||
github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
|
||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=
|
||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
|
||||
github.com/gobuffalo/envy v1.6.3 h1:I9iyNACF0Tovfta7iqLrUAXFHYBDBWveQrjpEv2XeWs=
|
||||
github.com/gobuffalo/envy v1.6.3/go.mod h1:gOxUQY+OEwqH1a2m25Sqax1GIhj31tPNOIdFzj8QThs=
|
||||
github.com/gobuffalo/fizz v1.0.7 h1:xvG4eDlZvwzFq1cUk13VsveNNBHAIxOBDYBW3MGCLtg=
|
||||
github.com/gobuffalo/fizz v1.0.7/go.mod h1:fbtmvB0dcsGJUxM/S8biqkQtvykqPQGdkcg94zVu8GA=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.0 h1:e2dK+SoHgOc/vfXuYMdXwEg2vAUlFzp8SBRwTOXckQ0=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.0/go.mod h1:c8/8gRnd6MSyyk+fp6E8O8cUTHd7P2cnDnH4G7o91l0=
|
||||
github.com/gobuffalo/makr v1.1.1 h1:IZXL0NMtPDCuzINbsCLjzo8/KYi2j/ySSyzeSn4B7Ds=
|
||||
github.com/gobuffalo/makr v1.1.1/go.mod h1:1Ga9O4Gqd5xXc+AoI3eLwgu7k+gWamSUXd2Ps942KkM=
|
||||
github.com/gobuffalo/packr v1.13.1 h1:1Z7KOEokVtxM7PFvh8ZYD/+h7vwN/hl1DBD4wDKWGvE=
|
||||
github.com/gobuffalo/packr v1.13.1/go.mod h1:m3J/Q/tkaODAQq3r6NyWhDhJs2cVZS/lU0+0Edmfv3c=
|
||||
github.com/gobuffalo/plush v0.0.0-20180810170812-274552812256 h1:F0IV6ybT9TYIXHVICqIHKcjCNvJuicTL3WwoE8kNuuI=
|
||||
github.com/gobuffalo/plush v0.0.0-20180810170812-274552812256/go.mod h1:vdLIKHIw/7fnuNo9clH7hkIP50T27JgtfrcD2mnqIBM=
|
||||
github.com/gobuffalo/pop v0.0.0-20180810203029-9f8bf0c11920 h1:O4TZPudnJq5ic4v/lCMotk8+o/pfsCGNzXMcBaFoWq8=
|
||||
github.com/gobuffalo/pop v0.0.0-20180810203029-9f8bf0c11920/go.mod h1:rYdFIDMO4v9I4SK6BQ3q+vnd5HlQnTtlY/ANF7wKzGM=
|
||||
github.com/gobuffalo/tags v0.0.0-20180810190535-4c0ef4ed8a98/go.mod h1:B2OuqVIntUiwfvr8G95aA63VofxRmFBpP/yui2Mza6U=
|
||||
github.com/gobuffalo/tags v2.0.6+incompatible h1:ROoAxfy9HW4i0plbJ+vw8whEs8J1KWpFJRa7CHRPb4M=
|
||||
github.com/gobuffalo/tags v2.0.6+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
|
||||
github.com/gobuffalo/uuid v0.0.0-20180810195722-82924465e062/go.mod h1:K1sWc56g4/eeeQxLEPdNW22nZSRq59ih6YKnxGUZQRA=
|
||||
github.com/gobuffalo/uuid v2.0.0+incompatible h1:Qy7fnxWR5ubnoXoHsHT63YamltD6PQraDWxqtapAMRI=
|
||||
github.com/gobuffalo/uuid v2.0.0+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/validate v2.0.0+incompatible h1:KllrOhUUzAeTil8MaaQorZOH0Bx6KOvi8mRVlwFHRA4=
|
||||
github.com/gobuffalo/validate v2.0.0+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM=
|
||||
github.com/gobuffalo/x v0.0.0-20180117215853-11ca13c05abd h1:0AiAe/jaKqMCar/zjOQFewW33iOLsCD6lPbqYlTcr2Q=
|
||||
github.com/gobuffalo/x v0.0.0-20180117215853-11ca13c05abd/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc=
|
||||
github.com/gobuffalo/buffalo v0.12.8-0.20181004233540-fac9bb505aa8/go.mod h1:sLyT7/dceRXJUxSsE813JTQtA3Eb1vjxWfo/N//vXIY=
|
||||
github.com/gobuffalo/buffalo v0.13.0/go.mod h1:Mjn1Ba9wpIbpbrD+lIDMy99pQ0H0LiddMIIDGse7qT4=
|
||||
github.com/gobuffalo/buffalo-plugins v1.0.2/go.mod h1:pOp/uF7X3IShFHyobahTkTLZaeUXwb0GrUTb9ngJWTs=
|
||||
github.com/gobuffalo/buffalo-plugins v1.0.4/go.mod h1:pWS1vjtQ6uD17MVFWf7i3zfThrEKWlI5+PYLw/NaDB4=
|
||||
github.com/gobuffalo/buffalo-plugins v1.4.3/go.mod h1:uCzTY0woez4nDMdQjkcOYKanngeUVRO2HZi7ezmAjWY=
|
||||
github.com/gobuffalo/buffalo-plugins v1.5.1 h1:TA7WgMcS1jfWdI5nSoqnCaPAMegOKrMcJjaWq/ZP7tM=
|
||||
github.com/gobuffalo/buffalo-plugins v1.5.1/go.mod h1:jbmwSZK5+PiAP9cC09VQOrGMZFCa/P0UMlIS3O12r5w=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.1 h1:o5sDfAaAm3oTytazmpWkgu9BTQ3TNmYiSFrlKSuvznU=
|
||||
github.com/gobuffalo/buffalo-plugins v1.6.1/go.mod h1:/XZt7UuuDnx5P4v3cStK0+XoYiNOA2f0wDIsm1oLJQA=
|
||||
github.com/gobuffalo/buffalo-pop v1.0.5/go.mod h1:Fw/LfFDnSmB/vvQXPvcXEjzP98Tc+AudyNWUBWKCwQ8=
|
||||
github.com/gobuffalo/buffalo-pop v1.1.2 h1:3q4oN2N/J4H+xWYizPrCYOupdtF7OALNmxEoRGRFTrI=
|
||||
github.com/gobuffalo/buffalo-pop v1.1.2/go.mod h1:czNLXcYbg5/fjr+uht0NyjZaQ0V2W23H1jzyORgCzQ4=
|
||||
github.com/gobuffalo/envy v1.6.4/go.mod h1:Abh+Jfw475/NWtYMEt+hnJWRiC8INKWibIMyNt1w2Mc=
|
||||
github.com/gobuffalo/envy v1.6.5 h1:X3is06x7v0nW2xiy2yFbbIjwHz57CD6z6MkvqULTCm8=
|
||||
github.com/gobuffalo/envy v1.6.5/go.mod h1:N+GkhhZ/93bGZc6ZKhJLP6+m+tCNPKwgSpH9kaifseQ=
|
||||
github.com/gobuffalo/events v1.0.3/go.mod h1:Txo8WmqScapa7zimEQIwgiJBvMECMe9gJjsKNPN3uZw=
|
||||
github.com/gobuffalo/events v1.0.7/go.mod h1:z8txf6H9jWhQ5Scr7YPLWg/cgXBRj8Q4uYI+rsVCCSQ=
|
||||
github.com/gobuffalo/events v1.0.8/go.mod h1:A5KyqT1sA+3GJiBE4QKZibse9mtOcI9nw8gGrDdqYGs=
|
||||
github.com/gobuffalo/events v1.1.1 h1:qVNM1t3w0pjU/WltTrB0gv/fjA4SrVW3W/BsMMbZbc4=
|
||||
github.com/gobuffalo/events v1.1.1/go.mod h1:Ia9OgHMco9pEhJaPrPQJ4u4+IZlkxYVco2VbJ2XgnAE=
|
||||
github.com/gobuffalo/fizz v1.0.12 h1:JJOkmlStog5AiBL434UoGMJ896p3MnTnzedFVaZSF3k=
|
||||
github.com/gobuffalo/fizz v1.0.12/go.mod h1:C0sltPxpYK8Ftvf64kbsQa2yiCZY4RZviurNxXdAKwc=
|
||||
github.com/gobuffalo/flect v0.0.0-20180907193754-dc14d8acaf9f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181002182613-4571df4b1daf/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181007231023-ae7ed6bfe683/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181018182602-fd24a256709f/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514 h1:TNe8Qea9CDvWb/wjx1KjucC6ymiPqA1CEP3NT8rGXOg=
|
||||
github.com/gobuffalo/flect v0.0.0-20181019110701-3d6f0b585514/go.mod h1:rCiQgmAE4axgBNl3jZWzS5rETRYTGOsrixTRaCPzNdA=
|
||||
github.com/gobuffalo/genny v0.0.0-20180924032338-7af3a40f2252/go.mod h1:tUTQOogrr7tAQnhajMSH6rv1BVev34H2sa1xNHMy94g=
|
||||
github.com/gobuffalo/genny v0.0.0-20181003150629-3786a0744c5d/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181005145118-318a41a134cc/go.mod h1:WAd8HmjMVrnkAZbmfgH5dLBUchsZfqzp/WS5sQz+uTM=
|
||||
github.com/gobuffalo/genny v0.0.0-20181007153042-b8de7d566757/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181012161047-33e5f43d83a6/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246 h1:ap17NHnOCqCKBCeW7deVKkGFZcm7/Lro6uqdlvTXN2k=
|
||||
github.com/gobuffalo/genny v0.0.0-20181017160347-90a774534246/go.mod h1:+oG5Ljrw04czAHbPXREwaFojJbpUvcIy4DiOnbEJFTA=
|
||||
github.com/gobuffalo/genny v0.0.0-20181019144442-df0a36fdd146 h1:4NAxHRgszMndVm7VFsT1+txhpBR3vYrjDxfYQEUsFJI=
|
||||
github.com/gobuffalo/genny v0.0.0-20181019144442-df0a36fdd146/go.mod h1:IyRrGrQb/sbHu/0z9i5mbpZroIsdxjCYfj+zFiFiWZQ=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.4/go.mod h1:uRowCdK+q8d/RF0Kt3/DSalaIXbb0De/dmTqMQdkQ4I=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.5 h1:YvGVf7yj1akgsb+qc64Q0WX8uhpuZSibChbqOMRSAqE=
|
||||
github.com/gobuffalo/github_flavored_markdown v1.0.5/go.mod h1:U0643QShPF+OF2tJvYNiYDLDGDuQmJZXsf/bHOJPsMY=
|
||||
github.com/gobuffalo/httptest v1.0.2 h1:LWp2khlgA697h4BIYWW2aRxvB93jMnBrbakQ/r2KLzs=
|
||||
github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E=
|
||||
github.com/gobuffalo/licenser v0.0.0-20180924033006-eae28e638a42/go.mod h1:Ubo90Np8gpsSZqNScZZkVXXAo5DGhTb+WYFIjlnog8w=
|
||||
github.com/gobuffalo/makr v1.1.5 h1:lOlpv2iz0dNa4qse0ZYQgbtT+ybwVxWEAcOZbcPmeYc=
|
||||
github.com/gobuffalo/makr v1.1.5/go.mod h1:Y+o0btAH1kYAMDJW/TX3+oAXEu0bmSLLoC9mIFxtzOw=
|
||||
github.com/gobuffalo/mapi v1.0.0/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
|
||||
github.com/gobuffalo/mapi v1.0.1 h1:JRuTiZzDEZhBHkFiHTxJkYRT6CbYuL0K/rn+1byJoEA=
|
||||
github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc=
|
||||
github.com/gobuffalo/meta v0.0.0-20181018155829-df62557efcd3/go.mod h1:XTTOhwMNryif3x9LkTTBO/Llrveezd71u3quLd0u7CM=
|
||||
github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3 h1:RPWDSAeQeNddUkOM1qM2PkyBYaaX1GAJZX/7zx+18mU=
|
||||
github.com/gobuffalo/meta v0.0.0-20181018192820-8c6cef77dab3/go.mod h1:E94EPzx9NERGCY69UWlcj6Hipf2uK/vnfrF4QD0plVE=
|
||||
github.com/gobuffalo/mw-basicauth v1.0.3 h1:bCqDBHnByenQitOtFdEtMvlWVgPwODrfZ+nVkgGoJZ8=
|
||||
github.com/gobuffalo/mw-basicauth v1.0.3/go.mod h1:dg7+ilMZOKnQFHDefUzUHufNyTswVUviCBgF244C1+0=
|
||||
github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56 h1:SUFp8EbFjlKXkvqstoxPWx3nVPV3BSKZTswQNTZFaik=
|
||||
github.com/gobuffalo/mw-contenttype v0.0.0-20180802152300-74f5a47f4d56/go.mod h1:7EvcmzBbeCvFtQm5GqF9ys6QnCxz2UM1x0moiWLq1No=
|
||||
github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b h1:A13B4mhcFQcjPJ1GFBrh61B4Qo87fZa82FfTt9LX/QU=
|
||||
github.com/gobuffalo/mw-csrf v0.0.0-20180802151833-446ff26e108b/go.mod h1:sbGtb8DmDZuDUQoxjr8hG1ZbLtZboD9xsn6p77ppcHo=
|
||||
github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130 h1:v94+IGhlBro0Lz1gOR3lrdAVSZ0mJF2NxsdppKd7FnI=
|
||||
github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130/go.mod h1:JvNHRj7bYNAMUr/5XMkZaDcw3jZhUZpsmzhd//FFWmQ=
|
||||
github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6 h1:pZhsgF8RXEngHdibuRNOXNk1pL0K9rFa5HOcvURNTQ4=
|
||||
github.com/gobuffalo/mw-i18n v0.0.0-20180802152014-e3060b7e13d6/go.mod h1:91AQfukc52A6hdfIfkxzyr+kpVYDodgAeT5cjX1UIj4=
|
||||
github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e h1:TsmUXyHjj5ReuN1AJjEVukf72J6AfRTF2CfTEaqVLT8=
|
||||
github.com/gobuffalo/mw-paramlogger v0.0.0-20181005191442-d6ee392ec72e/go.mod h1:6OJr6VwSzgJMqWMj7TYmRUqzNe2LXu/W1rRW4MAz/ME=
|
||||
github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189 h1:nhPzONHNGlXZIMFfKm6cWpRSq5oTanRK1qBtfCPBFyE=
|
||||
github.com/gobuffalo/mw-tokenauth v0.0.0-20181001105134-8545f626c189/go.mod h1:UqBF00IfKvd39ni5+yI5MLMjAf4gX7cDKN/26zDOD6c=
|
||||
github.com/gobuffalo/packr v1.13.7 h1:2uZgLd6b/W4yRBZV/ScaORxZLNGMHO0VCvqQNkKukNA=
|
||||
github.com/gobuffalo/packr v1.13.7/go.mod h1:KkinLIn/n6+3tVXMwg6KkNvWwVsrRAz4ph+jgpk3Z24=
|
||||
github.com/gobuffalo/plush v3.7.16+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/plush v3.7.20+incompatible h1:FgLKw/zwd8IY8lAqfSuVNuHopR7jKVSs6yjJKeBajzU=
|
||||
github.com/gobuffalo/plush v3.7.20+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
|
||||
github.com/gobuffalo/pop v4.8.2+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/pop v4.8.3+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/pop v4.8.4+incompatible h1:5v15ZgICK3MFTU90QRqCaqDUf4wcriIbws1hqpYL2Xo=
|
||||
github.com/gobuffalo/pop v4.8.4+incompatible/go.mod h1:DwBz3SD5SsHpTZiTubcsFWcVDpJWGsxjVjMPnkiThWg=
|
||||
github.com/gobuffalo/release v1.0.35/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4=
|
||||
github.com/gobuffalo/release v1.0.38/go.mod h1:VtHFAKs61vO3wboCec5xr9JPTjYyWYcvaM3lclkc4x4=
|
||||
github.com/gobuffalo/release v1.0.42/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug=
|
||||
github.com/gobuffalo/release v1.0.51 h1:aGv+3ILbNuW1ef+fPELAfsQko56juthKJqOIr94oogM=
|
||||
github.com/gobuffalo/release v1.0.51/go.mod h1:RPs7EtafH4oylgetOJpGP0yCZZUiO4vqHfTHJjSdpug=
|
||||
github.com/gobuffalo/shoulders v1.0.1 h1:BqVJBUXlBWAf+WLhXijVk3SCpp75LXrVBiIkOCzZbNc=
|
||||
github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA=
|
||||
github.com/gobuffalo/tags v2.0.11+incompatible h1:zLkaontB8lWefU+DX38mzPLRKFGTJL8FKb9JnKMt0Z0=
|
||||
github.com/gobuffalo/tags v2.0.11+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
|
||||
github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/uuid v2.0.4+incompatible h1:m56JXViLiZaacKcx00GwfAc9dSLkp3akw/V6bOoJ1PA=
|
||||
github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
|
||||
github.com/gobuffalo/validate v2.0.3+incompatible h1:6f4JCEz11Zi6iIlexMv7Jz10RBPvgI795AOaubtCwTE=
|
||||
github.com/gobuffalo/validate v2.0.3+incompatible/go.mod h1:N+EtDe0J8252BgfzQUChBgfd6L93m9weay53EWFVsMM=
|
||||
github.com/gobuffalo/x v0.0.0-20181003152136-452098b06085/go.mod h1:WevpGD+5YOreDJznWevcn8NTmQEW5STSBgIkpkjzqXc=
|
||||
github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7 h1:N0iqtKwkicU8M2rLirTDJxdwuL8I2/8MjMlEayaNSgE=
|
||||
github.com/gobuffalo/x v0.0.0-20181007152206-913e47c59ca7/go.mod h1:9rDPXaB3kXdKWzMc4odGQQdG2e2DIEmANy5aSJ9yesY=
|
||||
github.com/gofrs/uuid v3.1.0+incompatible h1:q2rtkjaKT4YEr6E1kamy0Ha4RtepWlQBedyHx0uzKwA=
|
||||
github.com/gofrs/uuid v3.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
|
||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
|
||||
github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk=
|
||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
|
||||
github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1 h1:LqbZZ9sNMWVjeXS4NN5oVvhMjDyLhmA1LG86oSo+IqY=
|
||||
github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY=
|
||||
github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ=
|
||||
github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4=
|
||||
github.com/gorilla/sessions v1.1.1 h1:YMDmfaK68mUixINzY/XjscuJ47uXFWSSHzFbBQM0PrE=
|
||||
github.com/gorilla/sessions v1.1.1/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
|
||||
github.com/gorilla/sessions v1.1.2/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
|
||||
github.com/gorilla/sessions v1.1.3 h1:uXoZdcdA5XdXF3QzuSlheVRUvjl+1rKY7zBXL68L9RU=
|
||||
github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0 h1:5B0uxl2lzNRVkJVg+uGHxWtRt4C0Wjc6kJKo5XYx8xE=
|
||||
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733 h1:vr3AYkKovP8uR8AvSGGUK1IDqRa5lAAvEkZG1LKaCRc=
|
||||
github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
|
||||
github.com/jackc/pgx v3.2.0+incompatible h1:0Vihzu20St42/UDsvZGdNE6jak7oi/UOeMzwMPHkgFY=
|
||||
github.com/jackc/pgx v3.2.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I=
|
||||
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0/go.mod h1:IiEW3SEiiErVyFdH8NTuWjSifiEQKUoyK3LNqr2kCHU=
|
||||
github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc=
|
||||
github.com/jmoiron/sqlx v1.2.0 h1:41Ip0zITnmWNR/vHV+S4m+VoUivnWY5E4OJfLZjCJMA=
|
||||
github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
|
||||
github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
|
||||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/karrick/godirwalk v1.7.5 h1:JQFiMR65pT543bkWP46+k194gS999qo/OYccos9cOXg=
|
||||
github.com/karrick/godirwalk v1.7.5/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46shStcFDJ34=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
|
||||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
|
||||
github.com/konsorten/go-windows-terminal-sequences v0.0.0-20180402223658-b729f2633dfe/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/lib/pq v0.0.0-20180523175426-90697d60dd84 h1:it29sI2IM490luSc3RAhp5WuCYnc6RtbfLVAB7nmC5M=
|
||||
github.com/lib/pq v0.0.0-20180523175426-90697d60dd84/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/markbates/deplist v1.0.2 h1:91fPoNtVdkSJa/F0Zv/5+CzcZ9OnCzbWYUmFpCKe3X8=
|
||||
github.com/markbates/deplist v1.0.2/go.mod h1:ZerU6FuDYMFbdh+BdCNmce+SexbmOZd/ftnrcxVyNXQ=
|
||||
github.com/markbates/going v1.0.0/go.mod h1:I6mnB4BPnEeqo85ynXIx1ZFLLbtiLHNXVgWeFO9OGOA=
|
||||
github.com/markbates/going v1.0.1 h1:IFDakPS7ROqx1rESYPSZmURUTwI4HWuM5waQIFCUZZQ=
|
||||
github.com/markbates/going v1.0.1/go.mod h1:I6mnB4BPnEeqo85ynXIx1ZFLLbtiLHNXVgWeFO9OGOA=
|
||||
github.com/markbates/grift v0.0.0-20180319170132-76f93617a788/go.mod h1:6qyNEZSY8v6duE2tBtO/tPgBvxhT7g7DnQoIYpEyCfw=
|
||||
github.com/markbates/grift v1.0.0/go.mod h1:6qyNEZSY8v6duE2tBtO/tPgBvxhT7g7DnQoIYpEyCfw=
|
||||
github.com/markbates/grift v1.0.1 h1:n3yUdXi+qdChTRvVCbRmD9iMLjSzv7ainzW3qYTP284=
|
||||
github.com/markbates/grift v1.0.1/go.mod h1:aC7s7OfCOzc2WCafmTm7wI3cfGFA/8opYhdTGlIAmmo=
|
||||
github.com/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A=
|
||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
||||
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
|
||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
||||
github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM=
|
||||
github.com/markbates/deplist v1.0.5 h1:BKTJDTV5EynLGvTyONdgYVvV34DWq20mJAfGBCP+AYs=
|
||||
github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM=
|
||||
github.com/markbates/going v1.0.2 h1:uNQHDDfMRNOUmuxDbPbvatyw4wr4UOSUZkGkdkcip1o=
|
||||
github.com/markbates/going v1.0.2/go.mod h1:UWCk3zm0UKefHZ7l8BNqi26UyiEMniznk8naLdTcy6c=
|
||||
github.com/markbates/grift v1.0.4 h1:JjTyhlgPtgEnyHNvVn5lk21zWQbWD3cGE0YdyvvbZYg=
|
||||
github.com/markbates/grift v1.0.4/go.mod h1:wbmtW74veyx+cgfwFhlnnMWqhoz55rnHR47oMXzsyVs=
|
||||
github.com/markbates/hmax v1.0.0 h1:yo2N0gBoCnUMKhV/VRLHomT6Y9wUm+oQQENuWJqCdlM=
|
||||
github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c=
|
||||
github.com/markbates/inflect v1.0.0 h1:gTffXSQCc+WaIvBcI/IItJQMOemietXr5EIKLXDYqI4=
|
||||
github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88=
|
||||
github.com/markbates/refresh v1.4.1 h1:+kEJt7Bz6Bn/pjmnbFHhyAEnO+mW0POtyqsVyK62o3A=
|
||||
github.com/markbates/refresh v1.4.1/go.mod h1:og/05QDfszH/SCl3w8VI2Or990yna0wS2lqRcJoDqAg=
|
||||
github.com/markbates/inflect v1.0.1 h1:t3WOiMLsNqn0Vvw87evC70WSawzHZcwMETn53rL1bBw=
|
||||
github.com/markbates/inflect v1.0.1/go.mod h1:uv3UVNBe5qBIfCm8O8Q+DW+S1EopeyINj+Ikhc7rnCk=
|
||||
github.com/markbates/oncer v0.0.0-20180924031910-e862a676800b/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/oncer v0.0.0-20180924034138-723ad0170a46/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4 h1:Mlji5gkcpzkqTROyE4ZxZ8hN7osunMb2RuGVrbvMvCc=
|
||||
github.com/markbates/oncer v0.0.0-20181014194634-05fccaae8fc4/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
|
||||
github.com/markbates/refresh v1.4.10 h1:6EZ/vvVpWiam8OTIhrhfV9cVJR/NvScvcCiqosbTkbA=
|
||||
github.com/markbates/refresh v1.4.10/go.mod h1:NDPHvotuZmTmesXxr95C9bjlw1/0frJwtME2dzcVKhc=
|
||||
github.com/markbates/safe v1.0.0 h1:PASIhtTLB6ss6IA6ODaTJQziqk1lnqO5vriEZq47zIU=
|
||||
github.com/markbates/safe v1.0.0/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
github.com/markbates/safe v1.0.1 h1:yjZkbvRM6IzKj9tlu/zMJLS0n/V351OZWRnF3QfaUxI=
|
||||
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
|
||||
github.com/markbates/sigtx v1.0.0 h1:y/xtkBvNPRjD4KeEplf4w9rJVSc23/xl+jXYGowTwy0=
|
||||
github.com/markbates/sigtx v1.0.0/go.mod h1:QF1Hv6Ic6Ca6W+T+DL0Y/ypborFKyvUY9HmuCD4VeTc=
|
||||
github.com/markbates/willie v1.0.6 h1:VguZshKlOyixOjcEdtlWxzCgr7AZE/3u+2bai9Ik1wY=
|
||||
github.com/markbates/willie v1.0.6/go.mod h1:XtK+fmQ7tgVMIVAS1ghwuqVPup3GtgrNY3UCvUlPdzM=
|
||||
github.com/markbates/willie v1.0.9 h1:394PpHImWjScL9X2VRCDXJAcc77sHsSr3w3sOnL/DVc=
|
||||
github.com/markbates/willie v1.0.9/go.mod h1:fsrFVWl91+gXpx/6dv715j7i11fYPfZ9ZGfH0DQzY7w=
|
||||
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
|
||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
|
||||
github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
|
||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
|
||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
|
||||
github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4=
|
||||
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
|
||||
github.com/microcosm-cc/bluemonday v1.0.0 h1:dr58SIfmOwOVr+m4Ye1xLWv8Dk9OFwXAtYnbJSmJ65k=
|
||||
github.com/microcosm-cc/bluemonday v1.0.0/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
|
||||
github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/go-homedir v0.0.0-20180801233206-58046073cbff h1:jM4Eo4qMmmcqePS3u6X2lcEELtVuXWkWJIS/pRI3oSk=
|
||||
github.com/mitchellh/go-homedir v0.0.0-20180801233206-58046073cbff/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/monoculum/formam v0.0.0-20170619223434-99ca9dcbaca6 h1:7HrW8yWJwvJBlfIsITNtkInQ8AgVUuSzrUm20AtBCkg=
|
||||
github.com/monoculum/formam v0.0.0-20170619223434-99ca9dcbaca6/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q=
|
||||
github.com/microcosm-cc/bluemonday v1.0.1 h1:SIYunPjnlXcW+gVfvm0IlSeR5U3WZUOLfVmqg85Go44=
|
||||
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
|
||||
github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
|
||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba h1:FEJJhVHSH+Kyxa5qNe/7dprlZbFcj2TG51OWIouhwls=
|
||||
github.com/monoculum/formam v0.0.0-20180901015400-4e68be1d79ba/go.mod h1:RKgILGEJq24YyJ2ban8EO0RUVSJlF1pGsEvoLEACr/Q=
|
||||
github.com/nicksnyder/go-i18n v1.10.0 h1:5AzlPKvXBH4qBzmZ09Ua9Gipyruv6uApMcrNZdo96+Q=
|
||||
github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q=
|
||||
github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
|
||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
||||
github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
|
||||
github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I=
|
||||
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
|
||||
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
|
||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
||||
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
|
||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
||||
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516 h1:ofR1ZdrNSkiWcMsRrubK9tb2/SlZVWttAfqUjJi6QYc=
|
||||
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516/go.mod h1:Yow6lPLSAXx2ifx470yD/nUe22Dv5vBvxK/UK9UUTVs=
|
||||
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
|
||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE=
|
||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM=
|
||||
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc=
|
||||
github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
|
||||
github.com/shurcooL/graphql v0.0.0-20180514000029-62c9ce094e75/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg=
|
||||
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b h1:vYEG87HxbU6dXj5npkeulCS96Dtz5xg3jcfCgpcvbIw=
|
||||
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU=
|
||||
github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8 h1:xLQlo0Ghg8zBaQi+tjpK+z/WLjbg/BhAWP9pYgqo/LQ=
|
||||
@@ -114,40 +241,84 @@ github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9 h1:j3cAp1j8k/tSLa
|
||||
github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ=
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 h1:/vdW8Cb7EXrkqWGufVMES1OH2sU9gKVb2n9/1y5NMBY=
|
||||
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/sirupsen/logrus v1.0.6 h1:hcP1GmhGigz/O7h1WVUM5KklBp1JoNS9FggWKdj/j3s=
|
||||
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
|
||||
github.com/sirupsen/logrus v1.1.0/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
|
||||
github.com/sirupsen/logrus v1.1.1 h1:VzGj7lhU7KEB9e9gMpAV/v5XT2NVSvLJhJLCWbnkgXg=
|
||||
github.com/sirupsen/logrus v1.1.1/go.mod h1:zrgwTnHtNr00buQ1vSptGe8m1f/BbgsPukg8qsT7A+A=
|
||||
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E=
|
||||
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8=
|
||||
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
|
||||
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
|
||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
||||
github.com/spf13/cast v1.2.0 h1:HHl1DSRbEQN2i8tJmtS6ViPyHx35+p51amrdsiTCrkg=
|
||||
github.com/spf13/cast v1.2.0/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg=
|
||||
github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8=
|
||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.2 h1:Fy0orTDgHdbnzHcsOgfCN4LtHf0ec3wwtiwJqwvf3Gc=
|
||||
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
||||
github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
|
||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
||||
github.com/spf13/viper v1.2.1 h1:bIcUwXqLseLF3BDAZduuNfekWG87ibtFxi59Bq+oI9M=
|
||||
github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaNVlI=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/unrolled/secure v0.0.0-20180618144512-8287f3899c8e h1:tgJKQPcQriVRZoTd6NXN3jITyBs6vR1H+0JsulRuX6s=
|
||||
github.com/unrolled/secure v0.0.0-20180618144512-8287f3899c8e/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
|
||||
golang.org/x/crypto v0.0.0-20180808211826-de0752318171 h1:vYogbvSFj2YXcjQxFHu/rASSOt9sLytpCaSkiwQ135I=
|
||||
golang.org/x/crypto v0.0.0-20180808211826-de0752318171/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180808004115-f9ce57c11b24/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180811021610-c39426892332 h1:efGso+ep0DjyCBJPjvoz0HI6UldX4Md2F1rZFe1ir0E=
|
||||
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
github.com/unrolled/secure v0.0.0-20180918153822-f340ee86eb8b/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
|
||||
github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f h1:ltz/eIXkYWdMCZbu3Rb+bUmWVTm5AqM0QM8o0uKir4U=
|
||||
github.com/unrolled/secure v0.0.0-20181005190816-ff9db2ff917f/go.mod h1:mnPT77IAdsi/kV7+Es7y+pXALeV3h7G6dQF6mNYjcLA=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181001203147-e3636079e1a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e h1:IzypfodbhbnViNUO/MEh0FzCUooG97cIGfdggUrUSyU=
|
||||
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180816102801-aaf60122140d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180921000356-2f5d2388922f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20181017193950-04a2e542c03f h1:4pRM7zYwpBjCnfA1jRmhItLxYJkaEnsmuAcRtA347DA=
|
||||
golang.org/x/net v0.0.0-20181017193950-04a2e542c03f/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20180616030259-6c888cc515d3/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180814072032-4e1fef560951 h1:VfGaXvV9wRnTJreeGDE0FWEDiQP1WWUDmutCjCThDz8=
|
||||
golang.org/x/sys v0.0.0-20180814072032-4e1fef560951/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
||||
golang.org/x/sys v0.0.0-20180816055513-1c9583448a9c/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180906133057-8cf3aee42992/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180921163948-d47a0f339242/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180927150500-dad3d9fb7b6e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181005133103-4497e2df6f9e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181011152604-fa43e7bc11ba/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181019084534-8f1d3d21f81b h1:1fwLBm/LiKBxPaIo6hz5bUsYvch6D9fswnXX8kcr+vk=
|
||||
golang.org/x/sys v0.0.0-20181019084534-8f1d3d21f81b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181003024731-2f84ea8ef872/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181006002542-f60d9635b16a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181013182035-5e66757b835f/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181017214349-06f26fdaaa28/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181019005945-6adeb8aab2de h1:kT+Ec4AyesVdjJuyBnwnKai/sOSk8JMYn9jetb8bO5s=
|
||||
golang.org/x/tools v0.0.0-20181019005945-6adeb8aab2de/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
google.golang.org/appengine v1.2.0 h1:S0iUepdCWODXRvtE+gcRDd15L+k+k1AiHlMiMjefH24=
|
||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk=
|
||||
gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/mail.v2 v2.0.0-20180301192024-63235f23494b h1:N3UL9Y5n1aRaUMvXW72xCCLfVPr8g7pWRvt/ssWU9es=
|
||||
gopkg.in/mail.v2 v2.0.0-20180301192024-63235f23494b/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=
|
||||
gopkg.in/russross/blackfriday.v1 v1.5.1 h1:/G8rrKhg8HTP6/VLtuQLbNSXHUzpDdNqZS5umeauNvc=
|
||||
gopkg.in/russross/blackfriday.v1 v1.5.1/go.mod h1:NAEMj3mL3YDCD1Mxuzav3y8y68EZs2OnJ9xdWYLES00=
|
||||
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo=
|
||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw=
|
||||
gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4 h1:a3llQg4+Czqaf+QH4diHuHiKv4j1abMwuRXwaRNHTPU=
|
||||
gopkg.in/mail.v2 v2.0.0-20180731213649-a0242b2233b4/go.mod h1:htwXN1Qh09vZJ1NVKxQqHPBaCBbzKhp5GzuJEA4VJWw=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
"strings"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/markbates/going/randx"
|
||||
"github.com/gobuffalo/x/randx"
|
||||
"github.com/markbates/grift/grift"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
-77
@@ -1,14 +1,5 @@
|
||||
package buffalo
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gobuffalo/x/httpx"
|
||||
gcontext "github.com/gorilla/context"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Handler is the basis for all of Buffalo. A Handler
|
||||
// will be given a Context interface that represents the
|
||||
// give request/response. It is the responsibility of the
|
||||
@@ -29,71 +20,3 @@ import (
|
||||
}
|
||||
*/
|
||||
type Handler func(Context) error
|
||||
|
||||
func (a *App) newContext(info RouteInfo, res http.ResponseWriter, req *http.Request) Context {
|
||||
ws := res.(*Response)
|
||||
params := req.URL.Query()
|
||||
vars := mux.Vars(req)
|
||||
for k, v := range vars {
|
||||
params.Set(k, v)
|
||||
}
|
||||
|
||||
session := a.getSession(req, ws)
|
||||
|
||||
ct := httpx.ContentType(req)
|
||||
contextData := map[string]interface{}{
|
||||
"app": a,
|
||||
"env": a.Env,
|
||||
"routes": a.Routes(),
|
||||
"current_route": info,
|
||||
"current_path": req.URL.Path,
|
||||
"contentType": ct,
|
||||
"method": req.Method,
|
||||
}
|
||||
|
||||
for _, route := range a.Routes() {
|
||||
cRoute := route
|
||||
contextData[cRoute.PathName] = cRoute.BuildPathHelper()
|
||||
}
|
||||
|
||||
return &DefaultContext{
|
||||
Context: req.Context(),
|
||||
contentType: ct,
|
||||
response: ws,
|
||||
request: req,
|
||||
params: params,
|
||||
logger: a.Logger,
|
||||
session: session,
|
||||
flash: newFlash(session),
|
||||
data: contextData,
|
||||
}
|
||||
}
|
||||
|
||||
func (info RouteInfo) ServeHTTP(res http.ResponseWriter, req *http.Request) {
|
||||
defer gcontext.Clear(req)
|
||||
a := info.App
|
||||
|
||||
c := a.newContext(info, res, req)
|
||||
|
||||
defer c.Flash().persist(c.Session())
|
||||
|
||||
err := a.Middleware.handler(info)(c)
|
||||
|
||||
if err != nil {
|
||||
status := 500
|
||||
// unpack root cause and check for HTTPError
|
||||
cause := errors.Cause(err)
|
||||
httpError, ok := cause.(HTTPError)
|
||||
if ok {
|
||||
status = httpError.Status
|
||||
}
|
||||
eh := a.ErrorHandlers.Get(status)
|
||||
err = eh(status, err, c)
|
||||
if err != nil {
|
||||
// things have really hit the fan if we're here!!
|
||||
a.Logger.Error(err)
|
||||
c.Response().WriteHeader(500)
|
||||
c.Response().Write([]byte(err.Error()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
-21
@@ -5,16 +5,12 @@ package buffalo
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -33,16 +29,7 @@ type textFormatter struct {
|
||||
|
||||
func (f *textFormatter) init(entry *logrus.Entry) {
|
||||
if entry.Logger != nil {
|
||||
f.isTerminal = f.checkIfTerminal(entry.Logger.Out)
|
||||
}
|
||||
}
|
||||
|
||||
func (f *textFormatter) checkIfTerminal(w io.Writer) bool {
|
||||
switch v := w.(type) {
|
||||
case *os.File:
|
||||
return terminal.IsTerminal(int(v.Fd()))
|
||||
default:
|
||||
return false
|
||||
f.isTerminal = checkIfTerminal(entry.Logger.Out)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,21 +37,22 @@ const defaultTimestampFormat = time.RFC3339
|
||||
|
||||
// Format renders a single log entry
|
||||
func (f *textFormatter) Format(entry *logrus.Entry) ([]byte, error) {
|
||||
var b *bytes.Buffer
|
||||
prefixFieldClashes(entry.Data)
|
||||
|
||||
keys := make([]string, 0, len(entry.Data))
|
||||
for k := range entry.Data {
|
||||
keys = append(keys, k)
|
||||
}
|
||||
|
||||
sort.Strings(keys)
|
||||
|
||||
var b *bytes.Buffer
|
||||
if entry.Buffer != nil {
|
||||
b = entry.Buffer
|
||||
} else {
|
||||
b = &bytes.Buffer{}
|
||||
}
|
||||
|
||||
prefixFieldClashes(entry.Data)
|
||||
|
||||
f.Do(func() { f.init(entry) })
|
||||
|
||||
isColored := (f.ForceColors || f.isTerminal)
|
||||
@@ -117,11 +105,15 @@ func (f *textFormatter) needsQuoting(text string) bool {
|
||||
if len(text) == 0 {
|
||||
return true
|
||||
}
|
||||
matched, err := regexp.MatchString("[^a-zA-Z\\-\\._\\/@\\^\\+]", text)
|
||||
if err != nil {
|
||||
return false
|
||||
for _, ch := range text {
|
||||
if !((ch >= 'a' && ch <= 'z') ||
|
||||
(ch >= 'A' && ch <= 'Z') ||
|
||||
(ch >= '0' && ch <= '9') ||
|
||||
ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '@' || ch == '^' || ch == '+') {
|
||||
return true
|
||||
}
|
||||
return matched
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (f *textFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) {
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package buffalo
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/markbates/going/defaults"
|
||||
"github.com/gobuffalo/x/defaults"
|
||||
)
|
||||
|
||||
// MethodOverride is the default implementation for the
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package middleware
|
||||
|
||||
import "github.com/gobuffalo/buffalo"
|
||||
|
||||
// SetContentType on the request to desired type. This will
|
||||
// override any content type sent by the client.
|
||||
func SetContentType(s string) buffalo.MiddlewareFunc {
|
||||
return func(next buffalo.Handler) buffalo.Handler {
|
||||
return func(c buffalo.Context) error {
|
||||
c.Request().Header.Set("Content-Type", s)
|
||||
return next(c)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// AddContentType will add a secondary content type to
|
||||
// a request. If no content type is sent by the client
|
||||
// the default will be set, otherwise the client's
|
||||
// content type will be used.
|
||||
func AddContentType(s string) buffalo.MiddlewareFunc {
|
||||
return func(next buffalo.Handler) buffalo.Handler {
|
||||
return func(c buffalo.Context) error {
|
||||
c.Request().Header.Add("Content-Type", s)
|
||||
return next(c)
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
-235
@@ -1,254 +1,30 @@
|
||||
package csrf
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/subtle"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/buffalo"
|
||||
"github.com/gobuffalo/envy"
|
||||
"github.com/markbates/going/defaults"
|
||||
)
|
||||
|
||||
const (
|
||||
// CSRF token length in bytes.
|
||||
tokenLength int = 32
|
||||
tokenKey string = "authenticity_token"
|
||||
)
|
||||
|
||||
var (
|
||||
// The name value used in form fields.
|
||||
fieldName = tokenKey
|
||||
|
||||
// The HTTP request header to inspect
|
||||
headerName = "X-CSRF-Token"
|
||||
|
||||
// Idempotent (safe) methods as defined by RFC7231 section 4.2.2.
|
||||
safeMethods = []string{"GET", "HEAD", "OPTIONS", "TRACE"}
|
||||
htmlTypes = []string{"html", "form", "plain", "*/*"}
|
||||
csrf "github.com/gobuffalo/mw-csrf"
|
||||
"github.com/markbates/oncer"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrNoReferer is returned when a HTTPS request provides an empty Referer
|
||||
// header.
|
||||
ErrNoReferer = errors.New("referer not supplied")
|
||||
ErrNoReferer = csrf.ErrNoReferer
|
||||
// ErrBadReferer is returned when the scheme & host in the URL do not match
|
||||
// the supplied Referer header.
|
||||
ErrBadReferer = errors.New("referer invalid")
|
||||
ErrBadReferer = csrf.ErrBadReferer
|
||||
// ErrNoToken is returned if no CSRF token is supplied in the request.
|
||||
ErrNoToken = errors.New("CSRF token not found in request")
|
||||
ErrNoToken = csrf.ErrNoToken
|
||||
// ErrBadToken is returned if the CSRF token in the request does not match
|
||||
// the token in the session, or is otherwise malformed.
|
||||
ErrBadToken = errors.New("CSRF token invalid")
|
||||
ErrBadToken = csrf.ErrBadToken
|
||||
)
|
||||
|
||||
// New enable CSRF protection on routes using this middleware.
|
||||
// This middleware is adapted from gorilla/csrf
|
||||
var New = func(next buffalo.Handler) buffalo.Handler {
|
||||
return func(c buffalo.Context) error {
|
||||
// don't run in test mode
|
||||
if envy.Get("GO_ENV", "development") == "test" {
|
||||
c.Set(tokenKey, "test")
|
||||
return next(c)
|
||||
}
|
||||
|
||||
req := c.Request()
|
||||
|
||||
ct := defaults.String(req.Header.Get("Content-Type"), req.Header.Get("Accept"))
|
||||
// ignore non-html requests
|
||||
if ct != "" && !contains(htmlTypes, ct) {
|
||||
return next(c)
|
||||
}
|
||||
|
||||
var realToken []byte
|
||||
var err error
|
||||
rawRealToken := c.Session().Get(tokenKey)
|
||||
|
||||
if rawRealToken == nil || len(rawRealToken.([]byte)) != tokenLength {
|
||||
// If the token is missing, or the length if the token is wrong,
|
||||
// generate a new token.
|
||||
realToken, err = generateRandomBytes(tokenLength)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Save the new real token in session
|
||||
c.Session().Set(tokenKey, realToken)
|
||||
} else {
|
||||
realToken = rawRealToken.([]byte)
|
||||
}
|
||||
|
||||
// Set masked token in context data, to be available in template
|
||||
c.Set(fieldName, mask(realToken, req))
|
||||
|
||||
// HTTP methods not defined as idempotent ("safe") under RFC7231 require
|
||||
// inspection.
|
||||
if !contains(safeMethods, req.Method) {
|
||||
// Enforce an origin check for HTTPS connections. As per the Django CSRF
|
||||
// implementation (https://goo.gl/vKA7GE) the Referer header is almost
|
||||
// always present for same-domain HTTP requests.
|
||||
if req.URL.Scheme == "https" {
|
||||
// Fetch the Referer value. Call the error handler if it's empty or
|
||||
// otherwise fails to parse.
|
||||
referer, err := url.Parse(req.Referer())
|
||||
if err != nil || referer.String() == "" {
|
||||
return ErrNoReferer
|
||||
}
|
||||
|
||||
if !sameOrigin(req.URL, referer) {
|
||||
return ErrBadReferer
|
||||
}
|
||||
}
|
||||
|
||||
// Retrieve the combined token (pad + masked) token and unmask it.
|
||||
requestToken := unmask(requestCSRFToken(req))
|
||||
|
||||
// Missing token
|
||||
if requestToken == nil {
|
||||
return ErrNoToken
|
||||
}
|
||||
|
||||
// Compare tokens
|
||||
if !compareTokens(requestToken, realToken) {
|
||||
return ErrBadToken
|
||||
}
|
||||
}
|
||||
|
||||
return next(c)
|
||||
}
|
||||
}
|
||||
|
||||
// generateRandomBytes returns securely generated random bytes.
|
||||
// It will return an error if the system's secure random number generator
|
||||
// fails to function correctly.
|
||||
func generateRandomBytes(n int) ([]byte, error) {
|
||||
b := make([]byte, n)
|
||||
_, err := rand.Read(b)
|
||||
// err == nil only if len(b) == n
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return b, nil
|
||||
}
|
||||
|
||||
// sameOrigin returns true if URLs a and b share the same origin. The same
|
||||
// origin is defined as host (which includes the port) and scheme.
|
||||
func sameOrigin(a, b *url.URL) bool {
|
||||
return (a.Scheme == b.Scheme && a.Host == b.Host)
|
||||
}
|
||||
|
||||
// contains is a helper function to check if a string exists in a slice - e.g.
|
||||
// whether a HTTP method exists in a list of safe methods.
|
||||
func contains(vals []string, s string) bool {
|
||||
s = strings.ToLower(s)
|
||||
for _, v := range vals {
|
||||
if strings.Contains(s, strings.ToLower(v)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// compare securely (constant-time) compares the unmasked token from the request
|
||||
// against the real token from the session.
|
||||
func compareTokens(a, b []byte) bool {
|
||||
// This is required as subtle.ConstantTimeCompare does not check for equal
|
||||
// lengths in Go versions prior to 1.3.
|
||||
if len(a) != len(b) {
|
||||
return false
|
||||
}
|
||||
|
||||
return subtle.ConstantTimeCompare(a, b) == 1
|
||||
}
|
||||
|
||||
// xorToken XORs tokens ([]byte) to provide unique-per-request CSRF tokens. It
|
||||
// will return a masked token if the base token is XOR'ed with a one-time-pad.
|
||||
// An unmasked token will be returned if a masked token is XOR'ed with the
|
||||
// one-time-pad used to mask it.
|
||||
func xorToken(a, b []byte) []byte {
|
||||
n := len(a)
|
||||
bn := len(b)
|
||||
if bn < n {
|
||||
n = bn
|
||||
}
|
||||
|
||||
res := make([]byte, n)
|
||||
|
||||
for i := 0; i < n; i++ {
|
||||
res[i] = a[i] ^ b[i]
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
// mask returns a unique-per-request token to mitigate the BREACH attack
|
||||
// as per http://breachattack.com/#mitigations
|
||||
//
|
||||
// The token is generated by XOR'ing a one-time-pad and the base (session) CSRF
|
||||
// token and returning them together as a 64-byte slice. This effectively
|
||||
// randomises the token on a per-request basis without breaking multiple browser
|
||||
// tabs/windows.
|
||||
func mask(realToken []byte, r *http.Request) string {
|
||||
otp, err := generateRandomBytes(tokenLength)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
// XOR the OTP with the real token to generate a masked token. Append the
|
||||
// OTP to the front of the masked token to allow unmasking in the subsequent
|
||||
// request.
|
||||
return base64.StdEncoding.EncodeToString(append(otp, xorToken(otp, realToken)...))
|
||||
}
|
||||
|
||||
// unmask splits the issued token (one-time-pad + masked token) and returns the
|
||||
// unmasked request token for comparison.
|
||||
func unmask(issued []byte) []byte {
|
||||
// Issued tokens are always masked and combined with the pad.
|
||||
if len(issued) != tokenLength*2 {
|
||||
return nil
|
||||
}
|
||||
|
||||
// We now know the length of the byte slice.
|
||||
otp := issued[tokenLength:]
|
||||
masked := issued[:tokenLength]
|
||||
|
||||
// Unmask the token by XOR'ing it against the OTP used to mask it.
|
||||
return xorToken(otp, masked)
|
||||
}
|
||||
|
||||
// requestCSRFToken gets the CSRF token from either:
|
||||
// - a HTTP header
|
||||
// - a form value
|
||||
// - a multipart form value
|
||||
func requestCSRFToken(r *http.Request) []byte {
|
||||
// 1. Check the HTTP header first.
|
||||
issued := r.Header.Get(headerName)
|
||||
|
||||
// 2. Fall back to the POST (form) value.
|
||||
if issued == "" {
|
||||
issued = r.PostFormValue(fieldName)
|
||||
}
|
||||
|
||||
// 3. Finally, fall back to the multipart form (if set).
|
||||
if issued == "" && r.MultipartForm != nil {
|
||||
vals := r.MultipartForm.Value[fieldName]
|
||||
|
||||
if len(vals) > 0 {
|
||||
issued = vals[0]
|
||||
}
|
||||
}
|
||||
|
||||
// Decode the "issued" (pad + masked) token sent in the request. Return a
|
||||
// nil byte slice on a decoding error (this will fail upstream).
|
||||
decoded, err := base64.StdEncoding.DecodeString(issued)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
return decoded
|
||||
// Deprecated: use github.com/gobuffalo/mw-csrf#New instead.
|
||||
var New = csrf.New
|
||||
|
||||
func init() {
|
||||
oncer.Deprecate(0, "github.com/gobuffalo/buffalo/middleware/csrf", "Use github.com/gobuffalo/mw-csrf instead.")
|
||||
}
|
||||
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
i18n middleware
|
||||
===============
|
||||
|
||||
This Buffalo middleware enables i18n features in your app:
|
||||
* User language detection from configurable sources
|
||||
* Translation helper using locales bundles from github.com/nicksnyder/go-i18n
|
||||
* Localized views
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
This middleware is setup by default on a new Buffalo app:
|
||||
|
||||
**actions/app.go**
|
||||
```go
|
||||
var app *buffalo.App
|
||||
|
||||
// T is used to provide translations
|
||||
var T *i18n.Translator
|
||||
|
||||
// App is where all routes and middleware for buffalo
|
||||
// should be defined. This is the nerve center of your
|
||||
// application.
|
||||
func App() *buffalo.App {
|
||||
if app == nil {
|
||||
// [...]
|
||||
|
||||
// Setup and use translations:
|
||||
var err error
|
||||
if T, err = i18n.New(packr.NewBox("../locales"), "en"); err != nil {
|
||||
app.Stop(err)
|
||||
}
|
||||
app.Use(T.Middleware())
|
||||
}
|
||||
return app
|
||||
}
|
||||
```
|
||||
|
||||
Use `i18n.New` to create a new instance of the translation module, then add the middleware (`T.Middleware()`) to the app to enable its features.
|
||||
|
||||
See https://gobuffalo.io/docs/localization for further info about Buffalo translation features and configuration.
|
||||
-267
@@ -1,267 +0,0 @@
|
||||
package i18n
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/buffalo"
|
||||
"github.com/gobuffalo/packr"
|
||||
"github.com/nicksnyder/go-i18n/i18n"
|
||||
"github.com/nicksnyder/go-i18n/i18n/language"
|
||||
"github.com/nicksnyder/go-i18n/i18n/translation"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// LanguageExtractor can be implemented for custom finding of search
|
||||
// languages. This can be useful if you want to load a user's language
|
||||
// from something like a database. See Middleware() for more information
|
||||
// on how the default implementation searches for languages.
|
||||
type LanguageExtractor func(LanguageExtractorOptions, buffalo.Context) []string
|
||||
|
||||
// LanguageExtractorOptions is a map of options for a LanguageExtractor.
|
||||
type LanguageExtractorOptions map[string]interface{}
|
||||
|
||||
// Translator for handling all your i18n needs.
|
||||
type Translator struct {
|
||||
// Box - where are the files?
|
||||
Box packr.Box
|
||||
// DefaultLanguage - default is passed as a parameter on New.
|
||||
DefaultLanguage string
|
||||
// HelperName - name of the view helper. default is "t"
|
||||
HelperName string
|
||||
// LanguageExtractors - a sorted list of user language extractors.
|
||||
LanguageExtractors []LanguageExtractor
|
||||
// LanguageExtractorOptions - a map with options to give to LanguageExtractors.
|
||||
LanguageExtractorOptions LanguageExtractorOptions
|
||||
}
|
||||
|
||||
// Load translations from the t.Box.
|
||||
func (t *Translator) Load() error {
|
||||
return t.Box.Walk(func(path string, f packr.File) error {
|
||||
b, err := t.Box.MustBytes(path)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "unable to read locale file %s", path)
|
||||
}
|
||||
|
||||
base := filepath.Base(path)
|
||||
dir := filepath.Dir(path)
|
||||
|
||||
// Add a prefix to the loaded string, to avoid collision with an ISO lang code
|
||||
err = i18n.ParseTranslationFileBytes(fmt.Sprintf("%sbuff%s", dir, base), b)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "unable to parse locale file %s", base)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
// AddTranslation directly, without using a file. This is useful if you wish to load translations
|
||||
// from a database, instead of disk.
|
||||
func (t *Translator) AddTranslation(lang *language.Language, translations ...translation.Translation) {
|
||||
i18n.AddTranslation(lang, translations...)
|
||||
}
|
||||
|
||||
// New Translator. Requires a packr.Box that points to the location
|
||||
// of the translation files, as well as a default language. This will
|
||||
// also call t.Load() and load the translations from disk.
|
||||
func New(box packr.Box, language string) (*Translator, error) {
|
||||
t := &Translator{
|
||||
Box: box,
|
||||
DefaultLanguage: language,
|
||||
HelperName: "t",
|
||||
LanguageExtractorOptions: LanguageExtractorOptions{
|
||||
"CookieName": "lang",
|
||||
"SessionName": "lang",
|
||||
"URLPrefixName": "lang",
|
||||
},
|
||||
LanguageExtractors: []LanguageExtractor{
|
||||
CookieLanguageExtractor,
|
||||
SessionLanguageExtractor,
|
||||
HeaderLanguageExtractor,
|
||||
},
|
||||
}
|
||||
return t, t.Load()
|
||||
}
|
||||
|
||||
// Middleware for loading the translations for the language(s)
|
||||
// selected. By default languages are loaded in the following order:
|
||||
//
|
||||
// Cookie - "lang"
|
||||
// Session - "lang"
|
||||
// Header - "Accept-Language"
|
||||
// Default - "en-US"
|
||||
//
|
||||
// These values can be changed on the Translator itself. In development
|
||||
// model the translation files will be reloaded on each request.
|
||||
func (t *Translator) Middleware() buffalo.MiddlewareFunc {
|
||||
return func(next buffalo.Handler) buffalo.Handler {
|
||||
return func(c buffalo.Context) error {
|
||||
|
||||
// in development reload the translations
|
||||
if c.Value("env").(string) == "development" {
|
||||
err := t.Load()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// set languages in context, if not set yet
|
||||
if langs := c.Value("languages"); langs == nil {
|
||||
c.Set("languages", t.extractLanguage(c))
|
||||
}
|
||||
|
||||
// set translator
|
||||
if T := c.Value("T"); T == nil {
|
||||
langs := c.Value("languages").([]string)
|
||||
T, err := i18n.Tfunc(langs[0], langs[1:]...)
|
||||
if err != nil {
|
||||
c.Logger().Warn(err)
|
||||
c.Logger().Warn("Your locale files are probably empty or missing")
|
||||
}
|
||||
c.Set("T", T)
|
||||
}
|
||||
|
||||
// set up the helper function for the views:
|
||||
c.Set(t.HelperName, func(s string, i ...interface{}) string {
|
||||
return t.Translate(c, s, i...)
|
||||
})
|
||||
return next(c)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Translate returns the translation of the string identified by translationID.
|
||||
//
|
||||
// See https://github.com/nicksnyder/go-i18n
|
||||
//
|
||||
// If there is no translation for translationID, then the translationID itself is returned.
|
||||
// This makes it easy to identify missing translations in your app.
|
||||
//
|
||||
// If translationID is a non-plural form, then the first variadic argument may be a map[string]interface{}
|
||||
// or struct that contains template data.
|
||||
//
|
||||
// If translationID is a plural form, the function accepts two parameter signatures
|
||||
// 1. T(count int, data struct{})
|
||||
// The first variadic argument must be an integer type
|
||||
// (int, int8, int16, int32, int64) or a float formatted as a string (e.g. "123.45").
|
||||
// The second variadic argument may be a map[string]interface{} or struct{} that contains template data.
|
||||
// 2. T(data struct{})
|
||||
// data must be a struct{} or map[string]interface{} that contains a Count field and the template data,
|
||||
// Count field must be an integer type (int, int8, int16, int32, int64)
|
||||
// or a float formatted as a string (e.g. "123.45").
|
||||
func (t *Translator) Translate(c buffalo.Context, translationID string, args ...interface{}) string {
|
||||
T := c.Value("T").(i18n.TranslateFunc)
|
||||
return T(translationID, args...)
|
||||
}
|
||||
|
||||
// AvailableLanguages gets the list of languages provided by the app.
|
||||
func (t *Translator) AvailableLanguages() []string {
|
||||
lt := i18n.LanguageTags()
|
||||
sort.Strings(lt)
|
||||
return lt
|
||||
}
|
||||
|
||||
// Refresh updates the context, reloading translation functions.
|
||||
// It can be used after language change, to be able to use translation functions
|
||||
// in the new language (for a flash message, for instance).
|
||||
func (t *Translator) Refresh(c buffalo.Context, newLang string) {
|
||||
langs := []string{newLang}
|
||||
langs = append(langs, t.extractLanguage(c)...)
|
||||
|
||||
// Refresh languages
|
||||
c.Set("languages", langs)
|
||||
|
||||
T, err := i18n.Tfunc(langs[0], langs[1:]...)
|
||||
if err != nil {
|
||||
c.Logger().Warn(err)
|
||||
c.Logger().Warn("Your locale files are probably empty or missing")
|
||||
}
|
||||
|
||||
// Refresh translation engine
|
||||
c.Set("T", T)
|
||||
}
|
||||
|
||||
func (t *Translator) extractLanguage(c buffalo.Context) []string {
|
||||
langs := []string{}
|
||||
for _, extractor := range t.LanguageExtractors {
|
||||
langs = append(langs, extractor(t.LanguageExtractorOptions, c)...)
|
||||
}
|
||||
// Add default language, even if no language extractor is defined
|
||||
langs = append(langs, t.DefaultLanguage)
|
||||
return langs
|
||||
}
|
||||
|
||||
// CookieLanguageExtractor is a LanguageExtractor implementation, using a cookie.
|
||||
func CookieLanguageExtractor(o LanguageExtractorOptions, c buffalo.Context) []string {
|
||||
langs := make([]string, 0)
|
||||
// try to get the language from a cookie:
|
||||
if cookieName := o["CookieName"].(string); cookieName != "" {
|
||||
if cookie, err := c.Request().Cookie(cookieName); err == nil {
|
||||
if cookie.Value != "" {
|
||||
langs = append(langs, cookie.Value)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
c.Logger().Error("i18n middleware: \"CookieName\" is not defined in LanguageExtractorOptions")
|
||||
}
|
||||
return langs
|
||||
}
|
||||
|
||||
// SessionLanguageExtractor is a LanguageExtractor implementation, using a session.
|
||||
func SessionLanguageExtractor(o LanguageExtractorOptions, c buffalo.Context) []string {
|
||||
langs := make([]string, 0)
|
||||
// try to get the language from the session
|
||||
if sessionName := o["SessionName"].(string); sessionName != "" {
|
||||
if s := c.Session().Get(sessionName); s != nil {
|
||||
langs = append(langs, s.(string))
|
||||
}
|
||||
} else {
|
||||
c.Logger().Error("i18n middleware: \"SessionName\" is not defined in LanguageExtractorOptions")
|
||||
}
|
||||
return langs
|
||||
}
|
||||
|
||||
// HeaderLanguageExtractor is a LanguageExtractor implementation, using a HTTP Accept-Language
|
||||
// header.
|
||||
func HeaderLanguageExtractor(o LanguageExtractorOptions, c buffalo.Context) []string {
|
||||
langs := make([]string, 0)
|
||||
// try to get the language from a header:
|
||||
acceptLang := c.Request().Header.Get("Accept-Language")
|
||||
if acceptLang != "" {
|
||||
langs = append(langs, parseAcceptLanguage(acceptLang)...)
|
||||
}
|
||||
return langs
|
||||
}
|
||||
|
||||
// URLPrefixLanguageExtractor is a LanguageExtractor implementation, using a prefix in the URL.
|
||||
func URLPrefixLanguageExtractor(o LanguageExtractorOptions, c buffalo.Context) []string {
|
||||
langs := make([]string, 0)
|
||||
// try to get the language from an URL prefix:
|
||||
if urlPrefixName := o["URLPrefixName"].(string); urlPrefixName != "" {
|
||||
paramLang := c.Param(urlPrefixName)
|
||||
if paramLang != "" && strings.HasPrefix(c.Request().URL.Path, fmt.Sprintf("/%s", paramLang)) {
|
||||
langs = append(langs, paramLang)
|
||||
}
|
||||
} else {
|
||||
c.Logger().Error("i18n middleware: \"URLPrefixName\" is not defined in LanguageExtractorOptions")
|
||||
}
|
||||
return langs
|
||||
}
|
||||
|
||||
// Inspired from https://siongui.github.io/2015/02/22/go-parse-accept-language/
|
||||
// Parse an Accept-Language string to get usable lang values for i18n system
|
||||
func parseAcceptLanguage(acptLang string) []string {
|
||||
var lqs []string
|
||||
|
||||
langQStrs := strings.Split(acptLang, ",")
|
||||
for _, langQStr := range langQStrs {
|
||||
trimedLangQStr := strings.Trim(langQStr, " ")
|
||||
|
||||
langQ := strings.Split(trimedLangQStr, ";")
|
||||
lq := langQ[0]
|
||||
lqs = append(lqs, lq)
|
||||
}
|
||||
return lqs
|
||||
}
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"mime/multipart"
|
||||
"net/url"
|
||||
|
||||
"github.com/gobuffalo/buffalo"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// ParameterLogger logs form and parameter values to the logger
|
||||
func ParameterLogger(next buffalo.Handler) buffalo.Handler {
|
||||
return func(c buffalo.Context) error {
|
||||
defer func() {
|
||||
req := c.Request()
|
||||
if req.Method != "GET" {
|
||||
if err := postParamLogger(c); err != nil {
|
||||
c.Logger().Error(err)
|
||||
}
|
||||
}
|
||||
b, err := json.Marshal(c.Params())
|
||||
if err != nil {
|
||||
c.Logger().Error(err)
|
||||
}
|
||||
c.LogField("params", string(b))
|
||||
}()
|
||||
return next(c)
|
||||
}
|
||||
}
|
||||
|
||||
func postParamLogger(c buffalo.Context) error {
|
||||
req := c.Request()
|
||||
mp := req.MultipartForm
|
||||
if mp != nil {
|
||||
return multipartParamLogger(mp, c)
|
||||
}
|
||||
|
||||
b, err := json.Marshal(req.Form)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
c.LogField("form", string(b))
|
||||
return nil
|
||||
}
|
||||
|
||||
func multipartParamLogger(mp *multipart.Form, c buffalo.Context) error {
|
||||
uv := url.Values{}
|
||||
for k, v := range mp.Value {
|
||||
for _, vv := range v {
|
||||
uv.Add(k, vv)
|
||||
}
|
||||
}
|
||||
for k, v := range mp.File {
|
||||
for _, vv := range v {
|
||||
uv.Add(k, vv.Filename)
|
||||
}
|
||||
}
|
||||
b, err := json.Marshal(uv)
|
||||
if err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
c.LogField("form", string(b))
|
||||
return nil
|
||||
}
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/gobuffalo/buffalo"
|
||||
"github.com/gobuffalo/pop"
|
||||
)
|
||||
|
||||
// PopTransaction is a piece of Buffalo middleware that wraps each
|
||||
// request in a transaction. The transaction will automatically get
|
||||
// committed if there's no errors and the response status code is a
|
||||
// 2xx or 3xx, otherwise it'll be rolled back. It will also add a
|
||||
// field to the log, "db", that shows the total duration spent during
|
||||
// the request making database calls.
|
||||
var PopTransaction = func(db *pop.Connection) buffalo.MiddlewareFunc {
|
||||
return func(h buffalo.Handler) buffalo.Handler {
|
||||
return func(c buffalo.Context) error {
|
||||
// wrap all requests in a transaction and set the length
|
||||
// of time doing things in the db to the log.
|
||||
err := db.Transaction(func(tx *pop.Connection) error {
|
||||
start := tx.Elapsed
|
||||
defer func() {
|
||||
finished := tx.Elapsed
|
||||
elapsed := time.Duration(finished - start)
|
||||
c.LogField("db", elapsed)
|
||||
}()
|
||||
c.Set("tx", tx)
|
||||
if err := h(c); err != nil {
|
||||
return err
|
||||
}
|
||||
if res, ok := c.Response().(*buffalo.Response); ok {
|
||||
if res.Status < 200 || res.Status >= 400 {
|
||||
return errNonSuccess
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil && errors.Cause(err) != errNonSuccess {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var errNonSuccess = errors.New("non success status code")
|
||||
+17
-23
@@ -6,67 +6,61 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/gobuffalo/buffalo/worker"
|
||||
"github.com/gobuffalo/envy"
|
||||
"github.com/gobuffalo/pop"
|
||||
"github.com/gobuffalo/x/defaults"
|
||||
"github.com/gorilla/sessions"
|
||||
"github.com/markbates/going/defaults"
|
||||
)
|
||||
|
||||
// Options are used to configure and define how your application should run.
|
||||
type Options struct {
|
||||
Name string
|
||||
Name string `json:"name"`
|
||||
// Addr is the bind address provided to http.Server. Default is "127.0.0.1:3000"
|
||||
// Can be set using ENV vars "ADDR" and "PORT".
|
||||
Addr string
|
||||
Addr string `json:"addr"`
|
||||
// Host that this application will be available at. Default is "http://127.0.0.1:[$PORT|3000]".
|
||||
Host string
|
||||
Host string `json:"host"`
|
||||
|
||||
// Env is the "environment" in which the App is running. Default is "development".
|
||||
Env string
|
||||
Env string `json:"env"`
|
||||
|
||||
// LogLevel defaults to "debug".
|
||||
LogLevel string
|
||||
LogLevel string `json:"log_level"`
|
||||
// Logger to be used with the application. A default one is provided.
|
||||
Logger Logger
|
||||
Logger Logger `json:"-"`
|
||||
|
||||
// MethodOverride allows for changing of the request method type. See the default
|
||||
// implementation at buffalo.MethodOverride
|
||||
MethodOverride http.HandlerFunc
|
||||
MethodOverride http.HandlerFunc `json:"-"`
|
||||
|
||||
// SessionStore is the `github.com/gorilla/sessions` store used to back
|
||||
// the session. It defaults to use a cookie store and the ENV variable
|
||||
// `SESSION_SECRET`.
|
||||
SessionStore sessions.Store
|
||||
SessionStore sessions.Store `json:"-"`
|
||||
// SessionName is the name of the session cookie that is set. This defaults
|
||||
// to "_buffalo_session".
|
||||
SessionName string
|
||||
SessionName string `json:"session_name"`
|
||||
|
||||
// Worker implements the Worker interface and can process tasks in the background.
|
||||
// Default is "github.com/gobuffalo/worker.Simple.
|
||||
Worker worker.Worker
|
||||
Worker worker.Worker `json:"-"`
|
||||
// WorkerOff tells App.Start() whether to start the Worker process or not. Default is "false".
|
||||
WorkerOff bool
|
||||
WorkerOff bool `json:"worker_off"`
|
||||
|
||||
// PreHandlers are http.Handlers that are called between the http.Server
|
||||
// and the buffalo Application.
|
||||
PreHandlers []http.Handler
|
||||
PreHandlers []http.Handler `json:"-"`
|
||||
// PreWare takes an http.Handler and returns and http.Handler
|
||||
// and acts as a pseudo-middleware between the http.Server and
|
||||
// a Buffalo application.
|
||||
PreWares []PreWare
|
||||
PreWares []PreWare `json:"-"`
|
||||
|
||||
Context context.Context
|
||||
|
||||
// LooseSlash defines the trailing slash behavior for new routes. The initial value is false.
|
||||
// This is the opposite of http://www.gorillatoolkit.org/pkg/mux#Router.StrictSlash
|
||||
LooseSlash bool
|
||||
Prefix string `json:"prefix"`
|
||||
Context context.Context `json:"-"`
|
||||
|
||||
cancel context.CancelFunc
|
||||
Prefix string
|
||||
}
|
||||
|
||||
// PreWare takes an http.Handler and returns and http.Handler
|
||||
@@ -135,7 +129,7 @@ func optionsWithDefaults(opts Options) Options {
|
||||
if opts.Env == "development" || opts.Env == "test" {
|
||||
secret = "buffalo-secret"
|
||||
} else {
|
||||
logrus.Warn("Unless you set SESSION_SECRET env variable, your session storage is not protected!")
|
||||
opts.Logger.Warn("Unless you set SESSION_SECRET env variable, your session storage is not protected!")
|
||||
}
|
||||
}
|
||||
opts.SessionStore = sessions.NewCookieStore([]byte(secret))
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
required = ["github.com/russross/blackfriday"]
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/russross/blackfriday"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/shurcooL/github_flavored_markdown"
|
||||
|
||||
+32
-16
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"path"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
@@ -61,11 +62,11 @@ PUT /users/edit - (redirect to /users/id or render user/edit.html)
|
||||
DELETE /users/id - redirect to /users
|
||||
*/
|
||||
func (e *Engine) Auto(ctx context.Context, i interface{}) Renderer {
|
||||
ct, ok := ctx.Value("contentType").(string)
|
||||
if !ok {
|
||||
ct = "text/html"
|
||||
ct, _ := ctx.Value("contentType").(string)
|
||||
if ct == "" {
|
||||
ct = e.DefaultContentType
|
||||
}
|
||||
ct = strings.ToLower(ct)
|
||||
ct = strings.TrimSpace(strings.ToLower(ct))
|
||||
|
||||
if strings.Contains(ct, "json") {
|
||||
return e.JSON(i)
|
||||
@@ -102,7 +103,7 @@ func (ir htmlAutoRenderer) Render(w io.Writer, data Data) error {
|
||||
}
|
||||
|
||||
switch data["method"] {
|
||||
case "PUT", "POST":
|
||||
case "PUT", "POST", "DELETE":
|
||||
if err := ir.redirect(pname, w, data); err != nil {
|
||||
if er, ok := err.(ErrRedirect); ok && er.Status >= 300 && er.Status < 400 {
|
||||
return err
|
||||
@@ -113,17 +114,20 @@ func (ir htmlAutoRenderer) Render(w io.Writer, data Data) error {
|
||||
return ir.HTML(fmt.Sprintf("%s/new.html", pname.File())).Render(w, data)
|
||||
}
|
||||
return nil
|
||||
case "DELETE":
|
||||
return ErrRedirect{
|
||||
Status: 302,
|
||||
URL: "/" + pname.URL(),
|
||||
}
|
||||
cp, ok := data["current_path"].(string)
|
||||
|
||||
defCase := func() error {
|
||||
return ir.HTML(fmt.Sprintf("%s/%s.html", pname.File(), "index")).Render(w, data)
|
||||
}
|
||||
if cp, ok := data["current_path"].(string); ok {
|
||||
if strings.HasSuffix(cp, "/edit") {
|
||||
if !ok {
|
||||
return defCase()
|
||||
}
|
||||
|
||||
if strings.HasSuffix(cp, "/edit/") {
|
||||
return ir.HTML(fmt.Sprintf("%s/edit.html", pname.File())).Render(w, data)
|
||||
}
|
||||
if strings.HasSuffix(cp, "/new") {
|
||||
if strings.HasSuffix(cp, "/new/") {
|
||||
return ir.HTML(fmt.Sprintf("%s/new.html", pname.File())).Render(w, data)
|
||||
}
|
||||
|
||||
@@ -134,9 +138,7 @@ func (ir htmlAutoRenderer) Render(w io.Writer, data Data) error {
|
||||
if x.MatchString(cp) {
|
||||
return ir.HTML(fmt.Sprintf("%s/show.html", pname.File())).Render(w, data)
|
||||
}
|
||||
}
|
||||
|
||||
return ir.HTML(fmt.Sprintf("%s/%s.html", pname.File(), "index")).Render(w, data)
|
||||
return defCase()
|
||||
}
|
||||
|
||||
func (ir htmlAutoRenderer) redirect(name inflect.Name, w io.Writer, data Data) error {
|
||||
@@ -150,7 +152,21 @@ func (ir htmlAutoRenderer) redirect(name inflect.Name, w io.Writer, data Data) e
|
||||
rt := reflect.TypeOf(fi)
|
||||
zero := reflect.Zero(rt)
|
||||
if fi != zero.Interface() {
|
||||
url := fmt.Sprintf("/%s/%v", name.URL(), f.Interface())
|
||||
m, ok := data["method"].(string)
|
||||
if !ok {
|
||||
m = "GET"
|
||||
}
|
||||
url := fmt.Sprint(data["current_path"])
|
||||
id := fmt.Sprint(f.Interface())
|
||||
url = strings.TrimSuffix(url, "/")
|
||||
switch m {
|
||||
case "DELETE":
|
||||
url = strings.TrimSuffix(url, id)
|
||||
default:
|
||||
if !strings.HasSuffix(url, id) {
|
||||
url = path.Join(url, id)
|
||||
}
|
||||
}
|
||||
|
||||
code := 302
|
||||
if i, ok := data["status"].(int); ok {
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
package render
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"mime"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type downloadRenderer struct {
|
||||
ctx context.Context
|
||||
name string
|
||||
reader io.Reader
|
||||
}
|
||||
|
||||
func (r downloadRenderer) ContentType() string {
|
||||
ext := filepath.Ext(r.name)
|
||||
t := mime.TypeByExtension(ext)
|
||||
if t == "" {
|
||||
t = "application/octet-stream"
|
||||
}
|
||||
|
||||
return t
|
||||
}
|
||||
|
||||
func (r downloadRenderer) Render(w io.Writer, d Data) error {
|
||||
written, err := io.Copy(w, r.reader)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx, ok := r.ctx.(responsible)
|
||||
if !ok {
|
||||
return errors.New("context has no response writer")
|
||||
}
|
||||
|
||||
header := ctx.Response().Header()
|
||||
disposition := fmt.Sprintf("attachment; filename=%s", r.name)
|
||||
header.Add("Content-Disposition", disposition)
|
||||
contentLength := strconv.Itoa(int(written))
|
||||
header.Add("Content-Length", contentLength)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Download renders a file attachment automatically setting following headers:
|
||||
//
|
||||
// Content-Type
|
||||
// Content-Length
|
||||
// Content-Disposition
|
||||
//
|
||||
// Content-Type is set using mime#TypeByExtension with the filename's extension. Content-Type will default to
|
||||
// application/octet-stream if using a filename with an unknown extension.
|
||||
func Download(ctx context.Context, name string, r io.Reader) Renderer {
|
||||
return downloadRenderer{
|
||||
ctx: ctx,
|
||||
name: name,
|
||||
reader: r,
|
||||
}
|
||||
}
|
||||
|
||||
// Download renders a file attachment automatically setting following headers:
|
||||
//
|
||||
// Content-Type
|
||||
// Content-Length
|
||||
// Content-Disposition
|
||||
//
|
||||
// Content-Type is set using mime#TypeByExtension with the filename's extension. Content-Type will default to
|
||||
// application/octet-stream if using a filename with an unknown extension.
|
||||
func (e *Engine) Download(ctx context.Context, name string, r io.Reader) Renderer {
|
||||
return Download(ctx, name, r)
|
||||
}
|
||||
|
||||
type responsible interface {
|
||||
Response() http.ResponseWriter
|
||||
}
|
||||
+1
-2
@@ -5,13 +5,12 @@ import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gobuffalo/plush"
|
||||
"github.com/gobuffalo/pop"
|
||||
"github.com/gobuffalo/tags"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func init() {
|
||||
plush.Helpers.Add("paginator", func(pagination *pop.Paginator, opts map[string]interface{}, help plush.HelperContext) (template.HTML, error) {
|
||||
plush.Helpers.Add("paginator", func(pagination interface{}, opts map[string]interface{}, help plush.HelperContext) (template.HTML, error) {
|
||||
if opts["path"] == nil {
|
||||
if req, ok := help.Value("request").(*http.Request); ok {
|
||||
opts["path"] = req.URL.String()
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ func (e *Engine) HTML(names ...string) Renderer {
|
||||
}
|
||||
hr := &templateRenderer{
|
||||
Engine: e,
|
||||
contentType: "text/html",
|
||||
contentType: "text/html; charset=utf-8",
|
||||
names: names,
|
||||
}
|
||||
return hr
|
||||
|
||||
+4
@@ -24,4 +24,8 @@ type Options struct {
|
||||
|
||||
// TemplateEngine to be used for rendering HTML templates
|
||||
TemplateEngines map[string]TemplateEngine
|
||||
|
||||
// DefaultContentType instructs the engine what it should fall back to if
|
||||
// the "content-type" is unknown
|
||||
DefaultContentType string
|
||||
}
|
||||
|
||||
+7
@@ -28,6 +28,9 @@ func New(opts Options) *Engine {
|
||||
if _, ok := opts.TemplateEngines["text"]; !ok {
|
||||
opts.TemplateEngines["text"] = plush.BuffaloRenderer
|
||||
}
|
||||
if _, ok := opts.TemplateEngines["txt"]; !ok {
|
||||
opts.TemplateEngines["txt"] = plush.BuffaloRenderer
|
||||
}
|
||||
if _, ok := opts.TemplateEngines["js"]; !ok {
|
||||
opts.TemplateEngines["js"] = JSTemplateEngine
|
||||
}
|
||||
@@ -38,6 +41,10 @@ func New(opts Options) *Engine {
|
||||
opts.TemplateEngines["tmpl"] = GoTemplateEngine
|
||||
}
|
||||
|
||||
if opts.DefaultContentType == "" {
|
||||
opts.DefaultContentType = "text/html; charset=utf-8"
|
||||
}
|
||||
|
||||
e := &Engine{
|
||||
Options: opts,
|
||||
}
|
||||
|
||||
+8
-1
@@ -45,10 +45,17 @@ func (es *EventSource) Flush() {
|
||||
es.fl.Flush()
|
||||
}
|
||||
|
||||
type closeNotifier interface {
|
||||
CloseNotify() <-chan bool
|
||||
}
|
||||
|
||||
// CloseNotify return true across the channel when the connection
|
||||
// in the browser has been severed.
|
||||
func (es *EventSource) CloseNotify() <-chan bool {
|
||||
return es.w.(http.CloseNotifier).CloseNotify()
|
||||
if cn, ok := es.w.(closeNotifier); ok {
|
||||
return cn.CloseNotify()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewEventSource returns a new EventSource instance while ensuring
|
||||
|
||||
+17
@@ -1,6 +1,7 @@
|
||||
package render
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io"
|
||||
"os"
|
||||
@@ -48,6 +49,22 @@ func (s templateRenderer) partial(name string, dd Data) (template.HTML, error) {
|
||||
for k, v := range dd {
|
||||
m[k] = v
|
||||
}
|
||||
|
||||
if _, ok := m["layout"]; ok {
|
||||
|
||||
var body template.HTML
|
||||
var err error
|
||||
|
||||
body, err = s.exec(name, m)
|
||||
if err != nil {
|
||||
return body, err
|
||||
}
|
||||
m["yield"] = body
|
||||
d, f := filepath.Split(fmt.Sprintf("%v", m["layout"]))
|
||||
name = filepath.Join(d, "_"+f)
|
||||
|
||||
}
|
||||
|
||||
return s.exec(name, m)
|
||||
}
|
||||
|
||||
|
||||
+4
-7
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
var assetsMutex = &sync.Mutex{}
|
||||
var assetsMutex = &sync.RWMutex{}
|
||||
var assetMap map[string]string
|
||||
|
||||
func loadManifest(manifest string) error {
|
||||
@@ -22,10 +22,9 @@ func loadManifest(manifest string) error {
|
||||
}
|
||||
|
||||
func assetPathFor(file string) string {
|
||||
assetsMutex.Lock()
|
||||
defer assetsMutex.Unlock()
|
||||
|
||||
assetsMutex.RLock()
|
||||
filePath := assetMap[file]
|
||||
assetsMutex.RUnlock()
|
||||
if filePath == "" {
|
||||
filePath = file
|
||||
}
|
||||
@@ -38,9 +37,7 @@ type helperTag struct {
|
||||
}
|
||||
|
||||
func (s templateRenderer) addAssetsHelpers(helpers Helpers) Helpers {
|
||||
helpers["assetPath"] = func(file string) (string, error) {
|
||||
return s.assetPath(file)
|
||||
}
|
||||
helpers["assetPath"] = s.assetPath
|
||||
|
||||
ah := []helperTag{
|
||||
{"javascriptTag", jsTag},
|
||||
|
||||
+1
@@ -14,6 +14,7 @@ func (s xmlRenderer) ContentType() string {
|
||||
}
|
||||
|
||||
func (s xmlRenderer) Render(w io.Writer, data Data) error {
|
||||
io.WriteString(w, xml.Header)
|
||||
enc := xml.NewEncoder(w)
|
||||
enc.Indent("", " ")
|
||||
return enc.Encode(s.value)
|
||||
|
||||
+7
-4
@@ -5,8 +5,7 @@ import (
|
||||
|
||||
humanize "github.com/dustin/go-humanize"
|
||||
"github.com/gobuffalo/x/httpx"
|
||||
"github.com/markbates/going/randx"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/gobuffalo/x/randx"
|
||||
)
|
||||
|
||||
// RequestLogger can be be overridden to a user specified
|
||||
@@ -32,13 +31,17 @@ func RequestLoggerFunc(h Handler) Handler {
|
||||
|
||||
start := time.Now()
|
||||
defer func() {
|
||||
ws := c.Response().(*Response)
|
||||
ws, ok := c.Response().(*Response)
|
||||
if !ok {
|
||||
ws = &Response{ResponseWriter: c.Response()}
|
||||
ws.Status = 200
|
||||
}
|
||||
req := c.Request()
|
||||
ct := httpx.ContentType(req)
|
||||
if ct != "" {
|
||||
c.LogField("content_type", ct)
|
||||
}
|
||||
c.LogFields(logrus.Fields{
|
||||
c.LogFields(map[string]interface{}{
|
||||
"method": req.Method,
|
||||
"path": req.URL.String(),
|
||||
"duration": time.Since(start),
|
||||
|
||||
+5
-1
@@ -45,9 +45,13 @@ func (w *Response) Flush() {
|
||||
}
|
||||
}
|
||||
|
||||
type closeNotifier interface {
|
||||
CloseNotify() <-chan bool
|
||||
}
|
||||
|
||||
// CloseNotify implements the http.CloseNotifier interface
|
||||
func (w *Response) CloseNotify() <-chan bool {
|
||||
if cn, ok := w.ResponseWriter.(http.CloseNotifier); ok {
|
||||
if cn, ok := w.ResponseWriter.(closeNotifier); ok {
|
||||
return cn.CloseNotify()
|
||||
}
|
||||
return nil
|
||||
|
||||
+11
-80
@@ -1,17 +1,13 @@
|
||||
package buffalo
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net/url"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"reflect"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/markbates/inflect"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Routes returns a list of all of the routes defined
|
||||
@@ -23,81 +19,6 @@ func (a *App) Routes() RouteList {
|
||||
return a.routes
|
||||
}
|
||||
|
||||
// RouteInfo provides information about the underlying route that
|
||||
// was built.
|
||||
type RouteInfo struct {
|
||||
Method string `json:"method"`
|
||||
Path string `json:"path"`
|
||||
HandlerName string `json:"handler"`
|
||||
PathName string `json:"pathName"`
|
||||
Aliases []string `json:"aliases"`
|
||||
MuxRoute *mux.Route `json:"-"`
|
||||
Handler Handler `json:"-"`
|
||||
App *App `json:"-"`
|
||||
}
|
||||
|
||||
// String returns a JSON representation of the RouteInfo
|
||||
func (ri RouteInfo) String() string {
|
||||
b, _ := json.MarshalIndent(ri, "", " ")
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// Alias path patterns to the this route. This is not the
|
||||
// same as a redirect.
|
||||
func (ri *RouteInfo) Alias(aliases ...string) *RouteInfo {
|
||||
ri.Aliases = append(ri.Aliases, aliases...)
|
||||
for _, a := range aliases {
|
||||
ri.App.router.Handle(a, ri).Methods(ri.Method)
|
||||
}
|
||||
return ri
|
||||
}
|
||||
|
||||
// Name allows users to set custom names for the routes.
|
||||
func (ri *RouteInfo) Name(name string) *RouteInfo {
|
||||
routeIndex := -1
|
||||
for index, route := range ri.App.Routes() {
|
||||
if route.Path == ri.Path && route.Method == ri.Method {
|
||||
routeIndex = index
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
name = inflect.CamelizeDownFirst(name)
|
||||
|
||||
if !strings.HasSuffix(name, "Path") {
|
||||
name = name + "Path"
|
||||
}
|
||||
|
||||
ri.PathName = name
|
||||
if routeIndex != -1 {
|
||||
ri.App.Routes()[routeIndex] = reflect.ValueOf(ri).Interface().(*RouteInfo)
|
||||
}
|
||||
|
||||
return ri
|
||||
}
|
||||
|
||||
//BuildPathHelper Builds a routeHelperfunc for a particular RouteInfo
|
||||
func (ri *RouteInfo) BuildPathHelper() RouteHelperFunc {
|
||||
cRoute := ri
|
||||
return func(opts map[string]interface{}) (template.HTML, error) {
|
||||
pairs := []string{}
|
||||
for k, v := range opts {
|
||||
pairs = append(pairs, k)
|
||||
pairs = append(pairs, fmt.Sprintf("%v", v))
|
||||
}
|
||||
|
||||
url, err := cRoute.MuxRoute.URL(pairs...)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("missing parameters for %v", cRoute.Path)
|
||||
}
|
||||
|
||||
result := url.Path
|
||||
result = addExtraParamsTo(result, opts)
|
||||
|
||||
return template.HTML(result), nil
|
||||
}
|
||||
}
|
||||
|
||||
func addExtraParamsTo(path string, opts map[string]interface{}) string {
|
||||
pendingParams := map[string]string{}
|
||||
keys := []string{}
|
||||
@@ -152,3 +73,13 @@ func (a RouteList) Less(i, j int) bool {
|
||||
y := a[j].Path // + a[j].Method
|
||||
return x < y
|
||||
}
|
||||
|
||||
// Lookup search a specific PathName in the RouteList and return the *RouteInfo
|
||||
func (a RouteList) Lookup(name string) (*RouteInfo, error) {
|
||||
for _, ri := range a {
|
||||
if ri.PathName == name {
|
||||
return ri, nil
|
||||
}
|
||||
}
|
||||
return nil, errors.New("path name not found")
|
||||
}
|
||||
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package buffalo
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/gobuffalo/events"
|
||||
gcontext "github.com/gorilla/context"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/markbates/inflect"
|
||||
)
|
||||
|
||||
// RouteInfo provides information about the underlying route that
|
||||
// was built.
|
||||
type RouteInfo struct {
|
||||
Method string `json:"method"`
|
||||
Path string `json:"path"`
|
||||
HandlerName string `json:"handler"`
|
||||
PathName string `json:"pathName"`
|
||||
Aliases []string `json:"aliases"`
|
||||
MuxRoute *mux.Route `json:"-"`
|
||||
Handler Handler `json:"-"`
|
||||
App *App `json:"-"`
|
||||
}
|
||||
|
||||
// String returns a JSON representation of the RouteInfo
|
||||
func (ri RouteInfo) String() string {
|
||||
b, _ := json.MarshalIndent(ri, "", " ")
|
||||
return string(b)
|
||||
}
|
||||
|
||||
// Alias path patterns to the this route. This is not the
|
||||
// same as a redirect.
|
||||
func (ri *RouteInfo) Alias(aliases ...string) *RouteInfo {
|
||||
ri.Aliases = append(ri.Aliases, aliases...)
|
||||
for _, a := range aliases {
|
||||
ri.App.router.Handle(a, ri).Methods(ri.Method)
|
||||
}
|
||||
return ri
|
||||
}
|
||||
|
||||
// Name allows users to set custom names for the routes.
|
||||
func (ri *RouteInfo) Name(name string) *RouteInfo {
|
||||
routeIndex := -1
|
||||
for index, route := range ri.App.Routes() {
|
||||
if route.Path == ri.Path && route.Method == ri.Method {
|
||||
routeIndex = index
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
name = inflect.CamelizeDownFirst(name)
|
||||
|
||||
if !strings.HasSuffix(name, "Path") {
|
||||
name = name + "Path"
|
||||
}
|
||||
|
||||
ri.PathName = name
|
||||
if routeIndex != -1 {
|
||||
ri.App.Routes()[routeIndex] = reflect.ValueOf(ri).Interface().(*RouteInfo)
|
||||
}
|
||||
|
||||
return ri
|
||||
}
|
||||
|
||||
//BuildPathHelper Builds a routeHelperfunc for a particular RouteInfo
|
||||
func (ri *RouteInfo) BuildPathHelper() RouteHelperFunc {
|
||||
cRoute := ri
|
||||
return func(opts map[string]interface{}) (template.HTML, error) {
|
||||
pairs := []string{}
|
||||
for k, v := range opts {
|
||||
pairs = append(pairs, k)
|
||||
pairs = append(pairs, fmt.Sprintf("%v", v))
|
||||
}
|
||||
|
||||
url, err := cRoute.MuxRoute.URL(pairs...)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("missing parameters for %v", cRoute.Path)
|
||||
}
|
||||
|
||||
result := url.Path
|
||||
result = addExtraParamsTo(result, opts)
|
||||
|
||||
return template.HTML(result), nil
|
||||
}
|
||||
}
|
||||
|
||||
func (ri RouteInfo) ServeHTTP(res http.ResponseWriter, req *http.Request) {
|
||||
defer gcontext.Clear(req)
|
||||
|
||||
a := ri.App
|
||||
|
||||
c := a.newContext(ri, res, req)
|
||||
defer c.Flash().persist(c.Session())
|
||||
|
||||
payload := events.Payload{
|
||||
"route": ri,
|
||||
"app": a,
|
||||
"context": c,
|
||||
}
|
||||
|
||||
events.EmitPayload(EvtRouteStarted, payload)
|
||||
|
||||
err := a.Middleware.handler(ri)(c)
|
||||
|
||||
if err != nil {
|
||||
events.EmitError(EvtRouteErr, err, payload)
|
||||
// things have really hit the fan if we're here!!
|
||||
a.Logger.Error(err)
|
||||
c.Response().WriteHeader(500)
|
||||
c.Response().Write([]byte(err.Error()))
|
||||
}
|
||||
events.EmitPayload(EvtRouteFinished, payload)
|
||||
}
|
||||
Generated
Vendored
+12
@@ -84,6 +84,7 @@ func (a *App) Mount(p string, h http.Handler) {
|
||||
*/
|
||||
func (a *App) ServeFiles(p string, root http.FileSystem) {
|
||||
path := path.Join(a.Prefix, p)
|
||||
a.filepaths = append(a.filepaths, path)
|
||||
a.router.PathPrefix(path).Handler(http.StripPrefix(path, a.fileServer(root)))
|
||||
}
|
||||
|
||||
@@ -198,11 +199,22 @@ func (a *App) Group(groupPath string) *App {
|
||||
return g
|
||||
}
|
||||
|
||||
// RouteHelpers returns a map of BuildPathHelper() for each route available in the app.
|
||||
func (a *App) RouteHelpers() map[string]RouteHelperFunc {
|
||||
rh := map[string]RouteHelperFunc{}
|
||||
for _, route := range a.Routes() {
|
||||
cRoute := route
|
||||
rh[cRoute.PathName] = cRoute.BuildPathHelper()
|
||||
}
|
||||
return rh
|
||||
}
|
||||
|
||||
func (a *App) addRoute(method string, url string, h Handler) *RouteInfo {
|
||||
a.moot.Lock()
|
||||
defer a.moot.Unlock()
|
||||
|
||||
url = path.Join(a.Prefix, url)
|
||||
url = a.normalizePath(url)
|
||||
name := a.buildRouteName(url)
|
||||
|
||||
hs := funcKey(h)
|
||||
+43
-8
@@ -4,21 +4,29 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/gobuffalo/buffalo/servers"
|
||||
"github.com/gobuffalo/events"
|
||||
"github.com/markbates/refresh/refresh/web"
|
||||
"github.com/markbates/sigtx"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Serve the application at the specified address/port and listen for OS
|
||||
// interrupt and kill signals and will attempt to stop the application
|
||||
// gracefully. This will also start the Worker process, unless WorkerOff is enabled.
|
||||
func (a *App) Serve(srvs ...servers.Server) error {
|
||||
logrus.Infof("Starting application at %s", a.Options.Host)
|
||||
a.Logger.Infof("Starting application at %s", a.Options.Addr)
|
||||
|
||||
payload := events.Payload{
|
||||
"app": a,
|
||||
}
|
||||
if err := events.EmitPayload(EvtAppStart, payload); err != nil {
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
||||
if len(srvs) == 0 {
|
||||
if strings.HasPrefix(a.Options.Addr, "unix:") {
|
||||
@@ -38,23 +46,28 @@ func (a *App) Serve(srvs ...servers.Server) error {
|
||||
go func() {
|
||||
// gracefully shut down the application when the context is cancelled
|
||||
<-ctx.Done()
|
||||
logrus.Info("Shutting down application")
|
||||
a.Logger.Info("Shutting down application")
|
||||
|
||||
events.EmitError(EvtAppStop, ctx.Err(), payload)
|
||||
|
||||
if err := a.Stop(ctx.Err()); err != nil {
|
||||
logrus.Error(err)
|
||||
events.EmitError(EvtAppStopErr, err, payload)
|
||||
a.Logger.Error(err)
|
||||
}
|
||||
|
||||
if !a.WorkerOff {
|
||||
// stop the workers
|
||||
logrus.Info("Shutting down worker")
|
||||
a.Logger.Info("Shutting down worker")
|
||||
events.EmitPayload(EvtWorkerStop, payload)
|
||||
if err := a.Worker.Stop(); err != nil {
|
||||
logrus.Error(err)
|
||||
events.EmitError(EvtWorkerStopErr, err, payload)
|
||||
a.Logger.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
for _, s := range srvs {
|
||||
if err := s.Shutdown(ctx); err != nil {
|
||||
logrus.Error(err)
|
||||
a.Logger.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +76,7 @@ func (a *App) Serve(srvs ...servers.Server) error {
|
||||
// if configured to do so, start the workers
|
||||
if !a.WorkerOff {
|
||||
go func() {
|
||||
events.EmitPayload(EvtWorkerStart, payload)
|
||||
if err := a.Worker.Start(ctx); err != nil {
|
||||
a.Stop(err)
|
||||
}
|
||||
@@ -79,6 +93,7 @@ func (a *App) Serve(srvs ...servers.Server) error {
|
||||
}
|
||||
|
||||
<-ctx.Done()
|
||||
|
||||
return a.Context.Err()
|
||||
}
|
||||
|
||||
@@ -86,7 +101,7 @@ func (a *App) Serve(srvs ...servers.Server) error {
|
||||
func (a *App) Stop(err error) error {
|
||||
a.cancel()
|
||||
if err != nil && errors.Cause(err) != context.Canceled {
|
||||
logrus.Error(err)
|
||||
a.Logger.Error(err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
@@ -103,6 +118,8 @@ func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
r.URL.Path = a.normalizePath(r.URL.Path)
|
||||
|
||||
var h http.Handler = a.router
|
||||
if a.Env == "development" {
|
||||
h = web.ErrorChecker(h)
|
||||
@@ -136,3 +153,21 @@ func (a *App) processPreHandlers(res http.ResponseWriter, req *http.Request) boo
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func (a *App) normalizePath(path string) string {
|
||||
if filepath.Ext(path) != "" {
|
||||
return path
|
||||
}
|
||||
if strings.HasSuffix(path, "/") {
|
||||
return path
|
||||
}
|
||||
for _, p := range a.filepaths {
|
||||
if p == "/" {
|
||||
continue
|
||||
}
|
||||
if strings.HasPrefix(path, p) {
|
||||
return path
|
||||
}
|
||||
}
|
||||
return path + "/"
|
||||
}
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// +build !appengine
|
||||
|
||||
package buffalo
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
)
|
||||
|
||||
func checkIfTerminal(w io.Writer) bool {
|
||||
switch v := w.(type) {
|
||||
case *os.File:
|
||||
return terminal.IsTerminal(int(v.Fd()))
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// +build appengine
|
||||
|
||||
package buffalo
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
func checkIfTerminal(w io.Writer) bool {
|
||||
return true
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
verbose=""
|
||||
|
||||
if [[ "$@" == "-v" ]]
|
||||
then
|
||||
verbose="-v"
|
||||
fi
|
||||
|
||||
go test -tags sqlite $verbose ./...
|
||||
+17
@@ -16,3 +16,20 @@ func WrapHandler(h http.Handler) Handler {
|
||||
func WrapHandlerFunc(h http.HandlerFunc) Handler {
|
||||
return WrapHandler(h)
|
||||
}
|
||||
|
||||
// WrapBuffaloHandler wraps a buffalo.Handler to
|
||||
// standard http.Handler
|
||||
func WrapBuffaloHandler(h Handler) http.Handler {
|
||||
a := New(Options{})
|
||||
// it doesn't matter what we actually map it
|
||||
// GET, POST, etc... we just need the underlying
|
||||
// RouteInfo, which implements http.Handler
|
||||
ri := a.GET("/", h)
|
||||
return ri
|
||||
}
|
||||
|
||||
// WrapBuffaloHandlerFunc wraps a buffalo.Handler to
|
||||
// standard http.HandlerFunc
|
||||
func WrapBuffaloHandlerFunc(h Handler) http.HandlerFunc {
|
||||
return WrapBuffaloHandler(h).ServeHTTP
|
||||
}
|
||||
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"]
|
||||
}
|
||||
+20
-8
@@ -2,13 +2,25 @@ language: go
|
||||
|
||||
sudo: false
|
||||
|
||||
go:
|
||||
- 1.7
|
||||
- 1.8
|
||||
- 1.9
|
||||
- "1.10"
|
||||
- tip
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- go: "1.9.x"
|
||||
- go: "1.10.x"
|
||||
- go: "1.11.x"
|
||||
env:
|
||||
- GO111MODULE=off
|
||||
- go: "1.11.x"
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- go: "tip"
|
||||
env:
|
||||
- GO111MODULE=off
|
||||
- go: "tip"
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
allow_failures:
|
||||
- go: 'tip'
|
||||
- go: "tip"
|
||||
|
||||
install: make deps
|
||||
|
||||
script: make ci-test
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
TAGS ?= "sqlite"
|
||||
GO_BIN ?= go
|
||||
|
||||
install:
|
||||
packr
|
||||
$(GO_BIN) install -v .
|
||||
|
||||
deps:
|
||||
$(GO_BIN) get github.com/gobuffalo/release
|
||||
$(GO_BIN) get github.com/gobuffalo/packr/packr
|
||||
$(GO_BIN) get -tags ${TAGS} -t ./...
|
||||
ifeq ($(GO111MODULE),on)
|
||||
$(GO_BIN) mod tidy
|
||||
endif
|
||||
|
||||
build:
|
||||
packr
|
||||
$(GO_BIN) build -v .
|
||||
|
||||
test:
|
||||
packr
|
||||
$(GO_BIN) test -tags ${TAGS} ./...
|
||||
|
||||
ci-test:
|
||||
$(GO_BIN) test -tags ${TAGS} -race ./...
|
||||
|
||||
lint:
|
||||
gometalinter --vendor ./... --deadline=1m --skip=internal
|
||||
|
||||
update:
|
||||
$(GO_BIN) get -u -tags ${TAGS}
|
||||
ifeq ($(GO111MODULE),on)
|
||||
$(GO_BIN) mod tidy
|
||||
endif
|
||||
packr
|
||||
make test
|
||||
make install
|
||||
ifeq ($(GO111MODULE),on)
|
||||
$(GO_BIN) mod tidy
|
||||
endif
|
||||
|
||||
release-test:
|
||||
$(GO_BIN) test -tags ${TAGS} -race ./...
|
||||
|
||||
release:
|
||||
release -y -f version.go
|
||||
+16
-1
@@ -1,3 +1,13 @@
|
||||
/*
|
||||
package envy makes working with ENV variables in Go trivial.
|
||||
|
||||
* Get ENV variables with default values.
|
||||
* Set ENV variables safely without affecting the underlying system.
|
||||
* Temporarily change ENV vars; useful for testing.
|
||||
* Map all of the key/values in the ENV.
|
||||
* Loads .env files (by using [godotenv](https://github.com/joho/godotenv/))
|
||||
* More!
|
||||
*/
|
||||
package envy
|
||||
|
||||
import (
|
||||
@@ -44,7 +54,12 @@ func loadEnv() {
|
||||
}
|
||||
|
||||
if os.Getenv("GO_ENV") == "" {
|
||||
if v := flag.Lookup("test.v"); v != nil && v.Value.String() == "true" {
|
||||
// if the flag "test.v" is *defined*, we're running as a unit test. Note that we don't care
|
||||
// about v.Value (verbose test mode); we just want to know if the test environment has defined
|
||||
// it. It's also possible that the flags are not yet fully parsed (i.e. flag.Parsed() == false),
|
||||
// so we could not depend on v.Value anyway.
|
||||
//
|
||||
if v := flag.Lookup("test.v"); v != nil {
|
||||
env["GO_ENV"] = "test"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ module github.com/gobuffalo/envy
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/joho/godotenv v1.2.0
|
||||
github.com/joho/godotenv v1.3.0
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/stretchr/testify v1.2.2
|
||||
)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/joho/godotenv v1.2.0 h1:vGTvz69FzUFp+X4/bAkb0j5BoLC+9bpqTWY8mjhA9pc=
|
||||
github.com/joho/godotenv v1.2.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
|
||||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# github.com/gobuffalo/envy Stands on the Shoulders of Giants
|
||||
|
||||
github.com/gobuffalo/envy does not try to reinvent the wheel! Instead, it uses the already great wheels developed by the Go community and puts them all together in the best way possible. Without these giants this project would not be possible. Please make sure to check them out and thank them for all of their hard work.
|
||||
|
||||
Thank you to the following **GIANTS**:
|
||||
|
||||
|
||||
* [github.com/gobuffalo/envy](https://godoc.org/github.com/gobuffalo/envy)
|
||||
|
||||
* [github.com/joho/godotenv](https://godoc.org/github.com/joho/godotenv)
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package envy
|
||||
|
||||
const Version = "v1.6.5"
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
*.log
|
||||
.DS_Store
|
||||
doc
|
||||
tmp
|
||||
pkg
|
||||
*.gem
|
||||
*.pid
|
||||
coverage
|
||||
coverage.data
|
||||
build/*
|
||||
*.pbxuser
|
||||
*.mode1v3
|
||||
.svn
|
||||
profile
|
||||
.console_history
|
||||
.sass-cache/*
|
||||
.rake_tasks~
|
||||
*.log.lck
|
||||
solr/
|
||||
.jhw-cache/
|
||||
jhw.*
|
||||
*.sublime*
|
||||
node_modules/
|
||||
dist/
|
||||
generated/
|
||||
.vendor/
|
||||
bin/*
|
||||
gin-bin
|
||||
.idea/
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"Enable": ["vet", "golint", "goimports", "deadcode", "gotype", "ineffassign", "misspell", "nakedret", "unconvert", "megacheck", "varcheck"]
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
language: go
|
||||
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- go: "1.9.x"
|
||||
- go: "1.10.x"
|
||||
- go: "1.11.x"
|
||||
env:
|
||||
- GO111MODULE=off
|
||||
- go: "1.11.x"
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- go: "tip"
|
||||
env:
|
||||
- GO111MODULE=off
|
||||
- go: "tip"
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
allow_failures:
|
||||
- go: "tip"
|
||||
|
||||
install: make deps
|
||||
|
||||
script: make ci-test
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user