format code

This commit is contained in:
barnettZQG 2020-11-25 16:39:38 +08:00
parent 7893190125
commit fe2db1e973
225 changed files with 255 additions and 271 deletions

View File

@ -14,8 +14,8 @@ jobs:
with: with:
# The Go version to download (if necessary) and use. Supports semver spec and ranges. # The Go version to download (if necessary) and use. Supports semver spec and ranges.
go-version: 1.13 go-version: 1.13
- name: Go-linter # - name: Go-linter
uses: Jerome1337/golint-action@v1.0.2 # uses: Jerome1337/golint-action@v1.0.2
- name: Extract branch name - name: Extract branch name
shell: bash shell: bash

View File

@ -11,7 +11,6 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/goodrain/rainbond/api/controller/upload" "github.com/goodrain/rainbond/api/controller/upload"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
@ -19,6 +18,7 @@ import (
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
) )
//AppStruct - //AppStruct -

View File

@ -6,11 +6,11 @@ import (
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware" "github.com/goodrain/rainbond/api/middleware"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
) )
// AppRestoreController is an implementation of AppRestoreInterface // AppRestoreController is an implementation of AppRestoreInterface

View File

@ -22,8 +22,8 @@ import (
"net/http" "net/http"
"strconv" "strconv"
"github.com/sirupsen/logrus"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware" "github.com/goodrain/rainbond/api/middleware"

View File

@ -26,11 +26,11 @@ import (
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
"github.com/bitly/go-simplejson" "github.com/bitly/go-simplejson"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
) )
//Event GetLogs //Event GetLogs

View File

@ -27,8 +27,8 @@ import (
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware" "github.com/goodrain/rainbond/api/middleware"

View File

@ -24,8 +24,8 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
k8svalidation "k8s.io/apimachinery/pkg/util/validation" k8svalidation "k8s.io/apimachinery/pkg/util/validation"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"

View File

@ -23,7 +23,6 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware" "github.com/goodrain/rainbond/api/middleware"
@ -31,6 +30,7 @@ import (
"github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/db/model"
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/goodrain/rainbond/worker/server" "github.com/goodrain/rainbond/worker/server"
"github.com/sirupsen/logrus"
) )
// PodController is an implementation of PodInterface // PodController is an implementation of PodInterface

View File

@ -26,7 +26,6 @@ import (
validator "github.com/goodrain/rainbond/util/govalidator" validator "github.com/goodrain/rainbond/util/govalidator"
"github.com/sirupsen/logrus"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware" "github.com/goodrain/rainbond/api/middleware"
@ -38,6 +37,7 @@ import (
"github.com/goodrain/rainbond/worker/discover/model" "github.com/goodrain/rainbond/worker/discover/model"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
) )
//StartService StartService //StartService StartService

View File

@ -22,7 +22,6 @@ import (
"encoding/json" "encoding/json"
"net/http" "net/http"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware" "github.com/goodrain/rainbond/api/middleware"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
@ -30,6 +29,7 @@ import (
"github.com/goodrain/rainbond/db/errors" "github.com/goodrain/rainbond/db/errors"
validation "github.com/goodrain/rainbond/util/endpoint" validation "github.com/goodrain/rainbond/util/endpoint"
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
) )
// ThirdPartyServiceController implements ThirdPartyServicer // ThirdPartyServiceController implements ThirdPartyServicer

View File

@ -23,13 +23,13 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/middleware" "github.com/goodrain/rainbond/api/middleware"
api_model "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
) )
//VolumeDependency VolumeDependency //VolumeDependency VolumeDependency

View File

@ -22,7 +22,6 @@ import (
"encoding/json" "encoding/json"
"time" "time"
"github.com/sirupsen/logrus"
tsdbClient "github.com/bluebreezecf/opentsdb-goclient/client" tsdbClient "github.com/bluebreezecf/opentsdb-goclient/client"
tsdbConfig "github.com/bluebreezecf/opentsdb-goclient/config" tsdbConfig "github.com/bluebreezecf/opentsdb-goclient/config"
"github.com/goodrain/rainbond/cmd/api/option" "github.com/goodrain/rainbond/cmd/api/option"
@ -35,6 +34,7 @@ import (
etcdutil "github.com/goodrain/rainbond/util/etcd" etcdutil "github.com/goodrain/rainbond/util/etcd"
"github.com/goodrain/rainbond/worker/discover/model" "github.com/goodrain/rainbond/worker/discover/model"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
) )
//ConDB struct //ConDB struct

