Skip to content

Commit

Permalink
make gen
Browse files Browse the repository at this point in the history
  • Loading branch information
potterbm-cb committed Nov 7, 2024
1 parent beabf7f commit 6b03e8b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 60 deletions.
5 changes: 1 addition & 4 deletions server/api_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ func (c *BlockAPIController) BlockTransaction(w http.ResponseWriter, r *http.Req
return
}

result, serviceErr := c.service.BlockTransaction(
r.Context(),
blockTransactionRequest,
)
result, serviceErr := c.service.BlockTransaction(r.Context(), blockTransactionRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down
35 changes: 7 additions & 28 deletions server/api_construction.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ func (c *ConstructionAPIController) ConstructionCombine(w http.ResponseWriter, r
return
}

result, serviceErr := c.service.ConstructionCombine(
r.Context(),
constructionCombineRequest,
)
result, serviceErr := c.service.ConstructionCombine(r.Context(), constructionCombineRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down Expand Up @@ -150,10 +147,7 @@ func (c *ConstructionAPIController) ConstructionDerive(w http.ResponseWriter, r
return
}

result, serviceErr := c.service.ConstructionDerive(
r.Context(),
constructionDeriveRequest,
)
result, serviceErr := c.service.ConstructionDerive(r.Context(), constructionDeriveRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down Expand Up @@ -183,10 +177,7 @@ func (c *ConstructionAPIController) ConstructionHash(w http.ResponseWriter, r *h
return
}

result, serviceErr := c.service.ConstructionHash(
r.Context(),
constructionHashRequest,
)
result, serviceErr := c.service.ConstructionHash(r.Context(), constructionHashRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down Expand Up @@ -216,10 +207,7 @@ func (c *ConstructionAPIController) ConstructionMetadata(w http.ResponseWriter,
return
}

result, serviceErr := c.service.ConstructionMetadata(
r.Context(),
constructionMetadataRequest,
)
result, serviceErr := c.service.ConstructionMetadata(r.Context(), constructionMetadataRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down Expand Up @@ -249,10 +237,7 @@ func (c *ConstructionAPIController) ConstructionParse(w http.ResponseWriter, r *
return
}

result, serviceErr := c.service.ConstructionParse(
r.Context(),
constructionParseRequest,
)
result, serviceErr := c.service.ConstructionParse(r.Context(), constructionParseRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down Expand Up @@ -282,10 +267,7 @@ func (c *ConstructionAPIController) ConstructionPayloads(w http.ResponseWriter,
return
}

result, serviceErr := c.service.ConstructionPayloads(
r.Context(),
constructionPayloadsRequest,
)
result, serviceErr := c.service.ConstructionPayloads(r.Context(), constructionPayloadsRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down Expand Up @@ -348,10 +330,7 @@ func (c *ConstructionAPIController) ConstructionSubmit(w http.ResponseWriter, r
return
}

result, serviceErr := c.service.ConstructionSubmit(
r.Context(),
constructionSubmitRequest,
)
result, serviceErr := c.service.ConstructionSubmit(r.Context(), constructionSubmitRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down
5 changes: 1 addition & 4 deletions server/api_mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ func (c *MempoolAPIController) MempoolTransaction(w http.ResponseWriter, r *http
return
}

result, serviceErr := c.service.MempoolTransaction(
r.Context(),
mempoolTransactionRequest,
)
result, serviceErr := c.service.MempoolTransaction(r.Context(), mempoolTransactionRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down
5 changes: 1 addition & 4 deletions server/api_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ func (c *SearchAPIController) SearchTransactions(w http.ResponseWriter, r *http.
return
}

result, serviceErr := c.service.SearchTransactions(
r.Context(),
searchTransactionsRequest,
)
result, serviceErr := c.service.SearchTransactions(r.Context(), searchTransactionsRequest)
if serviceErr != nil {
EncodeJSONResponse(serviceErr, http.StatusInternalServerError, w)

Expand Down
11 changes: 1 addition & 10 deletions types/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,4 @@ module github.com/coinbase/rosetta-sdk-go/types

go 1.19

require (
github.com/mitchellh/mapstructure v1.5.0
github.com/stretchr/testify v1.9.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
require github.com/mitchellh/mapstructure v1.5.0
10 changes: 0 additions & 10 deletions types/go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 6b03e8b

Please sign in to comment.