From c06ff99d2ed81b53ed4c2e29373c37618c7fdefc Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Thu, 28 Dec 2023 13:22:16 -0500 Subject: [PATCH 1/4] chores: bump Dockerfile go -> `1.21.4` --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a9bf52d..ea6e9a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.4 as build +FROM golang:1.21.4 as build LABEL author="vlbeaudoin" From d60cf01c82f43579d3cba60943c32e210cda2fbd Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Thu, 28 Dec 2023 13:30:32 -0500 Subject: [PATCH 2/4] fix: ajouter `*http.Client` dans handlers avec bottinApiClient Ajuster selon changement de signature de `bottindata.NewApiClient` --- handlers/health.go | 4 ++++ handlers/transaction.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/handlers/health.go b/handlers/health.go index f193544..1d6d3c5 100644 --- a/handlers/health.go +++ b/handlers/health.go @@ -19,7 +19,11 @@ func GetHealth(c echo.Context) error { bottinApiProtocol := viper.GetString("bottin.api.protocol") bottinApiPort := viper.GetInt("bottin.api.port") + bottinClient := http.DefaultClient + defer bottinClient.CloseIdleConnections() + bottinConnection := bottindata.NewApiClient( + bottinClient, bottinApiKey, bottinApiHost, bottinApiProtocol, diff --git a/handlers/transaction.go b/handlers/transaction.go index c6c6a15..946f6c8 100644 --- a/handlers/transaction.go +++ b/handlers/transaction.go @@ -80,8 +80,12 @@ func PostTransactions(c echo.Context) error { bottinApiProtocol := viper.GetString("bottin.api.protocol") bottinApiPort := viper.GetInt("bottin.api.port") + bottinClient := http.DefaultClient + defer bottinClient.CloseIdleConnections() + // Using bottin's API client bottinApiClient := bottindata.NewApiClient( + bottinClient, bottinApiKey, bottinApiHost, bottinApiProtocol, From 658763e8a87a33e40dc0da8413853a4bf6135946 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Thu, 28 Dec 2023 13:36:40 -0500 Subject: [PATCH 3/4] =?UTF-8?q?fix(apicmd):=20ajouter=20`*http.Client`=20?= =?UTF-8?q?=C3=A0=20`apiCmd`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/api.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/api.go b/cmd/api.go index 2aa156b..5f11779 100644 --- a/cmd/api.go +++ b/cmd/api.go @@ -4,6 +4,7 @@ import ( "crypto/subtle" "fmt" "log" + "net/http" "git.agecem.com/agecem/bottin-agenda/data" "git.agecem.com/agecem/bottin-agenda/handlers" @@ -34,8 +35,12 @@ var apiCmd = &cobra.Command{ bottinApiProtocol := viper.GetString("bottin.api.protocol") bottinApiPort := viper.GetInt("bottin.api.port") + bottinClient := http.DefaultClient + defer bottinClient.CloseIdleConnections() + // Using bottin's API client bottinConnection := bottindata.NewApiClient( + bottinClient, bottinApiKey, bottinApiHost, bottinApiProtocol, From 00b3d07f282cd8c523bd23935fd197f0e5afb58c Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Thu, 28 Dec 2023 14:13:30 -0500 Subject: [PATCH 4/4] chores: bump `postgres` -> `16.1` --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 309d27f..f1f7c4f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,7 @@ services: db: - image: 'docker.io/library/postgres:14.8' + image: 'docker.io/library/postgres:16.1' environment: POSTGRES_DATABASE: "${BOTTINAGENDA_POSTGRES_DATABASE}" POSTGRES_PASSWORD: "${BOTTINAGENDA_POSTGRES_PASSWORD}"