From cb9e2bb4204d9f084cbea6ac6ae3a6b6d6afcee8 Mon Sep 17 00:00:00 2001 From: Bethuel Mmbaga Date: Mon, 10 Mar 2025 15:56:12 +0300 Subject: [PATCH] Fix circular dependency (#21) * Moved ExtendNetBirdConfig to config package * Updated accountManager type to account.Manager --- integrations/{ => config}/config.go | 2 +- integrations/go.mod | 2 +- integrations/go.sum | 4 ++-- integrations/integrations.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename integrations/{ => config}/config.go (91%) diff --git a/integrations/config.go b/integrations/config/config.go similarity index 91% rename from integrations/config.go rename to integrations/config/config.go index fdb84be..b48e31a 100644 --- a/integrations/config.go +++ b/integrations/config/config.go @@ -1,4 +1,4 @@ -package integrations +package config import ( "github.com/netbirdio/netbird/management/proto" diff --git a/integrations/go.mod b/integrations/go.mod index e1bc21b..4f2c4b8 100644 --- a/integrations/go.mod +++ b/integrations/go.mod @@ -6,7 +6,7 @@ toolchain go1.23.1 require ( github.com/gorilla/mux v1.8.0 - github.com/netbirdio/netbird v0.37.2-0.20250307161910-36da4644134f + github.com/netbirdio/netbird v0.37.2-0.20250307162345-dd953022b02a github.com/sirupsen/logrus v1.9.3 go.opentelemetry.io/otel/metric v1.26.0 ) diff --git a/integrations/go.sum b/integrations/go.sum index 1a41c5c..c2eb8d1 100644 --- a/integrations/go.sum +++ b/integrations/go.sum @@ -248,8 +248,8 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/netbirdio/netbird v0.37.2-0.20250307161910-36da4644134f h1:G/W354RYChk6slX3xXgGTLKpSznMQ9xzFiqP1mOQkVg= -github.com/netbirdio/netbird v0.37.2-0.20250307161910-36da4644134f/go.mod h1:JkjoxOhkv+vf2sEb0NGmMbU6GtJDL745tWevj/W7eqg= +github.com/netbirdio/netbird v0.37.2-0.20250307162345-dd953022b02a h1:f3RkE+2ShzDFTZqlsMOPdeo9Vev74HMMdEUteya4eQE= +github.com/netbirdio/netbird v0.37.2-0.20250307162345-dd953022b02a/go.mod h1:jZQ50BQm4HHoWJu5SHD0UFAmRVgNrnJH9s0xwzoqi/M= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/okta/okta-sdk-golang/v2 v2.18.0 h1:cfDasMb7CShbZvOrF6n+DnLevWwiHgedWMGJ8M8xKDc= diff --git a/integrations/integrations.go b/integrations/integrations.go index f7c34d2..0ef62a7 100644 --- a/integrations/integrations.go +++ b/integrations/integrations.go @@ -21,7 +21,7 @@ func RegisterHandlers( ctx context.Context, prefix string, router *mux.Router, - accountManager account.AccountManager, + accountManager account.Manager, integratedValidator integrated_validator.IntegratedValidator, meter metric.Meter, permissionsManager permissions.Manager,