Skip to content

Commit

Permalink
[REV] update package api design,remove pkg dir (fixed goodrain#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnett committed Apr 24, 2018
1 parent 72c10ad commit 287f8bd
Show file tree
Hide file tree
Showing 467 changed files with 817 additions and 825 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package cloud

import (
"github.com/go-chi/chi"
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/api/controller"
)

//Routes routes
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package license

import (
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/pkg/api/util"
"github.com/goodrain/rainbond/api/controller"
"github.com/goodrain/rainbond/api/util"
"net/http"

"github.com/go-chi/chi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package rootFunc

import (
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/api/controller"

"github.com/go-chi/chi"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package version2

import (
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/api/controller"

"github.com/go-chi/chi"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package version2

import (
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/pkg/api/middleware"
"github.com/goodrain/rainbond/api/controller"
"github.com/goodrain/rainbond/api/middleware"

"github.com/go-chi/chi"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
package version2

import (
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/pkg/api/middleware"
"github.com/goodrain/rainbond/api/controller"
"github.com/goodrain/rainbond/api/middleware"

"github.com/go-chi/chi"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package version2

import (
"github.com/go-chi/chi"
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/api/controller"
)

//PluginRouter plugin router
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package version2

import (
"github.com/go-chi/chi"
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/api/controller"
)

//PluginRouter plugin router
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package websocket

import (
"github.com/goodrain/rainbond/pkg/api/controller"
"github.com/goodrain/rainbond/api/controller"

"github.com/go-chi/chi"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ import (
"os"
"strconv"

"github.com/goodrain/rainbond/pkg/api/handler/publiccloud"
"github.com/goodrain/rainbond/api/handler/publiccloud"

"github.com/goodrain/rainbond/pkg/db"
"github.com/goodrain/rainbond/pkg/db/model"
"github.com/goodrain/rainbond/db"
"github.com/goodrain/rainbond/db/model"

"github.com/goodrain/rainbond/pkg/api/middleware"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/api/middleware"
httputil "github.com/goodrain/rainbond/util/http"
)

//ChargesVerifyController service charges verify
Expand Down
8 changes: 4 additions & 4 deletions pkg/api/controller/check.go → api/controller/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import (
"strings"

"github.com/go-chi/chi"
"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/api/middleware"
api_model "github.com/goodrain/rainbond/pkg/api/model"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware"
api_model "github.com/goodrain/rainbond/api/model"
httputil "github.com/goodrain/rainbond/util/http"
)

//Check service check
Expand Down
6 changes: 3 additions & 3 deletions pkg/api/controller/cloud.go → api/controller/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"net/http"

"github.com/go-chi/chi"
"github.com/goodrain/rainbond/pkg/api/handler"
api_model "github.com/goodrain/rainbond/pkg/api/model"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/api/handler"
api_model "github.com/goodrain/rainbond/api/model"
httputil "github.com/goodrain/rainbond/util/http"
)

//CloudManager cloud manager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"net/http"

"github.com/go-chi/chi"
"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/api/middleware"
api_model "github.com/goodrain/rainbond/pkg/api/model"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware"
api_model "github.com/goodrain/rainbond/api/model"
httputil "github.com/goodrain/rainbond/util/http"
)

//SetDefineSource SetDefineSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package controller

import (
"github.com/goodrain/rainbond/pkg/api/proxy"
"github.com/goodrain/rainbond/api/proxy"
"net/http"

"github.com/Sirupsen/logrus"
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/controller/event.go → api/controller/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (

"github.com/Sirupsen/logrus"
"github.com/bitly/go-simplejson"
"github.com/goodrain/rainbond/pkg/db"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/db"
httputil "github.com/goodrain/rainbond/util/http"
)

//Event GetLogs
Expand Down
8 changes: 4 additions & 4 deletions pkg/api/controller/eventLog.go → api/controller/eventLog.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import (
"os"
"strings"

httputil "github.com/goodrain/rainbond/pkg/util/http"
httputil "github.com/goodrain/rainbond/util/http"

"github.com/Sirupsen/logrus"
"github.com/go-chi/chi"

"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/api/middleware"
api_model "github.com/goodrain/rainbond/pkg/api/model"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware"
api_model "github.com/goodrain/rainbond/api/model"
)

//EventLogStruct eventlog struct
Expand Down
4 changes: 2 additions & 2 deletions pkg/api/controller/license.go → api/controller/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"
"net/http"

"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/api/handler"

httputil "github.com/goodrain/rainbond/pkg/util/http"
httputil "github.com/goodrain/rainbond/util/http"

"github.com/Sirupsen/logrus"
validator "github.com/thedevsaddam/govalidator"
Expand Down
8 changes: 4 additions & 4 deletions pkg/api/controller/manager.go → api/controller/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"net/http"

"github.com/goodrain/rainbond/cmd/api/option"
"github.com/goodrain/rainbond/pkg/api/apiFunc"
"github.com/goodrain/rainbond/pkg/api/discover"
"github.com/goodrain/rainbond/pkg/api/proxy"
"github.com/goodrain/rainbond/pkg/appruntimesync/client"
"github.com/goodrain/rainbond/api/apiFunc"
"github.com/goodrain/rainbond/api/discover"
"github.com/goodrain/rainbond/api/proxy"
"github.com/goodrain/rainbond/appruntimesync/client"

"github.com/Sirupsen/logrus"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ package controller
import (
"net/http"

"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/api/middleware"
api_model "github.com/goodrain/rainbond/pkg/api/model"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware"
api_model "github.com/goodrain/rainbond/api/model"
httputil "github.com/goodrain/rainbond/util/http"
)

//SetDownStreamRule 设置下游规则
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/controller/nodes.go → api/controller/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package controller

import (
"github.com/goodrain/rainbond/pkg/api/proxy"
"github.com/goodrain/rainbond/api/proxy"
"net/http"

"github.com/Sirupsen/logrus"
Expand Down
8 changes: 4 additions & 4 deletions pkg/api/controller/plugin.go → api/controller/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ package controller
import (
"net/http"

"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/api/middleware"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware"

"github.com/go-chi/chi"

api_model "github.com/goodrain/rainbond/pkg/api/model"
httputil "github.com/goodrain/rainbond/pkg/util/http"
api_model "github.com/goodrain/rainbond/api/model"
httputil "github.com/goodrain/rainbond/util/http"
)

//PluginAction plugin action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"strconv"
"strings"

"github.com/goodrain/rainbond/pkg/db"
"github.com/goodrain/rainbond/db"

"github.com/Sirupsen/logrus"
"github.com/go-chi/chi"
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions pkg/api/controller/resources.go → api/controller/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ import (
"strconv"
"strings"

"github.com/goodrain/rainbond/pkg/api/middleware"
api_model "github.com/goodrain/rainbond/pkg/api/model"
dbmodel "github.com/goodrain/rainbond/pkg/db/model"
"github.com/goodrain/rainbond/api/middleware"
api_model "github.com/goodrain/rainbond/api/model"
dbmodel "github.com/goodrain/rainbond/db/model"

"github.com/pquerna/ffjson/ffjson"

"github.com/go-chi/chi"
"github.com/jinzhu/gorm"
validator "github.com/thedevsaddam/govalidator"

"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/appruntimesync/client"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/appruntimesync/client"
httputil "github.com/goodrain/rainbond/util/http"

"github.com/Sirupsen/logrus"
"github.com/renstorm/fuzzysearch/fuzzy"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ import (
"fmt"
"net/http"

"github.com/goodrain/rainbond/pkg/api/middleware"
api_model "github.com/goodrain/rainbond/pkg/api/model"
"github.com/goodrain/rainbond/pkg/event"
"github.com/goodrain/rainbond/pkg/worker/discover/model"
"github.com/goodrain/rainbond/api/middleware"
api_model "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/worker/discover/model"

"time"

"github.com/Sirupsen/logrus"
"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/db"
dbmodel "github.com/goodrain/rainbond/pkg/db/model"
tutil "github.com/goodrain/rainbond/pkg/util"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model"
tutil "github.com/goodrain/rainbond/util"
httputil "github.com/goodrain/rainbond/util/http"
validator "github.com/thedevsaddam/govalidator"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"net/http"

"github.com/go-chi/chi"
"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/api/middleware"
api_model "github.com/goodrain/rainbond/pkg/api/model"
httputil "github.com/goodrain/rainbond/pkg/util/http"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware"
api_model "github.com/goodrain/rainbond/api/model"
httputil "github.com/goodrain/rainbond/util/http"
)

//Share 应用分享
Expand Down
10 changes: 5 additions & 5 deletions pkg/api/controller/volume.go → api/controller/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import (
"net/http"
"strings"

"github.com/goodrain/rainbond/pkg/api/handler"
"github.com/goodrain/rainbond/pkg/api/middleware"
"github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware"

api_model "github.com/goodrain/rainbond/pkg/api/model"
dbmodel "github.com/goodrain/rainbond/pkg/db/model"
httputil "github.com/goodrain/rainbond/pkg/util/http"
api_model "github.com/goodrain/rainbond/api/model"
dbmodel "github.com/goodrain/rainbond/db/model"
httputil "github.com/goodrain/rainbond/util/http"

"github.com/Sirupsen/logrus"
"github.com/go-chi/chi"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"net/http"
"os"

"github.com/goodrain/rainbond/pkg/api/discover"
"github.com/goodrain/rainbond/pkg/api/proxy"
"github.com/goodrain/rainbond/api/discover"
"github.com/goodrain/rainbond/api/proxy"

"github.com/Sirupsen/logrus"

Expand Down
2 changes: 1 addition & 1 deletion pkg/api/daemon/region_api.go → api/daemon/region_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package daemon

import (
"github.com/goodrain/rainbond/pkg/api/util"
"github.com/goodrain/rainbond/api/util"
"net/http"
"os"
"os/exec"
Expand Down
12 changes: 6 additions & 6 deletions pkg/api/db/db.go → api/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"time"

"github.com/goodrain/rainbond/cmd/api/option"
"github.com/goodrain/rainbond/pkg/db"
"github.com/goodrain/rainbond/pkg/db/config"
"github.com/goodrain/rainbond/pkg/event"
"github.com/goodrain/rainbond/pkg/mq/api/grpc/client"
"github.com/goodrain/rainbond/pkg/mq/api/grpc/pb"
"github.com/goodrain/rainbond/pkg/worker/discover/model"
"github.com/goodrain/rainbond/db"
"github.com/goodrain/rainbond/db/config"
"github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/mq/api/grpc/client"
"github.com/goodrain/rainbond/mq/api/grpc/pb"
"github.com/goodrain/rainbond/worker/discover/model"

"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
Expand Down
Loading

0 comments on commit 287f8bd

Please sign in to comment.