Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

moved evertyhing to app folder'

goenning72267b59b89c
diff --git a/auth/jwt.go b/app/auth/jwt.go
similarity index 95%
rename from auth/jwt.go
rename to app/auth/jwt.go
index 4b6463fcf..1df6fc5c1 100644
--- a/auth/jwt.go
+++ b/app/auth/jwt.go
@@ -1,7 +1,7 @@
package auth
import (
- "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.go
similarity index 94%
rename from auth/jwt_test.go
rename to app/auth/jwt_test.go
index 2d55320d6..21c52fbf6 100644
--- a/auth/jwt_test.go
+++ b/app/auth/jwt_test.go
@@ -3,7 +3,7 @@ package auth_test
import (
"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.go
similarity index 100%
rename from auth/oauth.go
rename to app/auth/oauth.go
diff --git a/context/wchy.go b/app/context/wchy.go
similarity index 80%
rename from context/wchy.go
rename to app/context/wchy.go
index 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 settings
type WchySettings struct {
diff --git a/env/env.go b/app/env/env.go
similarity index 100%
rename from env/env.go
rename to app/env/env.go
diff --git a/env/env_test.go b/app/env/env_test.go
similarity index 97%
rename from env/env_test.go
rename to app/env/env_test.go
index 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.go
similarity index 93%
rename from handler/auth.go
rename to app/handler/auth.go
index 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.go
similarity index 85%
rename from handler/auth_test.go
rename to app/handler/auth_test.go
index 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.go
similarity index 85%
rename from handler/index.go
rename to app/handler/index.go
index a46b73efd..3310ab556 100644
--- a/handler/index.go
+++ b/app/handler/index.go
@@ -1,8 +1,8 @@
package handler
import (
- "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.go
similarity index 75%
rename from handler/index_test.go
rename to app/handler/index_test.go
index f8e1c828f..4227d6a71 100644
--- a/handler/index_test.go
+++ b/app/handler/index_test.go
@@ -3,10 +3,10 @@ package handler_test
import (
"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.go
similarity index 93%
rename from handler/status.go
rename to app/handler/status.go
index 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.go
similarity index 82%
rename from handler/status_test.go
rename to app/handler/status_test.go
index b3ebf54d9..be339e757 100644
--- a/handler/status_test.go
+++ b/app/handler/status_test.go
@@ -3,9 +3,9 @@ package handler_test
import (
"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.go
similarity index 86%
rename from handler/tenant.go
rename to app/handler/tenant.go
index 6cd74fc42..e16a6c41d 100644
--- a/handler/tenant.go
+++ b/app/handler/tenant.go
@@ -3,8 +3,8 @@ package handler
import (
"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.go
similarity index 83%
rename from handler/tenant_test.go
rename to app/handler/tenant_test.go
index 82ff2f89d..8ac71c414 100644
--- a/handler/tenant_test.go
+++ b/app/handler/tenant_test.go
@@ -3,11 +3,11 @@ package handler_test
import (
"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.go
similarity index 97%
rename from mock/server.go
rename to app/mock/server.go
index 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.go
similarity index 100%
rename from model/model.go
rename to app/model/model.go
diff --git a/router/middleware/hostchecker.go b/app/router/middleware/hostchecker.go
similarity index 100%
rename from router/middleware/hostchecker.go
rename to app/router/middleware/hostchecker.go
diff --git a/router/middleware/hostchecker_test.go b/app/router/middleware/hostchecker_test.go
similarity index 94%
rename from router/middleware/hostchecker_test.go
rename to app/router/middleware/hostchecker_test.go
index 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.go
similarity index 96%
rename from router/middleware/jwt.go
rename to app/router/middleware/jwt.go
index a8271a492..2e1727e31 100644
--- a/router/middleware/jwt.go
+++ b/app/router/middleware/jwt.go
@@ -3,7 +3,7 @@ package middleware
import (
"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.go
similarity index 96%
rename from router/middleware/jwt_test.go
rename to app/router/middleware/jwt_test.go
index 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.go
similarity index 87%
rename from router/middleware/multitenant.go
rename to app/router/middleware/multitenant.go
index 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.go
similarity index 91%
rename from router/middleware/multitenant_test.go
rename to app/router/middleware/multitenant_test.go
index 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.go
similarity index 97%
rename from router/renderer.go
rename to app/router/renderer.go
index 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.go
similarity index 89%
rename from router/router.go
rename to app/router/router.go
index 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.go
similarity index 81%
rename from router/router_test.go
rename to app/router/router_test.go
index 584f623b9..f1bc3921b 100644
--- a/router/router_test.go
+++ b/app/router/router_test.go
@@ -3,7 +3,7 @@ package router_test
import (
"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.go
similarity index 100%
rename from service/consts.go
rename to app/service/consts.go
diff --git a/service/health.go b/app/service/health.go
similarity index 100%
rename from service/health.go
rename to app/service/health.go
diff --git a/service/health_test.go b/app/service/health_test.go
similarity index 95%
rename from service/health_test.go
rename to app/service/health_test.go
index 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.go
similarity index 94%
rename from service/idea.go
rename to app/service/idea.go
index 3173b156d..97a81cb64 100644
--- a/service/idea.go
+++ b/app/service/idea.go
@@ -3,7 +3,7 @@ package service
import (
"database/sql"
- "github.com/WeCanHearYou/wchy/model"
+ "github.com/WeCanHearYou/wchy/app/model"
)
// IdeaService contains read and write operations for ideas
diff --git a/service/idea_test.go b/app/service/idea_test.go
similarity index 93%
rename from service/idea_test.go
rename to app/service/idea_test.go
index 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.go
similarity index 92%
rename from service/tenant.go
rename to app/service/tenant.go
index 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 tenants
diff --git a/service/tenant_test.go b/app/service/tenant_test.go
similarity index 97%
rename from service/tenant_test.go
rename to app/service/tenant_test.go
index 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.go
similarity index 96%
rename from service/user.go
rename to app/service/user.go
index 73c1d1919..b3189660b 100644
--- a/service/user.go
+++ b/app/service/user.go
@@ -3,7 +3,7 @@ package service
import (
"database/sql"
- "github.com/WeCanHearYou/wchy/model"
+ "github.com/WeCanHearYou/wchy/app/model"
)
// UserService is used for user operations
diff --git a/service/user_test.go b/app/service/user_test.go
similarity index 96%
rename from service/user_test.go
rename to app/service/user_test.go
index 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.go
similarity index 100%
rename from util/http.go
rename to app/util/http.go
diff --git a/main.go b/main.go
index 0cf473c6e..d9c8bf6e7 100644
--- a/main.go
+++ b/main.go
@@ -3,15 +3,14 @@ package main
import (
"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