From 3af4f37091c03bdeb58b82449e536e3d7a83d399 Mon Sep 17 00:00:00 2001 From: NateWilliams2 Date: Mon, 3 Jun 2024 18:56:23 -0400 Subject: [PATCH 1/3] API Docs: Fix wrong API reponse types, add authorization header --- api/api.go | 4 +++- api/censuses.go | 32 +++++++++++++++++--------------- api/docs/README.md | 2 +- api/docs/models/models.go | 2 +- api/elections.go | 6 +++--- api/wallet.go | 23 ++++++++++++----------- 6 files changed, 37 insertions(+), 32 deletions(-) diff --git a/api/api.go b/api/api.go index 68cf0879e..6a8300a20 100644 --- a/api/api.go +++ b/api/api.go @@ -48,7 +48,9 @@ import ( // @host api-dev.vocdoni.net // @BasePath /v2 -// @securityDefinitions.basic BasicAuth +// @securityDefinitions.apikey ApiKeyAuth +// @in header +// @name Authorization // MaxPageSize defines the maximum number of results returned by the paginated endpoints const MaxPageSize = 10 diff --git a/api/censuses.go b/api/censuses.go index 7a61c2522..291c7a670 100644 --- a/api/censuses.go +++ b/api/censuses.go @@ -213,7 +213,7 @@ func (a *API) enableCensusHandlers() error { // @Tags Censuses // @Accept json // @Produce json -// @Security BasicAuth +// @Security ApiKeyAuth // @Param type path string true "Census type" Enums(weighted,zkweighted,csp) // @Success 200 {object} object{censusId=string} // @Router /censuses/{type} [post] @@ -250,7 +250,7 @@ func (a *API) censusCreateHandler(msg *apirest.APIdata, ctx *httprouter.HTTPCont // @Tags Censuses // @Accept json // @Produce json -// @Security BasicAuth +// @Security ApiKeyAuth // @Param censusID path string true "Census id" // @Param transaction body CensusParticipants true "PublicKey - weight array " // @Success 200 "(empty body)" @@ -411,12 +411,12 @@ func (a *API) censusRootHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) // @Summary Export census // @Description Export census to JSON format. Requires Bearer token // @Tags Censuses +// @Security ApiKeyAuth // @Accept json // @Produce json -// @Security BasicAuth -// @Param censusID path string true "Census id" -// @Success 200 {object} censusdb.CensusDump -// @Router /censuses/{censusID}/export [get] +// @Param censusID path string true "Census id" +// @Success 200 {object} censusdb.CensusDump +// @Router /censuses/{censusID}/export [get] func (a *API) censusDumpHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContext) error { token, err := uuid.Parse(msg.AuthToken) if err != nil { @@ -461,7 +461,7 @@ func (a *API) censusDumpHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContex // @Tags Censuses // @Accept json // @Produce json -// @Security BasicAuth +// @Security ApiKeyAuth // @Param censusID path string true "Census id" // @Success 200 "(empty body)" // @Router /censuses/{censusID}/import [post] @@ -597,7 +597,8 @@ func (a *API) censusSizeHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) // @Produce json // @Param censusID path string true "Census id" // @Success 200 "(empty body)" -// @Router /censuses/{censusID} [delete] +// @Security ApiKeyAuth +// @Router /censuses/{censusID} [delete] func (a *API) censusDeleteHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContext) error { token, err := uuid.Parse(msg.AuthToken) if err != nil { @@ -628,7 +629,7 @@ func (a *API) censusDeleteHandler(msg *apirest.APIdata, ctx *httprouter.HTTPCont // @Tags Censuses // @Accept json // @Produce json -// @Security BasicAuth +// @Security ApiKeyAuth // @Success 200 {object} object{census=object{censusID=string,uri=string}} "It return published censusID and the ipfs uri where its uploaded" // @Param censusID path string true "Census id" // @Router /censuses/{censusID}/publish [post] @@ -816,7 +817,7 @@ func (a *API) censusPublishCheckHandler(_ *apirest.APIdata, ctx *httprouter.HTTP // @Tags Censuses // @Accept json // @Produce json -// @Security BasicAuth +// @Security ApiKeyAuth // @Param censusID path string true "Census id" // @Param key path string true "Key to proof" // @Success 200 {object} object{weight=number,proof=string,value=string} "where proof is Merkle tree siblings and value is Merkle tree leaf value" @@ -950,14 +951,14 @@ func (a *API) censusVerifyHandler(msg *apirest.APIdata, ctx *httprouter.HTTPCont } // censusListHandler -// // @Summary List all census references // @Description List all census references. Requires Admin Bearer token. // @Tags Censuses +// @Security ApiKeyAuth // @Accept json // @Produce json -// @Success 200 {object} object{valid=bool} -// @Router /censuses/list/ [get] +// @Success 200 {object} []censusdb.CensusList +// @Router /censuses/list [get] func (a *API) censusListHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) error { list, err := a.censusdb.List() if err != nil { @@ -976,9 +977,10 @@ func (a *API) censusListHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) // @Description Export the whole census database to a JSON file. Requires Admin Bearer token. // @Tags Censuses // @Accept json +// @Security ApiKeyAuth // @Produce json // @Param ipfs path string true "Export to IPFS. Blank to return the JSON file" -// @Success 200 {object} object{valid=bool} +// @Success 200 {object} object{uri=string} // @Router /censuses/export/{ipfs} [get] func (a *API) censusExportDBHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) error { isIPFSExport := strings.HasSuffix(ctx.Request.URL.Path, "ipfs") @@ -1011,7 +1013,7 @@ func (a *API) censusExportDBHandler(_ *apirest.APIdata, ctx *httprouter.HTTPCont // @Tags Censuses // @Accept json // @Produce json -// @Success 200 {object} object{valid=bool} +// @Success 200 "(empty body)" // @Router /censuses/import/{ipfscid} [post] func (a *API) censusImportDBHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContext) error { ipfscid := ctx.URLParam("ipfscid") diff --git a/api/docs/README.md b/api/docs/README.md index 1e0a10dda..392aa0fd9 100644 --- a/api/docs/README.md +++ b/api/docs/README.md @@ -23,7 +23,7 @@ The `Accounts` tag refer to the namespace where the endpoint behalf, see // @Param address path string true "Account address" // For body objects // @Param transaction body object{txPayload=string,metadata=string} true "Transaction payload and metadata object encoded using base64 " -// @Security BasicAuth +// @Security ApiKeyAuth // If bearer token is needed (for some census ops for example) ``` diff --git a/api/docs/models/models.go b/api/docs/models/models.go index f9455a695..081d3d2e4 100644 --- a/api/docs/models/models.go +++ b/api/docs/models/models.go @@ -46,7 +46,7 @@ func ElectionListByStatusHandler() { // @Tags Censuses // @Accept json // @Produce json -// @Security BasicAuth +// @Security ApiKeyAuth // @Success 200 {object} object{census=object{censusID=string,uri=string}} "It return published censusID and the ipfs uri where its uploaded" // @Param censusID path string true "Census id" // @Param root path string true "Specific root where to publish the census. Not required" diff --git a/api/elections.go b/api/elections.go index 0d7f75bfa..b84f4dc74 100644 --- a/api/elections.go +++ b/api/elections.go @@ -132,7 +132,7 @@ func (a *API) enableElectionHandlers() error { // @Accept json // @Produce json // @Param page path number true "Page " -// @Success 200 {object} ElectionSummary +// @Success 200 {object} object{elections=[]ElectionSummary} // @Router /elections/page/{page} [get] func (a *API) electionFullListHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) error { page := 0 @@ -336,7 +336,7 @@ func (a *API) electionKeysHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContex // @Produce json // @Param electionID path string true "Election id" // @Param page path number true "Page " -// @Success 200 {object} Vote +// @Success 200 {object} object{votes=[]Vote} // @Router /elections/{electionID}/votes/page/{page} [get] func (a *API) electionVotesHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) error { electionID, err := hex.DecodeString(util.TrimHex(ctx.URLParam("electionID"))) @@ -621,7 +621,7 @@ func getElection(electionID []byte, vs *state.State) (*models.Process, error) { // @Produce json // @Param page path number true "Page to paginate" // @Param transaction body ElectionFilter true "Filtered by partial organizationID, partial processID, process status and with results available or not" -// @Success 200 {object} ElectionSummary +// @Success 200 {object} object{elections=[]ElectionSummary} // @Router /elections/filter/page/{page} [post] func (a *API) electionFilterPaginatedHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContext) error { // get organizationId from the request body diff --git a/api/wallet.go b/api/wallet.go index 303e48a0f..9e91119ab 100644 --- a/api/wallet.go +++ b/api/wallet.go @@ -198,7 +198,7 @@ func (a *API) walletAddHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) // // @Summary Set wallet account // @Description Set a new account. Needed the bearer token associated the account. -// @Security BasicAuth +// @Security ApiKeyAuth // @Tags Wallet // @Accept json // @Produce json @@ -245,7 +245,7 @@ func (a *API) walletCreateHandler(msg *apirest.APIdata, ctx *httprouter.HTTPCont // // @Summary Transfer tokens // @Description Transfer balance to another account. Needed the bearer token associated the account. -// @Security BasicAuth +// @Security ApiKeyAuth // @Tags Wallet // @Accept json // @Produce json @@ -303,15 +303,16 @@ func (a *API) walletTransferHandler(msg *apirest.APIdata, ctx *httprouter.HTTPCo // walletElectionHandler // -// @Summary Create election for wallet -// @Description Creates an election. Requires the bearer token of the account you want to create the election. -// @Security BasicAuth -// @Tags Wallet -// @Accept json -// @Produce json -// @Param description body ElectionDescription true "Election description" -// @Success 200 {object} Transaction -// @Router /wallet/election [post] +// @Summary Create election for wallet +// @Description Creates an election. Requires the bearer token of the account you want to create the election. +// @Security ApiKeyAuth +// @Param Auth-Token header string true "Bearer " +// @Tags Wallet +// @Accept json +// @Produce json +// @Param description body ElectionDescription true "Election description" +// @Success 200 {object} Transaction +// @Router /wallet/election [post] func (a *API) walletElectionHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContext) error { wallet, err := a.walletFromToken(msg.AuthToken) if err != nil { From 8cbeadff7ad14b0266ccadcd3d76f1dd390586b0 Mon Sep 17 00:00:00 2001 From: NateWilliams2 Date: Wed, 19 Jun 2024 11:44:59 -0400 Subject: [PATCH 2/3] API: Run Gofumpt --- api/censuses.go | 59 +++++++++++++++++++++++++------------------------ go.mod | 10 +++++++++ go.sum | 26 ++++++++++++++++++++++ 3 files changed, 66 insertions(+), 29 deletions(-) diff --git a/api/censuses.go b/api/censuses.go index 291c7a670..3714eafb6 100644 --- a/api/censuses.go +++ b/api/censuses.go @@ -408,15 +408,15 @@ func (a *API) censusRootHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) // censusDumpHandler // -// @Summary Export census -// @Description Export census to JSON format. Requires Bearer token -// @Tags Censuses -// @Security ApiKeyAuth -// @Accept json -// @Produce json -// @Param censusID path string true "Census id" -// @Success 200 {object} censusdb.CensusDump -// @Router /censuses/{censusID}/export [get] +// @Summary Export census +// @Description Export census to JSON format. Requires Bearer token +// @Tags Censuses +// @Security ApiKeyAuth +// @Accept json +// @Produce json +// @Param censusID path string true "Census id" +// @Success 200 {object} censusdb.CensusDump +// @Router /censuses/{censusID}/export [get] func (a *API) censusDumpHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContext) error { token, err := uuid.Parse(msg.AuthToken) if err != nil { @@ -587,18 +587,18 @@ func (a *API) censusSizeHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) // censusDeleteHandler // -// @Summary Delete census -// @Description Delete unpublished census (not on the storage yet). See [publish census](census-publish)\n -// @Description - Requires Bearer token -// @Description - Deletes a census from the server storage -// @Description - Published census cannot be deleted -// @Tags Censuses -// @Accept json -// @Produce json -// @Param censusID path string true "Census id" -// @Success 200 "(empty body)" -// @Security ApiKeyAuth -// @Router /censuses/{censusID} [delete] +// @Summary Delete census +// @Description Delete unpublished census (not on the storage yet). See [publish census](census-publish)\n +// @Description - Requires Bearer token +// @Description - Deletes a census from the server storage +// @Description - Published census cannot be deleted +// @Tags Censuses +// @Accept json +// @Produce json +// @Param censusID path string true "Census id" +// @Success 200 "(empty body)" +// @Security ApiKeyAuth +// @Router /censuses/{censusID} [delete] func (a *API) censusDeleteHandler(msg *apirest.APIdata, ctx *httprouter.HTTPContext) error { token, err := uuid.Parse(msg.AuthToken) if err != nil { @@ -951,14 +951,15 @@ func (a *API) censusVerifyHandler(msg *apirest.APIdata, ctx *httprouter.HTTPCont } // censusListHandler -// @Summary List all census references -// @Description List all census references. Requires Admin Bearer token. -// @Tags Censuses -// @Security ApiKeyAuth -// @Accept json -// @Produce json -// @Success 200 {object} []censusdb.CensusList -// @Router /censuses/list [get] +// +// @Summary List all census references +// @Description List all census references. Requires Admin Bearer token. +// @Tags Censuses +// @Security ApiKeyAuth +// @Accept json +// @Produce json +// @Success 200 {object} []censusdb.CensusList +// @Router /censuses/list [get] func (a *API) censusListHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) error { list, err := a.censusdb.List() if err != nil { diff --git a/go.mod b/go.mod index 5903ab507..e90a6b616 100644 --- a/go.mod +++ b/go.mod @@ -56,6 +56,7 @@ require ( github.com/rs/zerolog v1.31.0 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 + github.com/swaggo/swag v1.16.3 github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a github.com/vocdoni/storage-proofs-eth-go v0.1.6 go.mongodb.org/mongo-driver v1.12.1 @@ -73,8 +74,11 @@ require ( github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/Jorropo/jsync v1.0.1 // indirect + github.com/KyleBanks/depth v1.2.1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/OneOfOne/xxhash v1.2.5 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect github.com/alexbrainman/goissue34681 v0.0.0-20191006012335-3fc7a47baff5 // indirect github.com/benbjohnson/clock v1.3.5 // indirect @@ -130,6 +134,10 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.6 // indirect + github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-openapi/swag v0.19.15 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/gofrs/flock v0.8.1 // indirect @@ -190,6 +198,7 @@ require ( github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect github.com/jmhodges/levigo v1.0.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/klauspost/cpuid/v2 v2.2.7 // indirect github.com/koron/go-ssdp v0.0.4 // indirect github.com/kr/pretty v0.3.1 // indirect @@ -215,6 +224,7 @@ require ( github.com/libp2p/zeroconf/v2 v2.2.0 // indirect github.com/linxGnu/grocksdb v1.8.6 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/go.sum b/go.sum index 3a77c580e..540e16112 100644 --- a/go.sum +++ b/go.sum @@ -77,6 +77,8 @@ github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwS github.com/Jorropo/jsync v1.0.1 h1:6HgRolFZnsdfzRUj+ImB9og1JYOxQoReSywkHOGSaUU= github.com/Jorropo/jsync v1.0.1/go.mod h1:jCOZj3vrBCri3bSU3ErUYvevKlnbssrXeCivybS5ABQ= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc= +github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= @@ -84,6 +86,10 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8 github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.5 h1:zl/OfRA6nftbBK9qTohYBJ5xvw6C/oNKizR7cZGl3cI= github.com/OneOfOne/xxhash v1.2.5/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -431,8 +437,16 @@ github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNI github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-sourcemap/sourcemap v2.1.2+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= @@ -802,6 +816,8 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -933,6 +949,9 @@ github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd h1:br0buuQ854V8u83wA0rVZ8ttrq5CpaPZdvrK0LP2lOk= @@ -1085,6 +1104,7 @@ github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdh github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -1433,6 +1453,8 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg= +github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954/go.mod h1:u2MKkTVTVJWe5D1rCvame8WqhBd88EuIwODJZ1VHCPM= @@ -1729,6 +1751,7 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210220033124-5f55cee0dc0d/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210423184538-5f58ad60dda6/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1849,6 +1872,7 @@ golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210316164454-77fc1eacc6aa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420205809-ac73e9fd8988/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426080607-c94f62235c83/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2108,6 +2132,7 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= @@ -2141,6 +2166,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From beb432cfd3c8518b0356d09b54a9c617ef8768b5 Mon Sep 17 00:00:00 2001 From: NateWilliams2 Date: Wed, 19 Jun 2024 12:10:28 -0400 Subject: [PATCH 3/3] Upgrade go version --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e90a6b616..33279cd2d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.vocdoni.io/dvote -go 1.22.0 +go 1.22.4 // For testing purposes // replace go.vocdoni.io/proto => ../dvote-protobuf