Skip to content

upgrade to new pop, go module and bug fixes #188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
language: go

go:
- 1.8
- 1.9
- 1.11.1

env:
- GO111MODULE=on

services:
- docker
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ build: ## Build the binary.

deps: ## Install dependencies.
@go get -u github.com/gobuffalo/pop/soda
@go get -u github.com/golang/lint/golint
@go get -u github.com/Masterminds/glide && glide install
@go get -u golang.org/x/lint/golint
@go mod download

image: ## Build the Docker image.
docker build .
Expand Down
2 changes: 1 addition & 1 deletion api/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/go-chi/chi"
"github.com/netlify/gotrue/models"
"github.com/netlify/gotrue/storage"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
)

type adminUserParams struct {
Expand Down
2 changes: 1 addition & 1 deletion api/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
jwt "github.com/dgrijalva/jwt-go"
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/netlify/gotrue/storage"
"github.com/netlify/netlify-commons/graceful"
"github.com/rs/cors"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/sebest/xff"
"github.com/sirupsen/logrus"
)
Expand Down
2 changes: 1 addition & 1 deletion api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/netlify/gotrue/models"
"github.com/netlify/gotrue/storage"
"github.com/netlify/gotrue/storage/test"
"github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion api/audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
jwt "github.com/dgrijalva/jwt-go"
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion api/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
jwt "github.com/dgrijalva/jwt-go"
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
)

type contextKey string
Expand Down
4 changes: 2 additions & 2 deletions api/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (e *OAuthError) WithInternalError(err error) *OAuthError {

// WithInternalMessage adds internal message information to the error
func (e *OAuthError) WithInternalMessage(fmtString string, args ...interface{}) *OAuthError {
e.InternalMessage = fmt.Sprintf(fmtString, args)
e.InternalMessage = fmt.Sprintf(fmtString, args...)
return e
}

Expand Down Expand Up @@ -111,7 +111,7 @@ func (e *HTTPError) WithInternalError(err error) *HTTPError {

// WithInternalMessage adds internal message information to the error
func (e *HTTPError) WithInternalMessage(fmtString string, args ...interface{}) *HTTPError {
e.InternalMessage = fmt.Sprintf(fmtString, args)
e.InternalMessage = fmt.Sprintf(fmtString, args...)
return e
}

Expand Down
2 changes: 1 addition & 1 deletion api/external.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/netlify/gotrue/api/provider"
"github.com/netlify/gotrue/models"
"github.com/netlify/gotrue/storage"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion api/external_saml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/netlify/gotrue/models"
"github.com/russellhaering/gosaml2/types"
dsig "github.com/russellhaering/goxmldsig"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion api/external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
jwt "github.com/dgrijalva/jwt-go"
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion api/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/netlify/gotrue/models"
"github.com/netlify/gotrue/storage"
"github.com/pkg/errors"
"github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
)

func addRequestID(globalConfig *conf.GlobalConfiguration) middlewareHandler {
Expand Down
2 changes: 1 addition & 1 deletion api/hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
"github.com/netlify/gotrue/storage/test"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions api/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

jwt "github.com/dgrijalva/jwt-go"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/sirupsen/logrus"

"github.com/netlify/gotrue/conf"
Expand Down Expand Up @@ -103,7 +103,7 @@ func (w *Webhook) trigger() (io.ReadCloser, error) {
// timed out - try again?
if i == w.Retries-1 {
closeBody(rsp)
return nil, httpError(http.StatusGatewayTimeout, "Failed to perform webhook in time frame (%d seconds)", timeout.Seconds())
return nil, httpError(http.StatusGatewayTimeout, "Failed to perform webhook in time frame (%v seconds)", timeout.Seconds())
}
hooklog.Info("Request timed out")
continue
Expand Down
2 changes: 1 addition & 1 deletion api/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
"github.com/pkg/errors"
"github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
)

func (a *API) loadInstance(w http.ResponseWriter, r *http.Request) (context.Context, error) {
Expand Down
2 changes: 1 addition & 1 deletion api/instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http/httptest"
"testing"

"github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"

"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
Expand Down
2 changes: 1 addition & 1 deletion api/invite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
jwt "github.com/dgrijalva/jwt-go"
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion api/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

jwt "github.com/dgrijalva/jwt-go"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion api/provider/saml.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
saml2 "github.com/russellhaering/gosaml2"
"github.com/russellhaering/gosaml2/types"
dsig "github.com/russellhaering/goxmldsig"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"golang.org/x/oauth2"
)

Expand Down
2 changes: 1 addition & 1 deletion api/recover_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion api/signup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
jwt "github.com/dgrijalva/jwt-go"
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
4 changes: 2 additions & 2 deletions api/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (a *API) ResourceOwnerPasswordGrant(ctx context.Context, w http.ResponseWri

if cookie != "" && config.Cookie.Duration > 0 {
if terr = a.setCookieToken(config, token.Token, cookie == useSessionCookie, w); terr != nil {
return internalServerError("Failed to set JWT cookie", terr)
return internalServerError("Failed to set JWT cookie. %s", terr)
}
}
return nil
Expand Down Expand Up @@ -145,7 +145,7 @@ func (a *API) RefreshTokenGrant(ctx context.Context, w http.ResponseWriter, r *h

if cookie != "" && config.Cookie.Duration > 0 {
if terr = a.setCookieToken(config, tokenString, cookie == useSessionCookie, w); terr != nil {
return internalServerError("Failed to set JWT cookie", terr)
return internalServerError("Failed to set JWT cookie. %s", terr)
}
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/netlify/gotrue/models"
"github.com/netlify/gotrue/storage"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
)

// UserUpdateParams parameters for updating a user
Expand Down
2 changes: 1 addition & 1 deletion api/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion api/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (a *API) Verify(w http.ResponseWriter, r *http.Request) error {

if cookie != "" && config.Cookie.Duration > 0 {
if terr = a.setCookieToken(config, token.Token, cookie == useSessionCookie, w); terr != nil {
return internalServerError("Failed to set JWT cookie", terr)
return internalServerError("Failed to set JWT cookie. %s", terr)
}
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion api/verify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion cmd/admin_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/models"
"github.com/netlify/gotrue/storage"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/serve_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/netlify/gotrue/api"
"github.com/netlify/gotrue/conf"
"github.com/netlify/gotrue/storage"
uuid "github.com/satori/go.uuid"
"github.com/gobuffalo/uuid"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
Loading