Skip to content

Commit

Permalink
Upgrade to echo v4
Browse files Browse the repository at this point in the history
  • Loading branch information
LeafHacker committed Dec 27, 2019
1 parent bce6c8e commit 43135f9
Show file tree
Hide file tree
Showing 27 changed files with 30 additions and 31 deletions.
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ go 1.12

require (
github.com/aws/aws-sdk-go v1.25.9
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/gbrlsnchs/jwt/v3 v3.0.0-rc.0
github.com/google/uuid v1.1.1
github.com/kr/pretty v0.1.0 // indirect
github.com/labstack/echo v3.3.10+incompatible
github.com/labstack/gommon v0.3.0 // indirect
github.com/labstack/echo/v4 v4.1.11
github.com/lib/pq v1.2.0
github.com/mailgun/mailgun-go/v3 v3.6.0
github.com/mattn/go-colorable v0.1.4 // indirect
Expand Down
5 changes: 3 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/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/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8bbnE7CX5OEgg=
github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s=
github.com/labstack/echo/v4 v4.1.11 h1:z0BZoArY4FqdpUEl+wlHp4hnr/oSR6MTmQmv8OHSoww=
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0=
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
Expand Down Expand Up @@ -63,6 +63,7 @@ github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPU
github.com/valyala/fasttemplate v1.1.0 h1:RZqt0yGBsps8NGvLSGW804QQqCUYYLsaOjTVHy1Ocw4=
github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 h1:Gv7RPwsi3eZ2Fgewe3CBsuOebPwO27PoXzRpJPsvSSM=
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc h1:c0o/qxkaO2LF5t6fQrT4b5hzyggAkLLlCUjqfRxd8Q4=
Expand Down
2 changes: 1 addition & 1 deletion src/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package api

import (
"github.com/ImpactDevelopment/ImpactServer/src/api/v1"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

// Server returns an echo server that handles api requests for each version
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/dbtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"

"github.com/ImpactDevelopment/ImpactServer/src/database"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

func dbTest(c echo.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/emailtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/ImpactDevelopment/ImpactServer/src/mailgun"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

func emailTest(c echo.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/minecraft.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/ImpactDevelopment/ImpactServer/src/util"
"github.com/google/uuid"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

var userData map[string]users.UserInfo
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/mogangloginjwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/ImpactDevelopment/ImpactServer/src/users"
"github.com/ImpactDevelopment/ImpactServer/src/util"
"github.com/google/uuid"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

func mojangLoginJWT(c echo.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/mojangloginlegacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/ImpactDevelopment/ImpactServer/src/users"
"github.com/ImpactDevelopment/ImpactServer/src/util"
"github.com/google/uuid"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

func mojangLoginLegacy(c echo.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/motd.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/ImpactDevelopment/ImpactServer/src/util"

"github.com/ImpactDevelopment/ImpactServer/src/cloudflare"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

const motdURL = "https://impactdevelopment.github.io/Resources/data/motd.txt"
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package v1

import (
"github.com/ImpactDevelopment/ImpactServer/src/middleware"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

// API configures the Group to implement v1 of the API
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/shared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"net/http/httptest"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

func getServer() (e *echo.Echo) {
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/thealtening.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package v1

import (
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
"time"
)

Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/themes.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package v1
import (
"net/http"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package middleware
import (
"strconv"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

// instruct the browser and cloudflare to cache for this amount of time
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion src/middleware/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

// Redirect trailing index.html's.
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion src/newWeb/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package newWeb

import (
"github.com/ImpactDevelopment/ImpactServer/src/util"
"github.com/labstack/echo/v4"
"net/http"
"net/url"

mid "github.com/ImpactDevelopment/ImpactServer/src/middleware"
"github.com/labstack/echo"
)

func Server() (e *echo.Echo) {
Expand Down
2 changes: 1 addition & 1 deletion src/s3proxy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

var AWSSession = session.Must(session.NewSession(&aws.Config{Region: aws.String("us-east-1")}))
Expand Down
4 changes: 2 additions & 2 deletions src/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/ImpactDevelopment/ImpactServer/src/s3proxy"
"github.com/ImpactDevelopment/ImpactServer/src/util"
"github.com/ImpactDevelopment/ImpactServer/src/web"
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
)

var port = 3000
Expand Down
2 changes: 1 addition & 1 deletion src/util/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http/httputil"
"net/url"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

// var func to allow overriding in tests
Expand Down
2 changes: 1 addition & 1 deletion src/util/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/url"
"testing"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion src/web/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/ImpactDevelopment/ImpactServer/src/util"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

const github = "https://impactdevelopment.github.io"
Expand Down
2 changes: 1 addition & 1 deletion src/web/changelog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion src/web/installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

"archive/zip"

"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

var installerVersion string
Expand Down
2 changes: 1 addition & 1 deletion src/web/releases.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/ImpactDevelopment/ImpactServer/src/util"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/s3"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

var rels map[string]Release
Expand Down
2 changes: 1 addition & 1 deletion src/web/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"

mid "github.com/ImpactDevelopment/ImpactServer/src/middleware"
"github.com/labstack/echo"
"github.com/labstack/echo/v4"
)

func Server() (e *echo.Echo) {
Expand Down

0 comments on commit 43135f9

Please sign in to comment.