mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-29 18:27:58 +08:00
format code
This commit is contained in:
parent
7893190125
commit
fe2db1e973
4
.github/workflows/commit-ci-build.yml
vendored
4
.github/workflows/commit-ci-build.yml
vendored
@ -14,8 +14,8 @@ jobs:
|
||||
with:
|
||||
# The Go version to download (if necessary) and use. Supports semver spec and ranges.
|
||||
go-version: 1.13
|
||||
- name: Go-linter
|
||||
uses: Jerome1337/golint-action@v1.0.2
|
||||
# - name: Go-linter
|
||||
# uses: Jerome1337/golint-action@v1.0.2
|
||||
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
|
@ -11,7 +11,6 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/goodrain/rainbond/api/controller/upload"
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
@ -19,6 +18,7 @@ import (
|
||||
"github.com/goodrain/rainbond/db"
|
||||
httputil "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//AppStruct -
|
||||
|
@ -6,11 +6,11 @@ import (
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/middleware"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
httputil "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// AppRestoreController is an implementation of AppRestoreInterface
|
||||
|
@ -22,7 +22,7 @@ func (a *ApplicationController) AddConfigGroup(w http.ResponseWriter, r *http.Re
|
||||
}
|
||||
|
||||
checkServiceExist(appID, configReq.ServiceIDs)
|
||||
|
||||
|
||||
// create app ConfigGroups
|
||||
resp, err := handler.GetApplicationHandler().AddConfigGroup(appID, &configReq)
|
||||
if err != nil {
|
||||
|
@ -22,8 +22,8 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/middleware"
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/bitly/go-simplejson"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
httputil "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//Event GetLogs
|
||||
|
@ -27,8 +27,8 @@ import (
|
||||
|
||||
httputil "github.com/goodrain/rainbond/util/http"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/middleware"
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
k8svalidation "k8s.io/apimachinery/pkg/util/validation"
|
||||
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
|
@ -23,7 +23,6 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/middleware"
|
||||
@ -31,6 +30,7 @@ import (
|
||||
"github.com/goodrain/rainbond/db/model"
|
||||
httputil "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/goodrain/rainbond/worker/server"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// PodController is an implementation of PodInterface
|
||||
|
@ -26,7 +26,6 @@ import (
|
||||
|
||||
validator "github.com/goodrain/rainbond/util/govalidator"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/middleware"
|
||||
@ -38,6 +37,7 @@ import (
|
||||
"github.com/goodrain/rainbond/worker/discover/model"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//StartService StartService
|
||||
|
@ -22,7 +22,6 @@ import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/middleware"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
@ -30,6 +29,7 @@ import (
|
||||
"github.com/goodrain/rainbond/db/errors"
|
||||
validation "github.com/goodrain/rainbond/util/endpoint"
|
||||
httputil "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// ThirdPartyServiceController implements ThirdPartyServicer
|
||||
|
@ -23,13 +23,13 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/middleware"
|
||||
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"
|
||||
)
|
||||
|
||||
//VolumeDependency VolumeDependency
|
||||
|
@ -22,7 +22,6 @@ import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
tsdbClient "github.com/bluebreezecf/opentsdb-goclient/client"
|
||||
tsdbConfig "github.com/bluebreezecf/opentsdb-goclient/config"
|
||||
"github.com/goodrain/rainbond/cmd/api/option"
|
||||
@ -35,6 +34,7 @@ import (
|
||||
etcdutil "github.com/goodrain/rainbond/util/etcd"
|
||||
"github.com/goodrain/rainbond/worker/discover/model"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//ConDB struct
|
||||
|
@ -11,10 +11,10 @@ import (
|
||||
|
||||
"regexp"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
|
@ -4,12 +4,12 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
apimodel "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
"github.com/goodrain/rainbond/db/errors"
|
||||
"github.com/goodrain/rainbond/db/model"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// AppRestoreAction is an implementation of AppRestoreHandler
|
||||
|
@ -31,8 +31,8 @@ import (
|
||||
"math/big"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
api_model "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
|
@ -25,12 +25,12 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/handler"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
"github.com/goodrain/rainbond/db/model"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//PubChargeSverify service Charge Sverify
|
||||
|
@ -5,10 +5,10 @@ import (
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/shirou/gopsutil/disk"
|
||||
"github.com/sirupsen/logrus"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
@ -3,8 +3,8 @@ package handler
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// EtcdKeyType etcd key type
|
||||
|
@ -25,10 +25,10 @@ import (
|
||||
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
tutil "github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//TIMELAYOUT timelayout
|
||||
|
@ -27,7 +27,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
apimodel "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
@ -35,6 +34,7 @@ import (
|
||||
"github.com/goodrain/rainbond/mq/client"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// GatewayAction -
|
||||
|
@ -26,10 +26,10 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
|
@ -23,9 +23,9 @@ import (
|
||||
"github.com/goodrain/rainbond/db"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//LicenseAction LicenseAction
|
||||
|
@ -25,10 +25,10 @@ import (
|
||||
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
api_model "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//NetRulesAction rules action struct
|
||||
|
@ -23,10 +23,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"container/list"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
gclient "github.com/goodrain/rainbond/mq/client"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//BatchOperationHandler batch operation handler
|
||||
|
@ -24,13 +24,13 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
api_model "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/goodrain/rainbond/builder/exector"
|
||||
client "github.com/goodrain/rainbond/mq/client"
|
||||
tutil "github.com/goodrain/rainbond/util"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/twinj/uuid"
|
||||
)
|
||||
|
||||
|
@ -22,13 +22,13 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
gclient "github.com/goodrain/rainbond/mq/client"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
dmodel "github.com/goodrain/rainbond/worker/discover/model"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//OperationHandler operation handler
|
||||
|
@ -25,13 +25,13 @@ import (
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
api_model "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
gclient "github.com/goodrain/rainbond/mq/client"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//GetTenantServicePluginRelation GetTenantServicePluginRelation
|
||||
|
@ -24,12 +24,12 @@ import (
|
||||
|
||||
"github.com/goodrain/rainbond/mq/client"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/goodrain/rainbond/builder/exector"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/twinj/uuid"
|
||||
)
|
||||
|
||||
|
@ -32,10 +32,10 @@ import (
|
||||
|
||||
"github.com/goodrain/rainbond/db"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
api_model "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//ServiceShareHandle service share
|
||||
|
@ -460,7 +460,7 @@ func (t *TenantAction) GetServicesResources(tr *api_model.ServicesResources) (re
|
||||
cpu += c.CpuRequest
|
||||
}
|
||||
}
|
||||
res[serviceID] = map[string]interface{}{"memory": memory/1024/1024, "cpu": cpu}
|
||||
res[serviceID] = map[string]interface{}{"memory": memory / 1024 / 1024, "cpu": cpu}
|
||||
}
|
||||
|
||||
for _, c := range closed {
|
||||
|
@ -23,11 +23,11 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/goodrain/rainbond/worker/client"
|
||||
)
|
||||
|
@ -24,12 +24,12 @@ import (
|
||||
|
||||
"fmt"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
api_model "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
"github.com/goodrain/rainbond/worker/client"
|
||||
"github.com/goodrain/rainbond/worker/server/pb"
|
||||
"github.com/sirupsen/logrus"
|
||||
// pb "github.com/goodrain/rainibond/worker/server/pb"
|
||||
)
|
||||
|
||||
|
@ -26,8 +26,8 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//WebSocketProxy WebSocketProxy
|
||||
|
@ -23,10 +23,10 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/goodrain/rainbond/node/api/model"
|
||||
utilhttp "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gopkg.in/yaml.v2"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
@ -23,10 +23,10 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/goodrain/rainbond/node/api/model"
|
||||
utilhttp "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//NotificationInterface cluster api
|
||||
|
@ -30,11 +30,11 @@ import (
|
||||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
"github.com/goodrain/rainbond/cmd"
|
||||
utilhttp "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var regionAPI, token string
|
||||
|
@ -21,11 +21,11 @@ package region
|
||||
import (
|
||||
"path"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/util"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
utilhttp "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/mitchellh/mapstructure"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
type tenant struct {
|
||||
|
@ -50,9 +50,9 @@ import (
|
||||
|
||||
apimiddleware "github.com/goodrain/rainbond/api/middleware"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/go-chi/chi/middleware"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//Manager apiserver
|
||||
|
@ -21,11 +21,11 @@ package util
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// CanDoEvent check can do event or not
|
||||
|
@ -28,9 +28,9 @@ import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/bitly/go-simplejson"
|
||||
"github.com/goodrain/rainbond/builder/discover"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
|
@ -19,11 +19,11 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/bitly/go-simplejson"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
httputil "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/sirupsen/logrus"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
)
|
||||
|
@ -25,12 +25,12 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/bitly/go-simplejson"
|
||||
"github.com/go-chi/chi"
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
httputil "github.com/goodrain/rainbond/util/http"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func GetVersionByEventID(w http.ResponseWriter, r *http.Request) {
|
||||
|
@ -31,7 +31,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/eapache/channels"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
@ -42,6 +41,7 @@ import (
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
@ -2,9 +2,9 @@ package cloudos
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"testing"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var endpoint = "dummy"
|
||||
|
@ -25,11 +25,11 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/builder/exector"
|
||||
"github.com/goodrain/rainbond/cmd/builder/option"
|
||||
"github.com/goodrain/rainbond/mq/api/grpc/pb"
|
||||
"github.com/goodrain/rainbond/mq/client"
|
||||
"github.com/sirupsen/logrus"
|
||||
grpc1 "google.golang.org/grpc"
|
||||
)
|
||||
|
||||
|
@ -22,13 +22,13 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
"github.com/goodrain/rainbond/builder/build"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
|
@ -22,11 +22,11 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
//"github.com/docker/docker/api/types"
|
||||
|
||||
|
@ -28,7 +28,6 @@ import (
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
"github.com/goodrain/rainbond/builder/build"
|
||||
@ -40,6 +39,7 @@ import (
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson" //"github.com/docker/docker/api/types"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
//"github.com/docker/docker/client"
|
||||
|
@ -29,9 +29,9 @@ import (
|
||||
"k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
"github.com/goodrain/rainbond/builder/job"
|
||||
|
@ -29,7 +29,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
@ -37,6 +36,7 @@ import (
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
@ -22,17 +22,17 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/cmd/builder/option"
|
||||
eventutil "github.com/goodrain/rainbond/eventlog/util"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// GarbageCollectionItem -
|
||||
type GarbageCollectionItem struct {
|
||||
TenantID string `json:"tenant_id"`
|
||||
ServiceID string `json:"service_id"`
|
||||
EventIDs []string `json:"event_ids"`
|
||||
TenantID string `json:"tenant_id"`
|
||||
ServiceID string `json:"service_id"`
|
||||
EventIDs []string `json:"event_ids"`
|
||||
Cfg option.Config `json:"-"`
|
||||
}
|
||||
|
||||
|
@ -34,12 +34,12 @@ import (
|
||||
"github.com/goodrain/rainbond/builder/sources/registry"
|
||||
"github.com/goodrain/rainbond/db"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder/cloudos"
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
|
@ -29,7 +29,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
@ -42,6 +41,7 @@ import (
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
|
@ -21,8 +21,8 @@ package exector
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
|
@ -28,7 +28,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
simplejson "github.com/bitly/go-simplejson"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/api/model"
|
||||
@ -38,6 +37,7 @@ import (
|
||||
"github.com/goodrain/rainbond/db"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
|
@ -35,8 +35,8 @@ import (
|
||||
|
||||
"github.com/goodrain/rainbond/builder/model"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/mq/api/grpc/pb"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -25,11 +25,11 @@ import (
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/builder/parser"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/goodrain/rainbond/mq/api/grpc/pb"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//ServiceCheckInput 任务输入数据
|
||||
|
@ -24,12 +24,12 @@ import (
|
||||
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//ImageShareItem ImageShareItem
|
||||
|
@ -25,12 +25,12 @@ import (
|
||||
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
|
@ -26,11 +26,11 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//SlugShareItem SlugShareItem
|
||||
|
@ -25,9 +25,9 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/eapache/channels"
|
||||
"github.com/goodrain/rainbond/builder/parser/code"
|
||||
"github.com/sirupsen/logrus"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
k8sErrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
@ -25,9 +25,9 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/builder/parser/types"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Build represents build in pom.xml
|
||||
|
@ -23,8 +23,8 @@ import (
|
||||
"io/ioutil"
|
||||
"path"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
|
@ -26,9 +26,9 @@ import (
|
||||
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/fatih/structs"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Compose is docker compose file loader, implements Loader interface
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/libcompose/project"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Parse Docker Compose with libcompose (only supports v1 and v2). Eventually we will
|
||||
|
@ -24,8 +24,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
libcomposeyaml "github.com/docker/libcompose/yaml"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/twinj/uuid"
|
||||
|
||||
"github.com/docker/cli/cli/compose/loader"
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
c "github.com/coreos/etcd/clientv3"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Etcd implements Discoverier
|
||||
|
@ -23,13 +23,13 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder/parser/compose"
|
||||
"github.com/goodrain/rainbond/builder/parser/types"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
"github.com/goodrain/rainbond/db/model"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//DockerComposeParse docker compose 文件解析
|
||||
|
@ -25,9 +25,9 @@ import (
|
||||
|
||||
"github.com/goodrain/rainbond/event"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var dockercompose = `
|
||||
|
@ -24,12 +24,12 @@ import (
|
||||
|
||||
dbmodel "github.com/goodrain/rainbond/db/model"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/distribution/reference"
|
||||
"github.com/goodrain/rainbond/builder/parser/code"
|
||||
"github.com/goodrain/rainbond/builder/parser/discovery"
|
||||
"github.com/goodrain/rainbond/builder/parser/types"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
"github.com/sirupsen/logrus"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
)
|
||||
|
||||
|
@ -25,7 +25,6 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/builder"
|
||||
"github.com/goodrain/rainbond/builder/parser/code"
|
||||
@ -36,6 +35,7 @@ import (
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing/transport" //"github.com/docker/docker/client"
|
||||
)
|
||||
|
@ -22,9 +22,9 @@ import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/builder/parser/discovery"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// ThirdPartyServiceParse is one of the implematation of parser.Parser
|
||||
|
@ -25,7 +25,6 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
dockertypes "github.com/docker/docker/api/types"
|
||||
dockercontainer "github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/api/types/events"
|
||||
@ -34,6 +33,7 @@ import (
|
||||
"github.com/docker/docker/api/types/versions"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
|
@ -23,8 +23,8 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/docker/docker/client"
|
||||
"golang.org/x/net/context"
|
||||
|
@ -30,7 +30,6 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/distribution/reference"
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/client"
|
||||
@ -38,6 +37,7 @@ import (
|
||||
"github.com/docker/docker/pkg/jsonmessage"
|
||||
"github.com/goodrain/rainbond/builder/model"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
|
@ -23,8 +23,8 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing/transport"
|
||||
)
|
||||
|
||||
|
@ -26,9 +26,9 @@ import (
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/event"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/crypto/ssh"
|
||||
"golang.org/x/crypto/ssh/agent"
|
||||
|
||||
|
@ -22,8 +22,8 @@ import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/mq/client"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
|
@ -34,13 +34,13 @@ import (
|
||||
|
||||
"net/http"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/builder/api"
|
||||
"github.com/goodrain/rainbond/builder/clean"
|
||||
discoverv2 "github.com/goodrain/rainbond/discover.v2"
|
||||
etcdutil "github.com/goodrain/rainbond/util/etcd"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//Run start run
|
||||
|
@ -26,8 +26,8 @@ import (
|
||||
"os"
|
||||
"sort"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
version "github.com/goodrain/rainbond/cmd"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
|
@ -26,7 +26,6 @@ import (
|
||||
"path"
|
||||
"syscall"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/discover"
|
||||
"github.com/goodrain/rainbond/eventlog/cluster"
|
||||
"github.com/goodrain/rainbond/eventlog/conf"
|
||||
@ -35,6 +34,7 @@ import (
|
||||
"github.com/goodrain/rainbond/eventlog/exit/web"
|
||||
"github.com/goodrain/rainbond/eventlog/store"
|
||||
etcdutil "github.com/goodrain/rainbond/util/etcd"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
|
@ -23,9 +23,9 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/api/region"
|
||||
"github.com/goodrain/rainbond/builder/sources"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
//"strings"
|
||||
|
@ -19,8 +19,8 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/cmd/init-probe/healthy"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
|
@ -25,12 +25,12 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
|
||||
core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
|
||||
endpointapi "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
|
||||
envoyv2 "github.com/goodrain/rainbond/node/core/envoy/v2"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
|
@ -27,11 +27,11 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
api_model "github.com/goodrain/rainbond/api/model"
|
||||
"github.com/goodrain/rainbond/cmd"
|
||||
envoyv2 "github.com/goodrain/rainbond/node/core/envoy/v2"
|
||||
"github.com/goodrain/rainbond/util"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -27,8 +27,8 @@ import (
|
||||
discover "github.com/goodrain/rainbond/discover.v2"
|
||||
"github.com/goodrain/rainbond/mq/api"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
etcdutil "github.com/goodrain/rainbond/util/etcd"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//Run start run
|
||||
|
@ -28,8 +28,8 @@ import (
|
||||
"github.com/goodrain/rainbond/discover"
|
||||
"github.com/goodrain/rainbond/webcli/app"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
etcdutil "github.com/goodrain/rainbond/util/etcd"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//Run start run
|
||||
|
@ -25,8 +25,8 @@ import (
|
||||
|
||||
"github.com/goodrain/rainbond/util"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/util/windows"
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
|
@ -144,7 +144,7 @@ type TenantServiceDao interface {
|
||||
ListServicesByTenantID(tenantID string) ([]*model.TenantServices, error)
|
||||
GetServiceTypeById(serviceID string) (*model.TenantServices, error)
|
||||
ListByAppID(appID string) ([]*model.TenantServices, error)
|
||||
BindAppByServiceIDs(appID string,serviceIDs []string) error
|
||||
BindAppByServiceIDs(appID string, serviceIDs []string) error
|
||||
}
|
||||
|
||||
//TenantServiceDeleteDao TenantServiceDeleteDao
|
||||
|
@ -27,8 +27,8 @@ import (
|
||||
|
||||
etcdutil "github.com/goodrain/rainbond/util/etcd"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/coreos/etcd/clientv3"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//Manager db manager
|
||||
|
@ -36,4 +36,3 @@ type AppBackup struct {
|
||||
func (t *AppBackup) TableName() string {
|
||||
return "region_app_backup"
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/distribution/reference"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//TenantPlugin plugin model
|
||||
|
@ -22,8 +22,8 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/docker/distribution/reference"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//VersionInfo version info struct
|
||||
|
@ -22,9 +22,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/db/model"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//AddModel AddModel
|
||||
|
@ -22,9 +22,9 @@ import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/db/model"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//CertificateDaoImpl -
|
||||
|
@ -21,10 +21,10 @@ package dao
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/db/errors"
|
||||
"github.com/goodrain/rainbond/db/model"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//PluginDaoImpl PluginDaoImpl
|
||||
|
@ -540,9 +540,9 @@ func (t *TenantServicesDaoImpl) ListThirdPartyServices() ([]*model.TenantService
|
||||
}
|
||||
|
||||
// BindAppByServiceIDs binding application by serviceIDs
|
||||
func (t *TenantServicesDaoImpl)BindAppByServiceIDs(appID string, serviceIDs []string) error{
|
||||
func (t *TenantServicesDaoImpl) BindAppByServiceIDs(appID string, serviceIDs []string) error {
|
||||
var service model.TenantServices
|
||||
if err := t.DB.Model(&service).Where("service_id in (?)", serviceIDs).Update("app_id", appID).Error; err != nil{
|
||||
if err := t.DB.Model(&service).Where("service_id in (?)", serviceIDs).Update("app_id", appID).Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
@ -21,8 +21,8 @@ package dao
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/goodrain/rainbond/db/model"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
@ -90,8 +90,8 @@ func TestManager_PluginBuildVersionDaoImpl_ListSuccessfulOnesByPluginIDs(t *test
|
||||
}
|
||||
for _, od := range oridata {
|
||||
buildVersion := &model.TenantPluginBuildVersion{
|
||||
PluginID: od.pluginID,
|
||||
Status: od.status,
|
||||
PluginID: od.pluginID,
|
||||
Status: od.status,
|
||||
DeployVersion: time.Now().Format("20060102150405.000000"),
|
||||
}
|
||||
if err := GetManager().TenantPluginBuildVersionDao().AddModel(buildVersion); err != nil {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user