diff --git a/cmd/icingadb-migrate/convert.go b/cmd/icingadb-migrate/convert.go index 69faaffcb..efa84ef40 100644 --- a/cmd/icingadb-migrate/convert.go +++ b/cmd/icingadb-migrate/convert.go @@ -3,12 +3,12 @@ package main import ( "database/sql" _ "embed" - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" + "github.com/icinga/icinga-go-library/utils" icingadbTypes "github.com/icinga/icingadb/pkg/icingadb/types" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" "github.com/icinga/icingadb/pkg/icingadb/v1/history" - "github.com/icinga/icingadb/pkg/types" - "github.com/icinga/icingadb/pkg/utils" "github.com/jmoiron/sqlx" "github.com/pkg/errors" "strconv" diff --git a/cmd/icingadb-migrate/main.go b/cmd/icingadb-migrate/main.go index 23e279922..15faddd08 100644 --- a/cmd/icingadb-migrate/main.go +++ b/cmd/icingadb-migrate/main.go @@ -8,11 +8,11 @@ import ( "fmt" "github.com/creasty/defaults" "github.com/goccy/go-yaml" - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/types" + "github.com/icinga/icinga-go-library/utils" "github.com/icinga/icingadb/pkg/icingadb" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/types" - "github.com/icinga/icingadb/pkg/utils" "github.com/jessevdk/go-flags" "github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx/reflectx" diff --git a/cmd/icingadb-migrate/misc.go b/cmd/icingadb-migrate/misc.go index 5b07b07fd..3d33ef8c2 100644 --- a/cmd/icingadb-migrate/misc.go +++ b/cmd/icingadb-migrate/misc.go @@ -3,9 +3,9 @@ package main import ( "context" "crypto/sha1" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/objectpacker" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/objectpacker" + "github.com/icinga/icinga-go-library/types" "github.com/jmoiron/sqlx" "github.com/pkg/errors" "github.com/vbauerster/mpb/v6" diff --git a/cmd/icingadb/main.go b/cmd/icingadb/main.go index 8de900f95..73ee3beed 100644 --- a/cmd/icingadb/main.go +++ b/cmd/icingadb/main.go @@ -3,6 +3,9 @@ package main import ( "context" "fmt" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/utils" "github.com/icinga/icingadb/internal" "github.com/icinga/icingadb/internal/command" "github.com/icinga/icingadb/pkg/common" @@ -12,9 +15,6 @@ import ( v1 "github.com/icinga/icingadb/pkg/icingadb/v1" "github.com/icinga/icingadb/pkg/icingaredis" "github.com/icinga/icingadb/pkg/icingaredis/telemetry" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/utils" "github.com/okzk/sdnotify" "github.com/pkg/errors" "go.uber.org/zap" diff --git a/go.mod b/go.mod index 5a202fdd9..dbcbec66b 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,9 @@ require ( github.com/goccy/go-yaml v1.11.3 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 + github.com/icinga/icinga-go-library v0.0.0-20240426075513-224c151b69d8 github.com/jessevdk/go-flags v1.5.0 - github.com/jmoiron/sqlx v1.3.5 + github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 github.com/mattn/go-sqlite3 v1.14.22 github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd @@ -19,7 +20,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/vbauerster/mpb/v6 v6.0.4 go.uber.org/zap v1.27.0 - golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d + golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f golang.org/x/sync v0.7.0 ) @@ -30,14 +31,14 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.16.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.12 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rivo/uniseg v0.2.0 // indirect - go.uber.org/multierr v1.10.0 // indirect - golang.org/x/sys v0.6.0 // indirect - golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/sys v0.14.0 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 87b6f9c18..e8b232130 100644 --- a/go.sum +++ b/go.sum @@ -16,15 +16,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I= @@ -33,25 +32,23 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/icinga/icinga-go-library v0.0.0-20240426075513-224c151b69d8 h1:JJVVWisS6jWC3eoQrnmBezV8caG/NbLLJiPTwRwLS3Y= +github.com/icinga/icinga-go-library v0.0.0-20240426075513-224c151b69d8/go.mod h1:OxsjmsPhTNHeB+ZGnc26P7UlqhOj89rV5m5aat5WPmc= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= +github.com/jmoiron/sqlx v1.4.0 h1:1PLqN7S1UYp5t4SrVVnt4nUVNemrDAtxlulVe+Qgm3o= +github.com/jmoiron/sqlx v1.4.0/go.mod h1:ZrZ7UsYB/weZdl2Bxg6jCRO9c3YHl8r3ahlKmRT4JLY= github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/okzk/sdnotify v0.0.0-20180710141335-d9becc38acbd h1:+iAPaTbi1gZpcpDwe/BW1fx7Xoesv69hLNGPheoyhBs= @@ -73,26 +70,24 @@ github.com/vbauerster/mpb/v6 v6.0.4 h1:h6J5zM/2wimP5Hj00unQuV8qbo5EPcj6wbkCqgj7K github.com/vbauerster/mpb/v6 v6.0.4/go.mod h1:a/+JT57gqh6Du0Ay5jSR+uBMfXGdlR7VQlGP52fJxLM= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d h1:vtUKgx8dahOomfFzLREU8nSv25YHnTgLBn4rDnWZdU0= -golang.org/x/exp v0.0.0-20220613132600-b0d781184e0d/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= +golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/internal/command/command.go b/internal/command/command.go index 31f899db5..bfcdfbcb7 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -2,13 +2,13 @@ package command import ( "fmt" + "github.com/icinga/icinga-go-library/config" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/redis" "github.com/icinga/icingadb/internal" icingadbconfig "github.com/icinga/icingadb/internal/config" - "github.com/icinga/icingadb/pkg/config" - "github.com/icinga/icingadb/pkg/database" "github.com/icinga/icingadb/pkg/icingaredis/telemetry" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/redis" goflags "github.com/jessevdk/go-flags" "github.com/pkg/errors" "os" diff --git a/internal/config/config.go b/internal/config/config.go index d66b444c5..0d7a07a92 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -2,10 +2,10 @@ package config import ( "github.com/creasty/defaults" - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/redis" "github.com/icinga/icingadb/pkg/icingadb/history" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/redis" "github.com/pkg/errors" "time" ) diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 3d1083dc2..1115fe40e 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -2,8 +2,8 @@ package config import ( "github.com/creasty/defaults" - "github.com/icinga/icingadb/pkg/config" - "github.com/icinga/icingadb/pkg/logging" + "github.com/icinga/icinga-go-library/config" + "github.com/icinga/icinga-go-library/logging" "github.com/stretchr/testify/require" "os" "testing" diff --git a/internal/version.go b/internal/version.go index 70e1c565f..d1aab39f8 100644 --- a/internal/version.go +++ b/internal/version.go @@ -1,7 +1,7 @@ package internal import ( - "github.com/icinga/icingadb/pkg/version" + "github.com/icinga/icinga-go-library/version" ) // Version contains version and Git commit information. diff --git a/pkg/common/sync_subject.go b/pkg/common/sync_subject.go index 3a56306cb..96fd50c74 100644 --- a/pkg/common/sync_subject.go +++ b/pkg/common/sync_subject.go @@ -1,10 +1,10 @@ package common import ( + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" - "github.com/icinga/icingadb/pkg/types" ) // SyncSubject defines information about entities to be synchronized. diff --git a/pkg/database/cleanup.go b/pkg/database/cleanup.go index b86906612..a825c0cd7 100644 --- a/pkg/database/cleanup.go +++ b/pkg/database/cleanup.go @@ -3,10 +3,10 @@ package database import ( "context" "fmt" - "github.com/icinga/icingadb/pkg/backoff" - "github.com/icinga/icingadb/pkg/com" - "github.com/icinga/icingadb/pkg/retry" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/backoff" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/retry" + "github.com/icinga/icinga-go-library/types" "time" ) diff --git a/pkg/database/config.go b/pkg/database/config.go index c27b803fe..bfcf299e4 100644 --- a/pkg/database/config.go +++ b/pkg/database/config.go @@ -1,7 +1,7 @@ package database import ( - "github.com/icinga/icingadb/pkg/config" + "github.com/icinga/icinga-go-library/config" "github.com/pkg/errors" ) diff --git a/pkg/database/db.go b/pkg/database/db.go index 78739719b..7d9eb7e02 100644 --- a/pkg/database/db.go +++ b/pkg/database/db.go @@ -6,13 +6,13 @@ import ( "database/sql/driver" "fmt" "github.com/go-sql-driver/mysql" - "github.com/icinga/icingadb/pkg/backoff" - "github.com/icinga/icingadb/pkg/com" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/periodic" - "github.com/icinga/icingadb/pkg/retry" - "github.com/icinga/icingadb/pkg/strcase" - "github.com/icinga/icingadb/pkg/utils" + "github.com/icinga/icinga-go-library/backoff" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/periodic" + "github.com/icinga/icinga-go-library/retry" + "github.com/icinga/icinga-go-library/strcase" + "github.com/icinga/icinga-go-library/utils" "github.com/jmoiron/sqlx" "github.com/jmoiron/sqlx/reflectx" "github.com/lib/pq" diff --git a/pkg/database/driver.go b/pkg/database/driver.go index 49bd43389..5aa03aeac 100644 --- a/pkg/database/driver.go +++ b/pkg/database/driver.go @@ -3,9 +3,9 @@ package database import ( "context" "database/sql/driver" - "github.com/icinga/icingadb/pkg/backoff" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/retry" + "github.com/icinga/icinga-go-library/backoff" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/retry" "github.com/pkg/errors" "go.uber.org/zap" "time" diff --git a/pkg/database/utils.go b/pkg/database/utils.go index 04037030f..2ae372cec 100644 --- a/pkg/database/utils.go +++ b/pkg/database/utils.go @@ -4,9 +4,9 @@ import ( "context" "database/sql/driver" "github.com/go-sql-driver/mysql" - "github.com/icinga/icingadb/pkg/com" - "github.com/icinga/icingadb/pkg/strcase" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/strcase" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" ) diff --git a/pkg/flatten/flatten.go b/pkg/flatten/flatten.go index 698eff178..6d3cee68d 100644 --- a/pkg/flatten/flatten.go +++ b/pkg/flatten/flatten.go @@ -2,7 +2,7 @@ package flatten import ( "fmt" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "strconv" ) diff --git a/pkg/flatten/flatten_test.go b/pkg/flatten/flatten_test.go index f84b8d9ec..99bf67a75 100644 --- a/pkg/flatten/flatten_test.go +++ b/pkg/flatten/flatten_test.go @@ -1,7 +1,7 @@ package flatten import ( - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/stretchr/testify/assert" "testing" ) diff --git a/pkg/icingadb/delta.go b/pkg/icingadb/delta.go index 7f9709f8c..e370fd03a 100644 --- a/pkg/icingadb/delta.go +++ b/pkg/icingadb/delta.go @@ -4,11 +4,11 @@ import ( "context" "fmt" "github.com/google/go-cmp/cmp" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/common" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/types" "go.uber.org/zap" "time" ) diff --git a/pkg/icingadb/delta_test.go b/pkg/icingadb/delta_test.go index 5d67d7fac..5067ecd3a 100644 --- a/pkg/icingadb/delta_test.go +++ b/pkg/icingadb/delta_test.go @@ -3,12 +3,12 @@ package icingadb import ( "context" "encoding/binary" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/common" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap" diff --git a/pkg/icingadb/dump_signals.go b/pkg/icingadb/dump_signals.go index a541aa52a..89595f309 100644 --- a/pkg/icingadb/dump_signals.go +++ b/pkg/icingadb/dump_signals.go @@ -2,8 +2,8 @@ package icingadb import ( "context" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/redis" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/redis" "github.com/pkg/errors" "go.uber.org/zap" "sync" diff --git a/pkg/icingadb/entitiesbyid.go b/pkg/icingadb/entitiesbyid.go index 62f837cc8..019e15f10 100644 --- a/pkg/icingadb/entitiesbyid.go +++ b/pkg/icingadb/entitiesbyid.go @@ -2,7 +2,7 @@ package icingadb import ( "context" - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" ) // EntitiesById is a map of key-contracts.Entity pairs. diff --git a/pkg/icingadb/ha.go b/pkg/icingadb/ha.go index e133e90d8..6460ac32d 100644 --- a/pkg/icingadb/ha.go +++ b/pkg/icingadb/ha.go @@ -6,16 +6,16 @@ import ( "database/sql" "encoding/hex" "github.com/google/uuid" - "github.com/icinga/icingadb/pkg/backoff" - "github.com/icinga/icingadb/pkg/com" - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/backoff" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/retry" + "github.com/icinga/icinga-go-library/types" + "github.com/icinga/icinga-go-library/utils" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" "github.com/icinga/icingadb/pkg/icingaredis" icingaredisv1 "github.com/icinga/icingadb/pkg/icingaredis/v1" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/retry" - "github.com/icinga/icingadb/pkg/types" - "github.com/icinga/icingadb/pkg/utils" "github.com/pkg/errors" "go.uber.org/zap" "sync" diff --git a/pkg/icingadb/history/retention.go b/pkg/icingadb/history/retention.go index 90249592e..e1260fa32 100644 --- a/pkg/icingadb/history/retention.go +++ b/pkg/icingadb/history/retention.go @@ -3,11 +3,11 @@ package history import ( "context" "fmt" - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/periodic" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" "github.com/icinga/icingadb/pkg/icingaredis/telemetry" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/periodic" "github.com/pkg/errors" "go.uber.org/zap" "time" diff --git a/pkg/icingadb/history/sla.go b/pkg/icingadb/history/sla.go index 6b53f5fde..6650ab755 100644 --- a/pkg/icingadb/history/sla.go +++ b/pkg/icingadb/history/sla.go @@ -1,11 +1,11 @@ package history import ( + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/structify" "github.com/icinga/icingadb/pkg/contracts" "github.com/icinga/icingadb/pkg/icingadb/types" "github.com/icinga/icingadb/pkg/icingadb/v1/history" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/structify" "reflect" ) diff --git a/pkg/icingadb/history/sync.go b/pkg/icingadb/history/sync.go index c370991f5..5bc95bbba 100644 --- a/pkg/icingadb/history/sync.go +++ b/pkg/icingadb/history/sync.go @@ -2,18 +2,18 @@ package history import ( "context" - "github.com/icinga/icingadb/pkg/com" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/periodic" + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/structify" + "github.com/icinga/icinga-go-library/types" + "github.com/icinga/icinga-go-library/utils" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" v1types "github.com/icinga/icingadb/pkg/icingadb/v1" v1 "github.com/icinga/icingadb/pkg/icingadb/v1/history" "github.com/icinga/icingadb/pkg/icingaredis/telemetry" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/periodic" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/structify" - "github.com/icinga/icingadb/pkg/types" - "github.com/icinga/icingadb/pkg/utils" "github.com/pkg/errors" "golang.org/x/sync/errgroup" "reflect" diff --git a/pkg/icingadb/overdue/sync.go b/pkg/icingadb/overdue/sync.go index b8cba912d..3f431b71a 100644 --- a/pkg/icingadb/overdue/sync.go +++ b/pkg/icingadb/overdue/sync.go @@ -5,14 +5,14 @@ import ( _ "embed" "fmt" "github.com/google/uuid" - "github.com/icinga/icingadb/pkg/com" - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/periodic" + "github.com/icinga/icinga-go-library/redis" "github.com/icinga/icingadb/pkg/icingadb/v1" "github.com/icinga/icingadb/pkg/icingadb/v1/overdue" "github.com/icinga/icingadb/pkg/icingaredis/telemetry" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/periodic" - "github.com/icinga/icingadb/pkg/redis" "github.com/pkg/errors" "golang.org/x/sync/errgroup" "regexp" diff --git a/pkg/icingadb/runtime_updates.go b/pkg/icingadb/runtime_updates.go index fd2dcd3dc..9b3f3a102 100644 --- a/pkg/icingadb/runtime_updates.go +++ b/pkg/icingadb/runtime_updates.go @@ -3,17 +3,17 @@ package icingadb import ( "context" "fmt" - "github.com/icinga/icingadb/pkg/com" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/periodic" + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/strcase" + "github.com/icinga/icinga-go-library/structify" "github.com/icinga/icingadb/pkg/common" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" "github.com/icinga/icingadb/pkg/icingaredis/telemetry" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/periodic" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/strcase" - "github.com/icinga/icingadb/pkg/structify" "github.com/pkg/errors" "go.uber.org/zap" "golang.org/x/sync/errgroup" diff --git a/pkg/icingadb/schema.go b/pkg/icingadb/schema.go index bc41cced5..aa4735af3 100644 --- a/pkg/icingadb/schema.go +++ b/pkg/icingadb/schema.go @@ -3,9 +3,9 @@ package icingadb import ( "context" "fmt" - "github.com/icinga/icingadb/pkg/backoff" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/retry" + "github.com/icinga/icinga-go-library/backoff" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/retry" "github.com/pkg/errors" "time" ) diff --git a/pkg/icingadb/scoped_entity.go b/pkg/icingadb/scoped_entity.go index 733c54518..5a77e7c53 100644 --- a/pkg/icingadb/scoped_entity.go +++ b/pkg/icingadb/scoped_entity.go @@ -1,7 +1,7 @@ package icingadb import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" ) // ScopedEntity combines an entity and a scope that specifies diff --git a/pkg/icingadb/sync.go b/pkg/icingadb/sync.go index e7ac536ff..6b39ee64f 100644 --- a/pkg/icingadb/sync.go +++ b/pkg/icingadb/sync.go @@ -3,16 +3,16 @@ package icingadb import ( "context" "fmt" - "github.com/icinga/icingadb/pkg/com" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/strcase" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/common" - "github.com/icinga/icingadb/pkg/database" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" "github.com/icinga/icingadb/pkg/icingaredis" "github.com/icinga/icingadb/pkg/icingaredis/telemetry" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/strcase" - "github.com/icinga/icingadb/pkg/types" "github.com/pkg/errors" "go.uber.org/zap" "golang.org/x/sync/errgroup" diff --git a/pkg/icingadb/types/acknowledgement_state.go b/pkg/icingadb/types/acknowledgement_state.go index 6034c7595..5a385653b 100644 --- a/pkg/icingadb/types/acknowledgement_state.go +++ b/pkg/icingadb/types/acknowledgement_state.go @@ -4,7 +4,7 @@ import ( "database/sql/driver" "encoding" "encoding/json" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" ) diff --git a/pkg/icingadb/types/comment_type.go b/pkg/icingadb/types/comment_type.go index ef7e70927..86bb092c6 100644 --- a/pkg/icingadb/types/comment_type.go +++ b/pkg/icingadb/types/comment_type.go @@ -4,7 +4,7 @@ import ( "database/sql/driver" "encoding" "encoding/json" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" "strconv" ) diff --git a/pkg/icingadb/types/notification_states.go b/pkg/icingadb/types/notification_states.go index 36129f53a..28f4fc84d 100644 --- a/pkg/icingadb/types/notification_states.go +++ b/pkg/icingadb/types/notification_states.go @@ -4,7 +4,7 @@ import ( "database/sql/driver" "encoding" "encoding/json" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" ) diff --git a/pkg/icingadb/types/notification_type.go b/pkg/icingadb/types/notification_type.go index 48abc457d..ce88c2efb 100644 --- a/pkg/icingadb/types/notification_type.go +++ b/pkg/icingadb/types/notification_type.go @@ -3,7 +3,7 @@ package types import ( "database/sql/driver" "encoding" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" "strconv" ) diff --git a/pkg/icingadb/types/notification_types.go b/pkg/icingadb/types/notification_types.go index 1fad901be..add8e3e6b 100644 --- a/pkg/icingadb/types/notification_types.go +++ b/pkg/icingadb/types/notification_types.go @@ -4,7 +4,7 @@ import ( "database/sql/driver" "encoding" "encoding/json" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" ) diff --git a/pkg/icingadb/types/state_type.go b/pkg/icingadb/types/state_type.go index 9f04c960d..247443182 100644 --- a/pkg/icingadb/types/state_type.go +++ b/pkg/icingadb/types/state_type.go @@ -4,7 +4,7 @@ import ( "database/sql/driver" "encoding" "encoding/json" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" ) diff --git a/pkg/icingadb/v1/checkable.go b/pkg/icingadb/v1/checkable.go index 4b1efeb9c..78d75f5b3 100644 --- a/pkg/icingadb/v1/checkable.go +++ b/pkg/icingadb/v1/checkable.go @@ -1,8 +1,8 @@ package v1 import ( + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/types" ) type Checkable struct { diff --git a/pkg/icingadb/v1/command.go b/pkg/icingadb/v1/command.go index 5416bd5e4..74ec5553f 100644 --- a/pkg/icingadb/v1/command.go +++ b/pkg/icingadb/v1/command.go @@ -1,9 +1,9 @@ package v1 import ( + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/types" ) type Command struct { diff --git a/pkg/icingadb/v1/comment.go b/pkg/icingadb/v1/comment.go index a07301c6c..75f29f738 100644 --- a/pkg/icingadb/v1/comment.go +++ b/pkg/icingadb/v1/comment.go @@ -1,9 +1,9 @@ package v1 import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" icingadbTypes "github.com/icinga/icingadb/pkg/icingadb/types" - "github.com/icinga/icingadb/pkg/types" ) type Comment struct { diff --git a/pkg/icingadb/v1/customvar.go b/pkg/icingadb/v1/customvar.go index 82c753ab0..a9a866dd2 100644 --- a/pkg/icingadb/v1/customvar.go +++ b/pkg/icingadb/v1/customvar.go @@ -2,12 +2,12 @@ package v1 import ( "context" - "github.com/icinga/icingadb/pkg/com" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/flatten" - "github.com/icinga/icingadb/pkg/objectpacker" - "github.com/icinga/icingadb/pkg/types" - "github.com/icinga/icingadb/pkg/utils" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/flatten" + "github.com/icinga/icinga-go-library/objectpacker" + "github.com/icinga/icinga-go-library/types" + "github.com/icinga/icinga-go-library/utils" "golang.org/x/sync/errgroup" "runtime" ) diff --git a/pkg/icingadb/v1/downtime.go b/pkg/icingadb/v1/downtime.go index 85fd1edd9..2df189403 100644 --- a/pkg/icingadb/v1/downtime.go +++ b/pkg/icingadb/v1/downtime.go @@ -1,8 +1,8 @@ package v1 import ( - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" ) type Downtime struct { diff --git a/pkg/icingadb/v1/endpoint.go b/pkg/icingadb/v1/endpoint.go index 180753436..464b103fd 100644 --- a/pkg/icingadb/v1/endpoint.go +++ b/pkg/icingadb/v1/endpoint.go @@ -1,9 +1,9 @@ package v1 import ( + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/types" ) type Endpoint struct { diff --git a/pkg/icingadb/v1/entity.go b/pkg/icingadb/v1/entity.go index f872182fa..e7584648e 100644 --- a/pkg/icingadb/v1/entity.go +++ b/pkg/icingadb/v1/entity.go @@ -1,7 +1,7 @@ package v1 import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" ) // EntityWithoutChecksum represents entities without a checksum. diff --git a/pkg/icingadb/v1/environment.go b/pkg/icingadb/v1/environment.go index 80e06f6aa..6b35d5c4b 100644 --- a/pkg/icingadb/v1/environment.go +++ b/pkg/icingadb/v1/environment.go @@ -2,7 +2,7 @@ package v1 import ( "context" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" ) type Environment struct { diff --git a/pkg/icingadb/v1/history/ack.go b/pkg/icingadb/v1/history/ack.go index c4a6b34a2..f89a9adaa 100644 --- a/pkg/icingadb/v1/history/ack.go +++ b/pkg/icingadb/v1/history/ack.go @@ -2,10 +2,10 @@ package history import ( "database/sql/driver" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" "github.com/icinga/icingadb/pkg/icingadb/v1" - "github.com/icinga/icingadb/pkg/types" ) type AckHistoryUpserter struct { diff --git a/pkg/icingadb/v1/history/comment.go b/pkg/icingadb/v1/history/comment.go index 343ca4a10..bf5941928 100644 --- a/pkg/icingadb/v1/history/comment.go +++ b/pkg/icingadb/v1/history/comment.go @@ -2,10 +2,10 @@ package history import ( "database/sql/driver" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" icingadbTypes "github.com/icinga/icingadb/pkg/icingadb/types" - "github.com/icinga/icingadb/pkg/types" ) type CommentHistoryEntity struct { diff --git a/pkg/icingadb/v1/history/downtime.go b/pkg/icingadb/v1/history/downtime.go index 3d548a242..ec3c8d668 100644 --- a/pkg/icingadb/v1/history/downtime.go +++ b/pkg/icingadb/v1/history/downtime.go @@ -2,9 +2,9 @@ package history import ( "database/sql/driver" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/types" ) type DowntimeHistoryEntity struct { diff --git a/pkg/icingadb/v1/history/flapping.go b/pkg/icingadb/v1/history/flapping.go index ea9b9e789..bd86f6205 100644 --- a/pkg/icingadb/v1/history/flapping.go +++ b/pkg/icingadb/v1/history/flapping.go @@ -2,10 +2,10 @@ package history import ( "database/sql/driver" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" "github.com/icinga/icingadb/pkg/icingadb/v1" - "github.com/icinga/icingadb/pkg/types" ) type FlappingHistoryUpserter struct { diff --git a/pkg/icingadb/v1/history/meta.go b/pkg/icingadb/v1/history/meta.go index 32b47a2a1..0f23908f4 100644 --- a/pkg/icingadb/v1/history/meta.go +++ b/pkg/icingadb/v1/history/meta.go @@ -1,9 +1,9 @@ package history import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/icingadb/v1" - "github.com/icinga/icingadb/pkg/types" ) // UpserterEntity provides upsert for entities. diff --git a/pkg/icingadb/v1/history/notification.go b/pkg/icingadb/v1/history/notification.go index ef1faed28..27f9d8778 100644 --- a/pkg/icingadb/v1/history/notification.go +++ b/pkg/icingadb/v1/history/notification.go @@ -1,10 +1,10 @@ package history import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" icingadbTypes "github.com/icinga/icingadb/pkg/icingadb/types" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" - "github.com/icinga/icingadb/pkg/types" ) type NotificationHistory struct { diff --git a/pkg/icingadb/v1/history/state.go b/pkg/icingadb/v1/history/state.go index c6398a7bd..dfd421a0c 100644 --- a/pkg/icingadb/v1/history/state.go +++ b/pkg/icingadb/v1/history/state.go @@ -1,9 +1,9 @@ package history import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" icingadbTypes "github.com/icinga/icingadb/pkg/icingadb/types" - "github.com/icinga/icingadb/pkg/types" ) type StateHistory struct { diff --git a/pkg/icingadb/v1/host.go b/pkg/icingadb/v1/host.go index fd92149cc..d404e9596 100644 --- a/pkg/icingadb/v1/host.go +++ b/pkg/icingadb/v1/host.go @@ -3,9 +3,9 @@ package v1 import ( "bytes" "database/sql/driver" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/types" "net" ) diff --git a/pkg/icingadb/v1/icingadb_instance.go b/pkg/icingadb/v1/icingadb_instance.go index 981c549de..28951e1f7 100644 --- a/pkg/icingadb/v1/icingadb_instance.go +++ b/pkg/icingadb/v1/icingadb_instance.go @@ -1,7 +1,7 @@ package v1 import ( - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" ) type IcingadbInstance struct { diff --git a/pkg/icingadb/v1/meta.go b/pkg/icingadb/v1/meta.go index 49763778b..2d209b193 100644 --- a/pkg/icingadb/v1/meta.go +++ b/pkg/icingadb/v1/meta.go @@ -1,9 +1,9 @@ package v1 import ( + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/types" ) // ChecksumMeta is embedded by every type with a checksum. diff --git a/pkg/icingadb/v1/notification.go b/pkg/icingadb/v1/notification.go index 42132e474..3cfca866b 100644 --- a/pkg/icingadb/v1/notification.go +++ b/pkg/icingadb/v1/notification.go @@ -1,10 +1,10 @@ package v1 import ( + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" icingadbTypes "github.com/icinga/icingadb/pkg/icingadb/types" - "github.com/icinga/icingadb/pkg/types" ) type Notification struct { diff --git a/pkg/icingadb/v1/overdue/host.go b/pkg/icingadb/v1/overdue/host.go index 57f75c121..d61b48712 100644 --- a/pkg/icingadb/v1/overdue/host.go +++ b/pkg/icingadb/v1/overdue/host.go @@ -1,9 +1,9 @@ package overdue import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" - "github.com/icinga/icingadb/pkg/types" ) type HostState struct { diff --git a/pkg/icingadb/v1/overdue/service.go b/pkg/icingadb/v1/overdue/service.go index 0db5550da..14bb25906 100644 --- a/pkg/icingadb/v1/overdue/service.go +++ b/pkg/icingadb/v1/overdue/service.go @@ -1,9 +1,9 @@ package overdue import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" v1 "github.com/icinga/icingadb/pkg/icingadb/v1" - "github.com/icinga/icingadb/pkg/types" ) type ServiceState struct { diff --git a/pkg/icingadb/v1/service.go b/pkg/icingadb/v1/service.go index 2392bc3b9..2c8a650b5 100644 --- a/pkg/icingadb/v1/service.go +++ b/pkg/icingadb/v1/service.go @@ -1,9 +1,9 @@ package v1 import ( + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/types" ) type Service struct { diff --git a/pkg/icingadb/v1/state.go b/pkg/icingadb/v1/state.go index c6505c98c..d2e48e814 100644 --- a/pkg/icingadb/v1/state.go +++ b/pkg/icingadb/v1/state.go @@ -1,8 +1,8 @@ package v1 import ( + "github.com/icinga/icinga-go-library/types" icingadbTypes "github.com/icinga/icingadb/pkg/icingadb/types" - "github.com/icinga/icingadb/pkg/types" ) type State struct { diff --git a/pkg/icingadb/v1/timeperiod.go b/pkg/icingadb/v1/timeperiod.go index 65e4b5226..2025fcbc9 100644 --- a/pkg/icingadb/v1/timeperiod.go +++ b/pkg/icingadb/v1/timeperiod.go @@ -1,9 +1,9 @@ package v1 import ( + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/types" ) type Timeperiod struct { diff --git a/pkg/icingadb/v1/url.go b/pkg/icingadb/v1/url.go index 18750dd8f..55f6eb15b 100644 --- a/pkg/icingadb/v1/url.go +++ b/pkg/icingadb/v1/url.go @@ -1,7 +1,7 @@ package v1 import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" ) type ActionUrl struct { diff --git a/pkg/icingadb/v1/user.go b/pkg/icingadb/v1/user.go index 2f2415832..a556e30fa 100644 --- a/pkg/icingadb/v1/user.go +++ b/pkg/icingadb/v1/user.go @@ -1,10 +1,10 @@ package v1 import ( + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" icingadbTypes "github.com/icinga/icingadb/pkg/icingadb/types" - "github.com/icinga/icingadb/pkg/types" ) type User struct { diff --git a/pkg/icingadb/v1/v1.go b/pkg/icingadb/v1/v1.go index b1ecdc318..f7677c775 100644 --- a/pkg/icingadb/v1/v1.go +++ b/pkg/icingadb/v1/v1.go @@ -1,7 +1,7 @@ package v1 import ( - "github.com/icinga/icingadb/pkg/database" + "github.com/icinga/icinga-go-library/database" ) var StateFactories = []database.EntityFactoryFunc{NewHostState, NewServiceState} diff --git a/pkg/icingaredis/heartbeat.go b/pkg/icingaredis/heartbeat.go index f5253beac..840445a23 100644 --- a/pkg/icingaredis/heartbeat.go +++ b/pkg/icingaredis/heartbeat.go @@ -2,11 +2,11 @@ package icingaredis import ( "context" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/types" + "github.com/icinga/icinga-go-library/utils" v1 "github.com/icinga/icingadb/pkg/icingaredis/v1" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/types" - "github.com/icinga/icingadb/pkg/utils" "github.com/pkg/errors" "go.uber.org/zap" "golang.org/x/sync/errgroup" diff --git a/pkg/icingaredis/telemetry/heartbeat.go b/pkg/icingaredis/telemetry/heartbeat.go index d06790c6f..041a696d0 100644 --- a/pkg/icingaredis/telemetry/heartbeat.go +++ b/pkg/icingaredis/telemetry/heartbeat.go @@ -3,13 +3,13 @@ package telemetry import ( "context" "fmt" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/periodic" + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/utils" "github.com/icinga/icingadb/internal" - "github.com/icinga/icingadb/pkg/com" "github.com/icinga/icingadb/pkg/icingaredis" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/periodic" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/utils" "github.com/pkg/errors" "go.uber.org/zap" "regexp" diff --git a/pkg/icingaredis/telemetry/stats.go b/pkg/icingaredis/telemetry/stats.go index 4b1bd4049..78f5c5c67 100644 --- a/pkg/icingaredis/telemetry/stats.go +++ b/pkg/icingaredis/telemetry/stats.go @@ -2,11 +2,11 @@ package telemetry import ( "context" - "github.com/icinga/icingadb/pkg/com" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/periodic" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/utils" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/periodic" + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/utils" "go.uber.org/zap" "strconv" "time" diff --git a/pkg/icingaredis/utils.go b/pkg/icingaredis/utils.go index 44dee5a6c..22c8661f4 100644 --- a/pkg/icingaredis/utils.go +++ b/pkg/icingaredis/utils.go @@ -2,13 +2,13 @@ package icingaredis import ( "context" - "github.com/icinga/icingadb/pkg/com" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/database" + "github.com/icinga/icinga-go-library/redis" + "github.com/icinga/icinga-go-library/strcase" + "github.com/icinga/icinga-go-library/types" "github.com/icinga/icingadb/pkg/common" "github.com/icinga/icingadb/pkg/contracts" - "github.com/icinga/icingadb/pkg/database" - "github.com/icinga/icingadb/pkg/redis" - "github.com/icinga/icingadb/pkg/strcase" - "github.com/icinga/icingadb/pkg/types" "github.com/pkg/errors" "golang.org/x/sync/errgroup" "runtime" diff --git a/pkg/icingaredis/v1/icinga_status.go b/pkg/icingaredis/v1/icinga_status.go index d94d3d650..eaad7207e 100644 --- a/pkg/icingaredis/v1/icinga_status.go +++ b/pkg/icingaredis/v1/icinga_status.go @@ -1,7 +1,7 @@ package v1 import ( - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" ) // IcingaStatus defines Icinga status information. diff --git a/pkg/icingaredis/v1/stats_message.go b/pkg/icingaredis/v1/stats_message.go index eeea2e5c9..0798468a9 100644 --- a/pkg/icingaredis/v1/stats_message.go +++ b/pkg/icingaredis/v1/stats_message.go @@ -1,7 +1,7 @@ package v1 import ( - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" ) diff --git a/pkg/logging/journald_core.go b/pkg/logging/journald_core.go index ac67cc60c..d1943a539 100644 --- a/pkg/logging/journald_core.go +++ b/pkg/logging/journald_core.go @@ -1,7 +1,7 @@ package logging import ( - "github.com/icinga/icingadb/pkg/strcase" + "github.com/icinga/icinga-go-library/strcase" "github.com/pkg/errors" "github.com/ssgreg/journald" "go.uber.org/zap/zapcore" diff --git a/pkg/objectpacker/objectpacker_test.go b/pkg/objectpacker/objectpacker_test.go index e377d7736..27389dccc 100644 --- a/pkg/objectpacker/objectpacker_test.go +++ b/pkg/objectpacker/objectpacker_test.go @@ -2,7 +2,7 @@ package objectpacker import ( "bytes" - "github.com/icinga/icingadb/pkg/types" + "github.com/icinga/icinga-go-library/types" "github.com/pkg/errors" "io" "testing" diff --git a/pkg/redis/client.go b/pkg/redis/client.go index 3ebd7f79e..cea7d7ea7 100644 --- a/pkg/redis/client.go +++ b/pkg/redis/client.go @@ -4,12 +4,12 @@ import ( "context" "crypto/tls" "fmt" - "github.com/icinga/icingadb/pkg/backoff" - "github.com/icinga/icingadb/pkg/com" - "github.com/icinga/icingadb/pkg/logging" - "github.com/icinga/icingadb/pkg/periodic" - "github.com/icinga/icingadb/pkg/retry" - "github.com/icinga/icingadb/pkg/utils" + "github.com/icinga/icinga-go-library/backoff" + "github.com/icinga/icinga-go-library/com" + "github.com/icinga/icinga-go-library/logging" + "github.com/icinga/icinga-go-library/periodic" + "github.com/icinga/icinga-go-library/retry" + "github.com/icinga/icinga-go-library/utils" "github.com/pkg/errors" "github.com/redis/go-redis/v9" "go.uber.org/zap" diff --git a/pkg/redis/config.go b/pkg/redis/config.go index 46df26f42..d59d37fb2 100644 --- a/pkg/redis/config.go +++ b/pkg/redis/config.go @@ -1,7 +1,7 @@ package redis import ( - "github.com/icinga/icingadb/pkg/config" + "github.com/icinga/icinga-go-library/config" "github.com/pkg/errors" "time" ) diff --git a/pkg/redis/utils.go b/pkg/redis/utils.go index 5da9fb9a5..66a38e30b 100644 --- a/pkg/redis/utils.go +++ b/pkg/redis/utils.go @@ -2,7 +2,7 @@ package redis import ( "context" - "github.com/icinga/icingadb/pkg/utils" + "github.com/icinga/icinga-go-library/utils" "github.com/pkg/errors" "github.com/redis/go-redis/v9" ) diff --git a/pkg/retry/retry.go b/pkg/retry/retry.go index 03be2be0c..0686b0fbf 100644 --- a/pkg/retry/retry.go +++ b/pkg/retry/retry.go @@ -4,7 +4,7 @@ import ( "context" "database/sql/driver" "github.com/go-sql-driver/mysql" - "github.com/icinga/icingadb/pkg/backoff" + "github.com/icinga/icinga-go-library/backoff" "github.com/lib/pq" "github.com/pkg/errors" "io"