Skip to content

Commit

Permalink
Fix ccapi module name to be available as package
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Venzi <[email protected]>
  • Loading branch information
samuelvenzi committed Dec 6, 2024
1 parent 4301662 commit 5bfbd1d
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion ccapi/chaincode/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion ccapi/chaincode/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion ccapi/chaincode/invokeGateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion ccapi/chaincode/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion ccapi/chaincode/queryGateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion ccapi/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/hyperledger-labs/ccapi
module github.com/hyperledger-labs/cc-tools-demo/ccapi

go 1.21

Expand Down
4 changes: 2 additions & 2 deletions ccapi/handlers/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ccapi/handlers/invokeGateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions ccapi/handlers/invokeV1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
12 changes: 6 additions & 6 deletions ccapi/handlers/qscc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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":
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -448,4 +448,4 @@ func decodeProcessedTransaction(t []byte) (map[string]interface{}, error) {
}

return processedTransactionMap, nil
}
}
4 changes: 2 additions & 2 deletions ccapi/handlers/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ccapi/handlers/queryGateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ccapi/handlers/queryV1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions ccapi/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion ccapi/routes/chaincode.go
Original file line number Diff line number Diff line change
@@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion ccapi/routes/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
4 changes: 2 additions & 2 deletions ccapi/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5bfbd1d

Please sign in to comment.