View File

@ -11,10 +11,10 @@ import (
"regexp" "regexp"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -4,12 +4,12 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/sirupsen/logrus"
apimodel "github.com/goodrain/rainbond/api/model" apimodel "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
"github.com/goodrain/rainbond/db/errors" "github.com/goodrain/rainbond/db/errors"
"github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/db/model"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
) )
// AppRestoreAction is an implementation of AppRestoreHandler // AppRestoreAction is an implementation of AppRestoreHandler

View File

@ -31,8 +31,8 @@ import (
"math/big" "math/big"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
api_model "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"

View File

@ -25,12 +25,12 @@ import (
"os" "os"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/handler" "github.com/goodrain/rainbond/api/handler"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
"github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/db/model"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
) )
//PubChargeSverify service Charge Sverify //PubChargeSverify service Charge Sverify

View File

@ -5,10 +5,10 @@ import (
"runtime" "runtime"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/shirou/gopsutil/disk" "github.com/shirou/gopsutil/disk"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@ -3,8 +3,8 @@ package handler
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/sirupsen/logrus"
) )
// EtcdKeyType etcd key type // EtcdKeyType etcd key type

View File

@ -25,10 +25,10 @@ import (
"time" "time"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
tutil "github.com/goodrain/rainbond/util" tutil "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
) )
//TIMELAYOUT timelayout //TIMELAYOUT timelayout

View File

@ -27,7 +27,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
apimodel "github.com/goodrain/rainbond/api/model" apimodel "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
@ -35,6 +34,7 @@ import (
"github.com/goodrain/rainbond/mq/client" "github.com/goodrain/rainbond/mq/client"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
) )
// GatewayAction - // GatewayAction -

View File

@ -26,10 +26,10 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"

View File

@ -23,9 +23,9 @@ import (
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
"github.com/sirupsen/logrus"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
) )
//LicenseAction LicenseAction //LicenseAction LicenseAction

View File

@ -25,10 +25,10 @@ import (
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
api_model "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/sirupsen/logrus"
) )
//NetRulesAction rules action struct //NetRulesAction rules action struct

View File

@ -23,10 +23,10 @@ import (
"strings" "strings"
"container/list" "container/list"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
gclient "github.com/goodrain/rainbond/mq/client" gclient "github.com/goodrain/rainbond/mq/client"
"github.com/sirupsen/logrus"
) )
//BatchOperationHandler batch operation handler //BatchOperationHandler batch operation handler

View File

@ -24,13 +24,13 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
api_model "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/goodrain/rainbond/builder/exector" "github.com/goodrain/rainbond/builder/exector"
client "github.com/goodrain/rainbond/mq/client" client "github.com/goodrain/rainbond/mq/client"
tutil "github.com/goodrain/rainbond/util" tutil "github.com/goodrain/rainbond/util"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
"github.com/twinj/uuid" "github.com/twinj/uuid"
) )

View File

@ -22,13 +22,13 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
gclient "github.com/goodrain/rainbond/mq/client" gclient "github.com/goodrain/rainbond/mq/client"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
dmodel "github.com/goodrain/rainbond/worker/discover/model" dmodel "github.com/goodrain/rainbond/worker/discover/model"
"github.com/sirupsen/logrus"
) )
//OperationHandler operation handler //OperationHandler operation handler

View File

@ -25,13 +25,13 @@ import (
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
api_model "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
gclient "github.com/goodrain/rainbond/mq/client" gclient "github.com/goodrain/rainbond/mq/client"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
) )
//GetTenantServicePluginRelation GetTenantServicePluginRelation //GetTenantServicePluginRelation GetTenantServicePluginRelation

