Commit b0d3bccb authored by suyanlong's avatar suyanlong

😘 insteadof go mod path

parent 0cdf9a37
Pipeline #8169 failed with stages
...@@ -16,5 +16,5 @@ jobs: ...@@ -16,5 +16,5 @@ jobs:
uses: lijinke666/ding-talk-pr-notify@main uses: lijinke666/ding-talk-pr-notify@main
with: with:
ding_talk_token: ${{ secrets.DING_TALK_ACCESS_TOKEN }} ding_talk_token: ${{ secrets.DING_TALK_ACCESS_TOKEN }}
repo_url: https://github.com/link33/sidecar/pull repo_url: https://gitlab.33.cn/link33/sidecar/pull
at_all: false at_all: false
\ No newline at end of file
# use : docker build --build-arg PLUGIN_URL=https://github.com/link33/sidecar-client-fabric --build-arg PLUGIN_VERSION=v1.0.0-rc2 -t sidecar:1.0.0 . # use : docker build --build-arg PLUGIN_URL=https://gitlab.33.cn/link33/sidecar-client-fabric --build-arg PLUGIN_VERSION=v1.0.0-rc2 -t sidecar:1.0.0 .
FROM golang:1.17 as builder FROM golang:1.17 as builder
RUN mkdir -p /go/src/github.com/link33/sidecar RUN mkdir -p /go/src/gitlab.33.cn/link33/sidecar
WORKDIR /go/src/github.com/link33/sidecar WORKDIR /go/src/gitlab.33.cn/link33/sidecar
# Cache dependencies # Cache dependencies
COPY go.mod . COPY go.mod .
...@@ -19,7 +19,7 @@ RUN go get -u github.com/gobuffalo/packr/packr ...@@ -19,7 +19,7 @@ RUN go get -u github.com/gobuffalo/packr/packr
RUN make install RUN make install
RUN cd .. && \ RUN cd .. && \
git clone https://github.com/link33/sidecar-client-fabric.git && \ git clone https://gitlab.33.cn/link33/sidecar-client-fabric.git && \
cd sidecar-client-fabric && \ cd sidecar-client-fabric && \
git checkout v1.1.0-rc1 && \ git checkout v1.1.0-rc1 && \
make fabric1.4 && \ make fabric1.4 && \
......
...@@ -10,7 +10,7 @@ CURRENT_PATH = $(shell pwd) ...@@ -10,7 +10,7 @@ CURRENT_PATH = $(shell pwd)
APP_NAME = sidecar APP_NAME = sidecar
# build with verison infos # build with verison infos
VERSION_DIR = github.com/link33/${APP_NAME} VERSION_DIR = gitlab.33.cn/link33/${APP_NAME}
BUILD_DATE = $(shell date +%FT%T) BUILD_DATE = $(shell date +%FT%T)
GIT_COMMIT = $(shell git log --pretty=format:'%h' -n 1) GIT_COMMIT = $(shell git log --pretty=format:'%h' -n 1)
GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD) GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
...@@ -166,7 +166,7 @@ aligner: ...@@ -166,7 +166,7 @@ aligner:
@aligner -r -c "//" -e ".go" -i ./internal/repo/a_repo-packr.go comment @aligner -r -c "//" -e ".go" -i ./internal/repo/a_repo-packr.go comment
goimports:fmt goimports:fmt
@CGO_ENABLED=1 goimports-reviser -dir-path ./ -project-name github.com/link33/sidecar -ignore-dir mock -rm-unused -set-alias -format @CGO_ENABLED=1 goimports-reviser -dir-path ./ -project-name gitlab.33.cn/link33/sidecar -ignore-dir mock -rm-unused -set-alias -format
aligner-check: aligner-check:
@aligner -r -c "//" -e ".go" -i ./internal/repo/a_repo-packr.go check @aligner -r -c "//" -e ".go" -i ./internal/repo/a_repo-packr.go check
......
# sidecar # sidecar
![build](https://github.com/link33/sidecar/workflows/build/badge.svg) ![build](https://gitlab.33.cn/link33/sidecar/workflows/build/badge.svg)
[![codecov](https://codecov.io/gh/link33/sidecar/branch/master/graph/badge.svg)](https://codecov.io/gh/link33/sidecar) [![codecov](https://codecov.io/gh/link33/sidecar/branch/master/graph/badge.svg)](https://codecov.io/gh/link33/sidecar)
## Build ## Build
......
...@@ -12,11 +12,11 @@ import ( ...@@ -12,11 +12,11 @@ import (
"github.com/meshplus/bitxhub-kit/crypto/asym" "github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/link33/sidecar/cmd/sidecar/client" "gitlab.33.cn/link33/sidecar/cmd/sidecar/client"
"github.com/link33/sidecar/internal/peermgr" "gitlab.33.cn/link33/sidecar/internal/peermgr"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/internal/rulemgr" "gitlab.33.cn/link33/sidecar/internal/rulemgr"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type Server struct { type Server struct {
......
...@@ -13,9 +13,9 @@ import ( ...@@ -13,9 +13,9 @@ import (
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/urfave/cli" "github.com/urfave/cli"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant" "gitlab.33.cn/link33/sidecar/model/constant"
) )
var appchainBxhCMD = cli.Command{ var appchainBxhCMD = cli.Command{
......
...@@ -11,7 +11,7 @@ import ( ...@@ -11,7 +11,7 @@ import (
"github.com/meshplus/bitxhub-kit/crypto/asym" "github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
) )
type Approve struct { type Approve struct {
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
) )
const ( const (
......
...@@ -10,9 +10,9 @@ import ( ...@@ -10,9 +10,9 @@ import (
"github.com/meshplus/bitxid" "github.com/meshplus/bitxid"
"github.com/urfave/cli" "github.com/urfave/cli"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant" "gitlab.33.cn/link33/sidecar/model/constant"
) )
const ( const (
......
...@@ -5,8 +5,8 @@ import ( ...@@ -5,8 +5,8 @@ import (
"github.com/urfave/cli" "github.com/urfave/cli"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant" "gitlab.33.cn/link33/sidecar/model/constant"
) )
var governanceCMD = cli.Command{ var governanceCMD = cli.Command{
......
...@@ -7,7 +7,7 @@ import ( ...@@ -7,7 +7,7 @@ import (
"github.com/meshplus/bitxhub-kit/crypto/asym" "github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
) )
var idCMD = cli.Command{ var idCMD = cli.Command{
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/tool" "gitlab.33.cn/link33/sidecar/tool"
) )
var initCMD = cli.Command{ var initCMD = cli.Command{
......
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"github.com/meshplus/bitxhub-kit/types" "github.com/meshplus/bitxhub-kit/types"
"github.com/urfave/cli" "github.com/urfave/cli"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant" "gitlab.33.cn/link33/sidecar/model/constant"
) )
var interchainCMD = cli.Command{ var interchainCMD = cli.Command{
......
...@@ -8,7 +8,7 @@ import ( ...@@ -8,7 +8,7 @@ import (
"github.com/meshplus/bitxhub-kit/crypto/asym" "github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
) )
var p2pCMD = cli.Command{ var p2pCMD = cli.Command{
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"github.com/urfave/cli" "github.com/urfave/cli"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant" "gitlab.33.cn/link33/sidecar/model/constant"
) )
var ruleCMD = cli.Command{ var ruleCMD = cli.Command{
......
...@@ -7,7 +7,7 @@ import ( ...@@ -7,7 +7,7 @@ import (
"github.com/fatih/color" "github.com/fatih/color"
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar/pkg/log" "gitlab.33.cn/link33/sidecar/pkg/log"
) )
var logger = log.NewWithModule("cmd") var logger = log.NewWithModule("cmd")
......
...@@ -14,12 +14,12 @@ import ( ...@@ -14,12 +14,12 @@ import (
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar/internal" "gitlab.33.cn/link33/sidecar/internal"
"github.com/link33/sidecar/internal/app" "gitlab.33.cn/link33/sidecar/internal/app"
"github.com/link33/sidecar/internal/loggers" "gitlab.33.cn/link33/sidecar/internal/loggers"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/pkg/log" "gitlab.33.cn/link33/sidecar/pkg/log"
"github.com/link33/sidecar/tool" "gitlab.33.cn/link33/sidecar/tool"
) )
var startCMD = cli.Command{ var startCMD = cli.Command{
......
...@@ -12,7 +12,7 @@ import ( ...@@ -12,7 +12,7 @@ import (
"github.com/meshplus/bitxhub-kit/crypto/asym" "github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar/tool" "gitlab.33.cn/link33/sidecar/tool"
) )
var toolCMD = cli.Command{ var toolCMD = cli.Command{
......
...@@ -5,7 +5,7 @@ import ( ...@@ -5,7 +5,7 @@ import (
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/link33/sidecar" "gitlab.33.cn/link33/sidecar"
) )
var versionCMD = cli.Command{ var versionCMD = cli.Command{
......
module github.com/link33/sidecar module gitlab.33.cn/link33/sidecar
go 1.17 go 1.17
......
...@@ -6,8 +6,8 @@ import ( ...@@ -6,8 +6,8 @@ import (
"github.com/meshplus/bitxhub-kit/crypto" "github.com/meshplus/bitxhub-kit/crypto"
"github.com/meshplus/bitxhub-kit/types" "github.com/meshplus/bitxhub-kit/types"
"github.com/link33/sidecar/internal" "gitlab.33.cn/link33/sidecar/internal"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type SubscriptionType int type SubscriptionType int
......
...@@ -6,8 +6,8 @@ import ( ...@@ -6,8 +6,8 @@ import (
"github.com/meshplus/bitxhub-kit/crypto" "github.com/meshplus/bitxhub-kit/crypto"
"github.com/link33/sidecar/pkg/log" "gitlab.33.cn/link33/sidecar/pkg/log"
"github.com/link33/sidecar/tool" "gitlab.33.cn/link33/sidecar/tool"
) )
const ( const (
......
...@@ -9,8 +9,8 @@ import ( ...@@ -9,8 +9,8 @@ import (
reflect "reflect" reflect "reflect"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
pb "github.com/link33/sidecar/model/pb" pb "gitlab.33.cn/link33/sidecar/model/pb"
crypto "github.com/meshplus/bitxhub-kit/crypto" crypto "github.com/meshplus/bitxhub-kit/crypto"
types "github.com/meshplus/bitxhub-kit/types" types "github.com/meshplus/bitxhub-kit/types"
) )
......
...@@ -3,7 +3,7 @@ package rpcx ...@@ -3,7 +3,7 @@ package rpcx
import ( import (
"fmt" "fmt"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
func Int32(i int32) *pb.Arg { func Int32(i int32) *pb.Arg {
......
...@@ -10,19 +10,19 @@ import ( ...@@ -10,19 +10,19 @@ import (
"github.com/meshplus/bitxhub-kit/storage/leveldb" "github.com/meshplus/bitxhub-kit/storage/leveldb"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/link33/sidecar/api" "gitlab.33.cn/link33/sidecar/api"
_ "github.com/link33/sidecar/imports" _ "gitlab.33.cn/link33/sidecar/imports"
"github.com/link33/sidecar/internal" "gitlab.33.cn/link33/sidecar/internal"
"github.com/link33/sidecar/internal/appchain" "gitlab.33.cn/link33/sidecar/internal/appchain"
"github.com/link33/sidecar/internal/loggers" "gitlab.33.cn/link33/sidecar/internal/loggers"
"github.com/link33/sidecar/internal/manger" "gitlab.33.cn/link33/sidecar/internal/manger"
"github.com/link33/sidecar/internal/peermgr" "gitlab.33.cn/link33/sidecar/internal/peermgr"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/internal/router" "gitlab.33.cn/link33/sidecar/internal/router"
"github.com/link33/sidecar/internal/rulemgr" "gitlab.33.cn/link33/sidecar/internal/rulemgr"
"github.com/link33/sidecar/internal/txcrypto" "gitlab.33.cn/link33/sidecar/internal/txcrypto"
"github.com/link33/sidecar/pkg/plugins" "gitlab.33.cn/link33/sidecar/pkg/plugins"
"github.com/link33/sidecar/tool" "gitlab.33.cn/link33/sidecar/tool"
) )
// App represents the necessary data for starting the sidecar app // App represents the necessary data for starting the sidecar app
......
...@@ -11,11 +11,11 @@ import ( ...@@ -11,11 +11,11 @@ import (
"github.com/Rican7/retry/strategy" "github.com/Rican7/retry/strategy"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/internal/txcrypto" "gitlab.33.cn/link33/sidecar/internal/txcrypto"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
"github.com/link33/sidecar/pkg/plugins" "gitlab.33.cn/link33/sidecar/pkg/plugins"
) )
type AppChain interface { type AppChain interface {
......
package appchain package appchain
import ( import (
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
//go:generate mockgen -destination mock_executor/mock_executor.go -package mock_executor -source executor.go //go:generate mockgen -destination mock_executor/mock_executor.go -package mock_executor -source executor.go
......
...@@ -8,7 +8,7 @@ import ( ...@@ -8,7 +8,7 @@ import (
reflect "reflect" reflect "reflect"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
pb "github.com/link33/sidecar/model/pb" pb "gitlab.33.cn/link33/sidecar/model/pb"
) )
// MockExecutor is a mock of Executor interface. // MockExecutor is a mock of Executor interface.
......
...@@ -8,7 +8,7 @@ import ( ...@@ -8,7 +8,7 @@ import (
reflect "reflect" reflect "reflect"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
pb "github.com/link33/sidecar/model/pb" pb "gitlab.33.cn/link33/sidecar/model/pb"
) )
// MockMonitor is a mock of Monitor interface. // MockMonitor is a mock of Monitor interface.
......
package appchain package appchain
import "github.com/link33/sidecar/model/pb" import "gitlab.33.cn/link33/sidecar/model/pb"
//go:generate mockgen -destination mock_monitor/mock_monitor.go -package mock_monitor -source monitor.go //go:generate mockgen -destination mock_monitor/mock_monitor.go -package mock_monitor -source monitor.go
type Monitor interface { type Monitor interface {
......
...@@ -3,9 +3,9 @@ package appchain ...@@ -3,9 +3,9 @@ package appchain
import ( import (
"errors" "errors"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/internal/router" "gitlab.33.cn/link33/sidecar/internal/router"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
func (a *appChain) ID() string { func (a *appChain) ID() string {
......
...@@ -4,8 +4,8 @@ import ( ...@@ -4,8 +4,8 @@ import (
"fmt" "fmt"
"sync" "sync"
"github.com/link33/sidecar/internal/rulemgr" "gitlab.33.cn/link33/sidecar/internal/rulemgr"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type MockChecker struct{} type MockChecker struct{}
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr" appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
const ( const (
......
package checker package checker
import "github.com/link33/sidecar/model/pb" import "gitlab.33.cn/link33/sidecar/model/pb"
type Checker interface { type Checker interface {
Check(ibtp *pb.IBTP) error Check(ibtp *pb.IBTP) error
......
...@@ -3,7 +3,7 @@ package exchanger ...@@ -3,7 +3,7 @@ package exchanger
import ( import (
"sync" "sync"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type Pool struct { type Pool struct {
......
...@@ -5,7 +5,7 @@ import ( ...@@ -5,7 +5,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
) )
func TestLogger(t *testing.T) { func TestLogger(t *testing.T) {
......
...@@ -3,8 +3,8 @@ package loggers ...@@ -3,8 +3,8 @@ package loggers
import ( import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/pkg/log" "gitlab.33.cn/link33/sidecar/pkg/log"
) )
const ( const (
......
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr" appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/peermgr" "gitlab.33.cn/link33/sidecar/internal/peermgr"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type Manager struct { type Manager struct {
......
...@@ -3,7 +3,7 @@ package peermgr ...@@ -3,7 +3,7 @@ package peermgr
import ( import (
"fmt" "fmt"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
func (swarm *Swarm) RegisterMultiMsgHandler(messageTypes []pb.Message_Type, handler MessageHandler) error { func (swarm *Swarm) RegisterMultiMsgHandler(messageTypes []pb.Message_Type, handler MessageHandler) error {
......
...@@ -7,8 +7,8 @@ import ( ...@@ -7,8 +7,8 @@ import (
"github.com/meshplus/bitxhub-kit/crypto" "github.com/meshplus/bitxhub-kit/crypto"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
var ( var (
......
...@@ -9,9 +9,9 @@ import ( ...@@ -9,9 +9,9 @@ import (
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
peer "github.com/libp2p/go-libp2p-core/peer" peer "github.com/libp2p/go-libp2p-core/peer"
peermgr "github.com/link33/sidecar/internal/peermgr" peermgr "gitlab.33.cn/link33/sidecar/internal/peermgr"
port "github.com/link33/sidecar/internal/port" port "gitlab.33.cn/link33/sidecar/internal/port"
pb "github.com/link33/sidecar/model/pb" pb "gitlab.33.cn/link33/sidecar/model/pb"
) )
// MockPeerManager is a mock of PeerManager interface. // MockPeerManager is a mock of PeerManager interface.
......
...@@ -3,9 +3,9 @@ package peermgr ...@@ -3,9 +3,9 @@ package peermgr
import ( import (
"github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peer"
"github.com/link33/sidecar/internal" "gitlab.33.cn/link33/sidecar/internal"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type ( type (
......
...@@ -13,11 +13,11 @@ import ( ...@@ -13,11 +13,11 @@ import (
ma "github.com/multiformats/go-multiaddr" ma "github.com/multiformats/go-multiaddr"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
router2 "github.com/link33/sidecar/internal/router" router2 "gitlab.33.cn/link33/sidecar/internal/router"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
"github.com/link33/sidecar/pkg/log" "gitlab.33.cn/link33/sidecar/pkg/log"
) )
var routerTmp router2.Router var routerTmp router2.Router
......
package peermgr package peermgr
import ( import (
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type sidecar struct { type sidecar struct {
......
...@@ -14,10 +14,10 @@ import ( ...@@ -14,10 +14,10 @@ import (
network "github.com/meshplus/go-lightp2p" network "github.com/meshplus/go-lightp2p"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/internal/router" "gitlab.33.cn/link33/sidecar/internal/router"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
const ( const (
......
package port package port
import ( import (
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
// 设计一套port管理机制:包括各种的管理模块。 // 设计一套port管理机制:包括各种的管理模块。
......
...@@ -7,7 +7,7 @@ import ( ...@@ -7,7 +7,7 @@ import (
"github.com/spf13/viper" "github.com/spf13/viper"
"github.com/link33/sidecar/tool" "gitlab.33.cn/link33/sidecar/tool"
) )
const ( const (
......
package router package router
import ( import (
"github.com/link33/sidecar/internal" "gitlab.33.cn/link33/sidecar/internal"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
//go:generate mockgen -destination mock_router/mock_router.go -package mock_router -source interface.go //go:generate mockgen -destination mock_router/mock_router.go -package mock_router -source interface.go
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
reflect "reflect" reflect "reflect"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
port "github.com/link33/sidecar/internal/port" port "gitlab.33.cn/link33/sidecar/internal/port"
pb "github.com/link33/sidecar/model/pb" pb "gitlab.33.cn/link33/sidecar/model/pb"
) )
// MockRouter is a mock of Router interface. // MockRouter is a mock of Router interface.
......
...@@ -8,10 +8,10 @@ import ( ...@@ -8,10 +8,10 @@ import (
"github.com/meshplus/bitxhub-kit/crypto" "github.com/meshplus/bitxhub-kit/crypto"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/link33/sidecar/internal/checker" "gitlab.33.cn/link33/sidecar/internal/checker"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type router struct { type router struct {
......
...@@ -5,8 +5,8 @@ import ( ...@@ -5,8 +5,8 @@ import (
"github.com/meshplus/bitxhub-kit/types" "github.com/meshplus/bitxhub-kit/types"
"github.com/link33/sidecar/internal/port" "gitlab.33.cn/link33/sidecar/internal/port"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
func (rm *RuleMgr) HandleRule(p port.Port, msg *pb.Message) { func (rm *RuleMgr) HandleRule(p port.Port, msg *pb.Message) {
......
...@@ -9,9 +9,9 @@ import ( ...@@ -9,9 +9,9 @@ import (
appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr" appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr"
"github.com/meshplus/bitxhub-kit/types" "github.com/meshplus/bitxhub-kit/types"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/constant" "gitlab.33.cn/link33/sidecar/model/constant"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
const ( const (
......
...@@ -4,8 +4,8 @@ import ( ...@@ -4,8 +4,8 @@ import (
"github.com/meshplus/bitxhub-kit/storage" "github.com/meshplus/bitxhub-kit/storage"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
) )
type Config struct { type Config struct {
......
...@@ -3,8 +3,8 @@ package syncer ...@@ -3,8 +3,8 @@ package syncer
import ( import (
appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr" appchainmgr "github.com/meshplus/bitxhub-core/appchain-mgr"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
type IBTPHandler func(ibtp *pb.IBTP) type IBTPHandler func(ibtp *pb.IBTP)
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
reflect "reflect" reflect "reflect"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
syncer "github.com/link33/sidecar/internal/syncer" syncer "gitlab.33.cn/link33/sidecar/internal/syncer"
pb "github.com/link33/sidecar/model/pb" pb "gitlab.33.cn/link33/sidecar/model/pb"
appchain_mgr "github.com/meshplus/bitxhub-core/appchain-mgr" appchain_mgr "github.com/meshplus/bitxhub-core/appchain-mgr"
) )
......
...@@ -4,7 +4,7 @@ import ( ...@@ -4,7 +4,7 @@ import (
"fmt" "fmt"
"strconv" "strconv"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
func (syncer *WrapperSyncer) persist(ws *pb.InterchainTxWrappers) error { func (syncer *WrapperSyncer) persist(ws *pb.InterchainTxWrappers) error {
......
...@@ -15,8 +15,8 @@ import ( ...@@ -15,8 +15,8 @@ import (
"github.com/meshplus/bitxhub-kit/types" "github.com/meshplus/bitxhub-kit/types"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
var _ Syncer = (*WrapperSyncer)(nil) var _ Syncer = (*WrapperSyncer)(nil)
......
...@@ -22,12 +22,12 @@ import ( ...@@ -22,12 +22,12 @@ import (
"github.com/meshplus/bitxhub-kit/types" "github.com/meshplus/bitxhub-kit/types"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/hub/client/mock_client" "gitlab.33.cn/link33/sidecar/hub/client/mock_client"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant" "gitlab.33.cn/link33/sidecar/model/constant"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
"github.com/link33/sidecar/pkg/log" "gitlab.33.cn/link33/sidecar/pkg/log"
) )
const ( const (
......
...@@ -9,9 +9,9 @@ import ( ...@@ -9,9 +9,9 @@ import (
"github.com/meshplus/bitxhub-kit/crypto/ecdh" "github.com/meshplus/bitxhub-kit/crypto/ecdh"
"github.com/meshplus/bitxhub-kit/crypto/sym" "github.com/meshplus/bitxhub-kit/crypto/sym"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/constant" "gitlab.33.cn/link33/sidecar/model/constant"
) )
type cryptor struct { type cryptor struct {
......
...@@ -10,10 +10,10 @@ import ( ...@@ -10,10 +10,10 @@ import (
"github.com/meshplus/bitxhub-kit/crypto/asym" "github.com/meshplus/bitxhub-kit/crypto/asym"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
rpcx "github.com/link33/sidecar/hub/client" rpcx "gitlab.33.cn/link33/sidecar/hub/client"
"github.com/link33/sidecar/hub/client/mock_client" "gitlab.33.cn/link33/sidecar/hub/client/mock_client"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
func TestRelayCryptor(t *testing.T) { func TestRelayCryptor(t *testing.T) {
......
...@@ -7,7 +7,7 @@ import ( ...@@ -7,7 +7,7 @@ import (
"github.com/Rican7/retry" "github.com/Rican7/retry"
"github.com/Rican7/retry/strategy" "github.com/Rican7/retry/strategy"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
// 实现 AppchainPluginServer接口,具体逻辑委托给业务接口Client的实现。主要是给插件进程使用。 // 实现 AppchainPluginServer接口,具体逻辑委托给业务接口Client的实现。主要是给插件进程使用。
......
package plugins package plugins
import ( import (
"github.com/link33/sidecar/internal" "gitlab.33.cn/link33/sidecar/internal"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
//go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source interface.go //go:generate mockgen -destination mock_client/mock_client.go -package mock_client -source interface.go
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
reflect "reflect" reflect "reflect"
gomock "github.com/golang/mock/gomock" gomock "github.com/golang/mock/gomock"
pb "github.com/link33/sidecar/model/pb" pb "gitlab.33.cn/link33/sidecar/model/pb"
plugins "github.com/link33/sidecar/pkg/plugins" plugins "gitlab.33.cn/link33/sidecar/pkg/plugins"
) )
// MockKernel is a mock of Kernel interface. // MockKernel is a mock of Kernel interface.
......
...@@ -6,7 +6,7 @@ import ( ...@@ -6,7 +6,7 @@ import (
plugin "github.com/hashicorp/go-plugin" plugin "github.com/hashicorp/go-plugin"
"google.golang.org/grpc" "google.golang.org/grpc"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
) )
// Handshake is a common handshake that is shared by plugin and host. // Handshake is a common handshake that is shared by plugin and host.
......
...@@ -9,8 +9,8 @@ import ( ...@@ -9,8 +9,8 @@ import (
hclog "github.com/hashicorp/go-hclog" hclog "github.com/hashicorp/go-hclog"
plugin "github.com/hashicorp/go-plugin" plugin "github.com/hashicorp/go-plugin"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/tool" "gitlab.33.cn/link33/sidecar/tool"
) )
var logger = hclog.New(&hclog.LoggerOptions{ var logger = hclog.New(&hclog.LoggerOptions{
......
...@@ -11,10 +11,10 @@ import ( ...@@ -11,10 +11,10 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/metadata" "google.golang.org/grpc/metadata"
"github.com/link33/sidecar/internal/repo" "gitlab.33.cn/link33/sidecar/internal/repo"
"github.com/link33/sidecar/model/pb" "gitlab.33.cn/link33/sidecar/model/pb"
"github.com/link33/sidecar/pkg/plugins" "gitlab.33.cn/link33/sidecar/pkg/plugins"
"github.com/link33/sidecar/pkg/plugins/mock_client" "gitlab.33.cn/link33/sidecar/pkg/plugins/mock_client"
) )
const ( const (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment