WIP
- commit
- 18ffca5367d6e314d03574e1dd6fbb6369c9c5cd
- author
- bnema · · 2023-09-04 16:38 UTC
- parent
- 6febb48
- signature
- unsigned
6 files · +170 -12
M .gitignore +2 -3
| @@ -1,5 +1,4 @@ | |||
| 1 | 1 | .env | |
| 2 | 2 | node_modules/ | |
| 3 | - | tmp/ | |
| 4 | - | logs/ | |
| 5 | - | *.log⏎̸ | |
| 3 | + | tmp/* | |
| 4 | + | logs/*⏎̸ | |
| @@ -1,5 +1,4 @@ | |||||
| 1 | .env | 1 | .env | ||
| 2 | node_modules/ | 2 | node_modules/ | ||
| 3 | - | tmp/ | 3 | + | tmp/* |
| 4 | - | logs/ | 4 | + | logs/*⏎̸ |
| 5 | - | *.log⏎̸ | |||
M cmd/main.go +2 -1
| @@ -25,7 +25,7 @@ func main() { | |||
| 25 | 25 | return | |
| 26 | 26 | } | |
| 27 | 27 | ||
| 28 | - | docker.ListDocker() // List docker containers | |
| 28 | + | docker.CreateImageFromDockerfile() | |
| 29 | 29 | ||
| 30 | 30 | e := echo.New() | |
| 31 | 31 | e.HideBanner = true | |
| @@ -38,4 +38,5 @@ func main() { | |||
| 38 | 38 | return e.Start(":" + port) | |
| 39 | 39 | } | |
| 40 | 40 | utils.RunAppCatchSIGINT(startFunc, &gordon.APPLogger.Logger) | |
| 41 | + | ||
| 41 | 42 | } | |
| @@ -25,7 +25,7 @@ func main() { | |||||
| 25 | return | 25 | return | ||
| 26 | } | 26 | } | ||
| 27 | 27 | ||||
| 28 | - | docker.ListDocker() // List docker containers | 28 | + | docker.CreateImageFromDockerfile() |
| 29 | 29 | ||||
| 30 | e := echo.New() | 30 | e := echo.New() | ||
| 31 | e.HideBanner = true | 31 | e.HideBanner = true | ||
| @@ -38,4 +38,5 @@ func main() { | |||||
| 38 | return e.Start(":" + port) | 38 | return e.Start(":" + port) | ||
| 39 | } | 39 | } | ||
| 40 | utils.RunAppCatchSIGINT(startFunc, &gordon.APPLogger.Logger) | 40 | utils.RunAppCatchSIGINT(startFunc, &gordon.APPLogger.Logger) | ||
| 41 | + | ||||
| 41 | } | 42 | } | ||
M go.mod +12 -3
| @@ -11,18 +11,27 @@ require ( | |||
| 11 | 11 | require ( | |
| 12 | 12 | github.com/Microsoft/go-winio v0.6.1 // indirect | |
| 13 | 13 | github.com/andybalholm/cascadia v1.3.1 // indirect | |
| 14 | + | github.com/containerd/containerd v1.7.5 // indirect | |
| 14 | 15 | github.com/docker/distribution v2.8.2+incompatible // indirect | |
| 15 | 16 | github.com/docker/docker v24.0.5+incompatible // indirect | |
| 16 | 17 | github.com/docker/go-connections v0.4.0 // indirect | |
| 17 | 18 | github.com/docker/go-units v0.5.0 // indirect | |
| 18 | 19 | github.com/gogo/protobuf v1.3.2 // indirect | |
| 19 | 20 | github.com/golang-jwt/jwt v3.2.2+incompatible // indirect | |
| 21 | + | github.com/klauspost/compress v1.16.7 // indirect | |
| 22 | + | github.com/moby/patternmatcher v0.6.0 // indirect | |
| 23 | + | github.com/moby/sys/sequential v0.5.0 // indirect | |
| 20 | 24 | github.com/opencontainers/go-digest v1.0.0 // indirect | |
| 21 | - | github.com/opencontainers/image-spec v1.0.2 // indirect | |
| 25 | + | github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect | |
| 26 | + | github.com/opencontainers/runc v1.1.9 // indirect | |
| 22 | 27 | github.com/pkg/errors v0.9.1 // indirect | |
| 23 | - | golang.org/x/mod v0.8.0 // indirect | |
| 28 | + | github.com/sirupsen/logrus v1.9.0 // indirect | |
| 29 | + | github.com/tidwall/gjson v1.16.0 // indirect | |
| 30 | + | github.com/tidwall/match v1.1.1 // indirect | |
| 31 | + | github.com/tidwall/pretty v1.2.1 // indirect | |
| 32 | + | golang.org/x/mod v0.9.0 // indirect | |
| 24 | 33 | golang.org/x/time v0.3.0 // indirect | |
| 25 | - | golang.org/x/tools v0.6.0 // indirect | |
| 34 | + | golang.org/x/tools v0.7.0 // indirect | |
| 26 | 35 | ) | |
| 27 | 36 | ||
| 28 | 37 | require ( | |
| @@ -11,18 +11,27 @@ require ( | |||||
| 11 | require ( | 11 | require ( | ||
| 12 | github.com/Microsoft/go-winio v0.6.1 // indirect | 12 | github.com/Microsoft/go-winio v0.6.1 // indirect | ||
| 13 | github.com/andybalholm/cascadia v1.3.1 // indirect | 13 | github.com/andybalholm/cascadia v1.3.1 // indirect | ||
| 14 | + | github.com/containerd/containerd v1.7.5 // indirect | |||
| 14 | github.com/docker/distribution v2.8.2+incompatible // indirect | 15 | github.com/docker/distribution v2.8.2+incompatible // indirect | ||
| 15 | github.com/docker/docker v24.0.5+incompatible // indirect | 16 | github.com/docker/docker v24.0.5+incompatible // indirect | ||
| 16 | github.com/docker/go-connections v0.4.0 // indirect | 17 | github.com/docker/go-connections v0.4.0 // indirect | ||
| 17 | github.com/docker/go-units v0.5.0 // indirect | 18 | github.com/docker/go-units v0.5.0 // indirect | ||
| 18 | github.com/gogo/protobuf v1.3.2 // indirect | 19 | github.com/gogo/protobuf v1.3.2 // indirect | ||
| 19 | github.com/golang-jwt/jwt v3.2.2+incompatible // indirect | 20 | github.com/golang-jwt/jwt v3.2.2+incompatible // indirect | ||
| 21 | + | github.com/klauspost/compress v1.16.7 // indirect | |||
| 22 | + | github.com/moby/patternmatcher v0.6.0 // indirect | |||
| 23 | + | github.com/moby/sys/sequential v0.5.0 // indirect | |||
| 20 | github.com/opencontainers/go-digest v1.0.0 // indirect | 24 | github.com/opencontainers/go-digest v1.0.0 // indirect | ||
| 21 | - | github.com/opencontainers/image-spec v1.0.2 // indirect | 25 | + | github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect |
| 26 | + | github.com/opencontainers/runc v1.1.9 // indirect | |||
| 22 | github.com/pkg/errors v0.9.1 // indirect | 27 | github.com/pkg/errors v0.9.1 // indirect | ||
| 23 | - | golang.org/x/mod v0.8.0 // indirect | 28 | + | github.com/sirupsen/logrus v1.9.0 // indirect |
| 29 | + | github.com/tidwall/gjson v1.16.0 // indirect | |||
| 30 | + | github.com/tidwall/match v1.1.1 // indirect | |||
| 31 | + | github.com/tidwall/pretty v1.2.1 // indirect | |||
| 32 | + | golang.org/x/mod v0.9.0 // indirect | |||
| 24 | golang.org/x/time v0.3.0 // indirect | 33 | golang.org/x/time v0.3.0 // indirect | ||
| 25 | - | golang.org/x/tools v0.6.0 // indirect | 34 | + | golang.org/x/tools v0.7.0 // indirect |
| 26 | ) | 35 | ) | ||
| 27 | 36 | ||||
| 28 | require ( | 37 | require ( | ||
M go.sum +27 -0
| @@ -4,6 +4,8 @@ github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAc | |||
| 4 | 4 | github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= | |
| 5 | 5 | github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= | |
| 6 | 6 | github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= | |
| 7 | + | github.com/containerd/containerd v1.7.5 h1:i9T9XpAWMe11BHMN7pu1BZqOGjXaKTPyz2v+KYOZgkY= | |
| 8 | + | github.com/containerd/containerd v1.7.5/go.mod h1:ieJNCSzASw2shSGYLHx8NAE7WsZ/gEigo5fQ78W5Zvw= | |
| 7 | 9 | github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= | |
| 8 | 10 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | |
| 9 | 11 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | |
| @@ -23,6 +25,8 @@ github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keL | |||
| 23 | 25 | github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= | |
| 24 | 26 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= | |
| 25 | 27 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | |
| 28 | + | github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= | |
| 29 | + | github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= | |
| 26 | 30 | github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= | |
| 27 | 31 | github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= | |
| 28 | 32 | github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= | |
| @@ -35,10 +39,18 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k | |||
| 35 | 39 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= | |
| 36 | 40 | github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= | |
| 37 | 41 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | |
| 42 | + | github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= | |
| 43 | + | github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= | |
| 44 | + | github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= | |
| 45 | + | github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= | |
| 38 | 46 | github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= | |
| 39 | 47 | github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= | |
| 40 | 48 | github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= | |
| 41 | 49 | github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= | |
| 50 | + | github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8= | |
| 51 | + | github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= | |
| 52 | + | github.com/opencontainers/runc v1.1.9 h1:XR0VIHTGce5eWPkaPesqTBrhW2yAcaraWfsEalNwQLM= | |
| 53 | + | github.com/opencontainers/runc v1.1.9/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= | |
| 42 | 54 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | |
| 43 | 55 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | |
| 44 | 56 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | |
| @@ -46,10 +58,20 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN | |||
| 46 | 58 | github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= | |
| 47 | 59 | github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= | |
| 48 | 60 | github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= | |
| 61 | + | github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= | |
| 62 | + | github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= | |
| 49 | 63 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | |
| 50 | 64 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | |
| 51 | 65 | github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= | |
| 52 | 66 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= | |
| 67 | + | github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= | |
| 68 | + | github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg= | |
| 69 | + | github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= | |
| 70 | + | github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= | |
| 71 | + | github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= | |
| 72 | + | github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= | |
| 73 | + | github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= | |
| 74 | + | github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= | |
| 53 | 75 | github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= | |
| 54 | 76 | github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= | |
| 55 | 77 | github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= | |
| @@ -69,6 +91,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | |||
| 69 | 91 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= | |
| 70 | 92 | golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= | |
| 71 | 93 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | |
| 94 | + | golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= | |
| 95 | + | golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | |
| 72 | 96 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | |
| 73 | 97 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |
| 74 | 98 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |
| @@ -93,6 +117,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc | |||
| 93 | 117 | golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 94 | 118 | golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 95 | 119 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 120 | + | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 96 | 121 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 97 | 122 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| 98 | 123 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |
| @@ -118,6 +143,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f | |||
| 118 | 143 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= | |
| 119 | 144 | golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= | |
| 120 | 145 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= | |
| 146 | + | golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= | |
| 147 | + | golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= | |
| 121 | 148 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |
| 122 | 149 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |
| 123 | 150 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |
| @@ -4,6 +4,8 @@ github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAc | |||||
| 4 | github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= | 4 | github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= | ||
| 5 | github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= | 5 | github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= | ||
| 6 | github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= | 6 | github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= | ||
| 7 | + | github.com/containerd/containerd v1.7.5 h1:i9T9XpAWMe11BHMN7pu1BZqOGjXaKTPyz2v+KYOZgkY= | |||
| 8 | + | github.com/containerd/containerd v1.7.5/go.mod h1:ieJNCSzASw2shSGYLHx8NAE7WsZ/gEigo5fQ78W5Zvw= | |||
| 7 | github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= | 9 | github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= | ||
| 8 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | 10 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | ||
| 9 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | 11 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | ||
| @@ -23,6 +25,8 @@ github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keL | |||||
| 23 | github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= | 25 | github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= | ||
| 24 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= | 26 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= | ||
| 25 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | 27 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | ||
| 28 | + | github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= | |||
| 29 | + | github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= | |||
| 26 | github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= | 30 | github.com/labstack/echo/v4 v4.11.1 h1:dEpLU2FLg4UVmvCGPuk/APjlH6GDpbEPti61srUUUs4= | ||
| 27 | github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= | 31 | github.com/labstack/echo/v4 v4.11.1/go.mod h1:YuYRTSM3CHs2ybfrL8Px48bO6BAnYIN4l8wSTMP6BDQ= | ||
| 28 | github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= | 32 | github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= | ||
| @@ -35,10 +39,18 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k | |||||
| 35 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= | 39 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= | ||
| 36 | github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= | 40 | github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= | ||
| 37 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | 41 | github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | ||
| 42 | + | github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= | |||
| 43 | + | github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= | |||
| 44 | + | github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= | |||
| 45 | + | github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= | |||
| 38 | github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= | 46 | github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= | ||
| 39 | github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= | 47 | github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= | ||
| 40 | github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= | 48 | github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= | ||
| 41 | github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= | 49 | github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= | ||
| 50 | + | github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8= | |||
| 51 | + | github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= | |||
| 52 | + | github.com/opencontainers/runc v1.1.9 h1:XR0VIHTGce5eWPkaPesqTBrhW2yAcaraWfsEalNwQLM= | |||
| 53 | + | github.com/opencontainers/runc v1.1.9/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= | |||
| 42 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | 54 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | ||
| 43 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | 55 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
| 44 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | 56 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | ||
| @@ -46,10 +58,20 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN | |||||
| 46 | github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= | 58 | github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= | ||
| 47 | github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= | 59 | github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= | ||
| 48 | github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= | 60 | github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= | ||
| 61 | + | github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= | |||
| 62 | + | github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= | |||
| 49 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | 63 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | ||
| 50 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | 64 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= | ||
| 51 | github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= | 65 | github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= | ||
| 52 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= | 66 | github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= | ||
| 67 | + | github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= | |||
| 68 | + | github.com/tidwall/gjson v1.16.0 h1:SyXa+dsSPpUlcwEDuKuEBJEz5vzTvOea+9rjyYodQFg= | |||
| 69 | + | github.com/tidwall/gjson v1.16.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= | |||
| 70 | + | github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= | |||
| 71 | + | github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= | |||
| 72 | + | github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= | |||
| 73 | + | github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= | |||
| 74 | + | github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= | |||
| 53 | github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= | 75 | github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= | ||
| 54 | github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= | 76 | github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= | ||
| 55 | github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= | 77 | github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= | ||
| @@ -69,6 +91,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= | |||||
| 69 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= | 91 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= | ||
| 70 | golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= | 92 | golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= | ||
| 71 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | 93 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | ||
| 94 | + | golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= | |||
| 95 | + | golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= | |||
| 72 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | 96 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | ||
| 73 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | 97 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
| 74 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | 98 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | ||
| @@ -93,6 +117,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc | |||||
| 93 | golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 117 | golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 94 | golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 118 | golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 95 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 119 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 120 | + | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |||
| 96 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 121 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 97 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 122 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| 98 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | 123 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| @@ -118,6 +143,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f | |||||
| 118 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= | 143 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= | ||
| 119 | golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= | 144 | golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= | ||
| 120 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= | 145 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= | ||
| 146 | + | golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= | |||
| 147 | + | golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= | |||
| 121 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | 148 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
| 122 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | 149 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
| 123 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | 150 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ||
M pkg/docker/registry.go +106 -5
| @@ -3,24 +3,125 @@ package docker | |||
| 3 | 3 | import ( | |
| 4 | 4 | "context" | |
| 5 | 5 | "fmt" | |
| 6 | + | "io" | |
| 7 | + | "os" | |
| 6 | 8 | ||
| 7 | 9 | "github.com/docker/docker/api/types" | |
| 10 | + | "github.com/docker/docker/api/types/container" | |
| 8 | 11 | "github.com/docker/docker/client" | |
| 12 | + | "github.com/docker/docker/pkg/archive" | |
| 13 | + | "github.com/docker/docker/pkg/stdcopy" | |
| 9 | 14 | ) | |
| 10 | 15 | ||
| 11 | - | // basic list of containers and images | |
| 12 | - | func ListDocker() { | |
| 13 | - | cli, err := client.NewClientWithOpts(client.FromEnv) | |
| 16 | + | func DockertPullImageTest() { | |
| 17 | + | ctx := context.Background() | |
| 18 | + | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) | |
| 14 | 19 | if err != nil { | |
| 15 | 20 | panic(err) | |
| 16 | 21 | } | |
| 22 | + | defer cli.Close() | |
| 17 | 23 | ||
| 18 | - | containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{}) | |
| 24 | + | reader, err := cli.ImagePull(ctx, "docker.io/library/alpine", types.ImagePullOptions{}) | |
| 19 | 25 | if err != nil { | |
| 20 | 26 | panic(err) | |
| 21 | 27 | } | |
| 28 | + | io.Copy(os.Stdout, reader) | |
| 29 | + | ||
| 30 | + | resp, err := cli.ContainerCreate(ctx, &container.Config{ | |
| 31 | + | Image: "alpine", | |
| 32 | + | Cmd: []string{"echo", "hello world"}, | |
| 33 | + | }, nil, nil, nil, "") | |
| 34 | + | if err != nil { | |
| 35 | + | panic(err) | |
| 36 | + | } | |
| 37 | + | ||
| 38 | + | if err := cli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { | |
| 39 | + | panic(err) | |
| 40 | + | } | |
| 41 | + | ||
| 42 | + | statusCh, errCh := cli.ContainerWait(ctx, resp.ID, container.WaitConditionNotRunning) | |
| 43 | + | select { | |
| 44 | + | case err := <-errCh: | |
| 45 | + | if err != nil { | |
| 46 | + | panic(err) | |
| 47 | + | } | |
| 48 | + | case <-statusCh: | |
| 49 | + | } | |
| 50 | + | ||
| 51 | + | out, err := cli.ContainerLogs(ctx, resp.ID, types.ContainerLogsOptions{ShowStdout: true}) | |
| 52 | + | if err != nil { | |
| 53 | + | panic(err) | |
| 54 | + | } | |
| 55 | + | ||
| 56 | + | stdcopy.StdCopy(os.Stdout, os.Stderr, out) | |
| 57 | + | } | |
| 58 | + | ||
| 59 | + | func DockerListContainersTest() { | |
| 60 | + | fmt.Println("Executing DockerListContainersTest()") | |
| 61 | + | ||
| 62 | + | ctx := context.Background() | |
| 63 | + | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) | |
| 64 | + | if err != nil { | |
| 65 | + | panic(err) | |
| 66 | + | } | |
| 67 | + | defer cli.Close() | |
| 68 | + | ||
| 69 | + | fmt.Println("Initialized Docker client.") | |
| 70 | + | ||
| 71 | + | containers, err := cli.ContainerList(ctx, types.ContainerListOptions{All: true}) | |
| 72 | + | if err != nil { | |
| 73 | + | panic(err) | |
| 74 | + | } | |
| 75 | + | ||
| 76 | + | fmt.Printf("Found %d containers.\n", len(containers)) | |
| 22 | 77 | ||
| 23 | 78 | for _, container := range containers { | |
| 24 | - | fmt.Printf("%s %s\n", container.ID[:10], container.Image) | |
| 79 | + | fmt.Printf("%s %s\n", container.ID[:10], container.Status) | |
| 80 | + | } | |
| 81 | + | } | |
| 82 | + | ||
| 83 | + | // I have a Dockerfile inside tmp/docker-test/Dockerfile and i want to create an image from it and place it at the same directory. | |
| 84 | + | func CreateImageFromDockerfile() { | |
| 85 | + | fmt.Println("Executing CreateImageFromDockerfile()") | |
| 86 | + | fmt.Println("Initialized Docker client.") | |
| 87 | + | ctx := context.Background() | |
| 88 | + | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) | |
| 89 | + | if err != nil { | |
| 90 | + | panic(err) | |
| 91 | + | } | |
| 92 | + | defer cli.Close() | |
| 93 | + | ||
| 94 | + | fmt.Println("Building image...") | |
| 95 | + | buildCtx, err := archive.TarWithOptions("tmp/docker-test/", &archive.TarOptions{}) | |
| 96 | + | if err != nil { | |
| 97 | + | panic(err) | |
| 98 | + | } | |
| 99 | + | defer buildCtx.Close() | |
| 100 | + | ||
| 101 | + | fmt.Println("Building image...") | |
| 102 | + | imageBuildResponse, err := cli.ImageBuild(ctx, buildCtx, types.ImageBuildOptions{ | |
| 103 | + | Tags: []string{"gordon-echo:latest"}, | |
| 104 | + | }) | |
| 105 | + | if err != nil { | |
| 106 | + | panic(err) | |
| 107 | + | } | |
| 108 | + | defer imageBuildResponse.Body.Close() | |
| 109 | + | ||
| 110 | + | fmt.Println("Saving image to file...") | |
| 111 | + | ||
| 112 | + | imageTar, err := cli.ImageSave(ctx, []string{"gordon-echo:latest"}) | |
| 113 | + | if err != nil { | |
| 114 | + | panic(err) | |
| 115 | + | } | |
| 116 | + | ||
| 117 | + | outputFile, err := os.Create("tmp/docker-test/gordon-echo.tar") | |
| 118 | + | if err != nil { | |
| 119 | + | panic(err) | |
| 120 | + | } | |
| 121 | + | defer outputFile.Close() | |
| 122 | + | ||
| 123 | + | _, err = io.Copy(outputFile, imageTar) | |
| 124 | + | if err != nil { | |
| 125 | + | panic(err) | |
| 25 | 126 | } | |
| 26 | 127 | } | |
| @@ -3,24 +3,125 @@ package docker | |||||
| 3 | import ( | 3 | import ( | ||
| 4 | "context" | 4 | "context" | ||
| 5 | "fmt" | 5 | "fmt" | ||
| 6 | + | "io" | |||
| 7 | + | "os" | |||
| 6 | 8 | ||||
| 7 | "github.com/docker/docker/api/types" | 9 | "github.com/docker/docker/api/types" | ||
| 10 | + | "github.com/docker/docker/api/types/container" | |||
| 8 | "github.com/docker/docker/client" | 11 | "github.com/docker/docker/client" | ||
| 12 | + | "github.com/docker/docker/pkg/archive" | |||
| 13 | + | "github.com/docker/docker/pkg/stdcopy" | |||
| 9 | ) | 14 | ) | ||
| 10 | 15 | ||||
| 11 | - | // basic list of containers and images | 16 | + | func DockertPullImageTest() { |
| 12 | - | func ListDocker() { | 17 | + | ctx := context.Background() |
| 13 | - | cli, err := client.NewClientWithOpts(client.FromEnv) | 18 | + | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) |
| 14 | if err != nil { | 19 | if err != nil { | ||
| 15 | panic(err) | 20 | panic(err) | ||
| 16 | } | 21 | } | ||
| 22 | + | defer cli.Close() | |||
| 17 | 23 | ||||
| 18 | - | containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{}) | 24 | + | reader, err := cli.ImagePull(ctx, "docker.io/library/alpine", types.ImagePullOptions{}) |
| 19 | if err != nil { | 25 | if err != nil { | ||
| 20 | panic(err) | 26 | panic(err) | ||
| 21 | } | 27 | } | ||
| 28 | + | io.Copy(os.Stdout, reader) | |||
| 29 | + | ||||
| 30 | + | resp, err := cli.ContainerCreate(ctx, &container.Config{ | |||
| 31 | + | Image: "alpine", | |||
| 32 | + | Cmd: []string{"echo", "hello world"}, | |||
| 33 | + | }, nil, nil, nil, "") | |||
| 34 | + | if err != nil { | |||
| 35 | + | panic(err) | |||
| 36 | + | } | |||
| 37 | + | ||||
| 38 | + | if err := cli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { | |||
| 39 | + | panic(err) | |||
| 40 | + | } | |||
| 41 | + | ||||
| 42 | + | statusCh, errCh := cli.ContainerWait(ctx, resp.ID, container.WaitConditionNotRunning) | |||
| 43 | + | select { | |||
| 44 | + | case err := <-errCh: | |||
| 45 | + | if err != nil { | |||
| 46 | + | panic(err) | |||
| 47 | + | } | |||
| 48 | + | case <-statusCh: | |||
| 49 | + | } | |||
| 50 | + | ||||
| 51 | + | out, err := cli.ContainerLogs(ctx, resp.ID, types.ContainerLogsOptions{ShowStdout: true}) | |||
| 52 | + | if err != nil { | |||
| 53 | + | panic(err) | |||
| 54 | + | } | |||
| 55 | + | ||||
| 56 | + | stdcopy.StdCopy(os.Stdout, os.Stderr, out) | |||
| 57 | + | } | |||
| 58 | + | ||||
| 59 | + | func DockerListContainersTest() { | |||
| 60 | + | fmt.Println("Executing DockerListContainersTest()") | |||
| 61 | + | ||||
| 62 | + | ctx := context.Background() | |||
| 63 | + | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) | |||
| 64 | + | if err != nil { | |||
| 65 | + | panic(err) | |||
| 66 | + | } | |||
| 67 | + | defer cli.Close() | |||
| 68 | + | ||||
| 69 | + | fmt.Println("Initialized Docker client.") | |||
| 70 | + | ||||
| 71 | + | containers, err := cli.ContainerList(ctx, types.ContainerListOptions{All: true}) | |||
| 72 | + | if err != nil { | |||
| 73 | + | panic(err) | |||
| 74 | + | } | |||
| 75 | + | ||||
| 76 | + | fmt.Printf("Found %d containers.\n", len(containers)) | |||
| 22 | 77 | ||||
| 23 | for _, container := range containers { | 78 | for _, container := range containers { | ||
| 24 | - | fmt.Printf("%s %s\n", container.ID[:10], container.Image) | 79 | + | fmt.Printf("%s %s\n", container.ID[:10], container.Status) |
| 80 | + | } | |||
| 81 | + | } | |||
| 82 | + | ||||
| 83 | + | // I have a Dockerfile inside tmp/docker-test/Dockerfile and i want to create an image from it and place it at the same directory. | |||
| 84 | + | func CreateImageFromDockerfile() { | |||
| 85 | + | fmt.Println("Executing CreateImageFromDockerfile()") | |||
| 86 | + | fmt.Println("Initialized Docker client.") | |||
| 87 | + | ctx := context.Background() | |||
| 88 | + | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) | |||
| 89 | + | if err != nil { | |||
| 90 | + | panic(err) | |||
| 91 | + | } | |||
| 92 | + | defer cli.Close() | |||
| 93 | + | ||||
| 94 | + | fmt.Println("Building image...") | |||
| 95 | + | buildCtx, err := archive.TarWithOptions("tmp/docker-test/", &archive.TarOptions{}) | |||
| 96 | + | if err != nil { | |||
| 97 | + | panic(err) | |||
| 98 | + | } | |||
| 99 | + | defer buildCtx.Close() | |||
| 100 | + | ||||
| 101 | + | fmt.Println("Building image...") | |||
| 102 | + | imageBuildResponse, err := cli.ImageBuild(ctx, buildCtx, types.ImageBuildOptions{ | |||
| 103 | + | Tags: []string{"gordon-echo:latest"}, | |||
| 104 | + | }) | |||
| 105 | + | if err != nil { | |||
| 106 | + | panic(err) | |||
| 107 | + | } | |||
| 108 | + | defer imageBuildResponse.Body.Close() | |||
| 109 | + | ||||
| 110 | + | fmt.Println("Saving image to file...") | |||
| 111 | + | ||||
| 112 | + | imageTar, err := cli.ImageSave(ctx, []string{"gordon-echo:latest"}) | |||
| 113 | + | if err != nil { | |||
| 114 | + | panic(err) | |||
| 115 | + | } | |||
| 116 | + | ||||
| 117 | + | outputFile, err := os.Create("tmp/docker-test/gordon-echo.tar") | |||
| 118 | + | if err != nil { | |||
| 119 | + | panic(err) | |||
| 120 | + | } | |||
| 121 | + | defer outputFile.Close() | |||
| 122 | + | ||||
| 123 | + | _, err = io.Copy(outputFile, imageTar) | |||
| 124 | + | if err != nil { | |||
| 125 | + | panic(err) | |||
| 25 | } | 126 | } | ||
| 26 | } | 127 | } | ||
M pkg/utils/parser.go +21 -0
| @@ -3,7 +3,9 @@ package utils | |||
| 3 | 3 | import ( | |
| 4 | 4 | "fmt" | |
| 5 | 5 | "io" | |
| 6 | + | "os" | |
| 6 | 7 | ||
| 8 | + | "github.com/tidwall/gjson" | |
| 7 | 9 | "gogs.bnema.dev/gordon-echo/internal/ui" | |
| 8 | 10 | "gopkg.in/yaml.v3" | |
| 9 | 11 | ) | |
| @@ -59,3 +61,22 @@ func PopulateDataFromYAML(currentLang string) (YamlData, error) { | |||
| 59 | 61 | } | |
| 60 | 62 | ||
| 61 | 63 | // Json Parser | |
| 64 | + | ||
| 65 | + | // ReadDataFromJSONFile loads the data from the given JSON file | |
| 66 | + | func ReadDataFromJSONFile(filePath string) (string, error) { | |
| 67 | + | bytes, err := os.ReadFile(filePath) | |
| 68 | + | if err != nil { | |
| 69 | + | return "", err | |
| 70 | + | } | |
| 71 | + | return string(bytes), nil | |
| 72 | + | } | |
| 73 | + | ||
| 74 | + | // QueryJSON queries the provided JSON content based on the given gjson query and returns the results as a slice of strings | |
| 75 | + | func QueryJSON(jsonContent, query string) []string { | |
| 76 | + | results := gjson.GetMany(jsonContent, query) | |
| 77 | + | var values []string | |
| 78 | + | for _, result := range results { | |
| 79 | + | values = append(values, result.String()) | |
| 80 | + | } | |
| 81 | + | return values | |
| 82 | + | } | |
| @@ -3,7 +3,9 @@ package utils | |||||
| 3 | import ( | 3 | import ( | ||
| 4 | "fmt" | 4 | "fmt" | ||
| 5 | "io" | 5 | "io" | ||
| 6 | + | "os" | |||
| 6 | 7 | ||||
| 8 | + | "github.com/tidwall/gjson" | |||
| 7 | "gogs.bnema.dev/gordon-echo/internal/ui" | 9 | "gogs.bnema.dev/gordon-echo/internal/ui" | ||
| 8 | "gopkg.in/yaml.v3" | 10 | "gopkg.in/yaml.v3" | ||
| 9 | ) | 11 | ) | ||
| @@ -59,3 +61,22 @@ func PopulateDataFromYAML(currentLang string) (YamlData, error) { | |||||
| 59 | } | 61 | } | ||
| 60 | 62 | ||||
| 61 | // Json Parser | 63 | // Json Parser | ||
| 64 | + | ||||
| 65 | + | // ReadDataFromJSONFile loads the data from the given JSON file | |||
| 66 | + | func ReadDataFromJSONFile(filePath string) (string, error) { | |||
| 67 | + | bytes, err := os.ReadFile(filePath) | |||
| 68 | + | if err != nil { | |||
| 69 | + | return "", err | |||
| 70 | + | } | |||
| 71 | + | return string(bytes), nil | |||
| 72 | + | } | |||
| 73 | + | ||||
| 74 | + | // QueryJSON queries the provided JSON content based on the given gjson query and returns the results as a slice of strings | |||
| 75 | + | func QueryJSON(jsonContent, query string) []string { | |||
| 76 | + | results := gjson.GetMany(jsonContent, query) | |||
| 77 | + | var values []string | |||
| 78 | + | for _, result := range results { | |||
| 79 | + | values = append(values, result.String()) | |||
| 80 | + | } | |||
| 81 | + | return values | |||
| 82 | + | } | |||