View File

@ -24,12 +24,12 @@ import (
"github.com/goodrain/rainbond/mq/client" "github.com/goodrain/rainbond/mq/client"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/goodrain/rainbond/builder/exector" "github.com/goodrain/rainbond/builder/exector"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
"github.com/twinj/uuid" "github.com/twinj/uuid"
) )

View File

@ -32,10 +32,10 @@ import (
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
api_model "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/sirupsen/logrus"
) )
//ServiceShareHandle service share //ServiceShareHandle service share

View File

@ -460,7 +460,7 @@ func (t *TenantAction) GetServicesResources(tr *api_model.ServicesResources) (re
cpu += c.CpuRequest 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 { for _, c := range closed {

View File

@ -23,11 +23,11 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/client"
) )

View File

@ -24,12 +24,12 @@ import (
"fmt" "fmt"
"github.com/sirupsen/logrus"
api_model "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
"github.com/goodrain/rainbond/worker/client" "github.com/goodrain/rainbond/worker/client"
"github.com/goodrain/rainbond/worker/server/pb" "github.com/goodrain/rainbond/worker/server/pb"
"github.com/sirupsen/logrus"
// pb "github.com/goodrain/rainibond/worker/server/pb" // pb "github.com/goodrain/rainibond/worker/server/pb"
) )

View File

@ -26,8 +26,8 @@ import (
"net/url" "net/url"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"github.com/sirupsen/logrus"
) )
//WebSocketProxy WebSocketProxy //WebSocketProxy WebSocketProxy

View File

@ -23,10 +23,10 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/goodrain/rainbond/node/api/model" "github.com/goodrain/rainbond/node/api/model"
utilhttp "github.com/goodrain/rainbond/util/http" utilhttp "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"io/ioutil" "io/ioutil"
"os" "os"

View File

@ -23,10 +23,10 @@ import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/goodrain/rainbond/node/api/model" "github.com/goodrain/rainbond/node/api/model"
utilhttp "github.com/goodrain/rainbond/util/http" utilhttp "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
) )
//NotificationInterface cluster api //NotificationInterface cluster api

View File

@ -30,11 +30,11 @@ import (
"path" "path"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
"github.com/goodrain/rainbond/cmd" "github.com/goodrain/rainbond/cmd"
utilhttp "github.com/goodrain/rainbond/util/http" utilhttp "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
) )
var regionAPI, token string var regionAPI, token string

View File

@ -21,11 +21,11 @@ package region
import ( import (
"path" "path"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/util" "github.com/goodrain/rainbond/api/util"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
utilhttp "github.com/goodrain/rainbond/util/http" utilhttp "github.com/goodrain/rainbond/util/http"
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"
"github.com/sirupsen/logrus"
) )
type tenant struct { type tenant struct {

View File

@ -50,9 +50,9 @@ import (
apimiddleware "github.com/goodrain/rainbond/api/middleware" apimiddleware "github.com/goodrain/rainbond/api/middleware"
"github.com/sirupsen/logrus"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/go-chi/chi/middleware" "github.com/go-chi/chi/middleware"
"github.com/sirupsen/logrus"
) )
//Manager apiserver //Manager apiserver

View File

@ -21,11 +21,11 @@ package util
import ( import (
"time" "time"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
) )
// CanDoEvent check can do event or not // CanDoEvent check can do event or not

View File

@ -28,9 +28,9 @@ import (
"net/http" "net/http"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/bitly/go-simplejson" "github.com/bitly/go-simplejson"
"github.com/goodrain/rainbond/builder/discover" "github.com/goodrain/rainbond/builder/discover"
"github.com/sirupsen/logrus"
"io/ioutil" "io/ioutil"
) )

View File

@ -19,11 +19,11 @@
package controller package controller
import ( import (
"github.com/sirupsen/logrus"
"github.com/bitly/go-simplejson" "github.com/bitly/go-simplejson"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
) )

View File

