Open platform to collect and prioritize feedback
moved evertyhing to app folder'
goenning72267b59b89c
diff --git a/auth/jwt.go b/app/auth/jwt.gosimilarity index 95%rename from auth/jwt.gorename to app/auth/jwt.goindex 4b6463fcf..1df6fc5c1 100644--- a/auth/jwt.go+++ b/app/auth/jwt.go@@ -1,7 +1,7 @@package authimport (- "github.com/WeCanHearYou/wchy/env"+ "github.com/WeCanHearYou/wchy/app/env"jwt "github.com/dgrijalva/jwt-go")diff --git a/auth/jwt_test.go b/app/auth/jwt_test.gosimilarity index 94%rename from auth/jwt_test.gorename to app/auth/jwt_test.goindex 2d55320d6..21c52fbf6 100644--- a/auth/jwt_test.go+++ b/app/auth/jwt_test.go@@ -3,7 +3,7 @@ package auth_testimport ("testing"- "github.com/WeCanHearYou/wchy/auth"+ "github.com/WeCanHearYou/wchy/app/auth". "github.com/onsi/gomega")diff --git a/auth/oauth.go b/app/auth/oauth.gosimilarity index 100%rename from auth/oauth.gorename to app/auth/oauth.godiff --git a/context/wchy.go b/app/context/wchy.gosimilarity index 80%rename from context/wchy.gorename to app/context/wchy.goindex ba2152bcc..b06ce7c35 100644--- a/context/wchy.go+++ b/app/context/wchy.go@@ -1,7 +1,9 @@package context-import "github.com/WeCanHearYou/wchy/service"-import "github.com/WeCanHearYou/wchy/auth"+import (+ "github.com/WeCanHearYou/wchy/app/auth"+ "github.com/WeCanHearYou/wchy/app/service"+)// WchySettings is an application-wide settingstype WchySettings struct {diff --git a/env/env.go b/app/env/env.gosimilarity index 100%rename from env/env.gorename to app/env/env.godiff --git a/env/env_test.go b/app/env/env_test.gosimilarity index 97%rename from env/env_test.gorename to app/env/env_test.goindex 9533aa691..8cf0d7381 100644--- a/env/env_test.go+++ b/app/env/env_test.go@@ -4,7 +4,7 @@ import ("os""testing"- "github.com/WeCanHearYou/wchy/env"+ "github.com/WeCanHearYou/wchy/app/env". "github.com/onsi/gomega")diff --git a/handler/auth.go b/app/handler/auth.gosimilarity index 93%rename from handler/auth.gorename to app/handler/auth.goindex 614b329af..9de4ae7f1 100644--- a/handler/auth.go+++ b/app/handler/auth.go@@ -6,10 +6,10 @@ import ("golang.org/x/oauth2"- "github.com/WeCanHearYou/wchy/auth"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/model"- "github.com/WeCanHearYou/wchy/service"+ "github.com/WeCanHearYou/wchy/app/auth"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/model"+ "github.com/WeCanHearYou/wchy/app/service""github.com/labstack/echo")diff --git a/handler/auth_test.go b/app/handler/auth_test.gosimilarity index 85%rename from handler/auth_test.gorename to app/handler/auth_test.goindex 157db8c94..a0cc7a422 100644--- a/handler/auth_test.go+++ b/app/handler/auth_test.go@@ -5,10 +5,10 @@ import ("net/http"- "github.com/WeCanHearYou/wchy/auth"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/handler"- "github.com/WeCanHearYou/wchy/mock"+ "github.com/WeCanHearYou/wchy/app/auth"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/handler"+ "github.com/WeCanHearYou/wchy/app/mock". "github.com/onsi/gomega")diff --git a/handler/index.go b/app/handler/index.gosimilarity index 85%rename from handler/index.gorename to app/handler/index.goindex a46b73efd..3310ab556 100644--- a/handler/index.go+++ b/app/handler/index.go@@ -1,8 +1,8 @@package handlerimport (- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/model"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/model""github.com/labstack/echo")diff --git a/handler/index_test.go b/app/handler/index_test.gosimilarity index 75%rename from handler/index_test.gorename to app/handler/index_test.goindex f8e1c828f..4227d6a71 100644--- a/handler/index_test.go+++ b/app/handler/index_test.go@@ -3,10 +3,10 @@ package handler_testimport ("testing"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/handler"- "github.com/WeCanHearYou/wchy/mock"- "github.com/WeCanHearYou/wchy/model"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/handler"+ "github.com/WeCanHearYou/wchy/app/mock"+ "github.com/WeCanHearYou/wchy/app/model". "github.com/onsi/gomega")diff --git a/handler/status.go b/app/handler/status.gosimilarity index 93%rename from handler/status.gorename to app/handler/status.goindex ac6b274c6..fbedffd43 100644--- a/handler/status.go+++ b/app/handler/status.go@@ -5,7 +5,7 @@ import ("runtime""time"- "github.com/WeCanHearYou/wchy/context"+ "github.com/WeCanHearYou/wchy/app/context""github.com/labstack/echo")diff --git a/handler/status_test.go b/app/handler/status_test.gosimilarity index 82%rename from handler/status_test.gorename to app/handler/status_test.goindex b3ebf54d9..be339e757 100644--- a/handler/status_test.go+++ b/app/handler/status_test.go@@ -3,9 +3,9 @@ package handler_testimport ("testing"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/handler"- "github.com/WeCanHearYou/wchy/mock"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/handler"+ "github.com/WeCanHearYou/wchy/app/mock". "github.com/onsi/gomega")diff --git a/handler/tenant.go b/app/handler/tenant.gosimilarity index 86%rename from handler/tenant.gorename to app/handler/tenant.goindex 6cd74fc42..e16a6c41d 100644--- a/handler/tenant.go+++ b/app/handler/tenant.go@@ -3,8 +3,8 @@ package handlerimport ("net/http"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/service"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/service""github.com/labstack/echo")diff --git a/handler/tenant_test.go b/app/handler/tenant_test.gosimilarity index 83%rename from handler/tenant_test.gorename to app/handler/tenant_test.goindex 82ff2f89d..8ac71c414 100644--- a/handler/tenant_test.go+++ b/app/handler/tenant_test.go@@ -3,11 +3,11 @@ package handler_testimport ("testing"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/handler"- "github.com/WeCanHearYou/wchy/mock"- "github.com/WeCanHearYou/wchy/model"- "github.com/WeCanHearYou/wchy/service"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/handler"+ "github.com/WeCanHearYou/wchy/app/mock"+ "github.com/WeCanHearYou/wchy/app/model"+ "github.com/WeCanHearYou/wchy/app/service". "github.com/onsi/gomega")diff --git a/mock/server.go b/app/mock/server.gosimilarity index 97%rename from mock/server.gorename to app/mock/server.goindex 30db529bb..6400aef8c 100644--- a/mock/server.go+++ b/app/mock/server.go@@ -7,7 +7,7 @@ import ("strings"- "github.com/WeCanHearYou/wchy/router"+ "github.com/WeCanHearYou/wchy/app/router""github.com/jmoiron/jsonq""github.com/labstack/echo")diff --git a/model/model.go b/app/model/model.gosimilarity index 100%rename from model/model.gorename to app/model/model.godiff --git a/router/middleware/hostchecker.go b/app/router/middleware/hostchecker.gosimilarity index 100%rename from router/middleware/hostchecker.gorename to app/router/middleware/hostchecker.godiff --git a/router/middleware/hostchecker_test.go b/app/router/middleware/hostchecker_test.gosimilarity index 94%rename from router/middleware/hostchecker_test.gorename to app/router/middleware/hostchecker_test.goindex ece718f3c..f7861a604 100644--- a/router/middleware/hostchecker_test.go+++ b/app/router/middleware/hostchecker_test.go@@ -5,7 +5,7 @@ import ("net/http/httptest""testing"- "github.com/WeCanHearYou/wchy/router/middleware"+ "github.com/WeCanHearYou/wchy/app/router/middleware""github.com/labstack/echo". "github.com/onsi/gomega")diff --git a/router/middleware/jwt.go b/app/router/middleware/jwt.gosimilarity index 96%rename from router/middleware/jwt.gorename to app/router/middleware/jwt.goindex a8271a492..2e1727e31 100644--- a/router/middleware/jwt.go+++ b/app/router/middleware/jwt.go@@ -3,7 +3,7 @@ package middlewareimport ("net/http"- "github.com/WeCanHearYou/wchy/auth"+ "github.com/WeCanHearYou/wchy/app/auth""github.com/labstack/echo")diff --git a/router/middleware/jwt_test.go b/app/router/middleware/jwt_test.gosimilarity index 96%rename from router/middleware/jwt_test.gorename to app/router/middleware/jwt_test.goindex 2d326189e..c1d446bc8 100644--- a/router/middleware/jwt_test.go+++ b/app/router/middleware/jwt_test.go@@ -5,8 +5,8 @@ import ("net/http/httptest""testing"- "github.com/WeCanHearYou/wchy/auth"- "github.com/WeCanHearYou/wchy/router/middleware"+ "github.com/WeCanHearYou/wchy/app/auth"+ "github.com/WeCanHearYou/wchy/app/router/middleware""github.com/labstack/echo". "github.com/onsi/gomega")diff --git a/router/middleware/multitenant.go b/app/router/middleware/multitenant.gosimilarity index 87%rename from router/middleware/multitenant.gorename to app/router/middleware/multitenant.goindex 50e912fd8..44712d8d3 100644--- a/router/middleware/multitenant.go+++ b/app/router/middleware/multitenant.go@@ -4,8 +4,8 @@ import ("fmt""net/http"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/util"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/util""github.com/labstack/echo")diff --git a/router/middleware/multitenant_test.go b/app/router/middleware/multitenant_test.gosimilarity index 91%rename from router/middleware/multitenant_test.gorename to app/router/middleware/multitenant_test.goindex ff758356a..2c3f2422d 100644--- a/router/middleware/multitenant_test.go+++ b/app/router/middleware/multitenant_test.go@@ -5,10 +5,10 @@ import ("net/http/httptest""testing"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/model"- "github.com/WeCanHearYou/wchy/router/middleware"- "github.com/WeCanHearYou/wchy/service"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/model"+ "github.com/WeCanHearYou/wchy/app/router/middleware"+ "github.com/WeCanHearYou/wchy/app/service""github.com/labstack/echo". "github.com/onsi/gomega")diff --git a/router/renderer.go b/app/router/renderer.gosimilarity index 97%rename from router/renderer.gorename to app/router/renderer.goindex 6a3fd4c70..3acc91671 100644--- a/router/renderer.go+++ b/app/router/renderer.go@@ -7,7 +7,7 @@ import ("os"- "github.com/WeCanHearYou/wchy/env"+ "github.com/WeCanHearYou/wchy/app/env""github.com/labstack/echo")diff --git a/router/router.go b/app/router/router.gosimilarity index 89%rename from router/router.gorename to app/router/router.goindex 6d895578e..ad7269d31 100644--- a/router/router.go+++ b/app/router/router.go@@ -5,11 +5,11 @@ import ("strings"- "github.com/WeCanHearYou/wchy/auth"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/env"- "github.com/WeCanHearYou/wchy/handler"- "github.com/WeCanHearYou/wchy/router/middleware"+ "github.com/WeCanHearYou/wchy/app/auth"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/env"+ "github.com/WeCanHearYou/wchy/app/handler"+ "github.com/WeCanHearYou/wchy/app/router/middleware""github.com/labstack/echo""github.com/labstack/gommon/log")diff --git a/router/router_test.go b/app/router/router_test.gosimilarity index 81%rename from router/router_test.gorename to app/router/router_test.goindex 584f623b9..f1bc3921b 100644--- a/router/router_test.go+++ b/app/router/router_test.go@@ -3,7 +3,7 @@ package router_testimport ("testing"- "github.com/WeCanHearYou/wchy/router"+ "github.com/WeCanHearYou/wchy/app/router". "github.com/onsi/gomega")diff --git a/service/consts.go b/app/service/consts.gosimilarity index 100%rename from service/consts.gorename to app/service/consts.godiff --git a/service/health.go b/app/service/health.gosimilarity index 100%rename from service/health.gorename to app/service/health.godiff --git a/service/health_test.go b/app/service/health_test.gosimilarity index 95%rename from service/health_test.gorename to app/service/health_test.goindex e6d746763..6a8799884 100644--- a/service/health_test.go+++ b/app/service/health_test.go@@ -6,7 +6,7 @@ import (sqlmock "gopkg.in/DATA-DOG/go-sqlmock.v1"- "github.com/WeCanHearYou/wchy/service"+ "github.com/WeCanHearYou/wchy/app/service". "github.com/onsi/gomega")diff --git a/service/idea.go b/app/service/idea.gosimilarity index 94%rename from service/idea.gorename to app/service/idea.goindex 3173b156d..97a81cb64 100644--- a/service/idea.go+++ b/app/service/idea.go@@ -3,7 +3,7 @@ package serviceimport ("database/sql"- "github.com/WeCanHearYou/wchy/model"+ "github.com/WeCanHearYou/wchy/app/model")// IdeaService contains read and write operations for ideasdiff --git a/service/idea_test.go b/app/service/idea_test.gosimilarity index 93%rename from service/idea_test.gorename to app/service/idea_test.goindex 98b114880..633daae8c 100644--- a/service/idea_test.go+++ b/app/service/idea_test.go@@ -6,8 +6,8 @@ import (sqlmock "gopkg.in/DATA-DOG/go-sqlmock.v1"- "github.com/WeCanHearYou/wchy/model"- "github.com/WeCanHearYou/wchy/service"+ "github.com/WeCanHearYou/wchy/app/model"+ "github.com/WeCanHearYou/wchy/app/service". "github.com/onsi/gomega")diff --git a/service/tenant.go b/app/service/tenant.gosimilarity index 92%rename from service/tenant.gorename to app/service/tenant.goindex 33a17a8c0..b9383934f 100644--- a/service/tenant.go+++ b/app/service/tenant.go@@ -4,8 +4,8 @@ import ("database/sql""strings"- "github.com/WeCanHearYou/wchy/env"- "github.com/WeCanHearYou/wchy/model"+ "github.com/WeCanHearYou/wchy/app/env"+ "github.com/WeCanHearYou/wchy/app/model")// TenantService contains read and write operations for tenantsdiff --git a/service/tenant_test.go b/app/service/tenant_test.gosimilarity index 97%rename from service/tenant_test.gorename to app/service/tenant_test.goindex 9a6d1dec5..0224cf5d2 100644--- a/service/tenant_test.go+++ b/app/service/tenant_test.go@@ -6,7 +6,7 @@ import (sqlmock "gopkg.in/DATA-DOG/go-sqlmock.v1"- "github.com/WeCanHearYou/wchy/service"+ "github.com/WeCanHearYou/wchy/app/service". "github.com/onsi/gomega")diff --git a/service/user.go b/app/service/user.gosimilarity index 96%rename from service/user.gorename to app/service/user.goindex 73c1d1919..b3189660b 100644--- a/service/user.go+++ b/app/service/user.go@@ -3,7 +3,7 @@ package serviceimport ("database/sql"- "github.com/WeCanHearYou/wchy/model"+ "github.com/WeCanHearYou/wchy/app/model")// UserService is used for user operationsdiff --git a/service/user_test.go b/app/service/user_test.gosimilarity index 96%rename from service/user_test.gorename to app/service/user_test.goindex 189ae330e..3491bf22c 100644--- a/service/user_test.go+++ b/app/service/user_test.go@@ -7,9 +7,9 @@ import (sqlmock "gopkg.in/DATA-DOG/go-sqlmock.v1"- "github.com/WeCanHearYou/wchy/auth"- "github.com/WeCanHearYou/wchy/model"- "github.com/WeCanHearYou/wchy/service"+ "github.com/WeCanHearYou/wchy/app/auth"+ "github.com/WeCanHearYou/wchy/app/model"+ "github.com/WeCanHearYou/wchy/app/service". "github.com/onsi/gomega")diff --git a/util/http.go b/app/util/http.gosimilarity index 100%rename from util/http.gorename to app/util/http.godiff --git a/main.go b/main.goindex 0cf473c6e..d9c8bf6e7 100644--- a/main.go+++ b/main.go@@ -3,15 +3,14 @@ package mainimport ("database/sql"+ "github.com/WeCanHearYou/wchy/app/auth"+ "github.com/WeCanHearYou/wchy/app/context"+ "github.com/WeCanHearYou/wchy/app/env"+ "github.com/WeCanHearYou/wchy/app/router"+ "github.com/WeCanHearYou/wchy/app/service"_ "github.com/lib/pq""fmt"-- "github.com/WeCanHearYou/wchy/auth"- "github.com/WeCanHearYou/wchy/context"- "github.com/WeCanHearYou/wchy/env"- "github.com/WeCanHearYou/wchy/router"- "github.com/WeCanHearYou/wchy/service")var buildtime string