From 5bfbd1dca129914e624c55fb7c0607ceea393687 Mon Sep 17 00:00:00 2001 From: Samuel Venzi Date: Fri, 6 Dec 2024 10:49:48 -0300 Subject: [PATCH] Fix ccapi module name to be available as package Signed-off-by: Samuel Venzi --- ccapi/chaincode/event.go | 2 +- ccapi/chaincode/invoke.go | 2 +- ccapi/chaincode/invokeGateway.go | 2 +- ccapi/chaincode/query.go | 2 +- ccapi/chaincode/queryGateway.go | 2 +- ccapi/go.mod | 2 +- ccapi/handlers/invoke.go | 4 ++-- ccapi/handlers/invokeGateway.go | 4 ++-- ccapi/handlers/invokeV1.go | 4 ++-- ccapi/handlers/qscc.go | 12 ++++++------ ccapi/handlers/query.go | 4 ++-- ccapi/handlers/queryGateway.go | 4 ++-- ccapi/handlers/queryV1.go | 4 ++-- ccapi/main.go | 4 ++-- ccapi/routes/chaincode.go | 2 +- ccapi/routes/routes.go | 2 +- ccapi/server/server.go | 4 ++-- 17 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ccapi/chaincode/event.go b/ccapi/chaincode/event.go index 0db0f90..c780be6 100644 --- a/ccapi/chaincode/event.go +++ b/ccapi/chaincode/event.go @@ -7,7 +7,7 @@ import ( "os" "regexp" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" ev "github.com/hyperledger/fabric-sdk-go/pkg/client/event" "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab" ) diff --git a/ccapi/chaincode/invoke.go b/ccapi/chaincode/invoke.go index b903059..c823cca 100644 --- a/ccapi/chaincode/invoke.go +++ b/ccapi/chaincode/invoke.go @@ -4,7 +4,7 @@ import ( "net/http" "os" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" "github.com/hyperledger/fabric-sdk-go/pkg/client/channel" "github.com/hyperledger/fabric-sdk-go/pkg/common/errors/retry" ) diff --git a/ccapi/chaincode/invokeGateway.go b/ccapi/chaincode/invokeGateway.go index 2d2edb9..3365a7d 100644 --- a/ccapi/chaincode/invokeGateway.go +++ b/ccapi/chaincode/invokeGateway.go @@ -3,7 +3,7 @@ package chaincode import ( "os" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" "github.com/hyperledger/fabric-gateway/pkg/client" "github.com/pkg/errors" ) diff --git a/ccapi/chaincode/query.go b/ccapi/chaincode/query.go index a069c7b..52935d1 100644 --- a/ccapi/chaincode/query.go +++ b/ccapi/chaincode/query.go @@ -4,7 +4,7 @@ import ( "net/http" "os" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" "github.com/hyperledger/fabric-sdk-go/pkg/client/channel" "github.com/hyperledger/fabric-sdk-go/pkg/common/errors/retry" ) diff --git a/ccapi/chaincode/queryGateway.go b/ccapi/chaincode/queryGateway.go index 96e9914..4dcf532 100644 --- a/ccapi/chaincode/queryGateway.go +++ b/ccapi/chaincode/queryGateway.go @@ -3,7 +3,7 @@ package chaincode import ( "os" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" "github.com/pkg/errors" ) diff --git a/ccapi/go.mod b/ccapi/go.mod index eb53a9d..e8fdfc3 100644 --- a/ccapi/go.mod +++ b/ccapi/go.mod @@ -1,4 +1,4 @@ -module github.com/hyperledger-labs/ccapi +module github.com/hyperledger-labs/cc-tools-demo/ccapi go 1.21 diff --git a/ccapi/handlers/invoke.go b/ccapi/handlers/invoke.go index 0a2e3db..3ee5353 100644 --- a/ccapi/handlers/invoke.go +++ b/ccapi/handlers/invoke.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/chaincode" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/chaincode" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" ) func Invoke(c *gin.Context) { diff --git a/ccapi/handlers/invokeGateway.go b/ccapi/handlers/invokeGateway.go index 123ad4d..b7cd36f 100644 --- a/ccapi/handlers/invokeGateway.go +++ b/ccapi/handlers/invokeGateway.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/chaincode" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/chaincode" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" "github.com/pkg/errors" ) diff --git a/ccapi/handlers/invokeV1.go b/ccapi/handlers/invokeV1.go index f6eca29..e33c5da 100644 --- a/ccapi/handlers/invokeV1.go +++ b/ccapi/handlers/invokeV1.go @@ -8,8 +8,8 @@ import ( "strings" "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/chaincode" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/chaincode" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" ) func InvokeV1(c *gin.Context) { diff --git a/ccapi/handlers/qscc.go b/ccapi/handlers/qscc.go index d999d39..9ecaf99 100644 --- a/ccapi/handlers/qscc.go +++ b/ccapi/handlers/qscc.go @@ -4,10 +4,10 @@ import ( "encoding/hex" "fmt" "net/http" - + "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/chaincode" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/chaincode" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" protos "github.com/hyperledger/fabric-protos-go-apiv2/common" queryresultprotos "github.com/hyperledger/fabric-protos-go-apiv2/ledger/queryresult" rwsetprotos "github.com/hyperledger/fabric-protos-go-apiv2/ledger/rwset" @@ -25,7 +25,7 @@ func QueryQSCC(c *gin.Context) { case "getBlockByNumber": getBlockByNumber(c, channelName) case "getBlockByHash": - getBlockByHash(c, channelName) + getBlockByHash(c, channelName) case "getTransactionByID": getTransactionByID(c, channelName) case "getChainInfo": @@ -147,7 +147,7 @@ func getBlockByHash(c *gin.Context, channelName string) { } result, err := chaincode.QueryGateway(channelName, "qscc", "GetBlockByHash", user, []string{channelName, string(hashBytes)}) - + if err != nil { err, status := common.ParseError(err) common.Abort(c, status, err) @@ -448,4 +448,4 @@ func decodeProcessedTransaction(t []byte) (map[string]interface{}, error) { } return processedTransactionMap, nil -} \ No newline at end of file +} diff --git a/ccapi/handlers/query.go b/ccapi/handlers/query.go index 0e013d4..17f7ffd 100644 --- a/ccapi/handlers/query.go +++ b/ccapi/handlers/query.go @@ -6,8 +6,8 @@ import ( "net/http" "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/chaincode" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/chaincode" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" ) func Query(c *gin.Context) { diff --git a/ccapi/handlers/queryGateway.go b/ccapi/handlers/queryGateway.go index 2cee7c3..444a8ea 100644 --- a/ccapi/handlers/queryGateway.go +++ b/ccapi/handlers/queryGateway.go @@ -7,8 +7,8 @@ import ( "os" "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/chaincode" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/chaincode" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" ) func QueryGatewayDefault(c *gin.Context) { diff --git a/ccapi/handlers/queryV1.go b/ccapi/handlers/queryV1.go index a68d30e..a729ff6 100644 --- a/ccapi/handlers/queryV1.go +++ b/ccapi/handlers/queryV1.go @@ -7,8 +7,8 @@ import ( "os" "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/chaincode" - "github.com/hyperledger-labs/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/chaincode" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" ) func QueryV1(c *gin.Context) { diff --git a/ccapi/main.go b/ccapi/main.go index 2e4891b..6a71f59 100644 --- a/ccapi/main.go +++ b/ccapi/main.go @@ -8,8 +8,8 @@ import ( "github.com/gin-contrib/cors" "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/chaincode" - "github.com/hyperledger-labs/ccapi/server" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/chaincode" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/server" "github.com/hyperledger/fabric-sdk-go/pkg/common/providers/fab" ) diff --git a/ccapi/routes/chaincode.go b/ccapi/routes/chaincode.go index 33c4f82..d547127 100644 --- a/ccapi/routes/chaincode.go +++ b/ccapi/routes/chaincode.go @@ -1,7 +1,7 @@ package routes import ( - "github.com/hyperledger-labs/ccapi/handlers" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/handlers" "github.com/gin-gonic/gin" ) diff --git a/ccapi/routes/routes.go b/ccapi/routes/routes.go index 6a17123..95d4da4 100644 --- a/ccapi/routes/routes.go +++ b/ccapi/routes/routes.go @@ -2,7 +2,7 @@ package routes import ( "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/docs" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/docs" swaggerfiles "github.com/swaggo/files" ginSwagger "github.com/swaggo/gin-swagger" ) diff --git a/ccapi/server/server.go b/ccapi/server/server.go index 58fe300..02ac72c 100644 --- a/ccapi/server/server.go +++ b/ccapi/server/server.go @@ -8,8 +8,8 @@ import ( "time" "github.com/gin-gonic/gin" - "github.com/hyperledger-labs/ccapi/common" - "github.com/hyperledger-labs/ccapi/routes" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/common" + "github.com/hyperledger-labs/cc-tools-demo/ccapi/routes" ) func defaultServer(r *gin.Engine) *http.Server {