@ -25,12 +25,12 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/bitly/go-simplejson" "github.com/bitly/go-simplejson"
"github.com/go-chi/chi" "github.com/go-chi/chi"
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
httputil "github.com/goodrain/rainbond/util/http" httputil "github.com/goodrain/rainbond/util/http"
"github.com/sirupsen/logrus"
) )
func GetVersionByEventID(w http.ResponseWriter, r *http.Request) { func GetVersionByEventID(w http.ResponseWriter, r *http.Request) {

View File

@ -31,7 +31,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/eapache/channels" "github.com/eapache/channels"
"github.com/fsnotify/fsnotify" "github.com/fsnotify/fsnotify"
@ -42,6 +41,7 @@ import (
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
) )

View File

@ -2,9 +2,9 @@ package cloudos
import ( import (
"os" "os"
"path/filepath"
"reflect" "reflect"
"testing" "testing"
"path/filepath"
) )
var endpoint = "dummy" var endpoint = "dummy"

View File

@ -25,11 +25,11 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/builder/exector" "github.com/goodrain/rainbond/builder/exector"
"github.com/goodrain/rainbond/cmd/builder/option" "github.com/goodrain/rainbond/cmd/builder/option"
"github.com/goodrain/rainbond/mq/api/grpc/pb" "github.com/goodrain/rainbond/mq/api/grpc/pb"
"github.com/goodrain/rainbond/mq/client" "github.com/goodrain/rainbond/mq/client"
"github.com/sirupsen/logrus"
grpc1 "google.golang.org/grpc" grpc1 "google.golang.org/grpc"
) )

View File

@ -22,13 +22,13 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
"github.com/goodrain/rainbond/builder/build" "github.com/goodrain/rainbond/builder/build"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -22,11 +22,11 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
//"github.com/docker/docker/api/types" //"github.com/docker/docker/api/types"

View File

@ -28,7 +28,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/sirupsen/logrus"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
"github.com/goodrain/rainbond/builder/build" "github.com/goodrain/rainbond/builder/build"
@ -40,6 +39,7 @@ import (
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" //"github.com/docker/docker/api/types" "github.com/tidwall/gjson" //"github.com/docker/docker/api/types"
"k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes"
//"github.com/docker/docker/client" //"github.com/docker/docker/client"

View File

@ -29,9 +29,9 @@ import (
"k8s.io/client-go/rest" "k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/goodrain/rainbond/builder/job" "github.com/goodrain/rainbond/builder/job"

View File

@ -29,7 +29,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
@ -37,6 +36,7 @@ import (
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
) )

View File

@ -22,17 +22,17 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/cmd/builder/option" "github.com/goodrain/rainbond/cmd/builder/option"
eventutil "github.com/goodrain/rainbond/eventlog/util" eventutil "github.com/goodrain/rainbond/eventlog/util"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
) )
// GarbageCollectionItem - // GarbageCollectionItem -
type GarbageCollectionItem struct { type GarbageCollectionItem struct {
TenantID string `json:"tenant_id"` TenantID string `json:"tenant_id"`
ServiceID string `json:"service_id"` ServiceID string `json:"service_id"`
EventIDs []string `json:"event_ids"` EventIDs []string `json:"event_ids"`
Cfg option.Config `json:"-"` Cfg option.Config `json:"-"`
} }

View File

