From 9246a6351bf13b877a75db808d202ece00d124cb Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Thu, 24 Aug 2023 17:53:13 +0200 Subject: [PATCH 1/9] go get goa v3 & go mod tidy --- go.mod | 22 ++++++++++++---------- go.sum | 53 +++++++++++++++++++++++++++++++++-------------------- 2 files changed, 45 insertions(+), 30 deletions(-) diff --git a/go.mod b/go.mod index 49cffdf3b..c34c9f2fd 100644 --- a/go.mod +++ b/go.mod @@ -24,12 +24,14 @@ require ( go.bug.st/downloader/v2 v2.1.1 go.bug.st/serial v1.4.1 goa.design/goa v1.0.1-0.20190116060309-40843d63b0e4 - golang.org/x/crypto v0.9.0 - golang.org/x/sys v0.8.0 + goa.design/goa/v3 v3.12.4 + golang.org/x/crypto v0.12.0 + golang.org/x/sys v0.11.0 gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa ) require ( + github.com/AnatolyRugalev/goregen v0.1.0 // indirect github.com/bytedance/sonic v1.8.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/creack/goselect v0.1.2 // indirect @@ -50,9 +52,9 @@ require ( github.com/go-stack/stack v1.8.0 // indirect github.com/goccy/go-json v0.10.0 // indirect github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gxui v0.0.0-20151028112939-f85e0a97b3a4 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/googollee/go-engine.io v0.0.0-20180829091931-e2f255711dcb // indirect - github.com/gorilla/websocket v1.4.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect github.com/h2non/filetype v1.1.3 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/juju/errors v0.0.0-20200330140219-3fe23663418f // indirect @@ -64,7 +66,6 @@ require ( github.com/leodido/go-urn v1.2.1 // indirect github.com/leonelquinteros/gotext v1.4.0 // indirect github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d // indirect - github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b // indirect github.com/mattn/go-isatty v0.0.17 // indirect github.com/miekg/dns v1.1.35 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -73,15 +74,16 @@ require ( github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pkg/sftp v1.13.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/sergi/go-diff v1.3.1 // indirect github.com/smartystreets/goconvey v1.6.4 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go v1.1.6 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea // indirect golang.org/x/arch v0.0.0-20210923205945-b76863e36670 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/text v0.9.0 // indirect - google.golang.org/protobuf v1.30.0 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.14.0 // indirect + golang.org/x/text v0.12.0 // indirect + golang.org/x/tools v0.12.0 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 8a528820b..ce5e57288 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/AnatolyRugalev/goregen v0.1.0 h1:xrdXkLaskMnbxW0x4FWNj2yoednv0X2bcTBWpuJGYfE= +github.com/AnatolyRugalev/goregen v0.1.0/go.mod h1:sVlY1tjcirqLBRZnCcIq1+7/Lwmqz5g7IK8AStjOVzI= github.com/andela/gin-cors v0.0.0-20160928171741-e8c3436a37e2 h1:CEix/eilscZqWgZKpY1VU0VTxOv+jV6NVgJEZ/hMBVs= github.com/andela/gin-cors v0.0.0-20160928171741-e8c3436a37e2/go.mod h1:qLg54VlozD6sRu86y3SzM1iybe6G2eaoZGKuGdxSsdc= github.com/arduino/arduino-cli v0.0.0-20230630155703-fe6d7499eb5e h1:gmlrLhRuuIY/hw9EvvLCUvMDXMFZBtIVW29tMYGchkw= @@ -61,16 +63,16 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gxui v0.0.0-20151028112939-f85e0a97b3a4 h1:OL2d27ueTKnlQJoqLW2fc9pWYulFnJYLWzomGV7HqZo= -github.com/google/gxui v0.0.0-20151028112939-f85e0a97b3a4/go.mod h1:Pw1H1OjSNHiqeuxAduB1BKYXIwFtsyrY47nEqSgEiCM= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googollee/go-engine.io v0.0.0-20180829091931-e2f255711dcb h1:n22Aukg/TjoypWc37dbKIpCsz0VMFPD36HQk1WKvg3A= github.com/googollee/go-engine.io v0.0.0-20180829091931-e2f255711dcb/go.mod h1:MBpz1MS3P4HtRcBpQU4HcjvWXZ9q+JWacMEh2/BFYbg= github.com/googollee/go-socket.io v0.0.0-20181101151912-c8aeb1ed9b49 h1:vKXGRzlhWE9TUVhLqAOcgQbfYvReAnsvQQIcnvWMfcg= github.com/googollee/go-socket.io v0.0.0-20181101151912-c8aeb1ed9b49/go.mod h1:ftBGBMhSYToR5oV4ImIPKvAIsNaTkLC+tTvoNafqxlQ= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.0 h1:WDFjx/TMzVgy9VdMMQi2K2Emtwi2QcUQsztZ/zLaH/Q= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -91,7 +93,10 @@ github.com/kr/binarydist v0.1.0 h1:6kAoLA9FMMnNGSehX0s1PdjbEaACznAv/W219j2uvyo= github.com/kr/binarydist v0.1.0/go.mod h1:DY7S//GCoz1BCd0B0EVrinCKAZN3pXe+MDaIZbXQVgM= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= @@ -100,7 +105,6 @@ github.com/leonelquinteros/gotext v1.4.0/go.mod h1:yZGXREmoGTtBvZHNcc+Yfug49G/2s github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d h1:Zj+PHjnhRYWBK6RqCDBcAhLXoi3TzC27Zad/Vn+gnVQ= github.com/manveru/faker v0.0.0-20171103152722-9fbc68a78c4d/go.mod h1:WZy8Q5coAB1zhY9AOBJP0O6J4BuDfbupUDavKY+I3+s= github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b h1:3E44bLeN8uKYdfQqVQycPnaVviZdBLbizFhU49mtbe4= -github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b/go.mod h1:Bj8LjjP0ReT1eKt5QlKjwgi5AFm5mI6O1A2G4ChI0Ag= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= @@ -127,6 +131,8 @@ github.com/pkg/sftp v1.13.4/go.mod h1:LzqnAvaD5TWeNBsZpfKxSYn1MbjWwOsCIAFFJbpIsK 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/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/sfreiberg/simplessh v0.0.0-20220719182921-185eafd40485 h1:ZMBZ2DKX1sScUSo9ZUwGI7jCMukslPNQNfZaw9vVyfY= github.com/sfreiberg/simplessh v0.0.0-20220719182921-185eafd40485/go.mod h1:9qeq2P58+4+LyuncL3waJDG+giOfXgowfrRZZF9XdWk= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= @@ -141,6 +147,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -156,33 +163,34 @@ github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 h1:w8V9v0qVympSF6GjdjIyeqR7+EVhAF9CBQmkmW7Zw0w= github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= -github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea h1:CyhwejzVGvZ3Q2PSbQ4NRRYn+ZWv5eS1vlaEusT+bAI= -github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea/go.mod h1:eNr558nEUjP8acGw8FFjTeWvSgU1stO7FAO6eknhHe4= go.bug.st/downloader/v2 v2.1.1 h1:nyqbUizo3E2IxCCm4YFac4FtSqqFpqWP+Aae5GCMuw4= go.bug.st/downloader/v2 v2.1.1/go.mod h1:VZW2V1iGKV8rJL2ZEGIDzzBeKowYv34AedJz13RzVII= go.bug.st/serial v1.4.1 h1:AwYUNixVf90XymNeJaUkMrPp+GZQe3RMFQmpVdHIUK8= go.bug.st/serial v1.4.1/go.mod h1:z8CesKorE90Qr/oRSJiEuvzYRKol9r/anJZEb5kt304= goa.design/goa v1.0.1-0.20190116060309-40843d63b0e4 h1:+qjyw15FIXxmcA/QmrDrofQPLMAav6X2v+UYH/pQq8A= goa.design/goa v1.0.1-0.20190116060309-40843d63b0e4/go.mod h1:NnzBwdNktihbNek+pPiFMQP9PPFsUt8MMPPyo9opDSo= +goa.design/goa/v3 v3.12.4 h1:g3G8yHLk+jyUDNRL2sNg+ZcoQ62zY83rpgagAQ5VmTA= +goa.design/goa/v3 v3.12.4/go.mod h1:h1vjyGQ+rqWK+VvnqN8oLcpqaHrKIyuY1Vx+jhKodpg= golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk= +golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14= +golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -191,29 +199,34 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols= +golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= +golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.12.0 h1:YW6HUoUmYBpwSgyaGaZq1fHjrBjX1rlpZ54T6mu2kss= +golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= -google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa h1:drvf2JoUL1fz3ttkGNkw+rf3kZa2//7XkYGpSO4NHNA= gopkg.in/inconshreveable/go-update.v0 v0.0.0-20150814200126-d8b0b1d421aa/go.mod h1:tuNm0ntQ7IH9VSA39XxzLMpee5c2DwgIbjD4x3ydo8Y= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce h1:xcEWjVhvbDy+nHP67nPDDpbYrY+ILlfndk4bRioVHaU= +gopkg.in/yaml.v2 v2.2.2/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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 8c02a417023c5815c7df79f4daa2c41cad1febe0 Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Thu, 24 Aug 2023 17:53:25 +0200 Subject: [PATCH 2/9] bump goa version used in design files (DSL) --- design/design.go | 2 +- design/pkgs.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/design/design.go b/design/design.go index f2c07ecf5..7fb32d206 100644 --- a/design/design.go +++ b/design/design.go @@ -15,7 +15,7 @@ package design -import . "goa.design/goa/dsl" +import . "goa.design/goa/v3/dsl" var _ = API("arduino-create-agent", func() { Title("Arduino Create Agent") diff --git a/design/pkgs.go b/design/pkgs.go index 081af2ec5..f47ca0fe0 100644 --- a/design/pkgs.go +++ b/design/pkgs.go @@ -15,7 +15,7 @@ package design -import . "goa.design/goa/dsl" +import . "goa.design/goa/v3/dsl" var _ = Service("indexes", func() { Description("The indexes service manages the package_index files") From 556fd3855b4f9d8f050fecf82eb2b917b16ce662 Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Thu, 24 Aug 2023 17:53:50 +0200 Subject: [PATCH 3/9] goa gen github.com/arduino/arduino-create-agent/design a lot of docs file were deleted because in #670 I forgot to run generate Same --- gen/docs/client.go | 21 - gen/docs/endpoints.go | 25 - gen/docs/service.go | 22 - gen/http/cli/arduino_create_agent/cli.go | 64 +- gen/http/docs/client/client.go | 44 -- gen/http/docs/client/encode_decode.go | 8 - gen/http/docs/client/paths.go | 8 - gen/http/docs/client/types.go | 8 - gen/http/docs/server/encode_decode.go | 8 - gen/http/docs/server/paths.go | 8 - gen/http/docs/server/server.go | 73 -- gen/http/docs/server/types.go | 8 - gen/http/indexes/client/cli.go | 14 +- gen/http/indexes/client/client.go | 15 +- gen/http/indexes/client/encode_decode.go | 72 +- gen/http/indexes/client/paths.go | 2 +- gen/http/indexes/client/types.go | 9 +- gen/http/indexes/server/encode_decode.go | 95 ++- gen/http/indexes/server/paths.go | 2 +- gen/http/indexes/server/server.go | 100 +-- gen/http/indexes/server/types.go | 6 +- gen/http/openapi.json | 2 +- gen/http/openapi.yaml | 938 +++++++++++------------ gen/http/openapi3.json | 1 + gen/http/openapi3.yaml | 379 +++++++++ gen/http/tools/client/cli.go | 14 +- gen/http/tools/client/client.go | 18 +- gen/http/tools/client/encode_decode.go | 90 ++- gen/http/tools/client/paths.go | 2 +- gen/http/tools/client/types.go | 20 +- gen/http/tools/server/encode_decode.go | 42 +- gen/http/tools/server/paths.go | 2 +- gen/http/tools/server/server.go | 120 +-- gen/http/tools/server/types.go | 12 +- gen/indexes/client.go | 19 +- gen/indexes/endpoints.go | 10 +- gen/indexes/service.go | 28 +- gen/indexes/views/view.go | 11 +- gen/tools/client.go | 16 +- gen/tools/endpoints.go | 12 +- gen/tools/service.go | 82 +- gen/tools/views/view.go | 23 +- 42 files changed, 1290 insertions(+), 1163 deletions(-) delete mode 100644 gen/docs/client.go delete mode 100644 gen/docs/endpoints.go delete mode 100644 gen/docs/service.go delete mode 100644 gen/http/docs/client/client.go delete mode 100644 gen/http/docs/client/encode_decode.go delete mode 100644 gen/http/docs/client/paths.go delete mode 100644 gen/http/docs/client/types.go delete mode 100644 gen/http/docs/server/encode_decode.go delete mode 100644 gen/http/docs/server/paths.go delete mode 100644 gen/http/docs/server/server.go delete mode 100644 gen/http/docs/server/types.go create mode 100644 gen/http/openapi3.json create mode 100644 gen/http/openapi3.yaml diff --git a/gen/docs/client.go b/gen/docs/client.go deleted file mode 100644 index 480f8dc7a..000000000 --- a/gen/docs/client.go +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs client -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package docs - -import ( - goa "goa.design/goa" -) - -// Client is the "docs" service client. -type Client struct { -} - -// NewClient initializes a "docs" service client given the endpoints. -func NewClient(goa.Endpoint) *Client { - return &Client{} -} diff --git a/gen/docs/endpoints.go b/gen/docs/endpoints.go deleted file mode 100644 index c03e4ab49..000000000 --- a/gen/docs/endpoints.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs endpoints -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package docs - -import ( - goa "goa.design/goa" -) - -// Endpoints wraps the "docs" service endpoints. -type Endpoints struct { -} - -// NewEndpoints wraps the methods of the "docs" service with endpoints. -func NewEndpoints(s Service) *Endpoints { - return &Endpoints{} -} - -// Use applies the given middleware to all the "docs" service endpoints. -func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) { -} diff --git a/gen/docs/service.go b/gen/docs/service.go deleted file mode 100644 index 3b1e0a265..000000000 --- a/gen/docs/service.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs service -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package docs - -// Service is the docs service interface. -type Service interface { -} - -// ServiceName is the name of the service as defined in the design. This is the -// same value that is set in the endpoint request contexts under the ServiceKey -// key. -const ServiceName = "docs" - -// MethodNames lists the service method names as defined in the design. These -// are the same values that are set in the endpoint request contexts under the -// MethodKey key. -var MethodNames = [0]string{} diff --git a/gen/http/cli/arduino_create_agent/cli.go b/gen/http/cli/arduino_create_agent/cli.go index 76e9a56e2..75ec883ef 100644 --- a/gen/http/cli/arduino_create_agent/cli.go +++ b/gen/http/cli/arduino_create_agent/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // arduino-create-agent HTTP client CLI support package // @@ -15,14 +15,13 @@ import ( indexesc "github.com/arduino/arduino-create-agent/gen/http/indexes/client" toolsc "github.com/arduino/arduino-create-agent/gen/http/tools/client" - goa "goa.design/goa" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // UsageCommands returns the set of commands and sub-commands using the format // -// command (subcommand1|subcommand2|...) -// +// command (subcommand1|subcommand2|...) func UsageCommands() string { return `indexes (list|add|remove) tools (available|installed|install|remove) @@ -44,7 +43,7 @@ func ParseEndpoint( enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restore bool, -) (goa.Endpoint, interface{}, error) { +) (goa.Endpoint, any, error) { var ( indexesFlags = flag.NewFlagSet("indexes", flag.ContinueOnError) @@ -159,7 +158,7 @@ func ParseEndpoint( } var ( - data interface{} + data any endpoint goa.Endpoint err error ) @@ -207,7 +206,7 @@ func ParseEndpoint( func indexesUsage() { fmt.Fprintf(os.Stderr, `The indexes service manages the package_index files Usage: - %s [globalflags] indexes COMMAND [flags] + %[1]s [globalflags] indexes COMMAND [flags] COMMAND: list: List implements list. @@ -215,41 +214,41 @@ COMMAND: remove: Remove implements remove. Additional help: - %s indexes COMMAND --help -`, os.Args[0], os.Args[0]) + %[1]s indexes COMMAND --help +`, os.Args[0]) } func indexesListUsage() { - fmt.Fprintf(os.Stderr, `%s [flags] indexes list + fmt.Fprintf(os.Stderr, `%[1]s [flags] indexes list List implements list. Example: - `+os.Args[0]+` indexes list + %[1]s indexes list `, os.Args[0]) } func indexesAddUsage() { - fmt.Fprintf(os.Stderr, `%s [flags] indexes add -body JSON + fmt.Fprintf(os.Stderr, `%[1]s [flags] indexes add -body JSON Add implements add. -body JSON: Example: - `+os.Args[0]+` indexes add --body '{ - "url": "http://downloads.arduino.cc/packages/package_index.json" + %[1]s indexes add --body '{ + "url": "https://downloads.arduino.cc/packages/package_index.json" }' `, os.Args[0]) } func indexesRemoveUsage() { - fmt.Fprintf(os.Stderr, `%s [flags] indexes remove -body JSON + fmt.Fprintf(os.Stderr, `%[1]s [flags] indexes remove -body JSON Remove implements remove. -body JSON: Example: - `+os.Args[0]+` indexes remove --body '{ - "url": "http://downloads.arduino.cc/packages/package_index.json" + %[1]s indexes remove --body '{ + "url": "https://downloads.arduino.cc/packages/package_index.json" }' `, os.Args[0]) } @@ -258,7 +257,7 @@ Example: func toolsUsage() { fmt.Fprintf(os.Stderr, `The tools service manages the available and installed tools Usage: - %s [globalflags] tools COMMAND [flags] + %[1]s [globalflags] tools COMMAND [flags] COMMAND: available: Available implements available. @@ -267,48 +266,48 @@ COMMAND: remove: Remove implements remove. Additional help: - %s tools COMMAND --help -`, os.Args[0], os.Args[0]) + %[1]s tools COMMAND --help +`, os.Args[0]) } func toolsAvailableUsage() { - fmt.Fprintf(os.Stderr, `%s [flags] tools available + fmt.Fprintf(os.Stderr, `%[1]s [flags] tools available Available implements available. Example: - `+os.Args[0]+` tools available + %[1]s tools available `, os.Args[0]) } func toolsInstalledUsage() { - fmt.Fprintf(os.Stderr, `%s [flags] tools installed + fmt.Fprintf(os.Stderr, `%[1]s [flags] tools installed Installed implements installed. Example: - `+os.Args[0]+` tools installed + %[1]s tools installed `, os.Args[0]) } func toolsInstallUsage() { - fmt.Fprintf(os.Stderr, `%s [flags] tools install -body JSON + fmt.Fprintf(os.Stderr, `%[1]s [flags] tools install -body JSON Install implements install. -body JSON: Example: - `+os.Args[0]+` tools install --body '{ - "checksum": "Quam voluptas voluptates expedita rem ipsum.", + %[1]s tools install --body '{ + "checksum": "Beatae dolor adipisci nulla et quam voluptas.", "name": "avrdude", "packager": "arduino", - "url": "Iusto libero explicabo beatae dolor adipisci nulla.", + "url": "Deserunt voluptatem impedit iusto libero.", "version": "6.3.0-arduino9" }' `, os.Args[0]) } func toolsRemoveUsage() { - fmt.Fprintf(os.Stderr, `%s [flags] tools remove -body JSON -packager STRING -name STRING -version STRING + fmt.Fprintf(os.Stderr, `%[1]s [flags] tools remove -body JSON -packager STRING -name STRING -version STRING Remove implements remove. -body JSON: @@ -317,8 +316,9 @@ Remove implements remove. -version STRING: The version of the tool Example: - `+os.Args[0]+` tools remove --body '{ - "url": "http://downloads.arduino.cc/packages/package_index.json" + %[1]s tools remove --body '{ + "checksum": "Ipsa minima quia.", + "url": "Expedita rem ipsum quasi harum nostrum." }' --packager "arduino" --name "avrdude" --version "6.3.0-arduino9" `, os.Args[0]) } diff --git a/gen/http/docs/client/client.go b/gen/http/docs/client/client.go deleted file mode 100644 index b7f6ee012..000000000 --- a/gen/http/docs/client/client.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs client HTTP transport -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package client - -import ( - "net/http" - - goahttp "goa.design/goa/http" -) - -// Client lists the docs service endpoint HTTP clients. -type Client struct { - // RestoreResponseBody controls whether the response bodies are reset after - // decoding so they can be read again. - RestoreResponseBody bool - - scheme string - host string - encoder func(*http.Request) goahttp.Encoder - decoder func(*http.Response) goahttp.Decoder -} - -// NewClient instantiates HTTP clients for all the docs service servers. -func NewClient( - scheme string, - host string, - doer goahttp.Doer, - enc func(*http.Request) goahttp.Encoder, - dec func(*http.Response) goahttp.Decoder, - restoreBody bool, -) *Client { - return &Client{ - RestoreResponseBody: restoreBody, - scheme: scheme, - host: host, - decoder: dec, - encoder: enc, - } -} diff --git a/gen/http/docs/client/encode_decode.go b/gen/http/docs/client/encode_decode.go deleted file mode 100644 index e6b7b4af3..000000000 --- a/gen/http/docs/client/encode_decode.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs HTTP client encoders and decoders -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package client diff --git a/gen/http/docs/client/paths.go b/gen/http/docs/client/paths.go deleted file mode 100644 index f0c4e10eb..000000000 --- a/gen/http/docs/client/paths.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// HTTP request path constructors for the docs service. -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package client diff --git a/gen/http/docs/client/types.go b/gen/http/docs/client/types.go deleted file mode 100644 index d2e2410ee..000000000 --- a/gen/http/docs/client/types.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs HTTP client types -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package client diff --git a/gen/http/docs/server/encode_decode.go b/gen/http/docs/server/encode_decode.go deleted file mode 100644 index df1840332..000000000 --- a/gen/http/docs/server/encode_decode.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs HTTP server encoders and decoders -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package server diff --git a/gen/http/docs/server/paths.go b/gen/http/docs/server/paths.go deleted file mode 100644 index 72ae3fc84..000000000 --- a/gen/http/docs/server/paths.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// HTTP request path constructors for the docs service. -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package server diff --git a/gen/http/docs/server/server.go b/gen/http/docs/server/server.go deleted file mode 100644 index 627b1fb60..000000000 --- a/gen/http/docs/server/server.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs HTTP server -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package server - -import ( - "context" - "net/http" - - docs "github.com/arduino/arduino-create-agent/gen/docs" - goahttp "goa.design/goa/http" -) - -// Server lists the docs service endpoint HTTP handlers. -type Server struct { - Mounts []*MountPoint -} - -// ErrorNamer is an interface implemented by generated error structs that -// exposes the name of the error as defined in the design. -type ErrorNamer interface { - ErrorName() string -} - -// MountPoint holds information about the mounted endpoints. -type MountPoint struct { - // Method is the name of the service method served by the mounted HTTP handler. - Method string - // Verb is the HTTP method used to match requests to the mounted handler. - Verb string - // Pattern is the HTTP request path pattern used to match requests to the - // mounted handler. - Pattern string -} - -// New instantiates HTTP handlers for all the docs service endpoints. -func New( - e *docs.Endpoints, - mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), -) *Server { - return &Server{ - Mounts: []*MountPoint{ - {"docs/pkgs.html", "GET", "/v2/docs/pkgs"}, - }, - } -} - -// Service returns the name of the service served. -func (s *Server) Service() string { return "docs" } - -// Use wraps the server handlers with the given middleware. -func (s *Server) Use(m func(http.Handler) http.Handler) { -} - -// Mount configures the mux to serve the docs endpoints. -func Mount(mux goahttp.Muxer) { - MountDocsPkgsHTML(mux, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - http.ServeFile(w, r, "docs/pkgs.html") - })) -} - -// MountDocsPkgsHTML configures the mux to serve GET request made to -// "/v2/docs/pkgs". -func MountDocsPkgsHTML(mux goahttp.Muxer, h http.Handler) { - mux.Handle("GET", "/v2/docs/pkgs", h.ServeHTTP) -} diff --git a/gen/http/docs/server/types.go b/gen/http/docs/server/types.go deleted file mode 100644 index 123e3bc30..000000000 --- a/gen/http/docs/server/types.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. -// -// docs HTTP server types -// -// Command: -// $ goa gen github.com/arduino/arduino-create-agent/design - -package server diff --git a/gen/http/indexes/client/cli.go b/gen/http/indexes/client/cli.go index f6a2ff094..52d376d69 100644 --- a/gen/http/indexes/client/cli.go +++ b/gen/http/indexes/client/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes HTTP client CLI support package // @@ -22,15 +22,13 @@ func BuildAddPayload(indexesAddBody string) (*indexes.IndexPayload, error) { { err = json.Unmarshal([]byte(indexesAddBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, example of valid JSON:\n%s", "'{\n \"url\": \"http://downloads.arduino.cc/packages/package_index.json\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"url\": \"https://downloads.arduino.cc/packages/package_index.json\"\n }'") } } - if err != nil { - return nil, err - } v := &indexes.IndexPayload{ URL: body.URL, } + return v, nil } @@ -42,14 +40,12 @@ func BuildRemovePayload(indexesRemoveBody string) (*indexes.IndexPayload, error) { err = json.Unmarshal([]byte(indexesRemoveBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, example of valid JSON:\n%s", "'{\n \"url\": \"http://downloads.arduino.cc/packages/package_index.json\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"url\": \"https://downloads.arduino.cc/packages/package_index.json\"\n }'") } } - if err != nil { - return nil, err - } v := &indexes.IndexPayload{ URL: body.URL, } + return v, nil } diff --git a/gen/http/indexes/client/client.go b/gen/http/indexes/client/client.go index 418f060c2..d0b4ec7f1 100644 --- a/gen/http/indexes/client/client.go +++ b/gen/http/indexes/client/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes client HTTP transport // @@ -11,8 +11,8 @@ import ( "context" "net/http" - goa "goa.design/goa" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // Client lists the indexes service endpoint HTTP clients. @@ -63,13 +63,12 @@ func (c *Client) List() goa.Endpoint { var ( decodeResponse = DecodeListResponse(c.decoder, c.RestoreResponseBody) ) - return func(ctx context.Context, v interface{}) (interface{}, error) { + return func(ctx context.Context, v any) (any, error) { req, err := c.BuildListRequest(ctx, v) if err != nil { return nil, err } resp, err := c.ListDoer.Do(req) - if err != nil { return nil, goahttp.ErrRequestError("indexes", "list", err) } @@ -84,7 +83,7 @@ func (c *Client) Add() goa.Endpoint { encodeRequest = EncodeAddRequest(c.encoder) decodeResponse = DecodeAddResponse(c.decoder, c.RestoreResponseBody) ) - return func(ctx context.Context, v interface{}) (interface{}, error) { + return func(ctx context.Context, v any) (any, error) { req, err := c.BuildAddRequest(ctx, v) if err != nil { return nil, err @@ -94,7 +93,6 @@ func (c *Client) Add() goa.Endpoint { return nil, err } resp, err := c.AddDoer.Do(req) - if err != nil { return nil, goahttp.ErrRequestError("indexes", "add", err) } @@ -109,7 +107,7 @@ func (c *Client) Remove() goa.Endpoint { encodeRequest = EncodeRemoveRequest(c.encoder) decodeResponse = DecodeRemoveResponse(c.decoder, c.RestoreResponseBody) ) - return func(ctx context.Context, v interface{}) (interface{}, error) { + return func(ctx context.Context, v any) (any, error) { req, err := c.BuildRemoveRequest(ctx, v) if err != nil { return nil, err @@ -119,7 +117,6 @@ func (c *Client) Remove() goa.Endpoint { return nil, err } resp, err := c.RemoveDoer.Do(req) - if err != nil { return nil, goahttp.ErrRequestError("indexes", "remove", err) } diff --git a/gen/http/indexes/client/encode_decode.go b/gen/http/indexes/client/encode_decode.go index 3bca6b10c..be2254655 100644 --- a/gen/http/indexes/client/encode_decode.go +++ b/gen/http/indexes/client/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes HTTP client encoders and decoders // @@ -10,18 +10,18 @@ package client import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" indexes "github.com/arduino/arduino-create-agent/gen/indexes" indexesviews "github.com/arduino/arduino-create-agent/gen/indexes/views" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" ) // BuildListRequest instantiates a HTTP request object with method and path set // to call the "indexes" service "list" endpoint -func (c *Client) BuildListRequest(ctx context.Context, v interface{}) (*http.Request, error) { +func (c *Client) BuildListRequest(ctx context.Context, v any) (*http.Request, error) { u := &url.URL{Scheme: c.scheme, Host: c.host, Path: ListIndexesPath()} req, err := http.NewRequest("GET", u.String(), nil) if err != nil { @@ -38,18 +38,18 @@ func (c *Client) BuildListRequest(ctx context.Context, v interface{}) (*http.Req // list endpoint. restoreBody controls whether the response body should be // restored after having been read. // DecodeListResponse may return the following errors: -// - "invalid_url" (type *goa.ServiceError): http.StatusBadRequest -// - error: internal error -func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) { - return func(resp *http.Response) (interface{}, error) { +// - "invalid_url" (type *goa.ServiceError): http.StatusBadRequest +// - error: internal error +func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (any, error) { if restoreBody { - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return nil, err } - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { defer resp.Body.Close() @@ -80,7 +80,7 @@ func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod } return nil, NewListInvalidURL(&body) default: - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) return nil, goahttp.ErrInvalidResponse("indexes", "list", resp.StatusCode, string(body)) } } @@ -88,7 +88,7 @@ func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBod // BuildAddRequest instantiates a HTTP request object with method and path set // to call the "indexes" service "add" endpoint -func (c *Client) BuildAddRequest(ctx context.Context, v interface{}) (*http.Request, error) { +func (c *Client) BuildAddRequest(ctx context.Context, v any) (*http.Request, error) { u := &url.URL{Scheme: c.scheme, Host: c.host, Path: AddIndexesPath()} req, err := http.NewRequest("POST", u.String(), nil) if err != nil { @@ -103,8 +103,8 @@ func (c *Client) BuildAddRequest(ctx context.Context, v interface{}) (*http.Requ // EncodeAddRequest returns an encoder for requests sent to the indexes add // server. -func EncodeAddRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error { - return func(req *http.Request, v interface{}) error { +func EncodeAddRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error { + return func(req *http.Request, v any) error { p, ok := v.(*indexes.IndexPayload) if !ok { return goahttp.ErrInvalidType("indexes", "add", "*indexes.IndexPayload", v) @@ -121,18 +121,18 @@ func EncodeAddRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Re // add endpoint. restoreBody controls whether the response body should be // restored after having been read. // DecodeAddResponse may return the following errors: -// - "invalid_url" (type *goa.ServiceError): http.StatusBadRequest -// - error: internal error -func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) { - return func(resp *http.Response) (interface{}, error) { +// - "invalid_url" (type *goa.ServiceError): http.StatusBadRequest +// - error: internal error +func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (any, error) { if restoreBody { - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return nil, err } - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { defer resp.Body.Close() @@ -149,7 +149,7 @@ func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody } p := NewAddOperationOK(&body) view := "default" - vres := &indexesviews.Operation{p, view} + vres := &indexesviews.Operation{Projected: p, View: view} if err = indexesviews.ValidateOperation(vres); err != nil { return nil, goahttp.ErrValidationError("indexes", "add", err) } @@ -170,7 +170,7 @@ func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody } return nil, NewAddInvalidURL(&body) default: - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) return nil, goahttp.ErrInvalidResponse("indexes", "add", resp.StatusCode, string(body)) } } @@ -178,7 +178,7 @@ func DecodeAddResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody // BuildRemoveRequest instantiates a HTTP request object with method and path // set to call the "indexes" service "remove" endpoint -func (c *Client) BuildRemoveRequest(ctx context.Context, v interface{}) (*http.Request, error) { +func (c *Client) BuildRemoveRequest(ctx context.Context, v any) (*http.Request, error) { u := &url.URL{Scheme: c.scheme, Host: c.host, Path: RemoveIndexesPath()} req, err := http.NewRequest("POST", u.String(), nil) if err != nil { @@ -193,8 +193,8 @@ func (c *Client) BuildRemoveRequest(ctx context.Context, v interface{}) (*http.R // EncodeRemoveRequest returns an encoder for requests sent to the indexes // remove server. -func EncodeRemoveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error { - return func(req *http.Request, v interface{}) error { +func EncodeRemoveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error { + return func(req *http.Request, v any) error { p, ok := v.(*indexes.IndexPayload) if !ok { return goahttp.ErrInvalidType("indexes", "remove", "*indexes.IndexPayload", v) @@ -211,18 +211,18 @@ func EncodeRemoveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // remove endpoint. restoreBody controls whether the response body should be // restored after having been read. // DecodeRemoveResponse may return the following errors: -// - "invalid_url" (type *goa.ServiceError): http.StatusBadRequest -// - error: internal error -func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) { - return func(resp *http.Response) (interface{}, error) { +// - "invalid_url" (type *goa.ServiceError): http.StatusBadRequest +// - error: internal error +func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (any, error) { if restoreBody { - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return nil, err } - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { defer resp.Body.Close() @@ -239,7 +239,7 @@ func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } p := NewRemoveOperationOK(&body) view := "default" - vres := &indexesviews.Operation{p, view} + vres := &indexesviews.Operation{Projected: p, View: view} if err = indexesviews.ValidateOperation(vres); err != nil { return nil, goahttp.ErrValidationError("indexes", "remove", err) } @@ -260,7 +260,7 @@ func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } return nil, NewRemoveInvalidURL(&body) default: - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) return nil, goahttp.ErrInvalidResponse("indexes", "remove", resp.StatusCode, string(body)) } } diff --git a/gen/http/indexes/client/paths.go b/gen/http/indexes/client/paths.go index 24fb5b1cb..6ae3e1516 100644 --- a/gen/http/indexes/client/paths.go +++ b/gen/http/indexes/client/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // HTTP request path constructors for the indexes service. // diff --git a/gen/http/indexes/client/types.go b/gen/http/indexes/client/types.go index 4d9d04b06..cdc4677ba 100644 --- a/gen/http/indexes/client/types.go +++ b/gen/http/indexes/client/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes HTTP client types // @@ -10,7 +10,7 @@ package client import ( indexes "github.com/arduino/arduino-create-agent/gen/indexes" indexesviews "github.com/arduino/arduino-create-agent/gen/indexes/views" - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // AddRequestBody is the type of the "indexes" service "add" endpoint HTTP @@ -123,6 +123,7 @@ func NewListInvalidURL(body *ListInvalidURLResponseBody) *goa.ServiceError { Timeout: *body.Timeout, Fault: *body.Fault, } + return v } @@ -132,6 +133,7 @@ func NewAddOperationOK(body *AddResponseBody) *indexesviews.OperationView { v := &indexesviews.OperationView{ Status: body.Status, } + return v } @@ -145,6 +147,7 @@ func NewAddInvalidURL(body *AddInvalidURLResponseBody) *goa.ServiceError { Timeout: *body.Timeout, Fault: *body.Fault, } + return v } @@ -154,6 +157,7 @@ func NewRemoveOperationOK(body *RemoveResponseBody) *indexesviews.OperationView v := &indexesviews.OperationView{ Status: body.Status, } + return v } @@ -168,6 +172,7 @@ func NewRemoveInvalidURL(body *RemoveInvalidURLResponseBody) *goa.ServiceError { Timeout: *body.Timeout, Fault: *body.Fault, } + return v } diff --git a/gen/http/indexes/server/encode_decode.go b/gen/http/indexes/server/encode_decode.go index 4172333cf..884d88004 100644 --- a/gen/http/indexes/server/encode_decode.go +++ b/gen/http/indexes/server/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes HTTP server encoders and decoders // @@ -9,19 +9,20 @@ package server import ( "context" + "errors" "io" "net/http" indexesviews "github.com/arduino/arduino-create-agent/gen/indexes/views" - goa "goa.design/goa" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // EncodeListResponse returns an encoder for responses returned by the indexes // list endpoint. -func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error { - return func(ctx context.Context, w http.ResponseWriter, v interface{}) error { - res := v.([]string) +func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { + res, _ := v.([]string) enc := encoder(ctx, w) body := res w.WriteHeader(http.StatusOK) @@ -31,19 +32,25 @@ func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goaht // EncodeListError returns an encoder for errors returned by the list indexes // endpoint. -func EncodeListError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error { - encodeError := goahttp.ErrorEncoder(encoder) +func EncodeListError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error { + encodeError := goahttp.ErrorEncoder(encoder, formatter) return func(ctx context.Context, w http.ResponseWriter, v error) error { - en, ok := v.(ErrorNamer) - if !ok { + var en goa.GoaErrorNamer + if !errors.As(v, &en) { return encodeError(ctx, w, v) } - switch en.ErrorName() { + switch en.GoaErrorName() { case "invalid_url": - res := v.(*goa.ServiceError) + var res *goa.ServiceError + errors.As(v, &res) enc := encoder(ctx, w) - body := NewListInvalidURLResponseBody(res) - w.Header().Set("goa-error", "invalid_url") + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewListInvalidURLResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) w.WriteHeader(http.StatusBadRequest) return enc.Encode(body) default: @@ -54,8 +61,8 @@ func EncodeListError(encoder func(context.Context, http.ResponseWriter) goahttp. // EncodeAddResponse returns an encoder for responses returned by the indexes // add endpoint. -func EncodeAddResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error { - return func(ctx context.Context, w http.ResponseWriter, v interface{}) error { +func EncodeAddResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { res := v.(*indexesviews.Operation) enc := encoder(ctx, w) body := NewAddResponseBody(res.Projected) @@ -66,8 +73,8 @@ func EncodeAddResponse(encoder func(context.Context, http.ResponseWriter) goahtt // DecodeAddRequest returns a decoder for requests sent to the indexes add // endpoint. -func DecodeAddRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error) { - return func(r *http.Request) (interface{}, error) { +func DecodeAddRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error) { + return func(r *http.Request) (any, error) { var ( body AddRequestBody err error @@ -91,19 +98,25 @@ func DecodeAddRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Dec // EncodeAddError returns an encoder for errors returned by the add indexes // endpoint. -func EncodeAddError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error { - encodeError := goahttp.ErrorEncoder(encoder) +func EncodeAddError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error { + encodeError := goahttp.ErrorEncoder(encoder, formatter) return func(ctx context.Context, w http.ResponseWriter, v error) error { - en, ok := v.(ErrorNamer) - if !ok { + var en goa.GoaErrorNamer + if !errors.As(v, &en) { return encodeError(ctx, w, v) } - switch en.ErrorName() { + switch en.GoaErrorName() { case "invalid_url": - res := v.(*goa.ServiceError) + var res *goa.ServiceError + errors.As(v, &res) enc := encoder(ctx, w) - body := NewAddInvalidURLResponseBody(res) - w.Header().Set("goa-error", "invalid_url") + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewAddInvalidURLResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) w.WriteHeader(http.StatusBadRequest) return enc.Encode(body) default: @@ -114,8 +127,8 @@ func EncodeAddError(encoder func(context.Context, http.ResponseWriter) goahttp.E // EncodeRemoveResponse returns an encoder for responses returned by the // indexes remove endpoint. -func EncodeRemoveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error { - return func(ctx context.Context, w http.ResponseWriter, v interface{}) error { +func EncodeRemoveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { res := v.(*indexesviews.Operation) enc := encoder(ctx, w) body := NewRemoveResponseBody(res.Projected) @@ -126,8 +139,8 @@ func EncodeRemoveResponse(encoder func(context.Context, http.ResponseWriter) goa // DecodeRemoveRequest returns a decoder for requests sent to the indexes // remove endpoint. -func DecodeRemoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error) { - return func(r *http.Request) (interface{}, error) { +func DecodeRemoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error) { + return func(r *http.Request) (any, error) { var ( body RemoveRequestBody err error @@ -151,19 +164,25 @@ func DecodeRemoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp. // EncodeRemoveError returns an encoder for errors returned by the remove // indexes endpoint. -func EncodeRemoveError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, error) error { - encodeError := goahttp.ErrorEncoder(encoder) +func EncodeRemoveError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error { + encodeError := goahttp.ErrorEncoder(encoder, formatter) return func(ctx context.Context, w http.ResponseWriter, v error) error { - en, ok := v.(ErrorNamer) - if !ok { + var en goa.GoaErrorNamer + if !errors.As(v, &en) { return encodeError(ctx, w, v) } - switch en.ErrorName() { + switch en.GoaErrorName() { case "invalid_url": - res := v.(*goa.ServiceError) + var res *goa.ServiceError + errors.As(v, &res) enc := encoder(ctx, w) - body := NewRemoveInvalidURLResponseBody(res) - w.Header().Set("goa-error", "invalid_url") + var body any + if formatter != nil { + body = formatter(ctx, res) + } else { + body = NewRemoveInvalidURLResponseBody(res) + } + w.Header().Set("goa-error", res.GoaErrorName()) w.WriteHeader(http.StatusBadRequest) return enc.Encode(body) default: diff --git a/gen/http/indexes/server/paths.go b/gen/http/indexes/server/paths.go index f1ec8674d..08bf1d4a4 100644 --- a/gen/http/indexes/server/paths.go +++ b/gen/http/indexes/server/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // HTTP request path constructors for the indexes service. // diff --git a/gen/http/indexes/server/server.go b/gen/http/indexes/server/server.go index 99c912659..521fff980 100644 --- a/gen/http/indexes/server/server.go +++ b/gen/http/indexes/server/server.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes HTTP server // @@ -12,8 +12,8 @@ import ( "net/http" indexes "github.com/arduino/arduino-create-agent/gen/indexes" - goa "goa.design/goa" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // Server lists the indexes service endpoint HTTP handlers. @@ -24,12 +24,6 @@ type Server struct { Remove http.Handler } -// ErrorNamer is an interface implemented by generated error structs that -// exposes the name of the error as defined in the design. -type ErrorNamer interface { - ErrorName() string -} - // MountPoint holds information about the mounted endpoints. type MountPoint struct { // Method is the name of the service method served by the mounted HTTP handler. @@ -41,13 +35,19 @@ type MountPoint struct { Pattern string } -// New instantiates HTTP handlers for all the indexes service endpoints. +// New instantiates HTTP handlers for all the indexes service endpoints using +// the provided encoder and decoder. The handlers are mounted on the given mux +// using the HTTP verb and path defined in the design. errhandler is called +// whenever a response fails to be encoded. formatter is used to format errors +// returned by the service methods prior to encoding. Both errhandler and +// formatter are optional and can be nil. func New( e *indexes.Endpoints, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) *Server { return &Server{ Mounts: []*MountPoint{ @@ -55,9 +55,9 @@ func New( {"Add", "POST", "/v2/pkgs/indexes/add"}, {"Remove", "POST", "/v2/pkgs/indexes/delete"}, }, - List: NewListHandler(e.List, mux, dec, enc, eh), - Add: NewAddHandler(e.Add, mux, dec, enc, eh), - Remove: NewRemoveHandler(e.Remove, mux, dec, enc, eh), + List: NewListHandler(e.List, mux, decoder, encoder, errhandler, formatter), + Add: NewAddHandler(e.Add, mux, decoder, encoder, errhandler, formatter), + Remove: NewRemoveHandler(e.Remove, mux, decoder, encoder, errhandler, formatter), } } @@ -71,6 +71,9 @@ func (s *Server) Use(m func(http.Handler) http.Handler) { s.Remove = m(s.Remove) } +// MethodNames returns the methods served. +func (s *Server) MethodNames() []string { return indexes.MethodNames[:] } + // Mount configures the mux to serve the indexes endpoints. func Mount(mux goahttp.Muxer, h *Server) { MountListHandler(mux, h.List) @@ -78,6 +81,11 @@ func Mount(mux goahttp.Muxer, h *Server) { MountRemoveHandler(mux, h.Remove) } +// Mount configures the mux to serve the indexes endpoints. +func (s *Server) Mount(mux goahttp.Muxer) { + Mount(mux, s) +} + // MountListHandler configures the mux to serve the "indexes" service "list" // endpoint. func MountListHandler(mux goahttp.Muxer, h http.Handler) { @@ -95,29 +103,29 @@ func MountListHandler(mux goahttp.Muxer, h http.Handler) { func NewListHandler( endpoint goa.Endpoint, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler { var ( - encodeResponse = EncodeListResponse(enc) - encodeError = EncodeListError(enc) + encodeResponse = EncodeListResponse(encoder) + encodeError = EncodeListError(encoder, formatter) ) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) ctx = context.WithValue(ctx, goa.MethodKey, "list") ctx = context.WithValue(ctx, goa.ServiceKey, "indexes") - + var err error res, err := endpoint(ctx, nil) - if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } if err := encodeResponse(ctx, w, res); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } }) } @@ -139,14 +147,15 @@ func MountAddHandler(mux goahttp.Muxer, h http.Handler) { func NewAddHandler( endpoint goa.Endpoint, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler { var ( - decodeRequest = DecodeAddRequest(mux, dec) - encodeResponse = EncodeAddResponse(enc) - encodeError = EncodeAddError(enc) + decodeRequest = DecodeAddRequest(mux, decoder) + encodeResponse = EncodeAddResponse(encoder) + encodeError = EncodeAddError(encoder, formatter) ) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) @@ -155,21 +164,19 @@ func NewAddHandler( payload, err := decodeRequest(r) if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } - res, err := endpoint(ctx, payload) - if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } if err := encodeResponse(ctx, w, res); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } }) } @@ -191,14 +198,15 @@ func MountRemoveHandler(mux goahttp.Muxer, h http.Handler) { func NewRemoveHandler( endpoint goa.Endpoint, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler { var ( - decodeRequest = DecodeRemoveRequest(mux, dec) - encodeResponse = EncodeRemoveResponse(enc) - encodeError = EncodeRemoveError(enc) + decodeRequest = DecodeRemoveRequest(mux, decoder) + encodeResponse = EncodeRemoveResponse(encoder) + encodeError = EncodeRemoveError(encoder, formatter) ) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) @@ -207,21 +215,19 @@ func NewRemoveHandler( payload, err := decodeRequest(r) if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } - res, err := endpoint(ctx, payload) - if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } if err := encodeResponse(ctx, w, res); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } }) } diff --git a/gen/http/indexes/server/types.go b/gen/http/indexes/server/types.go index 4f6792278..b0a144716 100644 --- a/gen/http/indexes/server/types.go +++ b/gen/http/indexes/server/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes HTTP server types // @@ -10,7 +10,7 @@ package server import ( indexes "github.com/arduino/arduino-create-agent/gen/indexes" indexesviews "github.com/arduino/arduino-create-agent/gen/indexes/views" - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // AddRequestBody is the type of the "indexes" service "add" endpoint HTTP @@ -160,6 +160,7 @@ func NewAddIndexPayload(body *AddRequestBody) *indexes.IndexPayload { v := &indexes.IndexPayload{ URL: *body.URL, } + return v } @@ -168,6 +169,7 @@ func NewRemoveIndexPayload(body *RemoveRequestBody) *indexes.IndexPayload { v := &indexes.IndexPayload{ URL: *body.URL, } + return v } diff --git a/gen/http/openapi.json b/gen/http/openapi.json index 2638bb9af..a315391ad 100644 --- a/gen/http/openapi.json +++ b/gen/http/openapi.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"title":"Arduino Create Agent","description":"A companion of Arduino Create. \n\tAllows the website to perform operations on the user computer, \n\tsuch as detecting which boards are connected and upload sketches on them.","version":""},"host":"localhost:80","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/v2/docs/pkgs":{"get":{"summary":"Download docs/pkgs.html","operationId":"docs#/v2/docs/pkgs","responses":{"200":{"description":"File downloaded","schema":{"type":"file"}}},"schemes":["http"]}},"/v2/pkgs/indexes":{"get":{"tags":["indexes"],"summary":"list indexes","operationId":"indexes#list","responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Harum nostrum qui ipsa minima quia dolorem."}}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/Indexeslist_invalid_url_response_body"}}},"schemes":["http"]}},"/v2/pkgs/indexes/add":{"post":{"tags":["indexes"],"summary":"add indexes","operationId":"indexes#add","parameters":[{"name":"AddRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/IndexesAddRequestBody","required":["url"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/IndexesAddResponseBody"}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/Indexesadd_invalid_url_response_body"}}},"schemes":["http"]}},"/v2/pkgs/indexes/delete":{"post":{"tags":["indexes"],"summary":"remove indexes","operationId":"indexes#remove","parameters":[{"name":"RemoveRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/IndexesRemoveRequestBody","required":["url"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/IndexesRemoveResponseBody"}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/Indexesremove_invalid_url_response_body"}}},"schemes":["http"]}},"/v2/pkgs/tools/available":{"get":{"tags":["tools"],"summary":"available tools","operationId":"tools#available","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ToolsToolResponseCollection"}}},"schemes":["http"]}},"/v2/pkgs/tools/installed":{"get":{"tags":["tools"],"summary":"installed tools","operationId":"tools#installed","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ToolsToolResponseCollection"}}},"schemes":["http"]},"post":{"tags":["tools"],"summary":"install tools","operationId":"tools#install","parameters":[{"name":"InstallRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/ToolsInstallRequestBody","required":["name","version","packager"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ToolsInstallResponseBody"}}},"schemes":["http"]}},"/v2/pkgs/tools/installed/{packager}/{name}/{version}":{"delete":{"tags":["tools"],"summary":"remove tools","operationId":"tools#remove","parameters":[{"name":"packager","in":"path","description":"The packager of the tool","required":true,"type":"string"},{"name":"name","in":"path","description":"The name of the tool","required":true,"type":"string"},{"name":"version","in":"path","description":"The version of the tool","required":true,"type":"string"},{"name":"RemoveRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/ToolsRemoveRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ToolsRemoveResponseBody"}}},"schemes":["http"]}}},"definitions":{"IndexesAddRequestBody":{"title":"IndexesAddRequestBody","type":"object","properties":{"url":{"type":"string","description":"The url of the index file","example":"http://downloads.arduino.cc/packages/package_index.json"}},"example":{"url":"http://downloads.arduino.cc/packages/package_index.json"},"required":["url"]},"IndexesAddResponseBody":{"title":"Mediatype identifier: application/vnd.arduino.operation; view=default","type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"description":"AddResponseBody result type (default view)","example":{"status":"ok"},"required":["status"]},"IndexesRemoveRequestBody":{"title":"IndexesRemoveRequestBody","type":"object","properties":{"url":{"type":"string","description":"The url of the index file","example":"http://downloads.arduino.cc/packages/package_index.json"}},"example":{"url":"http://downloads.arduino.cc/packages/package_index.json"},"required":["url"]},"IndexesRemoveResponseBody":{"title":"Mediatype identifier: application/vnd.arduino.operation; view=default","type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"description":"RemoveResponseBody result type (default view)","example":{"status":"ok"},"required":["status"]},"Indexesadd_invalid_url_response_body":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"url invalid (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"Indexeslist_invalid_url_response_body":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"url invalid (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"Indexesremove_invalid_url_response_body":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"url invalid (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"ToolResponse":{"title":"Mediatype identifier: application/vnd.arduino.tool; view=default","type":"object","properties":{"name":{"type":"string","description":"The name of the tool","example":"avrdude"},"packager":{"type":"string","description":"The packager of the tool","example":"arduino"},"version":{"type":"string","description":"The version of the tool","example":"6.3.0-arduino9"}},"description":"A tool is an executable program that can upload sketches. (default view)","example":{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},"required":["name","version","packager"]},"ToolsInstallRequestBody":{"title":"ToolsInstallRequestBody","type":"object","properties":{"checksum":{"type":"string","description":"A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly.","example":"Occaecati eum."},"name":{"type":"string","description":"The name of the tool","example":"avrdude"},"packager":{"type":"string","description":"The packager of the tool","example":"arduino"},"url":{"type":"string","description":"The url where the package can be found. Optional. \n\tIf present checksum must also be present.","example":"Sit quod dolor repellat."},"version":{"type":"string","description":"The version of the tool","example":"6.3.0-arduino9"}},"example":{"checksum":"Id ut totam.","name":"avrdude","packager":"arduino","url":"Vero ipsum corporis nihil.","version":"6.3.0-arduino9"},"required":["name","version","packager"]},"ToolsInstallResponseBody":{"title":"Mediatype identifier: application/vnd.arduino.operation; view=default","type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"description":"InstallResponseBody result type (default view)","example":{"status":"ok"},"required":["status"]},"ToolsRemoveRequestBody":{"title":"ToolsRemoveRequestBody","type":"object","properties":{"checksum":{"type":"string","description":"A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly.","example":"Nobis officia optio inventore."},"url":{"type":"string","description":"The url where the package can be found. Optional. \n\tIf present checksum must also be present.","example":"Inventore exercitationem."}},"example":{"checksum":"Qui modi dolorem.","url":"In voluptatibus."}},"ToolsRemoveResponseBody":{"title":"Mediatype identifier: application/vnd.arduino.operation; view=default","type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"description":"RemoveResponseBody result type (default view)","example":{"status":"ok"},"required":["status"]},"ToolsToolResponseCollection":{"title":"Mediatype identifier: application/vnd.arduino.tool; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/ToolResponse"},"description":"AvailableResponseBody is the result type for an array of ToolResponse (default view)","example":[{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"}]}}} \ No newline at end of file +{"swagger":"2.0","info":{"title":"Arduino Create Agent","description":"A companion of Arduino Create. \n\tAllows the website to perform operations on the user computer, \n\tsuch as detecting which boards are connected and upload sketches on them.","version":""},"host":"localhost:80","basePath":"/v2","consumes":["application/json","application/xml","application/gob"],"produces":["application/json","application/xml","application/gob"],"paths":{"/pkgs/indexes":{"get":{"tags":["indexes"],"summary":"list indexes","operationId":"indexes#list","responses":{"200":{"description":"OK response.","schema":{"type":"array","items":{"type":"string","example":"Repudiandae dignissimos consectetur eos molestiae culpa soluta."}}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/IndexesListInvalidURLResponseBody"}}},"schemes":["http"]}},"/pkgs/indexes/add":{"post":{"tags":["indexes"],"summary":"add indexes","operationId":"indexes#add","parameters":[{"name":"AddRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/IndexesAddRequestBody","required":["url"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/IndexesAddResponseBody"}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/IndexesAddInvalidURLResponseBody"}}},"schemes":["http"]}},"/pkgs/indexes/delete":{"post":{"tags":["indexes"],"summary":"remove indexes","operationId":"indexes#remove","parameters":[{"name":"RemoveRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/IndexesRemoveRequestBody","required":["url"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/IndexesRemoveResponseBody"}},"400":{"description":"Bad Request response.","schema":{"$ref":"#/definitions/IndexesRemoveInvalidURLResponseBody"}}},"schemes":["http"]}},"/pkgs/tools/available":{"get":{"tags":["tools"],"summary":"available tools","operationId":"tools#available","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ToolsToolResponseCollection"}}},"schemes":["http"]}},"/pkgs/tools/installed":{"get":{"tags":["tools"],"summary":"installed tools","operationId":"tools#installed","responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ToolsToolResponseCollection"}}},"schemes":["http"]},"post":{"tags":["tools"],"summary":"install tools","operationId":"tools#install","parameters":[{"name":"InstallRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/ToolsInstallRequestBody","required":["name","version","packager"]}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ToolsInstallResponseBody"}}},"schemes":["http"]}},"/pkgs/tools/installed/{packager}/{name}/{version}":{"delete":{"tags":["tools"],"summary":"remove tools","operationId":"tools#remove","parameters":[{"name":"packager","in":"path","description":"The packager of the tool","required":true,"type":"string"},{"name":"name","in":"path","description":"The name of the tool","required":true,"type":"string"},{"name":"version","in":"path","description":"The version of the tool","required":true,"type":"string"},{"name":"RemoveRequestBody","in":"body","required":true,"schema":{"$ref":"#/definitions/ToolsRemoveRequestBody"}}],"responses":{"200":{"description":"OK response.","schema":{"$ref":"#/definitions/ToolsRemoveResponseBody"}}},"schemes":["http"]}}},"definitions":{"IndexesAddInvalidURLResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"url invalid (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"IndexesAddRequestBody":{"title":"IndexesAddRequestBody","type":"object","properties":{"url":{"type":"string","description":"The url of the index file","example":"https://downloads.arduino.cc/packages/package_index.json"}},"example":{"url":"https://downloads.arduino.cc/packages/package_index.json"},"required":["url"]},"IndexesAddResponseBody":{"title":"Mediatype identifier: application/vnd.arduino.operation; view=default","type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"description":"AddResponseBody result type (default view)","example":{"status":"ok"},"required":["status"]},"IndexesListInvalidURLResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":true},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"url invalid (default view)","example":{"fault":true,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"IndexesRemoveInvalidURLResponseBody":{"title":"Mediatype identifier: application/vnd.goa.error; view=default","type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":true},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":true}},"description":"url invalid (default view)","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":true,"timeout":false},"required":["name","id","message","temporary","timeout","fault"]},"IndexesRemoveRequestBody":{"title":"IndexesRemoveRequestBody","type":"object","properties":{"url":{"type":"string","description":"The url of the index file","example":"https://downloads.arduino.cc/packages/package_index.json"}},"example":{"url":"https://downloads.arduino.cc/packages/package_index.json"},"required":["url"]},"IndexesRemoveResponseBody":{"title":"Mediatype identifier: application/vnd.arduino.operation; view=default","type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"description":"RemoveResponseBody result type (default view)","example":{"status":"ok"},"required":["status"]},"ToolResponse":{"title":"Mediatype identifier: application/vnd.arduino.tool; view=default","type":"object","properties":{"name":{"type":"string","description":"The name of the tool","example":"avrdude"},"packager":{"type":"string","description":"The packager of the tool","example":"arduino"},"version":{"type":"string","description":"The version of the tool","example":"6.3.0-arduino9"}},"description":"A tool is an executable program that can upload sketches. (default view)","example":{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},"required":["name","version","packager"]},"ToolsInstallRequestBody":{"title":"ToolsInstallRequestBody","type":"object","properties":{"checksum":{"type":"string","description":"A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly.","example":"Totam cum inventore exercitationem in."},"name":{"type":"string","description":"The name of the tool","example":"avrdude"},"packager":{"type":"string","description":"The packager of the tool","example":"arduino"},"url":{"type":"string","description":"The url where the package can be found. Optional. \n\tIf present checksum must also be present.","example":"Totam vero ipsum corporis nihil voluptatem id."},"version":{"type":"string","description":"The version of the tool","example":"6.3.0-arduino9"}},"example":{"checksum":"Modi dolorem reprehenderit perspiciatis illo aspernatur.","name":"avrdude","packager":"arduino","url":"Officia optio inventore atque in voluptatibus qui.","version":"6.3.0-arduino9"},"required":["name","version","packager"]},"ToolsInstallResponseBody":{"title":"Mediatype identifier: application/vnd.arduino.operation; view=default","type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"description":"InstallResponseBody result type (default view)","example":{"status":"ok"},"required":["status"]},"ToolsRemoveRequestBody":{"title":"ToolsRemoveRequestBody","type":"object","properties":{"checksum":{"type":"string","description":"A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly.","example":"Et qui id et cumque illo."},"url":{"type":"string","description":"The url where the package can be found. Optional. \n\tIf present checksum must also be present.","example":"Officia maiores reiciendis est nemo."}},"example":{"checksum":"Corporis eum et numquam sapiente.","url":"Est voluptatem eos reprehenderit quo sint quod."}},"ToolsRemoveResponseBody":{"title":"Mediatype identifier: application/vnd.arduino.operation; view=default","type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"description":"RemoveResponseBody result type (default view)","example":{"status":"ok"},"required":["status"]},"ToolsToolResponseCollection":{"title":"Mediatype identifier: application/vnd.arduino.tool; type=collection; view=default","type":"array","items":{"$ref":"#/definitions/ToolResponse"},"description":"AvailableResponseBody is the result type for an array of ToolResponse (default view)","example":[{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"}]}}} \ No newline at end of file diff --git a/gen/http/openapi.yaml b/gen/http/openapi.yaml index f887b2660..30aaaa8d7 100644 --- a/gen/http/openapi.yaml +++ b/gen/http/openapi.yaml @@ -1,491 +1,461 @@ swagger: "2.0" info: - title: Arduino Create Agent - description: "A companion of Arduino Create. \n\tAllows the website to perform operations - on the user computer, \n\tsuch as detecting which boards are connected and upload - sketches on them." - version: "" + title: Arduino Create Agent + description: "A companion of Arduino Create. \n\tAllows the website to perform operations on the user computer, \n\tsuch as detecting which boards are connected and upload sketches on them." + version: "" host: localhost:80 +basePath: /v2 consumes: -- application/json -- application/xml -- application/gob + - application/json + - application/xml + - application/gob produces: -- application/json -- application/xml -- application/gob + - application/json + - application/xml + - application/gob paths: - /v2/docs/pkgs: - get: - summary: Download docs/pkgs.html - operationId: docs#/v2/docs/pkgs - responses: - "200": - description: File downloaded - schema: - type: file - schemes: - - http - /v2/pkgs/indexes: - get: - tags: - - indexes - summary: list indexes - operationId: indexes#list - responses: - "200": - description: OK response. - schema: - type: array - items: - type: string - example: Harum nostrum qui ipsa minima quia dolorem. - "400": - description: Bad Request response. - schema: - $ref: '#/definitions/Indexeslist_invalid_url_response_body' - schemes: - - http - /v2/pkgs/indexes/add: - post: - tags: - - indexes - summary: add indexes - operationId: indexes#add - parameters: - - name: AddRequestBody - in: body - required: true - schema: - $ref: '#/definitions/IndexesAddRequestBody' - required: - - url - responses: - "200": - description: OK response. - schema: - $ref: '#/definitions/IndexesAddResponseBody' - "400": - description: Bad Request response. - schema: - $ref: '#/definitions/Indexesadd_invalid_url_response_body' - schemes: - - http - /v2/pkgs/indexes/delete: - post: - tags: - - indexes - summary: remove indexes - operationId: indexes#remove - parameters: - - name: RemoveRequestBody - in: body - required: true - schema: - $ref: '#/definitions/IndexesRemoveRequestBody' - required: - - url - responses: - "200": - description: OK response. - schema: - $ref: '#/definitions/IndexesRemoveResponseBody' - "400": - description: Bad Request response. - schema: - $ref: '#/definitions/Indexesremove_invalid_url_response_body' - schemes: - - http - /v2/pkgs/tools/available: - get: - tags: - - tools - summary: available tools - operationId: tools#available - responses: - "200": - description: OK response. - schema: - $ref: '#/definitions/ToolsToolResponseCollection' - schemes: - - http - /v2/pkgs/tools/installed: - get: - tags: - - tools - summary: installed tools - operationId: tools#installed - responses: - "200": - description: OK response. - schema: - $ref: '#/definitions/ToolsToolResponseCollection' - schemes: - - http - post: - tags: - - tools - summary: install tools - operationId: tools#install - parameters: - - name: InstallRequestBody - in: body - required: true - schema: - $ref: '#/definitions/ToolsInstallRequestBody' - required: - - name - - version - - packager - responses: - "200": - description: OK response. - schema: - $ref: '#/definitions/ToolsInstallResponseBody' - schemes: - - http - /v2/pkgs/tools/installed/{packager}/{name}/{version}: - delete: - tags: - - tools - summary: remove tools - operationId: tools#remove - parameters: - - name: packager - in: path - description: The packager of the tool - required: true - type: string - - name: name - in: path - description: The name of the tool - required: true - type: string - - name: version - in: path - description: The version of the tool - required: true - type: string - - name: RemoveRequestBody - in: body - required: true - schema: - $ref: '#/definitions/ToolsRemoveRequestBody' - responses: - "200": - description: OK response. - schema: - $ref: '#/definitions/ToolsRemoveResponseBody' - schemes: - - http + /pkgs/indexes: + get: + tags: + - indexes + summary: list indexes + operationId: indexes#list + responses: + "200": + description: OK response. + schema: + type: array + items: + type: string + example: Repudiandae dignissimos consectetur eos molestiae culpa soluta. + "400": + description: Bad Request response. + schema: + $ref: '#/definitions/IndexesListInvalidURLResponseBody' + schemes: + - http + /pkgs/indexes/add: + post: + tags: + - indexes + summary: add indexes + operationId: indexes#add + parameters: + - name: AddRequestBody + in: body + required: true + schema: + $ref: '#/definitions/IndexesAddRequestBody' + required: + - url + responses: + "200": + description: OK response. + schema: + $ref: '#/definitions/IndexesAddResponseBody' + "400": + description: Bad Request response. + schema: + $ref: '#/definitions/IndexesAddInvalidURLResponseBody' + schemes: + - http + /pkgs/indexes/delete: + post: + tags: + - indexes + summary: remove indexes + operationId: indexes#remove + parameters: + - name: RemoveRequestBody + in: body + required: true + schema: + $ref: '#/definitions/IndexesRemoveRequestBody' + required: + - url + responses: + "200": + description: OK response. + schema: + $ref: '#/definitions/IndexesRemoveResponseBody' + "400": + description: Bad Request response. + schema: + $ref: '#/definitions/IndexesRemoveInvalidURLResponseBody' + schemes: + - http + /pkgs/tools/available: + get: + tags: + - tools + summary: available tools + operationId: tools#available + responses: + "200": + description: OK response. + schema: + $ref: '#/definitions/ToolsToolResponseCollection' + schemes: + - http + /pkgs/tools/installed: + get: + tags: + - tools + summary: installed tools + operationId: tools#installed + responses: + "200": + description: OK response. + schema: + $ref: '#/definitions/ToolsToolResponseCollection' + schemes: + - http + post: + tags: + - tools + summary: install tools + operationId: tools#install + parameters: + - name: InstallRequestBody + in: body + required: true + schema: + $ref: '#/definitions/ToolsInstallRequestBody' + required: + - name + - version + - packager + responses: + "200": + description: OK response. + schema: + $ref: '#/definitions/ToolsInstallResponseBody' + schemes: + - http + /pkgs/tools/installed/{packager}/{name}/{version}: + delete: + tags: + - tools + summary: remove tools + operationId: tools#remove + parameters: + - name: packager + in: path + description: The packager of the tool + required: true + type: string + - name: name + in: path + description: The name of the tool + required: true + type: string + - name: version + in: path + description: The version of the tool + required: true + type: string + - name: RemoveRequestBody + in: body + required: true + schema: + $ref: '#/definitions/ToolsRemoveRequestBody' + responses: + "200": + description: OK response. + schema: + $ref: '#/definitions/ToolsRemoveResponseBody' + schemes: + - http definitions: - IndexesAddRequestBody: - title: IndexesAddRequestBody - type: object - properties: - url: - type: string - description: The url of the index file - example: http://downloads.arduino.cc/packages/package_index.json - example: - url: http://downloads.arduino.cc/packages/package_index.json - required: - - url - IndexesAddResponseBody: - title: 'Mediatype identifier: application/vnd.arduino.operation; view=default' - type: object - properties: - status: - type: string - description: The status of the operation - example: ok - description: AddResponseBody result type (default view) - example: - status: ok - required: - - status - IndexesRemoveRequestBody: - title: IndexesRemoveRequestBody - type: object - properties: - url: - type: string - description: The url of the index file - example: http://downloads.arduino.cc/packages/package_index.json - example: - url: http://downloads.arduino.cc/packages/package_index.json - required: - - url - IndexesRemoveResponseBody: - title: 'Mediatype identifier: application/vnd.arduino.operation; view=default' - type: object - properties: - status: - type: string - description: The status of the operation - example: ok - description: RemoveResponseBody result type (default view) - example: - status: ok - required: - - status - Indexesadd_invalid_url_response_body: - title: 'Mediatype identifier: application/vnd.goa.error; view=default' - type: object - properties: - fault: - type: boolean - description: Is the error a server-side fault? - example: false - id: - type: string - description: ID is a unique identifier for this particular occurrence of the - problem. - example: 123abc - message: - type: string - description: Message is a human-readable explanation specific to this occurrence - of the problem. - example: parameter 'p' must be an integer - name: - type: string - description: Name is the name of this class of errors. - example: bad_request - temporary: - type: boolean - description: Is the error temporary? - example: false - timeout: - type: boolean - description: Is the error a timeout? - example: false - description: url invalid (default view) - example: - fault: true - id: 123abc - message: parameter 'p' must be an integer - name: bad_request - temporary: true - timeout: true - required: - - name - - id - - message - - temporary - - timeout - - fault - Indexeslist_invalid_url_response_body: - title: 'Mediatype identifier: application/vnd.goa.error; view=default' - type: object - properties: - fault: - type: boolean - description: Is the error a server-side fault? - example: true - id: - type: string - description: ID is a unique identifier for this particular occurrence of the - problem. - example: 123abc - message: - type: string - description: Message is a human-readable explanation specific to this occurrence - of the problem. - example: parameter 'p' must be an integer - name: - type: string - description: Name is the name of this class of errors. - example: bad_request - temporary: - type: boolean - description: Is the error temporary? - example: false - timeout: - type: boolean - description: Is the error a timeout? - example: false - description: url invalid (default view) - example: - fault: false - id: 123abc - message: parameter 'p' must be an integer - name: bad_request - temporary: false - timeout: false - required: - - name - - id - - message - - temporary - - timeout - - fault - Indexesremove_invalid_url_response_body: - title: 'Mediatype identifier: application/vnd.goa.error; view=default' - type: object - properties: - fault: - type: boolean - description: Is the error a server-side fault? - example: false - id: - type: string - description: ID is a unique identifier for this particular occurrence of the - problem. - example: 123abc - message: - type: string - description: Message is a human-readable explanation specific to this occurrence - of the problem. - example: parameter 'p' must be an integer - name: - type: string - description: Name is the name of this class of errors. - example: bad_request - temporary: - type: boolean - description: Is the error temporary? - example: true - timeout: - type: boolean - description: Is the error a timeout? - example: true - description: url invalid (default view) - example: - fault: false - id: 123abc - message: parameter 'p' must be an integer - name: bad_request - temporary: true - timeout: false - required: - - name - - id - - message - - temporary - - timeout - - fault - ToolResponse: - title: 'Mediatype identifier: application/vnd.arduino.tool; view=default' - type: object - properties: - name: - type: string - description: The name of the tool - example: avrdude - packager: - type: string - description: The packager of the tool - example: arduino - version: - type: string - description: The version of the tool - example: 6.3.0-arduino9 - description: A tool is an executable program that can upload sketches. (default - view) - example: - name: avrdude - packager: arduino - version: 6.3.0-arduino9 - required: - - name - - version - - packager - ToolsInstallRequestBody: - title: ToolsInstallRequestBody - type: object - properties: - checksum: - type: string - description: "A checksum of the archive. Mandatory when url is present. \n\tThis - ensures that the package is downloaded correcly." - example: Occaecati eum. - name: - type: string - description: The name of the tool - example: avrdude - packager: - type: string - description: The packager of the tool - example: arduino - url: - type: string - description: "The url where the package can be found. Optional. \n\tIf present - checksum must also be present." - example: Sit quod dolor repellat. - version: - type: string - description: The version of the tool - example: 6.3.0-arduino9 - example: - checksum: Id ut totam. - name: avrdude - packager: arduino - url: Vero ipsum corporis nihil. - version: 6.3.0-arduino9 - required: - - name - - version - - packager - ToolsInstallResponseBody: - title: 'Mediatype identifier: application/vnd.arduino.operation; view=default' - type: object - properties: - status: - type: string - description: The status of the operation - example: ok - description: InstallResponseBody result type (default view) - example: - status: ok - required: - - status - ToolsRemoveRequestBody: - title: ToolsRemoveRequestBody - type: object - properties: - checksum: - type: string - description: "A checksum of the archive. Mandatory when url is present. \n\tThis - ensures that the package is downloaded correcly." - example: Nobis officia optio inventore. - url: - type: string - description: "The url where the package can be found. Optional. \n\tIf present - checksum must also be present." - example: Inventore exercitationem. - example: - checksum: Qui modi dolorem. - url: In voluptatibus. - ToolsRemoveResponseBody: - title: 'Mediatype identifier: application/vnd.arduino.operation; view=default' - type: object - properties: - status: - type: string - description: The status of the operation - example: ok - description: RemoveResponseBody result type (default view) - example: - status: ok - required: - - status - ToolsToolResponseCollection: - title: 'Mediatype identifier: application/vnd.arduino.tool; type=collection; view=default' - type: array - items: - $ref: '#/definitions/ToolResponse' - description: AvailableResponseBody is the result type for an array of ToolResponse - (default view) - example: - - name: avrdude - packager: arduino - version: 6.3.0-arduino9 - - name: avrdude - packager: arduino - version: 6.3.0-arduino9 - - name: avrdude - packager: arduino - version: 6.3.0-arduino9 - - name: avrdude - packager: arduino - version: 6.3.0-arduino9 + IndexesAddInvalidURLResponseBody: + title: 'Mediatype identifier: application/vnd.goa.error; view=default' + type: object + properties: + fault: + type: boolean + description: Is the error a server-side fault? + example: true + id: + type: string + description: ID is a unique identifier for this particular occurrence of the problem. + example: 123abc + message: + type: string + description: Message is a human-readable explanation specific to this occurrence of the problem. + example: parameter 'p' must be an integer + name: + type: string + description: Name is the name of this class of errors. + example: bad_request + temporary: + type: boolean + description: Is the error temporary? + example: true + timeout: + type: boolean + description: Is the error a timeout? + example: false + description: url invalid (default view) + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: false + timeout: false + required: + - name + - id + - message + - temporary + - timeout + - fault + IndexesAddRequestBody: + title: IndexesAddRequestBody + type: object + properties: + url: + type: string + description: The url of the index file + example: https://downloads.arduino.cc/packages/package_index.json + example: + url: https://downloads.arduino.cc/packages/package_index.json + required: + - url + IndexesAddResponseBody: + title: 'Mediatype identifier: application/vnd.arduino.operation; view=default' + type: object + properties: + status: + type: string + description: The status of the operation + example: ok + description: AddResponseBody result type (default view) + example: + status: ok + required: + - status + IndexesListInvalidURLResponseBody: + title: 'Mediatype identifier: application/vnd.goa.error; view=default' + type: object + properties: + fault: + type: boolean + description: Is the error a server-side fault? + example: true + id: + type: string + description: ID is a unique identifier for this particular occurrence of the problem. + example: 123abc + message: + type: string + description: Message is a human-readable explanation specific to this occurrence of the problem. + example: parameter 'p' must be an integer + name: + type: string + description: Name is the name of this class of errors. + example: bad_request + temporary: + type: boolean + description: Is the error temporary? + example: false + timeout: + type: boolean + description: Is the error a timeout? + example: false + description: url invalid (default view) + example: + fault: true + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: true + timeout: true + required: + - name + - id + - message + - temporary + - timeout + - fault + IndexesRemoveInvalidURLResponseBody: + title: 'Mediatype identifier: application/vnd.goa.error; view=default' + type: object + properties: + fault: + type: boolean + description: Is the error a server-side fault? + example: false + id: + type: string + description: ID is a unique identifier for this particular occurrence of the problem. + example: 123abc + message: + type: string + description: Message is a human-readable explanation specific to this occurrence of the problem. + example: parameter 'p' must be an integer + name: + type: string + description: Name is the name of this class of errors. + example: bad_request + temporary: + type: boolean + description: Is the error temporary? + example: true + timeout: + type: boolean + description: Is the error a timeout? + example: true + description: url invalid (default view) + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: true + timeout: false + required: + - name + - id + - message + - temporary + - timeout + - fault + IndexesRemoveRequestBody: + title: IndexesRemoveRequestBody + type: object + properties: + url: + type: string + description: The url of the index file + example: https://downloads.arduino.cc/packages/package_index.json + example: + url: https://downloads.arduino.cc/packages/package_index.json + required: + - url + IndexesRemoveResponseBody: + title: 'Mediatype identifier: application/vnd.arduino.operation; view=default' + type: object + properties: + status: + type: string + description: The status of the operation + example: ok + description: RemoveResponseBody result type (default view) + example: + status: ok + required: + - status + ToolResponse: + title: 'Mediatype identifier: application/vnd.arduino.tool; view=default' + type: object + properties: + name: + type: string + description: The name of the tool + example: avrdude + packager: + type: string + description: The packager of the tool + example: arduino + version: + type: string + description: The version of the tool + example: 6.3.0-arduino9 + description: A tool is an executable program that can upload sketches. (default view) + example: + name: avrdude + packager: arduino + version: 6.3.0-arduino9 + required: + - name + - version + - packager + ToolsInstallRequestBody: + title: ToolsInstallRequestBody + type: object + properties: + checksum: + type: string + description: "A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly." + example: Totam cum inventore exercitationem in. + name: + type: string + description: The name of the tool + example: avrdude + packager: + type: string + description: The packager of the tool + example: arduino + url: + type: string + description: "The url where the package can be found. Optional. \n\tIf present checksum must also be present." + example: Totam vero ipsum corporis nihil voluptatem id. + version: + type: string + description: The version of the tool + example: 6.3.0-arduino9 + example: + checksum: Modi dolorem reprehenderit perspiciatis illo aspernatur. + name: avrdude + packager: arduino + url: Officia optio inventore atque in voluptatibus qui. + version: 6.3.0-arduino9 + required: + - name + - version + - packager + ToolsInstallResponseBody: + title: 'Mediatype identifier: application/vnd.arduino.operation; view=default' + type: object + properties: + status: + type: string + description: The status of the operation + example: ok + description: InstallResponseBody result type (default view) + example: + status: ok + required: + - status + ToolsRemoveRequestBody: + title: ToolsRemoveRequestBody + type: object + properties: + checksum: + type: string + description: "A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly." + example: Et qui id et cumque illo. + url: + type: string + description: "The url where the package can be found. Optional. \n\tIf present checksum must also be present." + example: Officia maiores reiciendis est nemo. + example: + checksum: Corporis eum et numquam sapiente. + url: Est voluptatem eos reprehenderit quo sint quod. + ToolsRemoveResponseBody: + title: 'Mediatype identifier: application/vnd.arduino.operation; view=default' + type: object + properties: + status: + type: string + description: The status of the operation + example: ok + description: RemoveResponseBody result type (default view) + example: + status: ok + required: + - status + ToolsToolResponseCollection: + title: 'Mediatype identifier: application/vnd.arduino.tool; type=collection; view=default' + type: array + items: + $ref: '#/definitions/ToolResponse' + description: AvailableResponseBody is the result type for an array of ToolResponse (default view) + example: + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 diff --git a/gen/http/openapi3.json b/gen/http/openapi3.json new file mode 100644 index 000000000..200367bbf --- /dev/null +++ b/gen/http/openapi3.json @@ -0,0 +1 @@ +{"openapi":"3.0.3","info":{"title":"Arduino Create Agent","description":"A companion of Arduino Create. \n\tAllows the website to perform operations on the user computer, \n\tsuch as detecting which boards are connected and upload sketches on them.","version":"1.0"},"servers":[{"url":"http://localhost:80","description":"Default server for arduino-create-agent"}],"paths":{"/v2/pkgs/indexes":{"get":{"tags":["indexes"],"summary":"list indexes","operationId":"indexes#list","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string","example":"Eveniet iure nihil optio qui."},"example":["Et perferendis eveniet voluptas.","Ut aut illum eaque dolor magni.","Amet illo veritatis laudantium optio."]},"example":["Illo enim vero qui rerum ut inventore.","Dolorem nihil autem minima alias."]}}},"400":{"description":"invalid_url: url invalid","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v2/pkgs/indexes/add":{"post":{"tags":["indexes"],"summary":"add indexes","operationId":"indexes#add","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRequestBody"},"example":{"url":"https://downloads.arduino.cc/packages/package_index.json"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"},"example":{"status":"ok"}}}},"400":{"description":"invalid_url: url invalid","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v2/pkgs/indexes/delete":{"post":{"tags":["indexes"],"summary":"remove indexes","operationId":"indexes#remove","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddRequestBody"},"example":{"url":"https://downloads.arduino.cc/packages/package_index.json"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"},"example":{"status":"ok"}}}},"400":{"description":"invalid_url: url invalid","content":{"application/vnd.goa.error":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v2/pkgs/tools/available":{"get":{"tags":["tools"],"summary":"available tools","operationId":"tools#available","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCollection"},"example":[{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"}]}}}}}},"/v2/pkgs/tools/installed":{"get":{"tags":["tools"],"summary":"installed tools","operationId":"tools#installed","responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolCollection"},"example":[{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"}]}}}}},"post":{"tags":["tools"],"summary":"install tools","operationId":"tools#install","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallRequestBody"},"example":{"checksum":"Beatae dolor adipisci nulla et quam voluptas.","name":"avrdude","packager":"arduino","url":"Deserunt voluptatem impedit iusto libero.","version":"6.3.0-arduino9"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"},"example":{"status":"ok"}}}}}}},"/v2/pkgs/tools/installed/{packager}/{name}/{version}":{"delete":{"tags":["tools"],"summary":"remove tools","operationId":"tools#remove","parameters":[{"name":"packager","in":"path","description":"The packager of the tool","required":true,"schema":{"type":"string","description":"The packager of the tool","example":"arduino"},"example":"arduino"},{"name":"name","in":"path","description":"The name of the tool","required":true,"schema":{"type":"string","description":"The name of the tool","example":"avrdude"},"example":"avrdude"},{"name":"version","in":"path","description":"The version of the tool","required":true,"schema":{"type":"string","description":"The version of the tool","example":"6.3.0-arduino9"},"example":"6.3.0-arduino9"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveRequestBody"},"example":{"checksum":"Ipsa minima quia.","url":"Expedita rem ipsum quasi harum nostrum."}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operation"},"example":{"status":"ok"}}}}}}}},"components":{"schemas":{"AddRequestBody":{"type":"object","properties":{"url":{"type":"string","description":"The url of the index file","example":"https://downloads.arduino.cc/packages/package_index.json"}},"example":{"url":"https://downloads.arduino.cc/packages/package_index.json"},"required":["url"]},"ArduinoTool":{"type":"object","properties":{"name":{"type":"string","description":"The name of the tool","example":"avrdude"},"packager":{"type":"string","description":"The packager of the tool","example":"arduino"},"version":{"type":"string","description":"The version of the tool","example":"6.3.0-arduino9"}},"description":"A tool is an executable program that can upload sketches.","example":{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},"required":["name","version","packager"]},"Error":{"type":"object","properties":{"fault":{"type":"boolean","description":"Is the error a server-side fault?","example":false},"id":{"type":"string","description":"ID is a unique identifier for this particular occurrence of the problem.","example":"123abc"},"message":{"type":"string","description":"Message is a human-readable explanation specific to this occurrence of the problem.","example":"parameter 'p' must be an integer"},"name":{"type":"string","description":"Name is the name of this class of errors.","example":"bad_request"},"temporary":{"type":"boolean","description":"Is the error temporary?","example":false},"timeout":{"type":"boolean","description":"Is the error a timeout?","example":false}},"description":"url invalid","example":{"fault":false,"id":"123abc","message":"parameter 'p' must be an integer","name":"bad_request","temporary":false,"timeout":true},"required":["name","id","message","temporary","timeout","fault"]},"InstallRequestBody":{"type":"object","properties":{"checksum":{"type":"string","description":"A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly.","example":"Sint odio sed consequatur numquam."},"name":{"type":"string","description":"The name of the tool","example":"avrdude"},"packager":{"type":"string","description":"The packager of the tool","example":"arduino"},"url":{"type":"string","description":"The url where the package can be found. Optional. \n\tIf present checksum must also be present.","example":"Et quo doloremque sapiente atque."},"version":{"type":"string","description":"The version of the tool","example":"6.3.0-arduino9"}},"example":{"checksum":"Mollitia commodi sunt.","name":"avrdude","packager":"arduino","url":"Quae reprehenderit provident provident debitis illo.","version":"6.3.0-arduino9"},"required":["name","version","packager"]},"Operation":{"type":"object","properties":{"status":{"type":"string","description":"The status of the operation","example":"ok"}},"example":{"status":"ok"},"required":["status"]},"RemoveRequestBody":{"type":"object","properties":{"checksum":{"type":"string","description":"A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly.","example":"Ea culpa."},"url":{"type":"string","description":"The url where the package can be found. Optional. \n\tIf present checksum must also be present.","example":"Odit officiis illo qui quia provident illo."}},"example":{"checksum":"Rerum eum esse corporis ex.","url":"Molestiae dolor quaerat enim."}},"ToolCollection":{"type":"array","items":{"$ref":"#/components/schemas/ArduinoTool"},"example":[{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"},{"name":"avrdude","packager":"arduino","version":"6.3.0-arduino9"}]}}},"tags":[{"name":"indexes","description":"The indexes service manages the package_index files"},{"name":"tools","description":"The tools service manages the available and installed tools"}]} \ No newline at end of file diff --git a/gen/http/openapi3.yaml b/gen/http/openapi3.yaml new file mode 100644 index 000000000..84ccfb1a9 --- /dev/null +++ b/gen/http/openapi3.yaml @@ -0,0 +1,379 @@ +openapi: 3.0.3 +info: + title: Arduino Create Agent + description: "A companion of Arduino Create. \n\tAllows the website to perform operations on the user computer, \n\tsuch as detecting which boards are connected and upload sketches on them." + version: "1.0" +servers: + - url: http://localhost:80 + description: Default server for arduino-create-agent +paths: + /v2/pkgs/indexes: + get: + tags: + - indexes + summary: list indexes + operationId: indexes#list + responses: + "200": + description: OK response. + content: + application/json: + schema: + type: array + items: + type: string + example: Eveniet iure nihil optio qui. + example: + - Et perferendis eveniet voluptas. + - Ut aut illum eaque dolor magni. + - Amet illo veritatis laudantium optio. + example: + - Illo enim vero qui rerum ut inventore. + - Dolorem nihil autem minima alias. + "400": + description: 'invalid_url: url invalid' + content: + application/vnd.goa.error: + schema: + $ref: '#/components/schemas/Error' + /v2/pkgs/indexes/add: + post: + tags: + - indexes + summary: add indexes + operationId: indexes#add + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddRequestBody' + example: + url: https://downloads.arduino.cc/packages/package_index.json + responses: + "200": + description: OK response. + content: + application/json: + schema: + $ref: '#/components/schemas/Operation' + example: + status: ok + "400": + description: 'invalid_url: url invalid' + content: + application/vnd.goa.error: + schema: + $ref: '#/components/schemas/Error' + /v2/pkgs/indexes/delete: + post: + tags: + - indexes + summary: remove indexes + operationId: indexes#remove + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AddRequestBody' + example: + url: https://downloads.arduino.cc/packages/package_index.json + responses: + "200": + description: OK response. + content: + application/json: + schema: + $ref: '#/components/schemas/Operation' + example: + status: ok + "400": + description: 'invalid_url: url invalid' + content: + application/vnd.goa.error: + schema: + $ref: '#/components/schemas/Error' + /v2/pkgs/tools/available: + get: + tags: + - tools + summary: available tools + operationId: tools#available + responses: + "200": + description: OK response. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolCollection' + example: + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + /v2/pkgs/tools/installed: + get: + tags: + - tools + summary: installed tools + operationId: tools#installed + responses: + "200": + description: OK response. + content: + application/json: + schema: + $ref: '#/components/schemas/ToolCollection' + example: + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + post: + tags: + - tools + summary: install tools + operationId: tools#install + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/InstallRequestBody' + example: + checksum: Beatae dolor adipisci nulla et quam voluptas. + name: avrdude + packager: arduino + url: Deserunt voluptatem impedit iusto libero. + version: 6.3.0-arduino9 + responses: + "200": + description: OK response. + content: + application/json: + schema: + $ref: '#/components/schemas/Operation' + example: + status: ok + /v2/pkgs/tools/installed/{packager}/{name}/{version}: + delete: + tags: + - tools + summary: remove tools + operationId: tools#remove + parameters: + - name: packager + in: path + description: The packager of the tool + required: true + schema: + type: string + description: The packager of the tool + example: arduino + example: arduino + - name: name + in: path + description: The name of the tool + required: true + schema: + type: string + description: The name of the tool + example: avrdude + example: avrdude + - name: version + in: path + description: The version of the tool + required: true + schema: + type: string + description: The version of the tool + example: 6.3.0-arduino9 + example: 6.3.0-arduino9 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/RemoveRequestBody' + example: + checksum: Ipsa minima quia. + url: Expedita rem ipsum quasi harum nostrum. + responses: + "200": + description: OK response. + content: + application/json: + schema: + $ref: '#/components/schemas/Operation' + example: + status: ok +components: + schemas: + AddRequestBody: + type: object + properties: + url: + type: string + description: The url of the index file + example: https://downloads.arduino.cc/packages/package_index.json + example: + url: https://downloads.arduino.cc/packages/package_index.json + required: + - url + ArduinoTool: + type: object + properties: + name: + type: string + description: The name of the tool + example: avrdude + packager: + type: string + description: The packager of the tool + example: arduino + version: + type: string + description: The version of the tool + example: 6.3.0-arduino9 + description: A tool is an executable program that can upload sketches. + example: + name: avrdude + packager: arduino + version: 6.3.0-arduino9 + required: + - name + - version + - packager + Error: + type: object + properties: + fault: + type: boolean + description: Is the error a server-side fault? + example: false + id: + type: string + description: ID is a unique identifier for this particular occurrence of the problem. + example: 123abc + message: + type: string + description: Message is a human-readable explanation specific to this occurrence of the problem. + example: parameter 'p' must be an integer + name: + type: string + description: Name is the name of this class of errors. + example: bad_request + temporary: + type: boolean + description: Is the error temporary? + example: false + timeout: + type: boolean + description: Is the error a timeout? + example: false + description: url invalid + example: + fault: false + id: 123abc + message: parameter 'p' must be an integer + name: bad_request + temporary: false + timeout: true + required: + - name + - id + - message + - temporary + - timeout + - fault + InstallRequestBody: + type: object + properties: + checksum: + type: string + description: "A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly." + example: Sint odio sed consequatur numquam. + name: + type: string + description: The name of the tool + example: avrdude + packager: + type: string + description: The packager of the tool + example: arduino + url: + type: string + description: "The url where the package can be found. Optional. \n\tIf present checksum must also be present." + example: Et quo doloremque sapiente atque. + version: + type: string + description: The version of the tool + example: 6.3.0-arduino9 + example: + checksum: Mollitia commodi sunt. + name: avrdude + packager: arduino + url: Quae reprehenderit provident provident debitis illo. + version: 6.3.0-arduino9 + required: + - name + - version + - packager + Operation: + type: object + properties: + status: + type: string + description: The status of the operation + example: ok + example: + status: ok + required: + - status + RemoveRequestBody: + type: object + properties: + checksum: + type: string + description: "A checksum of the archive. Mandatory when url is present. \n\tThis ensures that the package is downloaded correcly." + example: Ea culpa. + url: + type: string + description: "The url where the package can be found. Optional. \n\tIf present checksum must also be present." + example: Odit officiis illo qui quia provident illo. + example: + checksum: Rerum eum esse corporis ex. + url: Molestiae dolor quaerat enim. + ToolCollection: + type: array + items: + $ref: '#/components/schemas/ArduinoTool' + example: + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 + - name: avrdude + packager: arduino + version: 6.3.0-arduino9 +tags: + - name: indexes + description: The indexes service manages the package_index files + - name: tools + description: The tools service manages the available and installed tools diff --git a/gen/http/tools/client/cli.go b/gen/http/tools/client/cli.go index d708a242e..c6b125ff9 100644 --- a/gen/http/tools/client/cli.go +++ b/gen/http/tools/client/cli.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools HTTP client CLI support package // @@ -22,12 +22,9 @@ func BuildInstallPayload(toolsInstallBody string) (*tools.ToolPayload, error) { { err = json.Unmarshal([]byte(toolsInstallBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, example of valid JSON:\n%s", "'{\n \"checksum\": \"Quam voluptas voluptates expedita rem ipsum.\",\n \"name\": \"avrdude\",\n \"packager\": \"arduino\",\n \"url\": \"Iusto libero explicabo beatae dolor adipisci nulla.\",\n \"version\": \"6.3.0-arduino9\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"checksum\": \"Beatae dolor adipisci nulla et quam voluptas.\",\n \"name\": \"avrdude\",\n \"packager\": \"arduino\",\n \"url\": \"Deserunt voluptatem impedit iusto libero.\",\n \"version\": \"6.3.0-arduino9\"\n }'") } } - if err != nil { - return nil, err - } v := &tools.ToolPayload{ Name: body.Name, Version: body.Version, @@ -35,6 +32,7 @@ func BuildInstallPayload(toolsInstallBody string) (*tools.ToolPayload, error) { URL: body.URL, Checksum: body.Checksum, } + return v, nil } @@ -46,7 +44,7 @@ func BuildRemovePayload(toolsRemoveBody string, toolsRemovePackager string, tool { err = json.Unmarshal([]byte(toolsRemoveBody), &body) if err != nil { - return nil, fmt.Errorf("invalid JSON for body, example of valid JSON:\n%s", "'{\n \"url\": \"http://downloads.arduino.cc/packages/package_index.json\"\n }'") + return nil, fmt.Errorf("invalid JSON for body, \nerror: %s, \nexample of valid JSON:\n%s", err, "'{\n \"checksum\": \"Ipsa minima quia.\",\n \"url\": \"Expedita rem ipsum quasi harum nostrum.\"\n }'") } } var packager string @@ -61,9 +59,6 @@ func BuildRemovePayload(toolsRemoveBody string, toolsRemovePackager string, tool { version = toolsRemoveVersion } - if err != nil { - return nil, err - } v := &tools.ToolPayload{ URL: body.URL, Checksum: body.Checksum, @@ -71,5 +66,6 @@ func BuildRemovePayload(toolsRemoveBody string, toolsRemovePackager string, tool v.Packager = packager v.Name = name v.Version = version + return v, nil } diff --git a/gen/http/tools/client/client.go b/gen/http/tools/client/client.go index b2bb68414..540a1c8a8 100644 --- a/gen/http/tools/client/client.go +++ b/gen/http/tools/client/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools client HTTP transport // @@ -11,8 +11,8 @@ import ( "context" "net/http" - goa "goa.design/goa" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // Client lists the tools service endpoint HTTP clients. @@ -70,13 +70,12 @@ func (c *Client) Available() goa.Endpoint { var ( decodeResponse = DecodeAvailableResponse(c.decoder, c.RestoreResponseBody) ) - return func(ctx context.Context, v interface{}) (interface{}, error) { + return func(ctx context.Context, v any) (any, error) { req, err := c.BuildAvailableRequest(ctx, v) if err != nil { return nil, err } resp, err := c.AvailableDoer.Do(req) - if err != nil { return nil, goahttp.ErrRequestError("tools", "available", err) } @@ -90,13 +89,12 @@ func (c *Client) Installed() goa.Endpoint { var ( decodeResponse = DecodeInstalledResponse(c.decoder, c.RestoreResponseBody) ) - return func(ctx context.Context, v interface{}) (interface{}, error) { + return func(ctx context.Context, v any) (any, error) { req, err := c.BuildInstalledRequest(ctx, v) if err != nil { return nil, err } resp, err := c.InstalledDoer.Do(req) - if err != nil { return nil, goahttp.ErrRequestError("tools", "installed", err) } @@ -111,7 +109,7 @@ func (c *Client) Install() goa.Endpoint { encodeRequest = EncodeInstallRequest(c.encoder) decodeResponse = DecodeInstallResponse(c.decoder, c.RestoreResponseBody) ) - return func(ctx context.Context, v interface{}) (interface{}, error) { + return func(ctx context.Context, v any) (any, error) { req, err := c.BuildInstallRequest(ctx, v) if err != nil { return nil, err @@ -121,7 +119,6 @@ func (c *Client) Install() goa.Endpoint { return nil, err } resp, err := c.InstallDoer.Do(req) - if err != nil { return nil, goahttp.ErrRequestError("tools", "install", err) } @@ -136,7 +133,7 @@ func (c *Client) Remove() goa.Endpoint { encodeRequest = EncodeRemoveRequest(c.encoder) decodeResponse = DecodeRemoveResponse(c.decoder, c.RestoreResponseBody) ) - return func(ctx context.Context, v interface{}) (interface{}, error) { + return func(ctx context.Context, v any) (any, error) { req, err := c.BuildRemoveRequest(ctx, v) if err != nil { return nil, err @@ -146,7 +143,6 @@ func (c *Client) Remove() goa.Endpoint { return nil, err } resp, err := c.RemoveDoer.Do(req) - if err != nil { return nil, goahttp.ErrRequestError("tools", "remove", err) } diff --git a/gen/http/tools/client/encode_decode.go b/gen/http/tools/client/encode_decode.go index acb1d0468..81266c7dc 100644 --- a/gen/http/tools/client/encode_decode.go +++ b/gen/http/tools/client/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools HTTP client encoders and decoders // @@ -10,18 +10,18 @@ package client import ( "bytes" "context" - "io/ioutil" + "io" "net/http" "net/url" tools "github.com/arduino/arduino-create-agent/gen/tools" toolsviews "github.com/arduino/arduino-create-agent/gen/tools/views" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" ) // BuildAvailableRequest instantiates a HTTP request object with method and // path set to call the "tools" service "available" endpoint -func (c *Client) BuildAvailableRequest(ctx context.Context, v interface{}) (*http.Request, error) { +func (c *Client) BuildAvailableRequest(ctx context.Context, v any) (*http.Request, error) { u := &url.URL{Scheme: c.scheme, Host: c.host, Path: AvailableToolsPath()} req, err := http.NewRequest("GET", u.String(), nil) if err != nil { @@ -37,16 +37,16 @@ func (c *Client) BuildAvailableRequest(ctx context.Context, v interface{}) (*htt // DecodeAvailableResponse returns a decoder for responses returned by the // tools available endpoint. restoreBody controls whether the response body // should be restored after having been read. -func DecodeAvailableResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) { - return func(resp *http.Response) (interface{}, error) { +func DecodeAvailableResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (any, error) { if restoreBody { - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return nil, err } - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { defer resp.Body.Close() @@ -63,14 +63,14 @@ func DecodeAvailableResponse(decoder func(*http.Response) goahttp.Decoder, resto } p := NewAvailableToolCollectionOK(body) view := "default" - vres := toolsviews.ToolCollection{p, view} + vres := toolsviews.ToolCollection{Projected: p, View: view} if err = toolsviews.ValidateToolCollection(vres); err != nil { return nil, goahttp.ErrValidationError("tools", "available", err) } res := tools.NewToolCollection(vres) return res, nil default: - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) return nil, goahttp.ErrInvalidResponse("tools", "available", resp.StatusCode, string(body)) } } @@ -78,7 +78,7 @@ func DecodeAvailableResponse(decoder func(*http.Response) goahttp.Decoder, resto // BuildInstalledRequest instantiates a HTTP request object with method and // path set to call the "tools" service "installed" endpoint -func (c *Client) BuildInstalledRequest(ctx context.Context, v interface{}) (*http.Request, error) { +func (c *Client) BuildInstalledRequest(ctx context.Context, v any) (*http.Request, error) { u := &url.URL{Scheme: c.scheme, Host: c.host, Path: InstalledToolsPath()} req, err := http.NewRequest("GET", u.String(), nil) if err != nil { @@ -94,16 +94,16 @@ func (c *Client) BuildInstalledRequest(ctx context.Context, v interface{}) (*htt // DecodeInstalledResponse returns a decoder for responses returned by the // tools installed endpoint. restoreBody controls whether the response body // should be restored after having been read. -func DecodeInstalledResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) { - return func(resp *http.Response) (interface{}, error) { +func DecodeInstalledResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (any, error) { if restoreBody { - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return nil, err } - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { defer resp.Body.Close() @@ -120,14 +120,14 @@ func DecodeInstalledResponse(decoder func(*http.Response) goahttp.Decoder, resto } p := NewInstalledToolCollectionOK(body) view := "default" - vres := toolsviews.ToolCollection{p, view} + vres := toolsviews.ToolCollection{Projected: p, View: view} if err = toolsviews.ValidateToolCollection(vres); err != nil { return nil, goahttp.ErrValidationError("tools", "installed", err) } res := tools.NewToolCollection(vres) return res, nil default: - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) return nil, goahttp.ErrInvalidResponse("tools", "installed", resp.StatusCode, string(body)) } } @@ -135,7 +135,7 @@ func DecodeInstalledResponse(decoder func(*http.Response) goahttp.Decoder, resto // BuildInstallRequest instantiates a HTTP request object with method and path // set to call the "tools" service "install" endpoint -func (c *Client) BuildInstallRequest(ctx context.Context, v interface{}) (*http.Request, error) { +func (c *Client) BuildInstallRequest(ctx context.Context, v any) (*http.Request, error) { u := &url.URL{Scheme: c.scheme, Host: c.host, Path: InstallToolsPath()} req, err := http.NewRequest("POST", u.String(), nil) if err != nil { @@ -150,8 +150,8 @@ func (c *Client) BuildInstallRequest(ctx context.Context, v interface{}) (*http. // EncodeInstallRequest returns an encoder for requests sent to the tools // install server. -func EncodeInstallRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error { - return func(req *http.Request, v interface{}) error { +func EncodeInstallRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error { + return func(req *http.Request, v any) error { p, ok := v.(*tools.ToolPayload) if !ok { return goahttp.ErrInvalidType("tools", "install", "*tools.ToolPayload", v) @@ -167,16 +167,16 @@ func EncodeInstallRequest(encoder func(*http.Request) goahttp.Encoder) func(*htt // DecodeInstallResponse returns a decoder for responses returned by the tools // install endpoint. restoreBody controls whether the response body should be // restored after having been read. -func DecodeInstallResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) { - return func(resp *http.Response) (interface{}, error) { +func DecodeInstallResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (any, error) { if restoreBody { - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return nil, err } - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { defer resp.Body.Close() @@ -193,14 +193,14 @@ func DecodeInstallResponse(decoder func(*http.Response) goahttp.Decoder, restore } p := NewInstallOperationOK(&body) view := "default" - vres := &toolsviews.Operation{p, view} + vres := &toolsviews.Operation{Projected: p, View: view} if err = toolsviews.ValidateOperation(vres); err != nil { return nil, goahttp.ErrValidationError("tools", "install", err) } res := tools.NewOperation(vres) return res, nil default: - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) return nil, goahttp.ErrInvalidResponse("tools", "install", resp.StatusCode, string(body)) } } @@ -208,7 +208,7 @@ func DecodeInstallResponse(decoder func(*http.Response) goahttp.Decoder, restore // BuildRemoveRequest instantiates a HTTP request object with method and path // set to call the "tools" service "remove" endpoint -func (c *Client) BuildRemoveRequest(ctx context.Context, v interface{}) (*http.Request, error) { +func (c *Client) BuildRemoveRequest(ctx context.Context, v any) (*http.Request, error) { var ( packager string name string @@ -237,8 +237,8 @@ func (c *Client) BuildRemoveRequest(ctx context.Context, v interface{}) (*http.R // EncodeRemoveRequest returns an encoder for requests sent to the tools remove // server. -func EncodeRemoveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, interface{}) error { - return func(req *http.Request, v interface{}) error { +func EncodeRemoveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error { + return func(req *http.Request, v any) error { p, ok := v.(*tools.ToolPayload) if !ok { return goahttp.ErrInvalidType("tools", "remove", "*tools.ToolPayload", v) @@ -254,16 +254,16 @@ func EncodeRemoveRequest(encoder func(*http.Request) goahttp.Encoder) func(*http // DecodeRemoveResponse returns a decoder for responses returned by the tools // remove endpoint. restoreBody controls whether the response body should be // restored after having been read. -func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (interface{}, error) { - return func(resp *http.Response) (interface{}, error) { +func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error) { + return func(resp *http.Response) (any, error) { if restoreBody { - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { return nil, err } - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) defer func() { - resp.Body = ioutil.NopCloser(bytes.NewBuffer(b)) + resp.Body = io.NopCloser(bytes.NewBuffer(b)) }() } else { defer resp.Body.Close() @@ -280,15 +280,27 @@ func DecodeRemoveResponse(decoder func(*http.Response) goahttp.Decoder, restoreB } p := NewRemoveOperationOK(&body) view := "default" - vres := &toolsviews.Operation{p, view} + vres := &toolsviews.Operation{Projected: p, View: view} if err = toolsviews.ValidateOperation(vres); err != nil { return nil, goahttp.ErrValidationError("tools", "remove", err) } res := tools.NewOperation(vres) return res, nil default: - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) return nil, goahttp.ErrInvalidResponse("tools", "remove", resp.StatusCode, string(body)) } } } + +// unmarshalToolResponseToToolsviewsToolView builds a value of type +// *toolsviews.ToolView from a value of type *ToolResponse. +func unmarshalToolResponseToToolsviewsToolView(v *ToolResponse) *toolsviews.ToolView { + res := &toolsviews.ToolView{ + Name: v.Name, + Version: v.Version, + Packager: v.Packager, + } + + return res +} diff --git a/gen/http/tools/client/paths.go b/gen/http/tools/client/paths.go index ab66d03f4..112da41a5 100644 --- a/gen/http/tools/client/paths.go +++ b/gen/http/tools/client/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // HTTP request path constructors for the tools service. // diff --git a/gen/http/tools/client/types.go b/gen/http/tools/client/types.go index 255a61504..0b2a81488 100644 --- a/gen/http/tools/client/types.go +++ b/gen/http/tools/client/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools HTTP client types // @@ -10,7 +10,7 @@ package client import ( tools "github.com/arduino/arduino-create-agent/gen/tools" toolsviews "github.com/arduino/arduino-create-agent/gen/tools/views" - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // InstallRequestBody is the type of the "tools" service "install" endpoint @@ -101,12 +101,9 @@ func NewRemoveRequestBody(p *tools.ToolPayload) *RemoveRequestBody { func NewAvailableToolCollectionOK(body AvailableResponseBody) toolsviews.ToolCollectionView { v := make([]*toolsviews.ToolView, len(body)) for i, val := range body { - v[i] = &toolsviews.ToolView{ - Name: val.Name, - Version: val.Version, - Packager: val.Packager, - } + v[i] = unmarshalToolResponseToToolsviewsToolView(val) } + return v } @@ -115,12 +112,9 @@ func NewAvailableToolCollectionOK(body AvailableResponseBody) toolsviews.ToolCol func NewInstalledToolCollectionOK(body InstalledResponseBody) toolsviews.ToolCollectionView { v := make([]*toolsviews.ToolView, len(body)) for i, val := range body { - v[i] = &toolsviews.ToolView{ - Name: val.Name, - Version: val.Version, - Packager: val.Packager, - } + v[i] = unmarshalToolResponseToToolsviewsToolView(val) } + return v } @@ -130,6 +124,7 @@ func NewInstallOperationOK(body *InstallResponseBody) *toolsviews.OperationView v := &toolsviews.OperationView{ Status: body.Status, } + return v } @@ -139,6 +134,7 @@ func NewRemoveOperationOK(body *RemoveResponseBody) *toolsviews.OperationView { v := &toolsviews.OperationView{ Status: body.Status, } + return v } diff --git a/gen/http/tools/server/encode_decode.go b/gen/http/tools/server/encode_decode.go index 5746d12e4..5b09d8e0b 100644 --- a/gen/http/tools/server/encode_decode.go +++ b/gen/http/tools/server/encode_decode.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools HTTP server encoders and decoders // @@ -13,14 +13,14 @@ import ( "net/http" toolsviews "github.com/arduino/arduino-create-agent/gen/tools/views" - goa "goa.design/goa" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // EncodeAvailableResponse returns an encoder for responses returned by the // tools available endpoint. -func EncodeAvailableResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error { - return func(ctx context.Context, w http.ResponseWriter, v interface{}) error { +func EncodeAvailableResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { res := v.(toolsviews.ToolCollection) enc := encoder(ctx, w) body := NewToolResponseCollection(res.Projected) @@ -31,8 +31,8 @@ func EncodeAvailableResponse(encoder func(context.Context, http.ResponseWriter) // EncodeInstalledResponse returns an encoder for responses returned by the // tools installed endpoint. -func EncodeInstalledResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error { - return func(ctx context.Context, w http.ResponseWriter, v interface{}) error { +func EncodeInstalledResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { res := v.(toolsviews.ToolCollection) enc := encoder(ctx, w) body := NewToolResponseCollection(res.Projected) @@ -43,8 +43,8 @@ func EncodeInstalledResponse(encoder func(context.Context, http.ResponseWriter) // EncodeInstallResponse returns an encoder for responses returned by the tools // install endpoint. -func EncodeInstallResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error { - return func(ctx context.Context, w http.ResponseWriter, v interface{}) error { +func EncodeInstallResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { res := v.(*toolsviews.Operation) enc := encoder(ctx, w) body := NewInstallResponseBody(res.Projected) @@ -55,8 +55,8 @@ func EncodeInstallResponse(encoder func(context.Context, http.ResponseWriter) go // DecodeInstallRequest returns a decoder for requests sent to the tools // install endpoint. -func DecodeInstallRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error) { - return func(r *http.Request) (interface{}, error) { +func DecodeInstallRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error) { + return func(r *http.Request) (any, error) { var ( body InstallRequestBody err error @@ -80,8 +80,8 @@ func DecodeInstallRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp // EncodeRemoveResponse returns an encoder for responses returned by the tools // remove endpoint. -func EncodeRemoveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error { - return func(ctx context.Context, w http.ResponseWriter, v interface{}) error { +func EncodeRemoveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error { + return func(ctx context.Context, w http.ResponseWriter, v any) error { res := v.(*toolsviews.Operation) enc := encoder(ctx, w) body := NewRemoveResponseBody(res.Projected) @@ -92,8 +92,8 @@ func EncodeRemoveResponse(encoder func(context.Context, http.ResponseWriter) goa // DecodeRemoveRequest returns a decoder for requests sent to the tools remove // endpoint. -func DecodeRemoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error) { - return func(r *http.Request) (interface{}, error) { +func DecodeRemoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error) { + return func(r *http.Request) (any, error) { var ( body RemoveRequestBody err error @@ -121,3 +121,15 @@ func DecodeRemoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp. return payload, nil } } + +// marshalToolsviewsToolViewToToolResponse builds a value of type *ToolResponse +// from a value of type *toolsviews.ToolView. +func marshalToolsviewsToolViewToToolResponse(v *toolsviews.ToolView) *ToolResponse { + res := &ToolResponse{ + Name: *v.Name, + Version: *v.Version, + Packager: *v.Packager, + } + + return res +} diff --git a/gen/http/tools/server/paths.go b/gen/http/tools/server/paths.go index 49cffd067..7579e9770 100644 --- a/gen/http/tools/server/paths.go +++ b/gen/http/tools/server/paths.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // HTTP request path constructors for the tools service. // diff --git a/gen/http/tools/server/server.go b/gen/http/tools/server/server.go index f758b2c20..af81a4fb9 100644 --- a/gen/http/tools/server/server.go +++ b/gen/http/tools/server/server.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools HTTP server // @@ -12,8 +12,8 @@ import ( "net/http" tools "github.com/arduino/arduino-create-agent/gen/tools" - goa "goa.design/goa" - goahttp "goa.design/goa/http" + goahttp "goa.design/goa/v3/http" + goa "goa.design/goa/v3/pkg" ) // Server lists the tools service endpoint HTTP handlers. @@ -25,12 +25,6 @@ type Server struct { Remove http.Handler } -// ErrorNamer is an interface implemented by generated error structs that -// exposes the name of the error as defined in the design. -type ErrorNamer interface { - ErrorName() string -} - // MountPoint holds information about the mounted endpoints. type MountPoint struct { // Method is the name of the service method served by the mounted HTTP handler. @@ -42,13 +36,19 @@ type MountPoint struct { Pattern string } -// New instantiates HTTP handlers for all the tools service endpoints. +// New instantiates HTTP handlers for all the tools service endpoints using the +// provided encoder and decoder. The handlers are mounted on the given mux +// using the HTTP verb and path defined in the design. errhandler is called +// whenever a response fails to be encoded. formatter is used to format errors +// returned by the service methods prior to encoding. Both errhandler and +// formatter are optional and can be nil. func New( e *tools.Endpoints, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) *Server { return &Server{ Mounts: []*MountPoint{ @@ -57,10 +57,10 @@ func New( {"Install", "POST", "/v2/pkgs/tools/installed"}, {"Remove", "DELETE", "/v2/pkgs/tools/installed/{packager}/{name}/{version}"}, }, - Available: NewAvailableHandler(e.Available, mux, dec, enc, eh), - Installed: NewInstalledHandler(e.Installed, mux, dec, enc, eh), - Install: NewInstallHandler(e.Install, mux, dec, enc, eh), - Remove: NewRemoveHandler(e.Remove, mux, dec, enc, eh), + Available: NewAvailableHandler(e.Available, mux, decoder, encoder, errhandler, formatter), + Installed: NewInstalledHandler(e.Installed, mux, decoder, encoder, errhandler, formatter), + Install: NewInstallHandler(e.Install, mux, decoder, encoder, errhandler, formatter), + Remove: NewRemoveHandler(e.Remove, mux, decoder, encoder, errhandler, formatter), } } @@ -75,6 +75,9 @@ func (s *Server) Use(m func(http.Handler) http.Handler) { s.Remove = m(s.Remove) } +// MethodNames returns the methods served. +func (s *Server) MethodNames() []string { return tools.MethodNames[:] } + // Mount configures the mux to serve the tools endpoints. func Mount(mux goahttp.Muxer, h *Server) { MountAvailableHandler(mux, h.Available) @@ -83,6 +86,11 @@ func Mount(mux goahttp.Muxer, h *Server) { MountRemoveHandler(mux, h.Remove) } +// Mount configures the mux to serve the tools endpoints. +func (s *Server) Mount(mux goahttp.Muxer) { + Mount(mux, s) +} + // MountAvailableHandler configures the mux to serve the "tools" service // "available" endpoint. func MountAvailableHandler(mux goahttp.Muxer, h http.Handler) { @@ -100,29 +108,29 @@ func MountAvailableHandler(mux goahttp.Muxer, h http.Handler) { func NewAvailableHandler( endpoint goa.Endpoint, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler { var ( - encodeResponse = EncodeAvailableResponse(enc) - encodeError = goahttp.ErrorEncoder(enc) + encodeResponse = EncodeAvailableResponse(encoder) + encodeError = goahttp.ErrorEncoder(encoder, formatter) ) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) ctx = context.WithValue(ctx, goa.MethodKey, "available") ctx = context.WithValue(ctx, goa.ServiceKey, "tools") - + var err error res, err := endpoint(ctx, nil) - if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } if err := encodeResponse(ctx, w, res); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } }) } @@ -144,29 +152,29 @@ func MountInstalledHandler(mux goahttp.Muxer, h http.Handler) { func NewInstalledHandler( endpoint goa.Endpoint, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler { var ( - encodeResponse = EncodeInstalledResponse(enc) - encodeError = goahttp.ErrorEncoder(enc) + encodeResponse = EncodeInstalledResponse(encoder) + encodeError = goahttp.ErrorEncoder(encoder, formatter) ) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) ctx = context.WithValue(ctx, goa.MethodKey, "installed") ctx = context.WithValue(ctx, goa.ServiceKey, "tools") - + var err error res, err := endpoint(ctx, nil) - if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } if err := encodeResponse(ctx, w, res); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } }) } @@ -188,14 +196,15 @@ func MountInstallHandler(mux goahttp.Muxer, h http.Handler) { func NewInstallHandler( endpoint goa.Endpoint, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler { var ( - decodeRequest = DecodeInstallRequest(mux, dec) - encodeResponse = EncodeInstallResponse(enc) - encodeError = goahttp.ErrorEncoder(enc) + decodeRequest = DecodeInstallRequest(mux, decoder) + encodeResponse = EncodeInstallResponse(encoder) + encodeError = goahttp.ErrorEncoder(encoder, formatter) ) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) @@ -204,21 +213,19 @@ func NewInstallHandler( payload, err := decodeRequest(r) if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } - res, err := endpoint(ctx, payload) - if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } if err := encodeResponse(ctx, w, res); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } }) } @@ -240,14 +247,15 @@ func MountRemoveHandler(mux goahttp.Muxer, h http.Handler) { func NewRemoveHandler( endpoint goa.Endpoint, mux goahttp.Muxer, - dec func(*http.Request) goahttp.Decoder, - enc func(context.Context, http.ResponseWriter) goahttp.Encoder, - eh func(context.Context, http.ResponseWriter, error), + decoder func(*http.Request) goahttp.Decoder, + encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, + errhandler func(context.Context, http.ResponseWriter, error), + formatter func(ctx context.Context, err error) goahttp.Statuser, ) http.Handler { var ( - decodeRequest = DecodeRemoveRequest(mux, dec) - encodeResponse = EncodeRemoveResponse(enc) - encodeError = goahttp.ErrorEncoder(enc) + decodeRequest = DecodeRemoveRequest(mux, decoder) + encodeResponse = EncodeRemoveResponse(encoder) + encodeError = goahttp.ErrorEncoder(encoder, formatter) ) return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ctx := context.WithValue(r.Context(), goahttp.AcceptTypeKey, r.Header.Get("Accept")) @@ -256,21 +264,19 @@ func NewRemoveHandler( payload, err := decodeRequest(r) if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } - res, err := endpoint(ctx, payload) - if err != nil { if err := encodeError(ctx, w, err); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } return } if err := encodeResponse(ctx, w, res); err != nil { - eh(ctx, w, err) + errhandler(ctx, w, err) } }) } diff --git a/gen/http/tools/server/types.go b/gen/http/tools/server/types.go index 49d37011d..6aaeb823f 100644 --- a/gen/http/tools/server/types.go +++ b/gen/http/tools/server/types.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools HTTP server types // @@ -10,7 +10,7 @@ package server import ( tools "github.com/arduino/arduino-create-agent/gen/tools" toolsviews "github.com/arduino/arduino-create-agent/gen/tools/views" - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // InstallRequestBody is the type of the "tools" service "install" endpoint @@ -74,11 +74,7 @@ type ToolResponse struct { func NewToolResponseCollection(res toolsviews.ToolCollectionView) ToolResponseCollection { body := make([]*ToolResponse, len(res)) for i, val := range res { - body[i] = &ToolResponse{ - Name: *val.Name, - Version: *val.Version, - Packager: *val.Packager, - } + body[i] = marshalToolsviewsToolViewToToolResponse(val) } return body } @@ -110,6 +106,7 @@ func NewInstallToolPayload(body *InstallRequestBody) *tools.ToolPayload { URL: body.URL, Checksum: body.Checksum, } + return v } @@ -122,6 +119,7 @@ func NewRemoveToolPayload(body *RemoveRequestBody, packager string, name string, v.Packager = packager v.Name = name v.Version = version + return v } diff --git a/gen/indexes/client.go b/gen/indexes/client.go index a95c0f640..ca50f7ae0 100644 --- a/gen/indexes/client.go +++ b/gen/indexes/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes client // @@ -10,7 +10,7 @@ package indexes import ( "context" - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // Client is the "indexes" service client. @@ -30,8 +30,11 @@ func NewClient(list, add, remove goa.Endpoint) *Client { } // List calls the "list" endpoint of the "indexes" service. +// List may return the following errors: +// - "invalid_url" (type *goa.ServiceError): url invalid +// - error: internal error func (c *Client) List(ctx context.Context) (res []string, err error) { - var ires interface{} + var ires any ires, err = c.ListEndpoint(ctx, nil) if err != nil { return @@ -40,8 +43,11 @@ func (c *Client) List(ctx context.Context) (res []string, err error) { } // Add calls the "add" endpoint of the "indexes" service. +// Add may return the following errors: +// - "invalid_url" (type *goa.ServiceError): url invalid +// - error: internal error func (c *Client) Add(ctx context.Context, p *IndexPayload) (res *Operation, err error) { - var ires interface{} + var ires any ires, err = c.AddEndpoint(ctx, p) if err != nil { return @@ -50,8 +56,11 @@ func (c *Client) Add(ctx context.Context, p *IndexPayload) (res *Operation, err } // Remove calls the "remove" endpoint of the "indexes" service. +// Remove may return the following errors: +// - "invalid_url" (type *goa.ServiceError): url invalid +// - error: internal error func (c *Client) Remove(ctx context.Context, p *IndexPayload) (res *Operation, err error) { - var ires interface{} + var ires any ires, err = c.RemoveEndpoint(ctx, p) if err != nil { return diff --git a/gen/indexes/endpoints.go b/gen/indexes/endpoints.go index 052938e1e..17b22ff34 100644 --- a/gen/indexes/endpoints.go +++ b/gen/indexes/endpoints.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes endpoints // @@ -10,7 +10,7 @@ package indexes import ( "context" - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // Endpoints wraps the "indexes" service endpoints. @@ -39,7 +39,7 @@ func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) { // NewListEndpoint returns an endpoint function that calls the method "list" of // service "indexes". func NewListEndpoint(s Service) goa.Endpoint { - return func(ctx context.Context, req interface{}) (interface{}, error) { + return func(ctx context.Context, req any) (any, error) { return s.List(ctx) } } @@ -47,7 +47,7 @@ func NewListEndpoint(s Service) goa.Endpoint { // NewAddEndpoint returns an endpoint function that calls the method "add" of // service "indexes". func NewAddEndpoint(s Service) goa.Endpoint { - return func(ctx context.Context, req interface{}) (interface{}, error) { + return func(ctx context.Context, req any) (any, error) { p := req.(*IndexPayload) res, err := s.Add(ctx, p) if err != nil { @@ -61,7 +61,7 @@ func NewAddEndpoint(s Service) goa.Endpoint { // NewRemoveEndpoint returns an endpoint function that calls the method // "remove" of service "indexes". func NewRemoveEndpoint(s Service) goa.Endpoint { - return func(ctx context.Context, req interface{}) (interface{}, error) { + return func(ctx context.Context, req any) (any, error) { p := req.(*IndexPayload) res, err := s.Remove(ctx, p) if err != nil { diff --git a/gen/indexes/service.go b/gen/indexes/service.go index ad57b8f88..784d36cb0 100644 --- a/gen/indexes/service.go +++ b/gen/indexes/service.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes service // @@ -11,7 +11,7 @@ import ( "context" indexesviews "github.com/arduino/arduino-create-agent/gen/indexes/views" - "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // The indexes service manages the package_index files @@ -48,34 +48,20 @@ type Operation struct { // MakeInvalidURL builds a goa.ServiceError from an error. func MakeInvalidURL(err error) *goa.ServiceError { - return &goa.ServiceError{ - Name: "invalid_url", - ID: goa.NewErrorID(), - Message: err.Error(), - } + return goa.NewServiceError(err, "invalid_url", false, false, false) } // NewOperation initializes result type Operation from viewed result type // Operation. func NewOperation(vres *indexesviews.Operation) *Operation { - var res *Operation - switch vres.View { - case "default", "": - res = newOperation(vres.Projected) - } - return res + return newOperation(vres.Projected) } // NewViewedOperation initializes viewed result type Operation from result type // Operation using the given view. func NewViewedOperation(res *Operation, view string) *indexesviews.Operation { - var vres *indexesviews.Operation - switch view { - case "default", "": - p := newOperationView(res) - vres = &indexesviews.Operation{p, "default"} - } - return vres + p := newOperationView(res) + return &indexesviews.Operation{Projected: p, View: "default"} } // newOperation converts projected type Operation to service type Operation. @@ -87,7 +73,7 @@ func newOperation(vres *indexesviews.OperationView) *Operation { return res } -// newOperationView projects result type Operation into projected type +// newOperationView projects result type Operation to projected type // OperationView using the "default" view. func newOperationView(res *Operation) *indexesviews.OperationView { vres := &indexesviews.OperationView{ diff --git a/gen/indexes/views/view.go b/gen/indexes/views/view.go index fb5d90fc8..a01c1a26c 100644 --- a/gen/indexes/views/view.go +++ b/gen/indexes/views/view.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // indexes views // @@ -8,7 +8,7 @@ package views import ( - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // Operation is the viewed result type that is projected based on a view. @@ -26,10 +26,9 @@ type OperationView struct { } var ( - // OperationMap is a map of attribute names in result type Operation indexed by - // view name. + // OperationMap is a map indexing the attribute names of Operation by view name. OperationMap = map[string][]string{ - "default": []string{ + "default": { "status", }, } @@ -42,7 +41,7 @@ func ValidateOperation(result *Operation) (err error) { case "default", "": err = ValidateOperationView(result.Projected) default: - err = goa.InvalidEnumValueError("view", result.View, []interface{}{"default"}) + err = goa.InvalidEnumValueError("view", result.View, []any{"default"}) } return } diff --git a/gen/tools/client.go b/gen/tools/client.go index 8c3cc70f1..71528938e 100644 --- a/gen/tools/client.go +++ b/gen/tools/client.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools client // @@ -10,7 +10,7 @@ package tools import ( "context" - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // Client is the "tools" service client. @@ -33,7 +33,7 @@ func NewClient(available, installed, install, remove goa.Endpoint) *Client { // Available calls the "available" endpoint of the "tools" service. func (c *Client) Available(ctx context.Context) (res ToolCollection, err error) { - var ires interface{} + var ires any ires, err = c.AvailableEndpoint(ctx, nil) if err != nil { return @@ -43,7 +43,7 @@ func (c *Client) Available(ctx context.Context) (res ToolCollection, err error) // Installed calls the "installed" endpoint of the "tools" service. func (c *Client) Installed(ctx context.Context) (res ToolCollection, err error) { - var ires interface{} + var ires any ires, err = c.InstalledEndpoint(ctx, nil) if err != nil { return @@ -53,10 +53,10 @@ func (c *Client) Installed(ctx context.Context) (res ToolCollection, err error) // Install calls the "install" endpoint of the "tools" service. // Install may return the following errors: -// - "not_found" (type *goa.ServiceError): tool not found -// - error: internal error +// - "not_found" (type *goa.ServiceError): tool not found +// - error: internal error func (c *Client) Install(ctx context.Context, p *ToolPayload) (res *Operation, err error) { - var ires interface{} + var ires any ires, err = c.InstallEndpoint(ctx, p) if err != nil { return @@ -66,7 +66,7 @@ func (c *Client) Install(ctx context.Context, p *ToolPayload) (res *Operation, e // Remove calls the "remove" endpoint of the "tools" service. func (c *Client) Remove(ctx context.Context, p *ToolPayload) (res *Operation, err error) { - var ires interface{} + var ires any ires, err = c.RemoveEndpoint(ctx, p) if err != nil { return diff --git a/gen/tools/endpoints.go b/gen/tools/endpoints.go index c2caa0d0a..bdc026550 100644 --- a/gen/tools/endpoints.go +++ b/gen/tools/endpoints.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools endpoints // @@ -10,7 +10,7 @@ package tools import ( "context" - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // Endpoints wraps the "tools" service endpoints. @@ -42,7 +42,7 @@ func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint) { // NewAvailableEndpoint returns an endpoint function that calls the method // "available" of service "tools". func NewAvailableEndpoint(s Service) goa.Endpoint { - return func(ctx context.Context, req interface{}) (interface{}, error) { + return func(ctx context.Context, req any) (any, error) { res, err := s.Available(ctx) if err != nil { return nil, err @@ -55,7 +55,7 @@ func NewAvailableEndpoint(s Service) goa.Endpoint { // NewInstalledEndpoint returns an endpoint function that calls the method // "installed" of service "tools". func NewInstalledEndpoint(s Service) goa.Endpoint { - return func(ctx context.Context, req interface{}) (interface{}, error) { + return func(ctx context.Context, req any) (any, error) { res, err := s.Installed(ctx) if err != nil { return nil, err @@ -68,7 +68,7 @@ func NewInstalledEndpoint(s Service) goa.Endpoint { // NewInstallEndpoint returns an endpoint function that calls the method // "install" of service "tools". func NewInstallEndpoint(s Service) goa.Endpoint { - return func(ctx context.Context, req interface{}) (interface{}, error) { + return func(ctx context.Context, req any) (any, error) { p := req.(*ToolPayload) res, err := s.Install(ctx, p) if err != nil { @@ -82,7 +82,7 @@ func NewInstallEndpoint(s Service) goa.Endpoint { // NewRemoveEndpoint returns an endpoint function that calls the method // "remove" of service "tools". func NewRemoveEndpoint(s Service) goa.Endpoint { - return func(ctx context.Context, req interface{}) (interface{}, error) { + return func(ctx context.Context, req any) (any, error) { p := req.(*ToolPayload) res, err := s.Remove(ctx, p) if err != nil { diff --git a/gen/tools/service.go b/gen/tools/service.go index 12d90c902..783204c4f 100644 --- a/gen/tools/service.go +++ b/gen/tools/service.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools service // @@ -11,7 +11,7 @@ import ( "context" toolsviews "github.com/arduino/arduino-create-agent/gen/tools/views" - "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // The tools service manages the available and installed tools @@ -36,6 +36,22 @@ const ServiceName = "tools" // MethodKey key. var MethodNames = [4]string{"available", "installed", "install", "remove"} +// Operation is the result type of the tools service install method. +type Operation struct { + // The status of the operation + Status string +} + +// A tool is an executable program that can upload sketches. +type Tool struct { + // The name of the tool + Name string + // The version of the tool + Version string + // The packager of the tool + Packager string +} + // ToolCollection is the result type of the tools service available method. type ToolCollection []*Tool @@ -55,75 +71,35 @@ type ToolPayload struct { Checksum *string } -// Operation is the result type of the tools service install method. -type Operation struct { - // The status of the operation - Status string -} - -// A tool is an executable program that can upload sketches. -type Tool struct { - // The name of the tool - Name string - // The version of the tool - Version string - // The packager of the tool - Packager string -} - // MakeNotFound builds a goa.ServiceError from an error. func MakeNotFound(err error) *goa.ServiceError { - return &goa.ServiceError{ - Name: "not_found", - ID: goa.NewErrorID(), - Message: err.Error(), - } + return goa.NewServiceError(err, "not_found", false, false, false) } // NewToolCollection initializes result type ToolCollection from viewed result // type ToolCollection. func NewToolCollection(vres toolsviews.ToolCollection) ToolCollection { - var res ToolCollection - switch vres.View { - case "default", "": - res = newToolCollection(vres.Projected) - } - return res + return newToolCollection(vres.Projected) } // NewViewedToolCollection initializes viewed result type ToolCollection from // result type ToolCollection using the given view. func NewViewedToolCollection(res ToolCollection, view string) toolsviews.ToolCollection { - var vres toolsviews.ToolCollection - switch view { - case "default", "": - p := newToolCollectionView(res) - vres = toolsviews.ToolCollection{p, "default"} - } - return vres + p := newToolCollectionView(res) + return toolsviews.ToolCollection{Projected: p, View: "default"} } // NewOperation initializes result type Operation from viewed result type // Operation. func NewOperation(vres *toolsviews.Operation) *Operation { - var res *Operation - switch vres.View { - case "default", "": - res = newOperation(vres.Projected) - } - return res + return newOperation(vres.Projected) } // NewViewedOperation initializes viewed result type Operation from result type // Operation using the given view. func NewViewedOperation(res *Operation, view string) *toolsviews.Operation { - var vres *toolsviews.Operation - switch view { - case "default", "": - p := newOperationView(res) - vres = &toolsviews.Operation{p, "default"} - } - return vres + p := newOperationView(res) + return &toolsviews.Operation{Projected: p, View: "default"} } // newToolCollection converts projected type ToolCollection to service type @@ -136,8 +112,8 @@ func newToolCollection(vres toolsviews.ToolCollectionView) ToolCollection { return res } -// newToolCollectionView projects result type ToolCollection into projected -// type ToolCollectionView using the "default" view. +// newToolCollectionView projects result type ToolCollection to projected type +// ToolCollectionView using the "default" view. func newToolCollectionView(res ToolCollection) toolsviews.ToolCollectionView { vres := make(toolsviews.ToolCollectionView, len(res)) for i, n := range res { @@ -161,7 +137,7 @@ func newTool(vres *toolsviews.ToolView) *Tool { return res } -// newToolView projects result type Tool into projected type ToolView using the +// newToolView projects result type Tool to projected type ToolView using the // "default" view. func newToolView(res *Tool) *toolsviews.ToolView { vres := &toolsviews.ToolView{ @@ -181,7 +157,7 @@ func newOperation(vres *toolsviews.OperationView) *Operation { return res } -// newOperationView projects result type Operation into projected type +// newOperationView projects result type Operation to projected type // OperationView using the "default" view. func newOperationView(res *Operation) *toolsviews.OperationView { vres := &toolsviews.OperationView{ diff --git a/gen/tools/views/view.go b/gen/tools/views/view.go index 38df0ae7b..4f6fe933d 100644 --- a/gen/tools/views/view.go +++ b/gen/tools/views/view.go @@ -1,4 +1,4 @@ -// Code generated by goa v2.0.0-wip, DO NOT EDIT. +// Code generated by goa v3.12.4, DO NOT EDIT. // // tools views // @@ -8,7 +8,7 @@ package views import ( - goa "goa.design/goa" + goa "goa.design/goa/v3/pkg" ) // ToolCollection is the viewed result type that is projected based on a view. @@ -47,25 +47,24 @@ type OperationView struct { } var ( - // ToolCollectionMap is a map of attribute names in result type ToolCollection - // indexed by view name. + // ToolCollectionMap is a map indexing the attribute names of ToolCollection by + // view name. ToolCollectionMap = map[string][]string{ - "default": []string{ + "default": { "name", "version", "packager", }, } - // OperationMap is a map of attribute names in result type Operation indexed by - // view name. + // OperationMap is a map indexing the attribute names of Operation by view name. OperationMap = map[string][]string{ - "default": []string{ + "default": { "status", }, } - // ToolMap is a map of attribute names in result type Tool indexed by view name. + // ToolMap is a map indexing the attribute names of Tool by view name. ToolMap = map[string][]string{ - "default": []string{ + "default": { "name", "version", "packager", @@ -80,7 +79,7 @@ func ValidateToolCollection(result ToolCollection) (err error) { case "default", "": err = ValidateToolCollectionView(result.Projected) default: - err = goa.InvalidEnumValueError("view", result.View, []interface{}{"default"}) + err = goa.InvalidEnumValueError("view", result.View, []any{"default"}) } return } @@ -92,7 +91,7 @@ func ValidateOperation(result *Operation) (err error) { case "default", "": err = ValidateOperationView(result.Projected) default: - err = goa.InvalidEnumValueError("view", result.View, []interface{}{"default"}) + err = goa.InvalidEnumValueError("view", result.View, []any{"default"}) } return } From c6284583770eae7ccd1a93555d8c51398b13ebd6 Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Thu, 24 Aug 2023 17:54:48 +0200 Subject: [PATCH 4/9] remove doc server followup of #670 since generated doc files are not there anymore --- v2/http.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/v2/http.go b/v2/http.go index a3e9c6318..5cbbc903a 100644 --- a/v2/http.go +++ b/v2/http.go @@ -20,7 +20,6 @@ import ( "net/http" "path/filepath" - docssvr "github.com/arduino/arduino-create-agent/gen/http/docs/server" indexessvr "github.com/arduino/arduino-create-agent/gen/http/indexes/server" toolssvr "github.com/arduino/arduino-create-agent/gen/http/tools/server" indexessvc "github.com/arduino/arduino-create-agent/gen/indexes" @@ -59,10 +58,6 @@ func Server(home string) http.Handler { toolsServer := toolssvr.New(toolsEndpoints, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, errorHandler(logger)) toolssvr.Mount(mux, toolsServer) - // Mount docs - docssvr.New(nil, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, errorHandler(logger)) - docssvr.Mount(mux) - // Mount middlewares handler := middleware.Log(logAdapter)(mux) handler = middleware.RequestID()(handler) From 01746a3c4728904fa3d891b8e337f583a2707e0a Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Thu, 24 Aug 2023 17:56:05 +0200 Subject: [PATCH 5/9] go mod tidy again --- go.mod | 1 + go.sum | 2 ++ 2 files changed, 3 insertions(+) diff --git a/go.mod b/go.mod index c34c9f2fd..f687c7b25 100644 --- a/go.mod +++ b/go.mod @@ -39,6 +39,7 @@ require ( github.com/davidmz/go-pageant v1.0.2 // indirect github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect github.com/dimfeld/httptreemux v5.0.1+incompatible // indirect + github.com/dimfeld/httptreemux/v5 v5.5.0 // indirect github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 // indirect github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 // indirect github.com/getlantern/golog v0.0.0-20190830074920-4ef2e798c2d7 // indirect diff --git a/go.sum b/go.sum index ce5e57288..a1a28de5a 100644 --- a/go.sum +++ b/go.sum @@ -27,6 +27,8 @@ github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZs github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= +github.com/dimfeld/httptreemux/v5 v5.5.0 h1:p8jkiMrCuZ0CmhwYLcbNbl7DDo21fozhKHQ2PccwOFQ= +github.com/dimfeld/httptreemux/v5 v5.5.0/go.mod h1:QeEylH57C0v3VO0tkKraVz9oD3Uu93CKPnTLbsidvSw= github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4= github.com/getlantern/context v0.0.0-20190109183933-c447772a6520/go.mod h1:L+mq6/vvYHKjCX2oez0CgEAJmbq1fbb/oNJIWQkBybY= github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 h1:6uJ+sZ/e03gkbqZ0kUG6mfKoqDb4XMAzMIwlajq19So= From 00ba8f275680e49086b40bb61c111d6afcf6d8cb Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Thu, 24 Aug 2023 18:31:25 +0200 Subject: [PATCH 6/9] bump to goa v3 also in v2 package --- go.mod | 2 -- go.sum | 4 ---- v2/http.go | 4 ++-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index f687c7b25..5fbf2a7a2 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,6 @@ require ( github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9 go.bug.st/downloader/v2 v2.1.1 go.bug.st/serial v1.4.1 - goa.design/goa v1.0.1-0.20190116060309-40843d63b0e4 goa.design/goa/v3 v3.12.4 golang.org/x/crypto v0.12.0 golang.org/x/sys v0.11.0 @@ -38,7 +37,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/davidmz/go-pageant v1.0.2 // indirect github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect - github.com/dimfeld/httptreemux v5.0.1+incompatible // indirect github.com/dimfeld/httptreemux/v5 v5.5.0 // indirect github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 // indirect github.com/getlantern/errors v0.0.0-20190325191628-abdb3e3e36f7 // indirect diff --git a/go.sum b/go.sum index a1a28de5a..3e93edd5f 100644 --- a/go.sum +++ b/go.sum @@ -25,8 +25,6 @@ github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454Wv github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 h1:MGKhKyiYrvMDZsmLR/+RGffQSXwEkXgfLSA08qDn9AI= github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598/go.mod h1:0FpDmbrt36utu8jEmeU05dPC9AB5tsLYVVi+ZHfyuwI= -github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4wg/adLLz5xh5CmpiCA= -github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= github.com/dimfeld/httptreemux/v5 v5.5.0 h1:p8jkiMrCuZ0CmhwYLcbNbl7DDo21fozhKHQ2PccwOFQ= github.com/dimfeld/httptreemux/v5 v5.5.0/go.mod h1:QeEylH57C0v3VO0tkKraVz9oD3Uu93CKPnTLbsidvSw= github.com/getlantern/context v0.0.0-20190109183933-c447772a6520 h1:NRUJuo3v3WGC/g5YiyF790gut6oQr5f3FBI88Wv0dx4= @@ -169,8 +167,6 @@ go.bug.st/downloader/v2 v2.1.1 h1:nyqbUizo3E2IxCCm4YFac4FtSqqFpqWP+Aae5GCMuw4= go.bug.st/downloader/v2 v2.1.1/go.mod h1:VZW2V1iGKV8rJL2ZEGIDzzBeKowYv34AedJz13RzVII= go.bug.st/serial v1.4.1 h1:AwYUNixVf90XymNeJaUkMrPp+GZQe3RMFQmpVdHIUK8= go.bug.st/serial v1.4.1/go.mod h1:z8CesKorE90Qr/oRSJiEuvzYRKol9r/anJZEb5kt304= -goa.design/goa v1.0.1-0.20190116060309-40843d63b0e4 h1:+qjyw15FIXxmcA/QmrDrofQPLMAav6X2v+UYH/pQq8A= -goa.design/goa v1.0.1-0.20190116060309-40843d63b0e4/go.mod h1:NnzBwdNktihbNek+pPiFMQP9PPFsUt8MMPPyo9opDSo= goa.design/goa/v3 v3.12.4 h1:g3G8yHLk+jyUDNRL2sNg+ZcoQ62zY83rpgagAQ5VmTA= goa.design/goa/v3 v3.12.4/go.mod h1:h1vjyGQ+rqWK+VvnqN8oLcpqaHrKIyuY1Vx+jhKodpg= golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= diff --git a/v2/http.go b/v2/http.go index 5cbbc903a..4233d6934 100644 --- a/v2/http.go +++ b/v2/http.go @@ -26,8 +26,8 @@ import ( toolssvc "github.com/arduino/arduino-create-agent/gen/tools" "github.com/arduino/arduino-create-agent/v2/pkgs" "github.com/sirupsen/logrus" - goahttp "goa.design/goa/http" - "goa.design/goa/http/middleware" + goahttp "goa.design/goa/v3/http" + "goa.design/goa/v3/http/middleware" ) // Server is the actual server From e8643693f32b1c25e9da638d6df43e9a371c5b16 Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Thu, 24 Aug 2023 18:32:37 +0200 Subject: [PATCH 7/9] fixes after bump to goa v3 (needs to be tested) --- v2/http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/http.go b/v2/http.go index 4233d6934..1aab59796 100644 --- a/v2/http.go +++ b/v2/http.go @@ -46,7 +46,7 @@ func Server(home string) http.Handler { } indexesEndpoints := indexessvc.NewEndpoints(&indexesSvc) indexesServer := indexessvr.New(indexesEndpoints, mux, goahttp.RequestDecoder, - goahttp.ResponseEncoder, errorHandler(logger)) + goahttp.ResponseEncoder, errorHandler(logger), nil) indexessvr.Mount(mux, indexesServer) // Mount tools @@ -55,7 +55,7 @@ func Server(home string) http.Handler { Indexes: &indexesSvc, } toolsEndpoints := toolssvc.NewEndpoints(&toolsSvc) - toolsServer := toolssvr.New(toolsEndpoints, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, errorHandler(logger)) + toolsServer := toolssvr.New(toolsEndpoints, mux, goahttp.RequestDecoder, goahttp.ResponseEncoder, errorHandler(logger), nil) toolssvr.Mount(mux, toolsServer) // Mount middlewares @@ -70,7 +70,7 @@ func Server(home string) http.Handler { // to correlate. func errorHandler(logger *logrus.Logger) func(context.Context, http.ResponseWriter, error) { return func(ctx context.Context, w http.ResponseWriter, err error) { - id := ctx.Value(middleware.RequestIDKey).(string) + id := ctx.Value(middleware.RequestID).(string) w.Write([]byte("[" + id + "] encoding: " + err.Error())) logger.Printf("[%s] ERROR: %s", id, err.Error()) } From 70a8d8344014738de21255df470fc4004e4e9ee3 Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Fri, 25 Aug 2023 12:10:46 +0200 Subject: [PATCH 8/9] update license cache --- .../v5.dep.yml} | 6 +-- .../go/github.com/google/uuid.dep.yml | 38 +++++++++++++++++++ .../go/github.com/gorilla/websocket.dep.yml | 2 +- .../go/goa.design/goa/{ => v3}/http.dep.yml | 11 +++--- .../goa/{ => v3}/http/middleware.dep.yml | 11 +++--- .../v3/middleware.dep.yml} | 10 ++--- .../go/goa.design/goa/v3/pkg.dep.yml | 34 +++++++++++++++++ .../go/golang.org/x/crypto/blowfish.dep.yml | 6 +-- .../go/golang.org/x/crypto/cast5.dep.yml | 6 +-- .../go/golang.org/x/crypto/curve25519.dep.yml | 6 +-- .../go/golang.org/x/crypto/ed25519.dep.yml | 6 +-- .../go/golang.org/x/crypto/openpgp.dep.yml | 6 +-- .../golang.org/x/crypto/openpgp/armor.dep.yml | 6 +-- .../x/crypto/openpgp/elgamal.dep.yml | 6 +-- .../x/crypto/openpgp/errors.dep.yml | 6 +-- .../x/crypto/openpgp/packet.dep.yml | 6 +-- .../golang.org/x/crypto/openpgp/s2k.dep.yml | 6 +-- .../go/golang.org/x/crypto/sha3.dep.yml | 6 +-- .../go/golang.org/x/crypto/ssh.dep.yml | 6 +-- .../go/golang.org/x/crypto/ssh/agent.dep.yml | 6 +-- .../crypto/ssh/internal/bcrypt_pbkdf.dep.yml | 6 +-- .../go/golang.org/x/net/bpf.dep.yml | 6 +-- .../go/golang.org/x/net/http2.dep.yml | 6 +-- .../go/golang.org/x/net/http2/h2c.dep.yml | 6 +-- .../go/golang.org/x/net/internal/iana.dep.yml | 6 +-- .../golang.org/x/net/internal/socket.dep.yml | 6 +-- .../go/golang.org/x/net/ipv4.dep.yml | 6 +-- .../go/golang.org/x/net/ipv6.dep.yml | 6 +-- .../go/golang.org/x/sys/unix.dep.yml | 6 +-- .../x/text/internal/language.dep.yml | 6 +-- .../x/text/internal/language/compact.dep.yml | 6 +-- .../go/golang.org/x/text/internal/tag.dep.yml | 6 +-- .../go/golang.org/x/text/language.dep.yml | 6 +-- .../protobuf/encoding/protowire.dep.yml | 6 +-- .../protobuf/internal/detrand.dep.yml | 6 +-- .../internal/encoding/messageset.dep.yml | 6 +-- .../protobuf/internal/errors.dep.yml | 6 +-- .../protobuf/internal/flags.dep.yml | 6 +-- .../protobuf/internal/genid.dep.yml | 6 +-- .../protobuf/internal/order.dep.yml | 6 +-- .../protobuf/internal/pragma.dep.yml | 6 +-- .../protobuf/internal/strs.dep.yml | 6 +-- .../google.golang.org/protobuf/proto.dep.yml | 6 +-- .../protobuf/reflect/protoreflect.dep.yml | 6 +-- .../protobuf/reflect/protoregistry.dep.yml | 6 +-- .../protobuf/runtime/protoiface.dep.yml | 6 +-- 46 files changed, 210 insertions(+), 136 deletions(-) rename .licenses/arduino-create-agent/go/github.com/dimfeld/{httptreemux.dep.yml => httptreemux/v5.dep.yml} (91%) create mode 100644 .licenses/arduino-create-agent/go/github.com/google/uuid.dep.yml rename .licenses/arduino-create-agent/go/goa.design/goa/{ => v3}/http.dep.yml (84%) rename .licenses/arduino-create-agent/go/goa.design/goa/{ => v3}/http/middleware.dep.yml (82%) rename .licenses/arduino-create-agent/go/goa.design/{goa.dep.yml => goa/v3/middleware.dep.yml} (85%) create mode 100644 .licenses/arduino-create-agent/go/goa.design/goa/v3/pkg.dep.yml diff --git a/.licenses/arduino-create-agent/go/github.com/dimfeld/httptreemux.dep.yml b/.licenses/arduino-create-agent/go/github.com/dimfeld/httptreemux/v5.dep.yml similarity index 91% rename from .licenses/arduino-create-agent/go/github.com/dimfeld/httptreemux.dep.yml rename to .licenses/arduino-create-agent/go/github.com/dimfeld/httptreemux/v5.dep.yml index 1fe733b11..768570786 100644 --- a/.licenses/arduino-create-agent/go/github.com/dimfeld/httptreemux.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/dimfeld/httptreemux/v5.dep.yml @@ -1,10 +1,10 @@ --- -name: github.com/dimfeld/httptreemux -version: v5.0.1+incompatible +name: github.com/dimfeld/httptreemux/v5 +version: v5.5.0 type: go summary: This is inspired by Julien Schmidt's httprouter, in that it uses a patricia tree, but the implementation is rather different. -homepage: https://pkg.go.dev/github.com/dimfeld/httptreemux +homepage: https://pkg.go.dev/github.com/dimfeld/httptreemux/v5 license: mit licenses: - sources: LICENSE diff --git a/.licenses/arduino-create-agent/go/github.com/google/uuid.dep.yml b/.licenses/arduino-create-agent/go/github.com/google/uuid.dep.yml new file mode 100644 index 000000000..7f334eb6e --- /dev/null +++ b/.licenses/arduino-create-agent/go/github.com/google/uuid.dep.yml @@ -0,0 +1,38 @@ +--- +name: github.com/google/uuid +version: v1.3.0 +type: go +summary: Package uuid generates and inspects UUIDs. +homepage: https://pkg.go.dev/github.com/google/uuid +license: bsd-3-clause +licenses: +- sources: LICENSE + text: | + Copyright (c) 2009,2014 Google Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +notices: [] diff --git a/.licenses/arduino-create-agent/go/github.com/gorilla/websocket.dep.yml b/.licenses/arduino-create-agent/go/github.com/gorilla/websocket.dep.yml index 47a7a9411..b3abb5163 100644 --- a/.licenses/arduino-create-agent/go/github.com/gorilla/websocket.dep.yml +++ b/.licenses/arduino-create-agent/go/github.com/gorilla/websocket.dep.yml @@ -1,6 +1,6 @@ --- name: github.com/gorilla/websocket -version: v1.4.0 +version: v1.5.0 type: go summary: Package websocket implements the WebSocket protocol defined in RFC 6455. homepage: https://pkg.go.dev/github.com/gorilla/websocket diff --git a/.licenses/arduino-create-agent/go/goa.design/goa/http.dep.yml b/.licenses/arduino-create-agent/go/goa.design/goa/v3/http.dep.yml similarity index 84% rename from .licenses/arduino-create-agent/go/goa.design/goa/http.dep.yml rename to .licenses/arduino-create-agent/go/goa.design/goa/v3/http.dep.yml index 8c69b62ff..2f5b72763 100644 --- a/.licenses/arduino-create-agent/go/goa.design/goa/http.dep.yml +++ b/.licenses/arduino-create-agent/go/goa.design/goa/v3/http.dep.yml @@ -1,12 +1,13 @@ --- -name: goa.design/goa/http -version: v1.0.1-0.20190116060309-40843d63b0e4 +name: goa.design/goa/v3/http +version: v3.12.4 type: go -summary: -homepage: https://pkg.go.dev/goa.design/goa/http +summary: Package http contains HTTP specific constructs that complement the code generated + by Goa. +homepage: https://pkg.go.dev/goa.design/goa/v3/http license: mit licenses: -- sources: goa@v1.0.1-0.20190116060309-40843d63b0e4/LICENSE +- sources: v3@v3.12.4/LICENSE text: | The MIT License (MIT) diff --git a/.licenses/arduino-create-agent/go/goa.design/goa/http/middleware.dep.yml b/.licenses/arduino-create-agent/go/goa.design/goa/v3/http/middleware.dep.yml similarity index 82% rename from .licenses/arduino-create-agent/go/goa.design/goa/http/middleware.dep.yml rename to .licenses/arduino-create-agent/go/goa.design/goa/v3/http/middleware.dep.yml index 6945f1cdb..bd9bbbf48 100644 --- a/.licenses/arduino-create-agent/go/goa.design/goa/http/middleware.dep.yml +++ b/.licenses/arduino-create-agent/go/goa.design/goa/v3/http/middleware.dep.yml @@ -1,12 +1,13 @@ --- -name: goa.design/goa/http/middleware -version: v1.0.1-0.20190116060309-40843d63b0e4 +name: goa.design/goa/v3/http/middleware +version: v3.12.4 type: go -summary: -homepage: https://pkg.go.dev/goa.design/goa/http/middleware +summary: Package middleware contains HTTP middlewares that wrap a HTTP handler to + provide additional functionality. +homepage: https://pkg.go.dev/goa.design/goa/v3/http/middleware license: mit licenses: -- sources: goa@v1.0.1-0.20190116060309-40843d63b0e4/LICENSE +- sources: v3@v3.12.4/LICENSE text: | The MIT License (MIT) diff --git a/.licenses/arduino-create-agent/go/goa.design/goa.dep.yml b/.licenses/arduino-create-agent/go/goa.design/goa/v3/middleware.dep.yml similarity index 85% rename from .licenses/arduino-create-agent/go/goa.design/goa.dep.yml rename to .licenses/arduino-create-agent/go/goa.design/goa/v3/middleware.dep.yml index 0324e20a3..07fd2adbd 100644 --- a/.licenses/arduino-create-agent/go/goa.design/goa.dep.yml +++ b/.licenses/arduino-create-agent/go/goa.design/goa/v3/middleware.dep.yml @@ -1,12 +1,12 @@ --- -name: goa.design/goa -version: v1.0.1-0.20190116060309-40843d63b0e4 +name: goa.design/goa/v3/middleware +version: v3.12.4 type: go -summary: -homepage: https://pkg.go.dev/goa.design/goa +summary: Package middleware contains transport independent middlewares. +homepage: https://pkg.go.dev/goa.design/goa/v3/middleware license: mit licenses: -- sources: LICENSE +- sources: v3@v3.12.4/LICENSE text: | The MIT License (MIT) diff --git a/.licenses/arduino-create-agent/go/goa.design/goa/v3/pkg.dep.yml b/.licenses/arduino-create-agent/go/goa.design/goa/v3/pkg.dep.yml new file mode 100644 index 000000000..73b6cd954 --- /dev/null +++ b/.licenses/arduino-create-agent/go/goa.design/goa/v3/pkg.dep.yml @@ -0,0 +1,34 @@ +--- +name: goa.design/goa/v3/pkg +version: v3.12.4 +type: go +summary: Package goa implements a Go framework for writing microservices that promotes + best practice by providing a single source of truth from which server code, client + code, and documentation is derived. +homepage: https://pkg.go.dev/goa.design/goa/v3/pkg +license: mit +licenses: +- sources: v3@v3.12.4/LICENSE + text: | + The MIT License (MIT) + + Copyright (c) 2015 Raphael Simon and goa Contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +notices: [] diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/blowfish.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/blowfish.dep.yml index 32542ee80..2b03d90da 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/blowfish.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/blowfish.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/crypto/blowfish -version: v0.9.0 +version: v0.12.0 type: go summary: Package blowfish implements Bruce Schneier's Blowfish encryption algorithm. homepage: https://pkg.go.dev/golang.org/x/crypto/blowfish license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml index 07797706d..e6eb77a48 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/cast5.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/crypto/cast5 -version: v0.9.0 +version: v0.12.0 type: go summary: Package cast5 implements CAST5, as defined in RFC 2144. homepage: https://pkg.go.dev/golang.org/x/crypto/cast5 license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/curve25519.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/curve25519.dep.yml index 87fad2602..49745efc0 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/curve25519.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/curve25519.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/crypto/curve25519 -version: v0.9.0 +version: v0.12.0 type: go summary: Package curve25519 provides an implementation of the X25519 function, which performs scalar multiplication on the elliptic curve known as Curve25519. homepage: https://pkg.go.dev/golang.org/x/crypto/curve25519 license: other licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/ed25519.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/ed25519.dep.yml index a78617c44..8f9003434 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/ed25519.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/ed25519.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/crypto/ed25519 -version: v0.9.0 +version: v0.12.0 type: go summary: Package ed25519 implements the Ed25519 signature algorithm. homepage: https://pkg.go.dev/golang.org/x/crypto/ed25519 license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp.dep.yml index 970ce11cb..1f042d482 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/crypto/openpgp -version: v0.9.0 +version: v0.12.0 type: go summary: Package openpgp implements high level operations on OpenPGP messages. homepage: https://pkg.go.dev/golang.org/x/crypto/openpgp license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/armor.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/armor.dep.yml index e21bf90be..0d86c7467 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/armor.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/armor.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/crypto/openpgp/armor -version: v0.9.0 +version: v0.12.0 type: go summary: Package armor implements OpenPGP ASCII Armor, see RFC 4880. homepage: https://pkg.go.dev/golang.org/x/crypto/openpgp/armor license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/elgamal.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/elgamal.dep.yml index 938c50dea..939bed409 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/elgamal.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/elgamal.dep.yml @@ -1,6 +1,6 @@ --- name: golang.org/x/crypto/openpgp/elgamal -version: v0.9.0 +version: v0.12.0 type: go summary: Package elgamal implements ElGamal encryption, suitable for OpenPGP, as specified in "A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms," @@ -8,7 +8,7 @@ summary: Package elgamal implements ElGamal encryption, suitable for OpenPGP, as homepage: https://pkg.go.dev/golang.org/x/crypto/openpgp/elgamal license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -37,7 +37,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/errors.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/errors.dep.yml index a1e4a4eed..e8835b050 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/errors.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/errors.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/crypto/openpgp/errors -version: v0.9.0 +version: v0.12.0 type: go summary: Package errors contains common error types for the OpenPGP packages. homepage: https://pkg.go.dev/golang.org/x/crypto/openpgp/errors license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/packet.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/packet.dep.yml index d8f8967e3..0affbd8cd 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/packet.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/packet.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/crypto/openpgp/packet -version: v0.9.0 +version: v0.12.0 type: go summary: Package packet implements parsing and serialization of OpenPGP packets, as specified in RFC 4880. homepage: https://pkg.go.dev/golang.org/x/crypto/openpgp/packet license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/s2k.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/s2k.dep.yml index 246dc47dd..2bd72897a 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/s2k.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/openpgp/s2k.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/crypto/openpgp/s2k -version: v0.9.0 +version: v0.12.0 type: go summary: Package s2k implements the various OpenPGP string-to-key transforms as specified in RFC 4800 section 3.7.1. homepage: https://pkg.go.dev/golang.org/x/crypto/openpgp/s2k license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml index 3300fee37..390a4a942 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/sha3.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/crypto/sha3 -version: v0.9.0 +version: v0.12.0 type: go summary: Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. homepage: https://pkg.go.dev/golang.org/x/crypto/sha3 license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh.dep.yml index 7bc31a8e2..d21b73b20 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/crypto/ssh -version: v0.9.0 +version: v0.12.0 type: go summary: Package ssh implements an SSH client and server. homepage: https://pkg.go.dev/golang.org/x/crypto/ssh license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh/agent.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh/agent.dep.yml index f27a4a5d7..6972aa661 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh/agent.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh/agent.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/crypto/ssh/agent -version: v0.9.0 +version: v0.12.0 type: go summary: Package agent implements the ssh-agent protocol, and provides both a client and a server. homepage: https://pkg.go.dev/golang.org/x/crypto/ssh/agent license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh/internal/bcrypt_pbkdf.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh/internal/bcrypt_pbkdf.dep.yml index 986ccaff9..a139cbc4c 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh/internal/bcrypt_pbkdf.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/crypto/ssh/internal/bcrypt_pbkdf.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/crypto/ssh/internal/bcrypt_pbkdf -version: v0.9.0 +version: v0.12.0 type: go summary: Package bcrypt_pbkdf implements bcrypt_pbkdf(3) from OpenBSD. homepage: https://pkg.go.dev/golang.org/x/crypto/ssh/internal/bcrypt_pbkdf license: bsd-3-clause licenses: -- sources: crypto@v0.9.0/LICENSE +- sources: crypto@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: crypto@v0.9.0/PATENTS +- sources: crypto@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/bpf.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/bpf.dep.yml index 7a5ce7ec7..9e307f7c1 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/net/bpf.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/net/bpf.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/net/bpf -version: v0.10.0 +version: v0.14.0 type: go summary: Package bpf implements marshaling and unmarshaling of programs for the Berkeley Packet Filter virtual machine, and provides a Go implementation of the virtual machine. homepage: https://pkg.go.dev/golang.org/x/net/bpf license: bsd-3-clause licenses: -- sources: net@v0.10.0/LICENSE +- sources: net@v0.14.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: net@v0.10.0/PATENTS +- sources: net@v0.14.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml index d0b815028..cbf8c0acf 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/net/http2.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/net/http2 -version: v0.10.0 +version: v0.14.0 type: go summary: Package http2 implements the HTTP/2 protocol. homepage: https://pkg.go.dev/golang.org/x/net/http2 license: bsd-3-clause licenses: -- sources: net@v0.10.0/LICENSE +- sources: net@v0.14.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: net@v0.10.0/PATENTS +- sources: net@v0.14.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml index 7a42a0b3e..7664817d2 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/net/http2/h2c.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/net/http2/h2c -version: v0.10.0 +version: v0.14.0 type: go summary: Package h2c implements the unencrypted "h2c" form of HTTP/2. homepage: https://pkg.go.dev/golang.org/x/net/http2/h2c license: bsd-3-clause licenses: -- sources: net@v0.10.0/LICENSE +- sources: net@v0.14.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: net@v0.10.0/PATENTS +- sources: net@v0.14.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/internal/iana.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/internal/iana.dep.yml index 84f4c1e16..0e2f3f5f2 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/net/internal/iana.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/net/internal/iana.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/net/internal/iana -version: v0.10.0 +version: v0.14.0 type: go summary: Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA). homepage: https://pkg.go.dev/golang.org/x/net/internal/iana license: bsd-3-clause licenses: -- sources: net@v0.10.0/LICENSE +- sources: net@v0.14.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: net@v0.10.0/PATENTS +- sources: net@v0.14.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socket.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socket.dep.yml index 1b693f0a2..c6297a5d0 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socket.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/net/internal/socket.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/net/internal/socket -version: v0.10.0 +version: v0.14.0 type: go summary: Package socket provides a portable interface for socket system calls. homepage: https://pkg.go.dev/golang.org/x/net/internal/socket license: bsd-3-clause licenses: -- sources: net@v0.10.0/LICENSE +- sources: net@v0.14.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: net@v0.10.0/PATENTS +- sources: net@v0.14.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/ipv4.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/ipv4.dep.yml index eb327c756..a2266173d 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/net/ipv4.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/net/ipv4.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/net/ipv4 -version: v0.10.0 +version: v0.14.0 type: go summary: Package ipv4 implements IP-level socket options for the Internet Protocol version 4. homepage: https://pkg.go.dev/golang.org/x/net/ipv4 license: bsd-3-clause licenses: -- sources: net@v0.10.0/LICENSE +- sources: net@v0.14.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: net@v0.10.0/PATENTS +- sources: net@v0.14.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/net/ipv6.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/net/ipv6.dep.yml index 197505ab8..4d272a7a7 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/net/ipv6.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/net/ipv6.dep.yml @@ -1,13 +1,13 @@ --- name: golang.org/x/net/ipv6 -version: v0.10.0 +version: v0.14.0 type: go summary: Package ipv6 implements IP-level socket options for the Internet Protocol version 6. homepage: https://pkg.go.dev/golang.org/x/net/ipv6 license: bsd-3-clause licenses: -- sources: net@v0.10.0/LICENSE +- sources: net@v0.14.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: net@v0.10.0/PATENTS +- sources: net@v0.14.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml index aeb5367d3..c762d63dc 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/sys/unix.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/sys/unix -version: v0.8.0 +version: v0.11.0 type: go summary: Package unix contains an interface to the low-level operating system primitives. homepage: https://pkg.go.dev/golang.org/x/sys/unix license: bsd-3-clause licenses: -- sources: sys@v0.8.0/LICENSE +- sources: sys@v0.11.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: sys@v0.8.0/PATENTS +- sources: sys@v0.11.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml index ee6bc7364..85143d519 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/text/internal/language -version: v0.9.0 +version: v0.12.0 type: go summary: homepage: https://pkg.go.dev/golang.org/x/text/internal/language license: bsd-3-clause licenses: -- sources: text@v0.9.0/LICENSE +- sources: text@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: text@v0.9.0/PATENTS +- sources: text@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language/compact.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language/compact.dep.yml index eeb0da1d6..bdff88a8a 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language/compact.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/language/compact.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/text/internal/language/compact -version: v0.9.0 +version: v0.12.0 type: go summary: Package compact defines a compact representation of language tags. homepage: https://pkg.go.dev/golang.org/x/text/internal/language/compact license: bsd-3-clause licenses: -- sources: text@v0.9.0/LICENSE +- sources: text@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: text@v0.9.0/PATENTS +- sources: text@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/tag.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/tag.dep.yml index 86d4f6934..aca4fbcca 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/text/internal/tag.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/text/internal/tag.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/text/internal/tag -version: v0.9.0 +version: v0.12.0 type: go summary: Package tag contains functionality handling tags and related data. homepage: https://pkg.go.dev/golang.org/x/text/internal/tag license: bsd-3-clause licenses: -- sources: text@v0.9.0/LICENSE +- sources: text@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: text@v0.9.0/PATENTS +- sources: text@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/golang.org/x/text/language.dep.yml b/.licenses/arduino-create-agent/go/golang.org/x/text/language.dep.yml index e174298a5..266a8d28e 100644 --- a/.licenses/arduino-create-agent/go/golang.org/x/text/language.dep.yml +++ b/.licenses/arduino-create-agent/go/golang.org/x/text/language.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/text/language -version: v0.9.0 +version: v0.12.0 type: go summary: Package language implements BCP 47 language tags and related functionality. homepage: https://pkg.go.dev/golang.org/x/text/language license: bsd-3-clause licenses: -- sources: text@v0.9.0/LICENSE +- sources: text@v0.12.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: text@v0.9.0/PATENTS +- sources: text@v0.12.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml index beb0e7880..92450adf2 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/encoding/protowire.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/encoding/protowire -version: v1.30.0 +version: v1.31.0 type: go summary: Package protowire parses and formats the raw wire encoding. homepage: https://pkg.go.dev/google.golang.org/protobuf/encoding/protowire license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml index 7cb833aa4..5a3ce24f0 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/detrand.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/internal/detrand -version: v1.30.0 +version: v1.31.0 type: go summary: Package detrand provides deterministically random functionality. homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/detrand license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml index 98ff26bf9..894b34a4f 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/encoding/messageset.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/internal/encoding/messageset -version: v1.30.0 +version: v1.31.0 type: go summary: Package messageset encodes and decodes the obsolete MessageSet wire format. homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/encoding/messageset license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml index 3cefaae5e..abaf8506d 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/errors.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/internal/errors -version: v1.30.0 +version: v1.31.0 type: go summary: Package errors implements functions to manipulate errors. homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/errors license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml index c8abf3682..00b7eb5f6 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/flags.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/internal/flags -version: v1.30.0 +version: v1.31.0 type: go summary: Package flags provides a set of flags controlled by build tags. homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/flags license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml index 4ac0531da..c7cebaba3 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/genid.dep.yml @@ -1,13 +1,13 @@ --- name: google.golang.org/protobuf/internal/genid -version: v1.30.0 +version: v1.31.0 type: go summary: Package genid contains constants for declarations in descriptor.proto and the well-known types. homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/genid license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml index 9c2ea0a9f..7726c9988 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/order.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/internal/order -version: v1.30.0 +version: v1.31.0 type: go summary: Package order provides ordered access to messages and maps. homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/order license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml index 34e7153c3..7dac9ae78 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/pragma.dep.yml @@ -1,13 +1,13 @@ --- name: google.golang.org/protobuf/internal/pragma -version: v1.30.0 +version: v1.31.0 type: go summary: Package pragma provides types that can be embedded into a struct to statically enforce or prevent certain language properties. homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/pragma license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml index 1fc7f9fa6..4e22c9344 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/internal/strs.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/internal/strs -version: v1.30.0 +version: v1.31.0 type: go summary: Package strs provides string manipulation functionality specific to protobuf. homepage: https://pkg.go.dev/google.golang.org/protobuf/internal/strs license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml index 8bdc4a98a..a898c7fb7 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/proto.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/proto -version: v1.30.0 +version: v1.31.0 type: go summary: Package proto provides functions operating on protocol buffer messages. homepage: https://pkg.go.dev/google.golang.org/protobuf/proto license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml index 52ad5040a..31c905bac 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoreflect.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/reflect/protoreflect -version: v1.30.0 +version: v1.31.0 type: go summary: Package protoreflect provides interfaces to dynamically manipulate messages. homepage: https://pkg.go.dev/google.golang.org/protobuf/reflect/protoreflect license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml index e96904398..15277039f 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/reflect/protoregistry.dep.yml @@ -1,13 +1,13 @@ --- name: google.golang.org/protobuf/reflect/protoregistry -version: v1.30.0 +version: v1.31.0 type: go summary: Package protoregistry provides data structures to register and lookup protobuf descriptor types. homepage: https://pkg.go.dev/google.golang.org/protobuf/reflect/protoregistry license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -36,7 +36,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) diff --git a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml index 92c41e498..873b8907e 100644 --- a/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml +++ b/.licenses/arduino-create-agent/go/google.golang.org/protobuf/runtime/protoiface.dep.yml @@ -1,12 +1,12 @@ --- name: google.golang.org/protobuf/runtime/protoiface -version: v1.30.0 +version: v1.31.0 type: go summary: Package protoiface contains types referenced or implemented by messages. homepage: https://pkg.go.dev/google.golang.org/protobuf/runtime/protoiface license: bsd-3-clause licenses: -- sources: protobuf@v1.30.0/LICENSE +- sources: protobuf@v1.31.0/LICENSE text: | Copyright (c) 2018 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: protobuf@v1.30.0/PATENTS +- sources: protobuf@v1.31.0/PATENTS text: | Additional IP Rights Grant (Patents) From b89c484584f785a9d14f0e42e1141e6887d531fb Mon Sep 17 00:00:00 2001 From: Umberto Baldi Date: Mon, 28 Aug 2023 11:46:24 +0200 Subject: [PATCH 9/9] apply suggestions by code-review --- v2/http.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/v2/http.go b/v2/http.go index 1aab59796..efafbfd7e 100644 --- a/v2/http.go +++ b/v2/http.go @@ -28,6 +28,7 @@ import ( "github.com/sirupsen/logrus" goahttp "goa.design/goa/v3/http" "goa.design/goa/v3/http/middleware" + goamiddleware "goa.design/goa/v3/middleware" ) // Server is the actual server @@ -70,7 +71,7 @@ func Server(home string) http.Handler { // to correlate. func errorHandler(logger *logrus.Logger) func(context.Context, http.ResponseWriter, error) { return func(ctx context.Context, w http.ResponseWriter, err error) { - id := ctx.Value(middleware.RequestID).(string) + id := ctx.Value(goamiddleware.RequestIDKey).(string) w.Write([]byte("[" + id + "] encoding: " + err.Error())) logger.Printf("[%s] ERROR: %s", id, err.Error()) }