Skip to content

Commit

Permalink
[FAB-7917] Move packages from def to pkg/fabsdk
Browse files Browse the repository at this point in the history
For now, move only def/factory and def/provider.
Eventually, we'll completely remove the def package.

Change-Id: I37891a0fd6b0657f09a92e0c8405e434e510e63b
Signed-off-by: Aleksandar Likic <aleksandar.likic@securekey.com>
  • Loading branch information
Aleksandar Likic committed Jan 25, 2018
1 parent ac3975a commit 10205b2
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion def/fabapi/deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ package fabapi
import (
"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
"github.com/hyperledger/fabric-sdk-go/api/apilogging"
"github.com/hyperledger/fabric-sdk-go/def/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/pkg/config"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk"
apisdk "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/api"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/pkg/logging"

"github.com/pkg/errors"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
"github.com/hyperledger/fabric-sdk-go/api/apifabclient"
"github.com/hyperledger/fabric-sdk-go/api/apilogging"
"github.com/hyperledger/fabric-sdk-go/def/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/pkg/config"
mocks "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/mocks"
"github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn/selection/dynamicselection/pgresolver"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/pkg/logging"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/core/common/ccprovider"
"github.com/hyperledger/fabric-sdk-go/third_party/github.com/hyperledger/fabric/protos/common"
Expand Down
6 changes: 3 additions & 3 deletions pkg/fabsdk/defpkgsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ package fabsdk

import (
"github.com/hyperledger/fabric-sdk-go/api/apilogging"
"github.com/hyperledger/fabric-sdk-go/def/factory/defclient"
"github.com/hyperledger/fabric-sdk-go/def/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/def/factory/defsvc"
apisdk "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/api"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defclient"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/pkg/logging/modlog"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ package defclient
import (
"testing"

"github.com/hyperledger/fabric-sdk-go/def/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/pkg/config"
credentialMgr "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/credentialmgr"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defcore"
)

/*
Expand Down Expand Up @@ -41,7 +41,7 @@ func TestNewMSPClient(t *testing.T) {
func TestNewCredentialManager(t *testing.T) {
factory := NewOrgClientFactory()

config, err := config.FromFile("../../../test/fixtures/config/config_test.yaml")()
config, err := config.FromFile("../../../../test/fixtures/config/config_test.yaml")()
if err != nil {
t.Fatalf(err.Error())
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ package defclient
import (
"testing"

"github.com/hyperledger/fabric-sdk-go/def/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defsvc"

"github.com/golang/mock/gomock"
"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
"github.com/hyperledger/fabric-sdk-go/api/apicore"
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/api/apifabclient"
"github.com/hyperledger/fabric-sdk-go/def/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/pkg/config"
"github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/channel"
fabmocks "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/mocks"
chImpl "github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn/chclient"
chmgmtImpl "github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn/chmgmtclient"
resmgmtImpl "github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn/resmgmtclient"
mockapisdk "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/api/mocks"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defcore"
)

func TestNewChannelMgmtClient(t *testing.T) {
Expand Down Expand Up @@ -163,7 +163,7 @@ func newMockProviders(t *testing.T) *mockProviders {
coreFactory := defcore.NewProviderFactory()
svcFactory := defsvc.NewProviderFactory()

config, err := config.FromFile("../../../test/fixtures/config/config_test.yaml")()
config, err := config.FromFile("../../../../test/fixtures/config/config_test.yaml")()
if err != nil {
t.Fatalf(err.Error())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
fab "github.com/hyperledger/fabric-sdk-go/api/apifabclient"
"github.com/hyperledger/fabric-sdk-go/api/apilogging"

"github.com/hyperledger/fabric-sdk-go/def/provider/fabpvdr"
cryptosuiteimpl "github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite/bccsp/sw"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
kvs "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/keyvaluestore"
signingMgr "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/signingmgr"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/provider/fabpvdr"

"github.com/hyperledger/fabric-sdk-go/pkg/logging/modlog"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
"github.com/hyperledger/fabric-sdk-go/api/apiconfig/mocks"
"github.com/hyperledger/fabric-sdk-go/api/apifabclient"
"github.com/hyperledger/fabric-sdk-go/def/provider/fabpvdr"
cryptosuitewrapper "github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite/bccsp/wrapper"
kvs "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/keyvaluestore"
"github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/mocks"
signingMgr "github.com/hyperledger/fabric-sdk-go/pkg/fabric-client/signingmgr"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/provider/fabpvdr"
"github.com/hyperledger/fabric-sdk-go/pkg/logging/modlog"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions pkg/fabsdk/mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/api/apifabclient"
"github.com/hyperledger/fabric-sdk-go/api/apilogging"
"github.com/hyperledger/fabric-sdk-go/def/factory/defclient"
"github.com/hyperledger/fabric-sdk-go/def/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/def/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/pkg/errors"
apisdk "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/api"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defclient"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/pkg/logging/modlog"
)

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/integration/orgs/multiple_orgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
chmgmt "github.com/hyperledger/fabric-sdk-go/api/apitxn/chmgmtclient"
resmgmt "github.com/hyperledger/fabric-sdk-go/api/apitxn/resmgmtclient"

"github.com/hyperledger/fabric-sdk-go/def/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/test/integration"
"github.com/hyperledger/fabric-sdk-go/test/metadata"

Expand Down
2 changes: 1 addition & 1 deletion test/integration/pkcs11/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/def/factory/defcore"
cryptosuite "github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite/bccsp/pkcs11"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/test/integration/e2e"
)

Expand Down
2 changes: 1 addition & 1 deletion test/integration/sdk/custom_cryptosuite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
"github.com/hyperledger/fabric-sdk-go/api/apicryptosuite"
"github.com/hyperledger/fabric-sdk-go/api/apitxn"
"github.com/hyperledger/fabric-sdk-go/def/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp"
bccspSw "github.com/hyperledger/fabric-sdk-go/internal/github.com/hyperledger/fabric/bccsp/factory/sw"
"github.com/hyperledger/fabric-sdk-go/pkg/config"
"github.com/hyperledger/fabric-sdk-go/pkg/cryptosuite/bccsp/wrapper"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defcore"
"github.com/hyperledger/fabric-sdk-go/test/integration"
"github.com/hyperledger/fabric-sdk-go/test/metadata"
)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/sdk/sdk_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/hyperledger/fabric-sdk-go/api/apiconfig"
fab "github.com/hyperledger/fabric-sdk-go/api/apifabclient"

"github.com/hyperledger/fabric-sdk-go/def/factory/defsvc"
"github.com/hyperledger/fabric-sdk-go/pkg/fabsdk/factory/defsvc"

"github.com/hyperledger/fabric-sdk-go/pkg/config"
selection "github.com/hyperledger/fabric-sdk-go/pkg/fabric-txn/selection/dynamicselection"
Expand Down

0 comments on commit 10205b2

Please sign in to comment.