@ -34,12 +34,12 @@ import (
"github.com/goodrain/rainbond/builder/sources/registry" "github.com/goodrain/rainbond/builder/sources/registry"
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
"github.com/sirupsen/logrus"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder/cloudos" "github.com/goodrain/rainbond/builder/cloudos"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -29,7 +29,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
@ -42,6 +41,7 @@ import (
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -21,8 +21,8 @@ package exector
import ( import (
"testing" "testing"
"github.com/sirupsen/logrus"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"

View File

@ -28,7 +28,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
simplejson "github.com/bitly/go-simplejson" simplejson "github.com/bitly/go-simplejson"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/api/model" "github.com/goodrain/rainbond/api/model"
@ -38,6 +37,7 @@ import (
"github.com/goodrain/rainbond/db" "github.com/goodrain/rainbond/db"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -35,8 +35,8 @@ import (
"github.com/goodrain/rainbond/builder/model" "github.com/goodrain/rainbond/builder/model"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/mq/api/grpc/pb" "github.com/goodrain/rainbond/mq/api/grpc/pb"
"github.com/sirupsen/logrus"
) )
const ( const (

View File

@ -25,11 +25,11 @@ import (
"github.com/ghodss/yaml" "github.com/ghodss/yaml"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/builder/parser" "github.com/goodrain/rainbond/builder/parser"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/mq/api/grpc/pb" "github.com/goodrain/rainbond/mq/api/grpc/pb"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
) )
//ServiceCheckInput 任务输入数据 //ServiceCheckInput 任务输入数据

View File

@ -24,12 +24,12 @@ import (
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
) )
//ImageShareItem ImageShareItem //ImageShareItem ImageShareItem

View File

@ -25,12 +25,12 @@ import (
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
) )

View File

@ -26,11 +26,11 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/pquerna/ffjson/ffjson" "github.com/pquerna/ffjson/ffjson"
"github.com/sirupsen/logrus"
) )
//SlugShareItem SlugShareItem //SlugShareItem SlugShareItem

View File

@ -25,9 +25,9 @@ import (
"sync" "sync"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/eapache/channels" "github.com/eapache/channels"
"github.com/goodrain/rainbond/builder/parser/code" "github.com/goodrain/rainbond/builder/parser/code"
"github.com/sirupsen/logrus"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
k8sErrors "k8s.io/apimachinery/pkg/api/errors" k8sErrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

View File

@ -25,9 +25,9 @@ import (
"path" "path"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/builder/parser/types" "github.com/goodrain/rainbond/builder/parser/types"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
) )
// Build represents build in pom.xml // Build represents build in pom.xml

View File

@ -23,8 +23,8 @@ import (
"io/ioutil" "io/ioutil"
"path" "path"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
) )

View File

@ -26,9 +26,9 @@ import (
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
"github.com/sirupsen/logrus"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/fatih/structs" "github.com/fatih/structs"
"github.com/sirupsen/logrus"
) )
// Compose is docker compose file loader, implements Loader interface // Compose is docker compose file loader, implements Loader interface

View File

@ -25,8 +25,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/sirupsen/logrus"
) )
// Parse Docker Compose with libcompose (only supports v1 and v2). Eventually we will // Parse Docker Compose with libcompose (only supports v1 and v2). Eventually we will

View File

@ -24,8 +24,8 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/sirupsen/logrus"
libcomposeyaml "github.com/docker/libcompose/yaml" libcomposeyaml "github.com/docker/libcompose/yaml"
"github.com/sirupsen/logrus"
"github.com/twinj/uuid" "github.com/twinj/uuid"
"github.com/docker/cli/cli/compose/loader" "github.com/docker/cli/cli/compose/loader"

View File

@ -25,8 +25,8 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
c "github.com/coreos/etcd/clientv3" c "github.com/coreos/etcd/clientv3"
"github.com/sirupsen/logrus"
) )
// Etcd implements Discoverier // Etcd implements Discoverier

View File

@ -23,13 +23,13 @@ import (
"runtime" "runtime"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder/parser/compose" "github.com/goodrain/rainbond/builder/parser/compose"
"github.com/goodrain/rainbond/builder/parser/types" "github.com/goodrain/rainbond/builder/parser/types"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
"github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/db/model"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/sirupsen/logrus"
) )
//DockerComposeParse docker compose 文件解析 //DockerComposeParse docker compose 文件解析

View File

@ -25,9 +25,9 @@ import (
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/sirupsen/logrus"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/ghodss/yaml" "github.com/ghodss/yaml"
"github.com/sirupsen/logrus"
) )
var dockercompose = ` var dockercompose = `

View File

@ -24,12 +24,12 @@ import (
dbmodel "github.com/goodrain/rainbond/db/model" dbmodel "github.com/goodrain/rainbond/db/model"
"github.com/sirupsen/logrus"
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/goodrain/rainbond/builder/parser/code" "github.com/goodrain/rainbond/builder/parser/code"
"github.com/goodrain/rainbond/builder/parser/discovery" "github.com/goodrain/rainbond/builder/parser/discovery"
"github.com/goodrain/rainbond/builder/parser/types" "github.com/goodrain/rainbond/builder/parser/types"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
"github.com/sirupsen/logrus"
"k8s.io/apimachinery/pkg/api/resource" "k8s.io/apimachinery/pkg/api/resource"
) )

View File

@ -25,7 +25,6 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/builder" "github.com/goodrain/rainbond/builder"
"github.com/goodrain/rainbond/builder/parser/code" "github.com/goodrain/rainbond/builder/parser/code"
@ -36,6 +35,7 @@ import (
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/pquerna/ffjson/ffjson" "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"
"gopkg.in/src-d/go-git.v4/plumbing/transport" //"github.com/docker/docker/client" "gopkg.in/src-d/go-git.v4/plumbing/transport" //"github.com/docker/docker/client"
) )

View File

@ -22,9 +22,9 @@ import (
"encoding/json" "encoding/json"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/builder/parser/discovery" "github.com/goodrain/rainbond/builder/parser/discovery"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/sirupsen/logrus"
) )
// ThirdPartyServiceParse is one of the implematation of parser.Parser // ThirdPartyServiceParse is one of the implematation of parser.Parser

View File

@ -25,7 +25,6 @@ import (
"strconv" "strconv"
"time" "time"
"github.com/sirupsen/logrus"
dockertypes "github.com/docker/docker/api/types" dockertypes "github.com/docker/docker/api/types"
dockercontainer "github.com/docker/docker/api/types/container" dockercontainer "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/events" "github.com/docker/docker/api/types/events"
@ -34,6 +33,7 @@ import (
"github.com/docker/docker/api/types/versions" "github.com/docker/docker/api/types/versions"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@ -23,8 +23,8 @@ import (
"os" "os"
"testing" "testing"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/sirupsen/logrus"
"github.com/docker/docker/client" "github.com/docker/docker/client"
"golang.org/x/net/context" "golang.org/x/net/context"

View File

@ -30,7 +30,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/client" "github.com/docker/docker/client"
@ -38,6 +37,7 @@ import (
"github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/jsonmessage"
"github.com/goodrain/rainbond/builder/model" "github.com/goodrain/rainbond/builder/model"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/sirupsen/logrus"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View File

@ -23,8 +23,8 @@ import (
"path" "path"
"strings" "strings"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
"gopkg.in/src-d/go-git.v4/plumbing/transport" "gopkg.in/src-d/go-git.v4/plumbing/transport"
) )

View File

@ -26,9 +26,9 @@ import (
"path/filepath" "path/filepath"
"strconv" "strconv"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/event" "github.com/goodrain/rainbond/event"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
"golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/agent" "golang.org/x/crypto/ssh/agent"

View File

@ -22,8 +22,8 @@ import (
"fmt" "fmt"
"runtime" "runtime"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/mq/client" "github.com/goodrain/rainbond/mq/client"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag" "github.com/spf13/pflag"
) )

View File

@ -34,13 +34,13 @@ import (
"net/http" "net/http"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/builder/api" "github.com/goodrain/rainbond/builder/api"
"github.com/goodrain/rainbond/builder/clean" "github.com/goodrain/rainbond/builder/clean"
discoverv2 "github.com/goodrain/rainbond/discover.v2" discoverv2 "github.com/goodrain/rainbond/discover.v2"
etcdutil "github.com/goodrain/rainbond/util/etcd" etcdutil "github.com/goodrain/rainbond/util/etcd"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/sirupsen/logrus"
) )
//Run start run //Run start run

View File

@ -26,8 +26,8 @@ import (
"os" "os"
"sort" "sort"
"github.com/sirupsen/logrus"
version "github.com/goodrain/rainbond/cmd" version "github.com/goodrain/rainbond/cmd"
"github.com/sirupsen/logrus"
"github.com/urfave/cli" "github.com/urfave/cli"
) )

View File

@ -26,7 +26,6 @@ import (
"path" "path"
"syscall" "syscall"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/discover" "github.com/goodrain/rainbond/discover"
"github.com/goodrain/rainbond/eventlog/cluster" "github.com/goodrain/rainbond/eventlog/cluster"
"github.com/goodrain/rainbond/eventlog/conf" "github.com/goodrain/rainbond/eventlog/conf"
@ -35,6 +34,7 @@ import (
"github.com/goodrain/rainbond/eventlog/exit/web" "github.com/goodrain/rainbond/eventlog/exit/web"
"github.com/goodrain/rainbond/eventlog/store" "github.com/goodrain/rainbond/eventlog/store"
etcdutil "github.com/goodrain/rainbond/util/etcd" etcdutil "github.com/goodrain/rainbond/util/etcd"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag" "github.com/spf13/pflag"
) )

View File

@ -23,9 +23,9 @@ import (
"os" "os"
"path" "path"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/api/region" "github.com/goodrain/rainbond/api/region"
"github.com/goodrain/rainbond/builder/sources" "github.com/goodrain/rainbond/builder/sources"
"github.com/sirupsen/logrus"
"github.com/urfave/cli" "github.com/urfave/cli"
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
//"strings" //"strings"

View File

@ -19,8 +19,8 @@
package cmd package cmd
import ( import (
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/cmd/init-probe/healthy" "github.com/goodrain/rainbond/cmd/init-probe/healthy"
"github.com/sirupsen/logrus"
"github.com/urfave/cli" "github.com/urfave/cli"
) )

View File

@ -25,12 +25,12 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2" v2 "github.com/envoyproxy/go-control-plane/envoy/api/v2"
core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core" core "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
endpointapi "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint" endpointapi "github.com/envoyproxy/go-control-plane/envoy/api/v2/endpoint"
envoyv2 "github.com/goodrain/rainbond/node/core/envoy/v2" envoyv2 "github.com/goodrain/rainbond/node/core/envoy/v2"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
"google.golang.org/grpc" "google.golang.org/grpc"
) )

View File

@ -27,11 +27,11 @@ import (
"syscall" "syscall"
"time" "time"
"github.com/sirupsen/logrus"
api_model "github.com/goodrain/rainbond/api/model" api_model "github.com/goodrain/rainbond/api/model"
"github.com/goodrain/rainbond/cmd" "github.com/goodrain/rainbond/cmd"
envoyv2 "github.com/goodrain/rainbond/node/core/envoy/v2" envoyv2 "github.com/goodrain/rainbond/node/core/envoy/v2"
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
) )
func main() { func main() {

View File

@ -27,8 +27,8 @@ import (
discover "github.com/goodrain/rainbond/discover.v2" discover "github.com/goodrain/rainbond/discover.v2"
"github.com/goodrain/rainbond/mq/api" "github.com/goodrain/rainbond/mq/api"
"github.com/sirupsen/logrus"
etcdutil "github.com/goodrain/rainbond/util/etcd" etcdutil "github.com/goodrain/rainbond/util/etcd"
"github.com/sirupsen/logrus"
) )
//Run start run //Run start run

View File

@ -28,8 +28,8 @@ import (
"github.com/goodrain/rainbond/discover" "github.com/goodrain/rainbond/discover"
"github.com/goodrain/rainbond/webcli/app" "github.com/goodrain/rainbond/webcli/app"
"github.com/sirupsen/logrus"
etcdutil "github.com/goodrain/rainbond/util/etcd" etcdutil "github.com/goodrain/rainbond/util/etcd"
"github.com/sirupsen/logrus"
) )
//Run start run //Run start run

View File

@ -25,8 +25,8 @@ import (
"github.com/goodrain/rainbond/util" "github.com/goodrain/rainbond/util"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/util/windows" "github.com/goodrain/rainbond/util/windows"
"github.com/sirupsen/logrus"
"github.com/spf13/pflag" "github.com/spf13/pflag"
) )

View File

@ -144,7 +144,7 @@ type TenantServiceDao interface {
ListServicesByTenantID(tenantID string) ([]*model.TenantServices, error) ListServicesByTenantID(tenantID string) ([]*model.TenantServices, error)
GetServiceTypeById(serviceID string) (*model.TenantServices, error) GetServiceTypeById(serviceID string) (*model.TenantServices, error)
ListByAppID(appID string) ([]*model.TenantServices, error) ListByAppID(appID string) ([]*model.TenantServices, error)
BindAppByServiceIDs(appID string,serviceIDs []string) error BindAppByServiceIDs(appID string, serviceIDs []string) error
} }
//TenantServiceDeleteDao TenantServiceDeleteDao //TenantServiceDeleteDao TenantServiceDeleteDao

View File

@ -27,8 +27,8 @@ import (
etcdutil "github.com/goodrain/rainbond/util/etcd" etcdutil "github.com/goodrain/rainbond/util/etcd"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/sirupsen/logrus"
) )
//Manager db manager //Manager db manager

View File

@ -36,4 +36,3 @@ type AppBackup struct {
func (t *AppBackup) TableName() string { func (t *AppBackup) TableName() string {
return "region_app_backup" return "region_app_backup"
} }

View File

@ -19,8 +19,8 @@
package model package model
import ( import (
"github.com/sirupsen/logrus"
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/sirupsen/logrus"
) )
//TenantPlugin plugin model //TenantPlugin plugin model

View File

@ -22,8 +22,8 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/sirupsen/logrus"
) )
//VersionInfo version info struct //VersionInfo version info struct

View File

@ -22,9 +22,9 @@ import (
"strings" "strings"
"time" "time"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/db/model"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
) )
//AddModel AddModel //AddModel AddModel

View File

@ -22,9 +22,9 @@ import (
"fmt" "fmt"
"reflect" "reflect"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/db/model"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
) )
//CertificateDaoImpl - //CertificateDaoImpl -

View File

@ -21,10 +21,10 @@ package dao
import ( import (
"fmt" "fmt"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/db/errors" "github.com/goodrain/rainbond/db/errors"
"github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/db/model"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
"github.com/sirupsen/logrus"
) )
//PluginDaoImpl PluginDaoImpl //PluginDaoImpl PluginDaoImpl

View File

@ -540,9 +540,9 @@ func (t *TenantServicesDaoImpl) ListThirdPartyServices() ([]*model.TenantService
} }
// BindAppByServiceIDs binding application by serviceIDs // 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 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 err
} }
return nil return nil

View File

@ -21,8 +21,8 @@ package dao
import ( import (
"fmt" "fmt"
"github.com/sirupsen/logrus"
"github.com/goodrain/rainbond/db/model" "github.com/goodrain/rainbond/db/model"
"github.com/sirupsen/logrus"
"github.com/jinzhu/gorm" "github.com/jinzhu/gorm"
) )

View File

@ -90,8 +90,8 @@ func TestManager_PluginBuildVersionDaoImpl_ListSuccessfulOnesByPluginIDs(t *test
} }
for _, od := range oridata { for _, od := range oridata {
buildVersion := &model.TenantPluginBuildVersion{ buildVersion := &model.TenantPluginBuildVersion{
PluginID: od.pluginID, PluginID: od.pluginID,
Status: od.status, Status: od.status,
DeployVersion: time.Now().Format("20060102150405.000000"), DeployVersion: time.Now().Format("20060102150405.000000"),
} }
if err := GetManager().TenantPluginBuildVersionDao().AddModel(buildVersion); err != nil { if err := GetManager().TenantPluginBuildVersionDao().AddModel(buildVersion); err != nil {

View File

@ -28,10 +28,10 @@ import (
"golang.org/x/net/context" "golang.org/x/net/context"
"github.com/sirupsen/logrus"
"github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/mvcc/mvccpb" "github.com/coreos/etcd/mvcc/mvccpb"
etcdutil "github.com/goodrain/rainbond/util/etcd" etcdutil "github.com/goodrain/rainbond/util/etcd"
"github.com/sirupsen/logrus"
) )
//CallbackUpdate 每次返还变化 //CallbackUpdate 每次返还变化

Some files were not shown because too many files have changed in this diff Show More