diff --git a/common/capabilities/check.go b/common/capabilities/check.go index 3637e0a69..5cee4a72a 100644 --- a/common/capabilities/check.go +++ b/common/capabilities/check.go @@ -17,9 +17,10 @@ package capabilities import ( + "math/big" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" - "math/big" ) func IsCapable(ch channel.Channel, capability int) bool { diff --git a/common/concurrency/initialized_notifier.go b/common/concurrency/initialized_notifier.go index b65155bbf..cdaca631d 100644 --- a/common/concurrency/initialized_notifier.go +++ b/common/concurrency/initialized_notifier.go @@ -17,8 +17,9 @@ package concurrency import ( - "github.com/michaelquigley/pfxlog" "sync/atomic" + + "github.com/michaelquigley/pfxlog" ) type InitState interface { diff --git a/common/config/env.go b/common/config/env.go index a62698832..25ff6213a 100644 --- a/common/config/env.go +++ b/common/config/env.go @@ -17,9 +17,10 @@ package config import ( - "github.com/michaelquigley/pfxlog" "os" "sync" + + "github.com/michaelquigley/pfxlog" ) var ensureTmpDirEnvOnce sync.Once @@ -48,7 +49,7 @@ func EnsureTempDirEnv() { func InjectEnv(config map[interface{}]interface{}) { ensureTmpDirEnvOnce.Do(EnsureTempDirEnv) - + for key, v := range config { if str, ok := v.(string); ok { config[key] = os.ExpandEnv(str) diff --git a/common/config/value.go b/common/config/value.go index 1869fd6c0..7722ba49c 100644 --- a/common/config/value.go +++ b/common/config/value.go @@ -17,8 +17,9 @@ package config import ( - "github.com/openziti/foundation/v2/concurrenz" "sync" + + "github.com/openziti/foundation/v2/concurrenz" ) type Listener[T any] interface { diff --git a/common/ctrl_msg/messages.go b/common/ctrl_msg/messages.go index 36122116d..2b8d13c26 100644 --- a/common/ctrl_msg/messages.go +++ b/common/ctrl_msg/messages.go @@ -19,6 +19,7 @@ package ctrl_msg import ( "errors" "fmt" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/edge_ctrl_pb" ) diff --git a/common/eid/id.go b/common/eid/id.go index 5b17c39f8..c9c30e0fd 100644 --- a/common/eid/id.go +++ b/common/eid/id.go @@ -3,6 +3,7 @@ package eid import ( "crypto/rand" "encoding/binary" + "github.com/teris-io/shortid" ) diff --git a/common/getziti/extract.go b/common/getziti/extract.go index f06d1c150..820512a10 100644 --- a/common/getziti/extract.go +++ b/common/getziti/extract.go @@ -5,11 +5,12 @@ import ( "archive/zip" "compress/gzip" "fmt" - "github.com/michaelquigley/pfxlog" "io" "os" "path/filepath" "strings" + + "github.com/michaelquigley/pfxlog" ) func Unzip(src, dest string, filter func(path string) (string, bool)) error { diff --git a/common/getziti/github.go b/common/getziti/github.go index 6af3640d4..3710e725c 100644 --- a/common/getziti/github.go +++ b/common/getziti/github.go @@ -3,12 +3,6 @@ package getziti import ( "context" "fmt" - "github.com/blang/semver" - "github.com/go-resty/resty/v2" - "github.com/michaelquigley/pfxlog" - "github.com/openziti/foundation/v2/versions" - c "github.com/openziti/ziti/v2/ziti/constants" - "github.com/pkg/errors" "net/http" "net/url" "os" @@ -16,6 +10,13 @@ import ( "sort" "strings" "time" + + "github.com/blang/semver" + "github.com/go-resty/resty/v2" + "github.com/michaelquigley/pfxlog" + "github.com/openziti/foundation/v2/versions" + c "github.com/openziti/ziti/v2/ziti/constants" + "github.com/pkg/errors" ) // GitHubReleasesData is used to parse the '/releases/latest' response from GitHub diff --git a/common/getziti/install_ziti.go b/common/getziti/install_ziti.go index e9a53bf34..eb230d75b 100644 --- a/common/getziti/install_ziti.go +++ b/common/getziti/install_ziti.go @@ -2,6 +2,7 @@ package getziti import ( "fmt" + c "github.com/openziti/ziti/v2/ziti/constants" ) diff --git a/common/getziti/install_ziti_edge_tunnel.go b/common/getziti/install_ziti_edge_tunnel.go index 2b226d08c..a95e17970 100644 --- a/common/getziti/install_ziti_edge_tunnel.go +++ b/common/getziti/install_ziti_edge_tunnel.go @@ -2,9 +2,10 @@ package getziti import ( "fmt" + "strings" + "github.com/blang/semver" c "github.com/openziti/ziti/v2/ziti/constants" - "strings" ) func InstallZitiEdgeTunnel(targetVersion, targetOS, targetArch, binDir string, verbose bool) error { diff --git a/common/handler_common/common.go b/common/handler_common/common.go index 85615c27f..52e53d2a0 100644 --- a/common/handler_common/common.go +++ b/common/handler_common/common.go @@ -1,10 +1,11 @@ package handler_common import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/ctrl_msg" - "time" ) func SendSuccess(request *channel.Message, ch channel.Channel, message string) { diff --git a/common/health/handler.go b/common/health/handler.go index 7bebdaec7..602921182 100644 --- a/common/health/handler.go +++ b/common/health/handler.go @@ -19,12 +19,13 @@ package health import ( "encoding/json" "fmt" - gosundheit "github.com/AppsFlyer/go-sundheit" - "github.com/openziti/xweb/v3" - "github.com/sirupsen/logrus" "net/http" "strings" "time" + + gosundheit "github.com/AppsFlyer/go-sundheit" + "github.com/openziti/xweb/v3" + "github.com/sirupsen/logrus" ) const ( diff --git a/common/logcontext/logcontext.go b/common/logcontext/logcontext.go index 51c4b0b07..591257958 100644 --- a/common/logcontext/logcontext.go +++ b/common/logcontext/logcontext.go @@ -2,6 +2,7 @@ package logcontext import ( "fmt" + "github.com/michaelquigley/pfxlog" "github.com/sirupsen/logrus" ) diff --git a/common/metrics/pool_metrics.go b/common/metrics/pool_metrics.go index 5b1904c92..eec18d66a 100644 --- a/common/metrics/pool_metrics.go +++ b/common/metrics/pool_metrics.go @@ -17,10 +17,11 @@ package metrics import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/goroutines" "github.com/openziti/metrics" - "time" ) func ConfigureGoroutinesPoolMetrics(config *goroutines.PoolConfig, registry metrics.Registry, poolType string) { diff --git a/common/pb/cmd_pb/impl.go b/common/pb/cmd_pb/impl.go index 8e5e1fd22..88ea836ce 100644 --- a/common/pb/cmd_pb/impl.go +++ b/common/pb/cmd_pb/impl.go @@ -2,6 +2,7 @@ package cmd_pb import ( "encoding/binary" + "google.golang.org/protobuf/proto" ) diff --git a/common/pb/cmd_pb/tags_test.go b/common/pb/cmd_pb/tags_test.go index d844cbd1f..5247a414c 100644 --- a/common/pb/cmd_pb/tags_test.go +++ b/common/pb/cmd_pb/tags_test.go @@ -1,8 +1,9 @@ package cmd_pb import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func TestTagEncodeDecode(t *testing.T) { diff --git a/common/pb/edge_ctrl_pb/decoder.go b/common/pb/edge_ctrl_pb/decoder.go index 22bd3881b..a1d43a496 100644 --- a/common/pb/edge_ctrl_pb/decoder.go +++ b/common/pb/edge_ctrl_pb/decoder.go @@ -18,10 +18,11 @@ package edge_ctrl_pb import ( "fmt" + "strings" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "google.golang.org/protobuf/proto" - "strings" ) type Decoder struct{} diff --git a/common/runner/operation.go b/common/runner/operation.go index 618cf74c2..3c595efe1 100644 --- a/common/runner/operation.go +++ b/common/runner/operation.go @@ -17,8 +17,9 @@ package runner import ( - "github.com/google/uuid" "time" + + "github.com/google/uuid" ) type Operation interface { diff --git a/common/runner/runner.go b/common/runner/runner.go index 65b172752..1f240118b 100644 --- a/common/runner/runner.go +++ b/common/runner/runner.go @@ -18,9 +18,10 @@ package runner import ( "fmt" + "time" + "github.com/google/uuid" "github.com/pkg/errors" - "time" ) type ErrorHandler func(error, Operation) diff --git a/common/spiffehlp/spiffe.go b/common/spiffehlp/spiffe.go index de5cf30dc..5e22a8753 100644 --- a/common/spiffehlp/spiffe.go +++ b/common/spiffehlp/spiffe.go @@ -20,8 +20,9 @@ import ( "crypto/tls" "crypto/x509" "fmt" - "github.com/pkg/errors" "net/url" + + "github.com/pkg/errors" ) // GetSpiffeIdFromCertChain cycles through a slice of certificates that goes from leaf up CAs. Each certificate diff --git a/common/trace/channel_peekhandler.go b/common/trace/channel_peekhandler.go index 1a70715eb..2d57f3938 100644 --- a/common/trace/channel_peekhandler.go +++ b/common/trace/channel_peekhandler.go @@ -18,16 +18,17 @@ package trace import ( "fmt" + "sync/atomic" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/trace/pb" + "github.com/openziti/foundation/v2/concurrenz" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" - "github.com/openziti/sdk-golang/xgress" - "github.com/openziti/foundation/v2/concurrenz" "google.golang.org/protobuf/proto" - "sync/atomic" - "time" ) var decoders = []channel.TraceMessageDecoder{channel.Decoder{}, ctrl_pb.Decoder{}, xgress.Decoder{}, mgmt_pb.Decoder{}} diff --git a/common/trace/controller.go b/common/trace/controller.go index c4ee1b6da..e2263247b 100644 --- a/common/trace/controller.go +++ b/common/trace/controller.go @@ -18,9 +18,10 @@ package trace import ( "fmt" - "github.com/openziti/channel/v4/trace/pb" "regexp" "strings" + + "github.com/openziti/channel/v4/trace/pb" ) type SourceType int diff --git a/common/trace/xgress_peekhandler.go b/common/trace/xgress_peekhandler.go index 10118c19f..8ae654225 100644 --- a/common/trace/xgress_peekhandler.go +++ b/common/trace/xgress_peekhandler.go @@ -18,13 +18,14 @@ package trace import ( "fmt" - "github.com/openziti/channel/v4" - "github.com/openziti/channel/v4/trace/pb" - "github.com/openziti/sdk-golang/xgress" - "github.com/openziti/foundation/v2/concurrenz" - "github.com/openziti/identity" "sync/atomic" "time" + + "github.com/openziti/channel/v4" + "github.com/openziti/channel/v4/trace/pb" + "github.com/openziti/foundation/v2/concurrenz" + "github.com/openziti/identity" + "github.com/openziti/sdk-golang/xgress" ) type XgressPeekHandler struct { diff --git a/common/version/info.go b/common/version/info.go index 1780f5016..2803be24b 100644 --- a/common/version/info.go +++ b/common/version/info.go @@ -17,8 +17,9 @@ package version import ( - "github.com/openziti/foundation/v2/versions" "runtime" + + "github.com/openziti/foundation/v2/versions" ) type cmdBuildInfo struct{} diff --git a/controller/api/api.go b/controller/api/api.go index 39a469ae7..8c2bf89c7 100644 --- a/controller/api/api.go +++ b/controller/api/api.go @@ -17,11 +17,12 @@ package api import ( + "net/http" + "github.com/go-openapi/runtime" "github.com/openziti/foundation/v2/errorz" "github.com/openziti/ziti/v2/controller/apierror" "github.com/openziti/ziti/v2/controller/change" - "net/http" ) type Responder interface { diff --git a/controller/api/cors.go b/controller/api/cors.go index 790b3b50d..14465e53d 100644 --- a/controller/api/cors.go +++ b/controller/api/cors.go @@ -17,8 +17,9 @@ package api import ( - "github.com/gorilla/handlers" "net/http" + + "github.com/gorilla/handlers" ) const ( diff --git a/controller/apierror/schema.go b/controller/apierror/schema.go index c76cc4c00..03b5da3cf 100644 --- a/controller/apierror/schema.go +++ b/controller/apierror/schema.go @@ -3,6 +3,7 @@ package apierror import ( "encoding/json" "fmt" + "github.com/xeipuuv/gojsonschema" ) diff --git a/controller/change/context.go b/controller/change/context.go index b612946d9..e3559e004 100644 --- a/controller/change/context.go +++ b/controller/change/context.go @@ -18,6 +18,7 @@ package change import ( "context" + "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/common/pb/cmd_pb" ) diff --git a/controller/command/rate_limiter.go b/controller/command/rate_limiter.go index 17b831bf6..80c759c57 100644 --- a/controller/command/rate_limiter.go +++ b/controller/command/rate_limiter.go @@ -18,6 +18,11 @@ package command import ( "fmt" + "strings" + "sync" + "sync/atomic" + "time" + "github.com/google/uuid" "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/errorz" @@ -25,10 +30,6 @@ import ( "github.com/openziti/metrics" "github.com/openziti/ziti/v2/controller/apierror" "github.com/pkg/errors" - "strings" - "sync" - "sync/atomic" - "time" ) const ( diff --git a/controller/command/rate_limiter_test.go b/controller/command/rate_limiter_test.go index f7df771f3..51ee90f15 100644 --- a/controller/command/rate_limiter_test.go +++ b/controller/command/rate_limiter_test.go @@ -21,16 +21,17 @@ package command import ( "errors" "fmt" + "sync" + "sync/atomic" + "testing" + "time" + "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/foundation/v2/errorz" "github.com/openziti/metrics" "github.com/openziti/sdk-golang/ziti" "github.com/openziti/ziti/v2/controller/apierror" "github.com/stretchr/testify/assert" - "sync" - "sync/atomic" - "testing" - "time" ) func Test_AdaptiveRateLimiter(t *testing.T) { diff --git a/controller/command/registry.go b/controller/command/registry.go index a8c0f5978..68e633c89 100644 --- a/controller/command/registry.go +++ b/controller/command/registry.go @@ -18,6 +18,7 @@ package command import ( "encoding/binary" + "github.com/openziti/foundation/v2/concurrenz" "github.com/pkg/errors" ) diff --git a/controller/config/config_edge_test.go b/controller/config/config_edge_test.go index 710fc548a..b52fcd7af 100644 --- a/controller/config/config_edge_test.go +++ b/controller/config/config_edge_test.go @@ -8,12 +8,13 @@ import ( "crypto/rand" "crypto/x509" "crypto/x509/pkix" - "github.com/google/uuid" - nfpem "github.com/openziti/foundation/v2/pem" - "github.com/stretchr/testify/require" "math/big" "testing" "time" + + "github.com/google/uuid" + nfpem "github.com/openziti/foundation/v2/pem" + "github.com/stretchr/testify/require" ) func Test_validateHostPortString(t *testing.T) { diff --git a/controller/db/api_session_certificate_store.go b/controller/db/api_session_certificate_store.go index 8945d3f9a..b0255fc17 100644 --- a/controller/db/api_session_certificate_store.go +++ b/controller/db/api_session_certificate_store.go @@ -17,9 +17,10 @@ package db import ( + "time" + "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" - "time" ) const ( diff --git a/controller/db/api_session_store.go b/controller/db/api_session_store.go index 578647c4e..94b759516 100644 --- a/controller/db/api_session_store.go +++ b/controller/db/api_session_store.go @@ -17,6 +17,9 @@ package db import ( + "strings" + "time" + "github.com/kataras/go-events" "github.com/michaelquigley/pfxlog" "github.com/openziti/storage/ast" @@ -27,8 +30,6 @@ import ( log "github.com/sirupsen/logrus" "go.etcd.io/bbolt" bolterrors "go.etcd.io/bbolt/errors" - "strings" - "time" ) const ( diff --git a/controller/db/api_session_store_test.go b/controller/db/api_session_store_test.go index 833b6079e..29a406689 100644 --- a/controller/db/api_session_store_test.go +++ b/controller/db/api_session_store_test.go @@ -18,6 +18,9 @@ package db import ( "fmt" + "testing" + "time" + "github.com/google/go-cmp/cmp" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/boltz" @@ -25,8 +28,6 @@ import ( "github.com/openziti/ziti/v2/common/eid" "github.com/openziti/ziti/v2/controller/change" "go.etcd.io/bbolt" - "testing" - "time" ) func Test_ApiSessionStore(t *testing.T) { diff --git a/controller/db/base_entity.go b/controller/db/base_entity.go index ed1101a42..2a6ad825b 100644 --- a/controller/db/base_entity.go +++ b/controller/db/base_entity.go @@ -17,8 +17,9 @@ package db import ( - "github.com/openziti/storage/boltz" "strings" + + "github.com/openziti/storage/boltz" ) const ( diff --git a/controller/db/base_store.go b/controller/db/base_store.go index f9cc01005..c013f5dcf 100644 --- a/controller/db/base_store.go +++ b/controller/db/base_store.go @@ -17,11 +17,12 @@ package db import ( + "strings" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" "go.etcd.io/bbolt" - "strings" ) type initializableStore interface { diff --git a/controller/db/config_store_test.go b/controller/db/config_store_test.go index 540e524a2..f9e331b09 100644 --- a/controller/db/config_store_test.go +++ b/controller/db/config_store_test.go @@ -19,11 +19,12 @@ package db import ( "encoding/json" "fmt" + "testing" + "time" + "github.com/openziti/storage/boltztest" "github.com/openziti/ziti/v2/common/eid" "go.etcd.io/bbolt" - "testing" - "time" ) func Test_ConfigStore(t *testing.T) { diff --git a/controller/db/config_type_store_test.go b/controller/db/config_type_store_test.go index 75e562fe2..bee462a6a 100644 --- a/controller/db/config_type_store_test.go +++ b/controller/db/config_type_store_test.go @@ -18,11 +18,12 @@ package db import ( "fmt" + "testing" + "time" + "github.com/openziti/storage/boltztest" "github.com/openziti/ziti/v2/common/eid" "go.etcd.io/bbolt" - "testing" - "time" ) func Test_ConfigTypeStore(t *testing.T) { diff --git a/controller/db/controller_store.go b/controller/db/controller_store.go index 976c002a0..c0623cd61 100644 --- a/controller/db/controller_store.go +++ b/controller/db/controller_store.go @@ -17,10 +17,11 @@ package db import ( - "github.com/openziti/storage/ast" - "github.com/openziti/storage/boltz" "strconv" "time" + + "github.com/openziti/storage/ast" + "github.com/openziti/storage/boltz" ) const ( diff --git a/controller/db/controller_store_test.go b/controller/db/controller_store_test.go index d15681195..b2f9c7efa 100644 --- a/controller/db/controller_store_test.go +++ b/controller/db/controller_store_test.go @@ -26,14 +26,15 @@ import ( "crypto/x509/pkix" "encoding/pem" "fmt" + "math/big" + "testing" + "time" + "github.com/google/uuid" "github.com/openziti/storage/boltz" "github.com/openziti/storage/boltztest" "github.com/openziti/ziti/v2/common/eid" "go.etcd.io/bbolt" - "math/big" - "testing" - "time" ) func Test_ControllerStore(t *testing.T) { diff --git a/controller/db/edge_router_policy_store.go b/controller/db/edge_router_policy_store.go index 946e2a53f..7c878d5bb 100644 --- a/controller/db/edge_router_policy_store.go +++ b/controller/db/edge_router_policy_store.go @@ -2,12 +2,13 @@ package db import ( "fmt" + "sort" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/common/eid" - "sort" ) func newEdgeRouterPolicy(name string) *EdgeRouterPolicy { diff --git a/controller/db/edge_router_policy_store_test.go b/controller/db/edge_router_policy_store_test.go index 4dc4d859c..21b592bd9 100644 --- a/controller/db/edge_router_policy_store_test.go +++ b/controller/db/edge_router_policy_store_test.go @@ -2,6 +2,10 @@ package db import ( "fmt" + "sort" + "strings" + "testing" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/boltz" @@ -9,9 +13,6 @@ import ( "github.com/openziti/ziti/v2/common/eid" "github.com/sirupsen/logrus" "go.etcd.io/bbolt" - "sort" - "strings" - "testing" ) func Test_EdgeRouterPolicyStore(t *testing.T) { diff --git a/controller/db/edge_router_store_test.go b/controller/db/edge_router_store_test.go index ea0ee11f2..12ebe947d 100644 --- a/controller/db/edge_router_store_test.go +++ b/controller/db/edge_router_store_test.go @@ -1,10 +1,11 @@ package db import ( + "testing" + "github.com/google/uuid" "github.com/openziti/storage/boltz" "github.com/openziti/storage/boltztest" - "testing" ) func Test_EdgeRouterEvents(t *testing.T) { diff --git a/controller/db/edge_service_store_test.go b/controller/db/edge_service_store_test.go index fa6bf0a72..2e5c700b9 100644 --- a/controller/db/edge_service_store_test.go +++ b/controller/db/edge_service_store_test.go @@ -18,11 +18,12 @@ package db import ( "fmt" + "testing" + "time" + "github.com/openziti/storage/boltztest" "github.com/openziti/ziti/v2/common/eid" "github.com/openziti/ziti/v2/controller/change" - "testing" - "time" "github.com/google/go-cmp/cmp" "github.com/openziti/foundation/v2/stringz" diff --git a/controller/db/eventual_eventer.go b/controller/db/eventual_eventer.go index 3e3cc3c78..75a52b8ae 100644 --- a/controller/db/eventual_eventer.go +++ b/controller/db/eventual_eventer.go @@ -18,6 +18,10 @@ package db import ( "fmt" + "sync" + "sync/atomic" + "time" + "github.com/kataras/go-events" "github.com/lucsky/cuid" "github.com/michaelquigley/pfxlog" @@ -26,9 +30,6 @@ import ( cmap "github.com/orcaman/concurrent-map/v2" "github.com/pkg/errors" "go.etcd.io/bbolt" - "sync" - "sync/atomic" - "time" ) // An EventualEventer provides a method for storing events in a persistent manner diff --git a/controller/db/interface_db_model.go b/controller/db/interface_db_model.go index 6ada08dbd..10dbbc872 100644 --- a/controller/db/interface_db_model.go +++ b/controller/db/interface_db_model.go @@ -19,8 +19,9 @@ package db import ( "encoding/json" "fmt" - "github.com/openziti/storage/boltz" "net" + + "github.com/openziti/storage/boltz" ) const ( diff --git a/controller/db/migration_v19.go b/controller/db/migration_v19.go index a2eecd878..2223f3862 100644 --- a/controller/db/migration_v19.go +++ b/controller/db/migration_v19.go @@ -1,11 +1,12 @@ package db import ( + "time" + "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "time" ) var identityTypesMap = map[string]string{ diff --git a/controller/db/migration_v23.go b/controller/db/migration_v23.go index a7163662b..6eb7312ac 100644 --- a/controller/db/migration_v23.go +++ b/controller/db/migration_v23.go @@ -1,8 +1,9 @@ package db import ( - "github.com/openziti/storage/boltz" "time" + + "github.com/openziti/storage/boltz" ) func (m *Migrations) addProcessMultiPostureCheck(step *boltz.MigrationStep) { diff --git a/controller/db/migration_v24.go b/controller/db/migration_v24.go index 32c79af5c..6024e51c7 100644 --- a/controller/db/migration_v24.go +++ b/controller/db/migration_v24.go @@ -2,6 +2,7 @@ package db import ( "fmt" + "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" ) diff --git a/controller/db/migration_v25.go b/controller/db/migration_v25.go index 8dce99016..4785d9b8f 100644 --- a/controller/db/migration_v25.go +++ b/controller/db/migration_v25.go @@ -17,8 +17,9 @@ package db import ( - "github.com/openziti/storage/boltz" "time" + + "github.com/openziti/storage/boltz" ) func (m *Migrations) addSystemAuthPolicies(step *boltz.MigrationStep) { diff --git a/controller/db/migration_v37.go b/controller/db/migration_v37.go index dc238c3a9..06d26b3d7 100644 --- a/controller/db/migration_v37.go +++ b/controller/db/migration_v37.go @@ -18,6 +18,7 @@ package db import ( "fmt" + nfpem "github.com/openziti/foundation/v2/pem" "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" diff --git a/controller/db/posture_check_mac.go b/controller/db/posture_check_mac.go index 806c24494..f553781ac 100644 --- a/controller/db/posture_check_mac.go +++ b/controller/db/posture_check_mac.go @@ -17,9 +17,10 @@ package db import ( - "github.com/openziti/storage/boltz" "regexp" "strings" + + "github.com/openziti/storage/boltz" ) const ( diff --git a/controller/db/posture_check_process.go b/controller/db/posture_check_process.go index b952b3a9a..263265ac9 100644 --- a/controller/db/posture_check_process.go +++ b/controller/db/posture_check_process.go @@ -17,8 +17,9 @@ package db import ( - "github.com/openziti/storage/boltz" "strings" + + "github.com/openziti/storage/boltz" ) const ( diff --git a/controller/db/revocation_store.go b/controller/db/revocation_store.go index 05cd5cb64..592b891b5 100644 --- a/controller/db/revocation_store.go +++ b/controller/db/revocation_store.go @@ -17,9 +17,10 @@ package db import ( + "time" + "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" - "time" ) const ( diff --git a/controller/db/router_store.go b/controller/db/router_store.go index fccc0e9d5..b619a4045 100644 --- a/controller/db/router_store.go +++ b/controller/db/router_store.go @@ -17,10 +17,11 @@ package db import ( + "time" + "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" "go.etcd.io/bbolt" - "time" ) const ( diff --git a/controller/db/router_store_test.go b/controller/db/router_store_test.go index 1d28c79a0..0911c7a49 100644 --- a/controller/db/router_store_test.go +++ b/controller/db/router_store_test.go @@ -18,10 +18,11 @@ package db import ( "fmt" - "github.com/openziti/storage/boltztest" "testing" "time" + "github.com/openziti/storage/boltztest" + "github.com/google/uuid" "github.com/google/go-cmp/cmp" diff --git a/controller/db/service_edge_router_policy_store.go b/controller/db/service_edge_router_policy_store.go index de3fd946f..d515032b3 100644 --- a/controller/db/service_edge_router_policy_store.go +++ b/controller/db/service_edge_router_policy_store.go @@ -2,12 +2,13 @@ package db import ( "fmt" + "sort" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/common/eid" - "sort" ) func newServiceEdgeRouterPolicy(name string) *ServiceEdgeRouterPolicy { diff --git a/controller/db/service_edge_router_policy_store_test.go b/controller/db/service_edge_router_policy_store_test.go index 11a5fab45..851f0c991 100644 --- a/controller/db/service_edge_router_policy_store_test.go +++ b/controller/db/service_edge_router_policy_store_test.go @@ -2,13 +2,14 @@ package db import ( "fmt" + "sort" + "testing" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/boltztest" "github.com/openziti/ziti/v2/common/eid" "go.etcd.io/bbolt" - "sort" - "testing" ) func Test_ServiceEdgeRouterPolicyStore(t *testing.T) { diff --git a/controller/db/service_events.go b/controller/db/service_events.go index e5310a801..519aa2e61 100644 --- a/controller/db/service_events.go +++ b/controller/db/service_events.go @@ -2,6 +2,7 @@ package db import ( "fmt" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/cowslice" ) diff --git a/controller/db/service_store_test.go b/controller/db/service_store_test.go index 05b00bf95..f3b6c2d02 100644 --- a/controller/db/service_store_test.go +++ b/controller/db/service_store_test.go @@ -18,11 +18,12 @@ package db import ( "fmt" - "github.com/google/uuid" - "github.com/openziti/storage/boltztest" "testing" "time" + "github.com/google/uuid" + "github.com/openziti/storage/boltztest" + "github.com/google/go-cmp/cmp" "github.com/openziti/storage/boltz" "go.etcd.io/bbolt" diff --git a/controller/db/session_store_test.go b/controller/db/session_store_test.go index 239d574b6..268e88c8d 100644 --- a/controller/db/session_store_test.go +++ b/controller/db/session_store_test.go @@ -18,6 +18,9 @@ package db import ( "fmt" + "testing" + "time" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/openziti/foundation/v2/stringz" @@ -26,8 +29,6 @@ import ( "github.com/openziti/ziti/v2/common/eid" "github.com/openziti/ziti/v2/controller/change" "go.etcd.io/bbolt" - "testing" - "time" ) const apiSessionsSessionsIdxPath = "/" + RootBucket + "/" + boltz.IndexesBucket + "/" + EntityTypeApiSessions + "/" + EntityTypeSessions diff --git a/controller/db/stores.go b/controller/db/stores.go index bb87eaa2c..6493105c0 100644 --- a/controller/db/stores.go +++ b/controller/db/stores.go @@ -21,6 +21,10 @@ import ( "crypto/x509" "errors" "fmt" + "reflect" + "sync" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/errorz" "github.com/openziti/foundation/v2/rate" @@ -29,9 +33,6 @@ import ( "github.com/openziti/ziti/v2/controller/change" "go.etcd.io/bbolt" "go4.org/sort" - "reflect" - "sync" - "time" ) func NewStoreDefinition[E boltz.ExtEntity](strategy boltz.EntityStrategy[E]) boltz.StoreDefinition[E] { diff --git a/controller/db/terminator_store.go b/controller/db/terminator_store.go index 770b30a52..743a7d3cc 100644 --- a/controller/db/terminator_store.go +++ b/controller/db/terminator_store.go @@ -18,6 +18,7 @@ package db import ( "encoding/binary" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/sequence" "github.com/openziti/storage/ast" diff --git a/controller/db/terminator_store_test.go b/controller/db/terminator_store_test.go index f0e9838b7..2ba4d697a 100644 --- a/controller/db/terminator_store_test.go +++ b/controller/db/terminator_store_test.go @@ -18,15 +18,16 @@ package db import ( "fmt" + "math" + "testing" + "time" + "github.com/google/uuid" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/boltztest" "github.com/openziti/ziti/v2/controller/fields" "github.com/openziti/ziti/v2/controller/xt" "go.etcd.io/bbolt" - "math" - "testing" - "time" ) func Test_TerminatorStore(t *testing.T) { diff --git a/controller/db/testing.go b/controller/db/testing.go index adcdb1e90..daf603e0e 100644 --- a/controller/db/testing.go +++ b/controller/db/testing.go @@ -1,6 +1,8 @@ package db import ( + "testing" + "github.com/google/uuid" "github.com/michaelquigley/pfxlog" "github.com/openziti/storage/boltz" @@ -12,7 +14,6 @@ import ( "github.com/openziti/ziti/v2/controller/xt_smartrouting" "github.com/pkg/errors" "go.etcd.io/bbolt" - "testing" ) func NewTestContext(t testing.TB) *TestContext { diff --git a/controller/db/transit_router_store.go b/controller/db/transit_router_store.go index 9796e0fe2..208c2b97b 100644 --- a/controller/db/transit_router_store.go +++ b/controller/db/transit_router_store.go @@ -18,6 +18,7 @@ package db import ( "fmt" + "github.com/openziti/storage/boltz" ) diff --git a/controller/db/util.go b/controller/db/util.go index e0512c05c..3074ea4dc 100644 --- a/controller/db/util.go +++ b/controller/db/util.go @@ -18,11 +18,12 @@ package db import ( "fmt" + "strings" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/boltz" "github.com/pkg/errors" - "strings" ) const ( diff --git a/controller/env/helpers.go b/controller/env/helpers.go index 0df06af74..5b64cb0a0 100644 --- a/controller/env/helpers.go +++ b/controller/env/helpers.go @@ -1,11 +1,12 @@ package env import ( + "net/http" + openApiErrors "github.com/go-openapi/errors" "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/errorz" "github.com/openziti/ziti/v2/controller/apierror" - "net/http" ) // ServeError is a wrapper for the OpenAPI REST server to allow the Edge API Error message responses to be used diff --git a/controller/env/producers.go b/controller/env/producers.go index 0b863440b..e4d5c4fd9 100644 --- a/controller/env/producers.go +++ b/controller/env/producers.go @@ -17,8 +17,9 @@ package env import ( - "gopkg.in/yaml.v3" "io" + + "gopkg.in/yaml.v3" ) type YamlProducer struct{} diff --git a/controller/env/trace.go b/controller/env/trace.go index 57c025df4..a8a7b7371 100644 --- a/controller/env/trace.go +++ b/controller/env/trace.go @@ -2,8 +2,9 @@ package env import ( "fmt" - cmap "github.com/orcaman/concurrent-map/v2" "time" + + cmap "github.com/orcaman/concurrent-map/v2" ) func NewTraceManager(shutdownNotify <-chan struct{}) *TraceManager { diff --git a/controller/event/metrics.go b/controller/event/metrics.go index 63f0bc902..ecd152ab5 100644 --- a/controller/event/metrics.go +++ b/controller/event/metrics.go @@ -17,8 +17,9 @@ package event import ( - "github.com/openziti/metrics/metrics_pb" "time" + + "github.com/openziti/metrics/metrics_pb" ) const ( diff --git a/controller/events/dispatcher_api_session.go b/controller/events/dispatcher_api_session.go index 7089478f0..0c3d94ef2 100644 --- a/controller/events/dispatcher_api_session.go +++ b/controller/events/dispatcher_api_session.go @@ -18,13 +18,14 @@ package events import ( "fmt" + "reflect" + "time" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/event" "github.com/pkg/errors" - "reflect" - "time" ) func (self *Dispatcher) AddApiSessionEventHandler(handler event.ApiSessionEventHandler) { diff --git a/controller/events/dispatcher_authentication.go b/controller/events/dispatcher_authentication.go index 49485a7c3..b6b160b0d 100644 --- a/controller/events/dispatcher_authentication.go +++ b/controller/events/dispatcher_authentication.go @@ -18,10 +18,11 @@ package events import ( "fmt" + "reflect" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/event" "github.com/pkg/errors" - "reflect" ) func (self *Dispatcher) AddAuthenticationEventHandler(handler event.AuthenticationEventHandler) { diff --git a/controller/events/dispatcher_circuit.go b/controller/events/dispatcher_circuit.go index 6c8046959..ae200f360 100644 --- a/controller/events/dispatcher_circuit.go +++ b/controller/events/dispatcher_circuit.go @@ -18,9 +18,10 @@ package events import ( "fmt" + "reflect" + "github.com/openziti/ziti/v2/controller/event" "github.com/pkg/errors" - "reflect" ) func (self *Dispatcher) AddCircuitEventHandler(handler event.CircuitEventHandler) { diff --git a/controller/events/dispatcher_cluster.go b/controller/events/dispatcher_cluster.go index 21d1a8f55..684d7cf52 100644 --- a/controller/events/dispatcher_cluster.go +++ b/controller/events/dispatcher_cluster.go @@ -17,9 +17,10 @@ package events import ( + "reflect" + "github.com/openziti/ziti/v2/controller/event" "github.com/pkg/errors" - "reflect" ) func (self *Dispatcher) AddClusterEventHandler(handler event.ClusterEventHandler) { diff --git a/controller/events/dispatcher_connect.go b/controller/events/dispatcher_connect.go index 899c91260..616c7ff48 100644 --- a/controller/events/dispatcher_connect.go +++ b/controller/events/dispatcher_connect.go @@ -17,9 +17,10 @@ package events import ( + "reflect" + "github.com/openziti/ziti/v2/controller/event" "github.com/pkg/errors" - "reflect" ) func (self *Dispatcher) AddConnectEventHandler(handler event.ConnectEventHandler) { diff --git a/controller/events/dispatcher_entity_change.go b/controller/events/dispatcher_entity_change.go index 1cd4df45f..da38b5f91 100644 --- a/controller/events/dispatcher_entity_change.go +++ b/controller/events/dispatcher_entity_change.go @@ -19,6 +19,10 @@ package events import ( "context" "encoding/binary" + "reflect" + "strings" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/genext" "github.com/openziti/storage/boltz" @@ -28,9 +32,6 @@ import ( "github.com/openziti/ziti/v2/controller/network" "github.com/pkg/errors" "go.etcd.io/bbolt" - "reflect" - "strings" - "time" ) const ( diff --git a/controller/events/dispatcher_entity_counts.go b/controller/events/dispatcher_entity_counts.go index 2f3e9cd5b..587b83c9e 100644 --- a/controller/events/dispatcher_entity_counts.go +++ b/controller/events/dispatcher_entity_counts.go @@ -17,11 +17,12 @@ package events import ( - "github.com/openziti/ziti/v2/controller/event" - "github.com/pkg/errors" "reflect" "strings" "time" + + "github.com/openziti/ziti/v2/controller/event" + "github.com/pkg/errors" ) func (self *Dispatcher) AddEntityCountEventHandler(handler event.EntityCountEventHandler, interval time.Duration, onlyLeaderEvents bool) { diff --git a/controller/events/dispatcher_link.go b/controller/events/dispatcher_link.go index 833b0842f..6ec08da6c 100644 --- a/controller/events/dispatcher_link.go +++ b/controller/events/dispatcher_link.go @@ -17,9 +17,10 @@ package events import ( + "reflect" + "github.com/openziti/ziti/v2/controller/event" "github.com/pkg/errors" - "reflect" ) func (self *Dispatcher) AddLinkEventHandler(handler event.LinkEventHandler) { diff --git a/controller/events/dispatcher_metrics.go b/controller/events/dispatcher_metrics.go index 99d04b927..07afc9162 100644 --- a/controller/events/dispatcher_metrics.go +++ b/controller/events/dispatcher_metrics.go @@ -17,13 +17,14 @@ package events import ( + "reflect" + "regexp" + "github.com/google/uuid" "github.com/openziti/metrics/metrics_pb" "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/controller/network" "github.com/pkg/errors" - "reflect" - "regexp" ) func (self *Dispatcher) AddMetricsEventHandler(handler event.MetricsEventHandler) { diff --git a/controller/events/dispatcher_router.go b/controller/events/dispatcher_router.go index 9a4dee93b..9ed12f751 100644 --- a/controller/events/dispatcher_router.go +++ b/controller/events/dispatcher_router.go @@ -17,12 +17,13 @@ package events import ( + "reflect" + "time" + "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/network" "github.com/pkg/errors" - "reflect" - "time" ) func (self *Dispatcher) AddRouterEventHandler(handler event.RouterEventHandler) { diff --git a/controller/events/dispatcher_sdk.go b/controller/events/dispatcher_sdk.go index 6fceb0575..cdfabb3a9 100644 --- a/controller/events/dispatcher_sdk.go +++ b/controller/events/dispatcher_sdk.go @@ -17,9 +17,10 @@ package events import ( + "reflect" + "github.com/openziti/ziti/v2/controller/event" "github.com/pkg/errors" - "reflect" ) func (self *Dispatcher) AddSdkEventHandler(handler event.SdkEventHandler) { diff --git a/controller/events/dispatcher_service.go b/controller/events/dispatcher_service.go index 64993072f..d1474473f 100644 --- a/controller/events/dispatcher_service.go +++ b/controller/events/dispatcher_service.go @@ -17,13 +17,14 @@ package events import ( + "reflect" + "strings" + "time" + "github.com/openziti/metrics/metrics_pb" "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/controller/network" "github.com/pkg/errors" - "reflect" - "strings" - "time" ) func (self *Dispatcher) AddServiceEventHandler(handler event.ServiceEventHandler) { diff --git a/controller/events/dispatcher_terminator.go b/controller/events/dispatcher_terminator.go index cfeef2e01..7b23c99f5 100644 --- a/controller/events/dispatcher_terminator.go +++ b/controller/events/dispatcher_terminator.go @@ -17,6 +17,10 @@ package events import ( + "reflect" + "strings" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" @@ -26,9 +30,6 @@ import ( "github.com/openziti/ziti/v2/controller/xt" "github.com/pkg/errors" "go.etcd.io/bbolt" - "reflect" - "strings" - "time" ) func (self *Dispatcher) AddTerminatorEventHandler(handler event.TerminatorEventHandler) { diff --git a/controller/events/dispatcher_usage.go b/controller/events/dispatcher_usage.go index 6f2addf94..5a10370db 100644 --- a/controller/events/dispatcher_usage.go +++ b/controller/events/dispatcher_usage.go @@ -18,11 +18,12 @@ package events import ( "fmt" + "reflect" + "time" + "github.com/openziti/metrics/metrics_pb" "github.com/openziti/ziti/v2/controller/event" "github.com/pkg/errors" - "reflect" - "time" ) func (self *Dispatcher) AddUsageEventHandler(handler event.UsageEventHandler) { diff --git a/controller/events/file_logger.go b/controller/events/file_logger.go index a85958841..cdf4279bb 100644 --- a/controller/events/file_logger.go +++ b/controller/events/file_logger.go @@ -18,11 +18,12 @@ package events import ( "fmt" - "github.com/natefinch/lumberjack" - "github.com/pkg/errors" "io" "os" "strings" + + "github.com/natefinch/lumberjack" + "github.com/pkg/errors" ) type fabricFormatterFactory struct{} diff --git a/controller/events/metrics_mappers.go b/controller/events/metrics_mappers.go index b889019db..78c512dfd 100644 --- a/controller/events/metrics_mappers.go +++ b/controller/events/metrics_mappers.go @@ -17,10 +17,11 @@ package events import ( + "strings" + "github.com/openziti/metrics/metrics_pb" "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/controller/network" - "strings" ) type ctrlChannelMetricsMapper struct{} diff --git a/controller/events/metrics_test.go b/controller/events/metrics_test.go index 04a54efc3..a511efd20 100644 --- a/controller/events/metrics_test.go +++ b/controller/events/metrics_test.go @@ -19,12 +19,13 @@ package events import ( "encoding/json" "fmt" - metrics2 "github.com/openziti/metrics" - "github.com/openziti/ziti/v2/controller/event" - "github.com/stretchr/testify/require" "regexp" "testing" "time" + + metrics2 "github.com/openziti/metrics" + "github.com/openziti/ziti/v2/controller/event" + "github.com/stretchr/testify/require" ) func Test_ExtractId(t *testing.T) { diff --git a/controller/handler_ctrl/accept.go b/controller/handler_ctrl/accept.go index 31da5694d..5da64f755 100644 --- a/controller/handler_ctrl/accept.go +++ b/controller/handler_ctrl/accept.go @@ -17,6 +17,8 @@ package handler_ctrl import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" @@ -24,7 +26,6 @@ import ( "github.com/openziti/ziti/v2/controller/xctrl" "github.com/pkg/errors" "google.golang.org/protobuf/proto" - "time" ) type CtrlAccepter struct { diff --git a/controller/handler_ctrl/circuit_request.go b/controller/handler_ctrl/circuit_request.go index 7d9b2fecc..884cb71fa 100644 --- a/controller/handler_ctrl/circuit_request.go +++ b/controller/handler_ctrl/circuit_request.go @@ -17,10 +17,11 @@ package handler_ctrl import ( + "time" + "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/xt" "google.golang.org/protobuf/proto" - "time" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" diff --git a/controller/handler_ctrl/create_terminator.go b/controller/handler_ctrl/create_terminator.go index 195eeabe0..a034bd3bb 100644 --- a/controller/handler_ctrl/create_terminator.go +++ b/controller/handler_ctrl/create_terminator.go @@ -18,6 +18,8 @@ package handler_ctrl import ( "fmt" + "math" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/handler_common" @@ -25,7 +27,6 @@ import ( "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/network" "google.golang.org/protobuf/proto" - "math" ) type createTerminatorHandler struct { diff --git a/controller/handler_ctrl/link_state.go b/controller/handler_ctrl/link_state.go index 4d4915c97..0895c03da 100644 --- a/controller/handler_ctrl/link_state.go +++ b/controller/handler_ctrl/link_state.go @@ -17,6 +17,8 @@ package handler_ctrl import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" @@ -24,7 +26,6 @@ import ( "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/network" "google.golang.org/protobuf/proto" - "time" ) type linkStateHandler struct { diff --git a/controller/handler_ctrl/metrics.go b/controller/handler_ctrl/metrics.go index 4780d373c..e9cc0c202 100644 --- a/controller/handler_ctrl/metrics.go +++ b/controller/handler_ctrl/metrics.go @@ -19,9 +19,9 @@ package handler_ctrl import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" + "github.com/openziti/metrics/metrics_pb" "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/controller/network" - "github.com/openziti/metrics/metrics_pb" "google.golang.org/protobuf/proto" ) diff --git a/controller/handler_ctrl/route_result.go b/controller/handler_ctrl/route_result.go index bb7b86442..fc05bced5 100644 --- a/controller/handler_ctrl/route_result.go +++ b/controller/handler_ctrl/route_result.go @@ -19,6 +19,7 @@ package handler_ctrl import ( "bytes" "encoding/binary" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/ctrl_msg" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" diff --git a/controller/handler_ctrl/update_router_interfaces.go b/controller/handler_ctrl/update_router_interfaces.go index 56d46b12a..7fb72b1e4 100644 --- a/controller/handler_ctrl/update_router_interfaces.go +++ b/controller/handler_ctrl/update_router_interfaces.go @@ -18,6 +18,7 @@ package handler_ctrl import ( "fmt" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/handler_common" diff --git a/controller/handler_ctrl/update_terminator.go b/controller/handler_ctrl/update_terminator.go index 98bdcc91b..d4a87392b 100644 --- a/controller/handler_ctrl/update_terminator.go +++ b/controller/handler_ctrl/update_terminator.go @@ -18,6 +18,8 @@ package handler_ctrl import ( "fmt" + "math" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/handler_common" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" @@ -28,7 +30,6 @@ import ( "github.com/openziti/ziti/v2/controller/xt" log "github.com/sirupsen/logrus" "google.golang.org/protobuf/proto" - "math" ) type updateTerminatorHandler struct { diff --git a/controller/handler_edge_ctrl/create_circuit.go b/controller/handler_edge_ctrl/create_circuit.go index 46b91ecf1..e1ca21265 100644 --- a/controller/handler_edge_ctrl/create_circuit.go +++ b/controller/handler_edge_ctrl/create_circuit.go @@ -18,6 +18,7 @@ package handler_edge_ctrl import ( "fmt" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/sdk-golang/ziti/edge" diff --git a/controller/handler_edge_ctrl/create_tunnel_terminator.go b/controller/handler_edge_ctrl/create_tunnel_terminator.go index bedfeb02a..5b3d81199 100644 --- a/controller/handler_edge_ctrl/create_tunnel_terminator.go +++ b/controller/handler_edge_ctrl/create_tunnel_terminator.go @@ -18,6 +18,9 @@ package handler_edge_ctrl import ( "fmt" + "math" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common" @@ -29,8 +32,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/protobuf/proto" - "math" - "time" ) type createTunnelTerminatorHandler struct { diff --git a/controller/handler_edge_ctrl/create_tunnel_terminator_v2.go b/controller/handler_edge_ctrl/create_tunnel_terminator_v2.go index 0e10e6270..43118ce84 100644 --- a/controller/handler_edge_ctrl/create_tunnel_terminator_v2.go +++ b/controller/handler_edge_ctrl/create_tunnel_terminator_v2.go @@ -18,6 +18,9 @@ package handler_edge_ctrl import ( "fmt" + "math" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" @@ -30,8 +33,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/protobuf/proto" - "math" - "time" ) type createTunnelTerminatorV2Handler struct { diff --git a/controller/handler_edge_ctrl/errors_test.go b/controller/handler_edge_ctrl/errors_test.go index 3857f7413..70960fc0d 100644 --- a/controller/handler_edge_ctrl/errors_test.go +++ b/controller/handler_edge_ctrl/errors_test.go @@ -17,9 +17,10 @@ package handler_edge_ctrl import ( + "testing" + "github.com/pkg/errors" "github.com/stretchr/testify/require" - "testing" ) func Test_ErrorsIs(t *testing.T) { diff --git a/controller/handler_edge_ctrl/extend_enrollment_verify.go b/controller/handler_edge_ctrl/extend_enrollment_verify.go index 2e901fb74..47aa90cf8 100644 --- a/controller/handler_edge_ctrl/extend_enrollment_verify.go +++ b/controller/handler_edge_ctrl/extend_enrollment_verify.go @@ -19,6 +19,7 @@ package handler_edge_ctrl import ( "bytes" "fmt" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" nfpem "github.com/openziti/foundation/v2/pem" diff --git a/controller/handler_edge_ctrl/health_event.go b/controller/handler_edge_ctrl/health_event.go index 99157a901..e3a303604 100644 --- a/controller/handler_edge_ctrl/health_event.go +++ b/controller/handler_edge_ctrl/health_event.go @@ -17,6 +17,8 @@ package handler_edge_ctrl import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/metrics" @@ -24,7 +26,6 @@ import ( "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/env" "google.golang.org/protobuf/proto" - "time" ) type healthEventHandler struct { diff --git a/controller/handler_edge_ctrl/list_tunnel_services.go b/controller/handler_edge_ctrl/list_tunnel_services.go index f7a267ad9..62a49aa93 100644 --- a/controller/handler_edge_ctrl/list_tunnel_services.go +++ b/controller/handler_edge_ctrl/list_tunnel_services.go @@ -2,13 +2,14 @@ package handler_edge_ctrl import ( "encoding/json" + "time" + "github.com/openziti/channel/v4" "github.com/openziti/storage/ast" "github.com/openziti/ziti/v2/common/pb/edge_ctrl_pb" "github.com/openziti/ziti/v2/controller/env" "github.com/sirupsen/logrus" "google.golang.org/protobuf/proto" - "time" ) type listTunnelServicesHandler struct { diff --git a/controller/handler_edge_ctrl/tunnel_health_event.go b/controller/handler_edge_ctrl/tunnel_health_event.go index 1890dca3f..1b3750f39 100644 --- a/controller/handler_edge_ctrl/tunnel_health_event.go +++ b/controller/handler_edge_ctrl/tunnel_health_event.go @@ -17,12 +17,13 @@ package handler_edge_ctrl import ( + "time" + "github.com/openziti/channel/v4" "github.com/openziti/metrics" "github.com/openziti/ziti/v2/common" "github.com/openziti/ziti/v2/common/pb/edge_ctrl_pb" "github.com/openziti/ziti/v2/controller/env" - "time" ) type tunnelHealthEventHandler struct { diff --git a/controller/handler_mgmt/inspect.go b/controller/handler_mgmt/inspect.go index 9e2ac0991..7701f4519 100644 --- a/controller/handler_mgmt/inspect.go +++ b/controller/handler_mgmt/inspect.go @@ -18,6 +18,7 @@ package handler_mgmt import ( "fmt" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" diff --git a/controller/handler_mgmt/stream_toggle_pipe_traces.go b/controller/handler_mgmt/stream_toggle_pipe_traces.go index d09223377..7d52bc23b 100644 --- a/controller/handler_mgmt/stream_toggle_pipe_traces.go +++ b/controller/handler_mgmt/stream_toggle_pipe_traces.go @@ -18,10 +18,11 @@ package handler_mgmt import ( "fmt" - "github.com/openziti/ziti/v2/controller/model" "sync" "time" + "github.com/openziti/ziti/v2/controller/model" + "github.com/openziti/channel/v4" trace_pb "github.com/openziti/channel/v4/trace/pb" "github.com/openziti/ziti/v2/common/handler_common" diff --git a/controller/handler_mgmt/stream_traces.go b/controller/handler_mgmt/stream_traces.go index 7d62baff2..136eb55cd 100644 --- a/controller/handler_mgmt/stream_traces.go +++ b/controller/handler_mgmt/stream_traces.go @@ -20,10 +20,10 @@ import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/trace/pb" - "github.com/openziti/ziti/v2/controller/network" "github.com/openziti/ziti/v2/common/handler_common" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" "github.com/openziti/ziti/v2/common/trace" + "github.com/openziti/ziti/v2/controller/network" "google.golang.org/protobuf/proto" ) diff --git a/controller/handler_mgmt/validate_circuits.go b/controller/handler_mgmt/validate_circuits.go index 2227c5b5f..311322aec 100644 --- a/controller/handler_mgmt/validate_circuits.go +++ b/controller/handler_mgmt/validate_circuits.go @@ -20,6 +20,9 @@ import ( "encoding/json" "errors" "fmt" + "strings" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" @@ -31,8 +34,6 @@ import ( "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/network" "google.golang.org/protobuf/proto" - "strings" - "time" ) type validateCircuitsHandler struct { diff --git a/controller/handler_mgmt/validate_identity_connection_statuses.go b/controller/handler_mgmt/validate_identity_connection_statuses.go index 0c1e20aca..be038efb6 100644 --- a/controller/handler_mgmt/validate_identity_connection_statuses.go +++ b/controller/handler_mgmt/validate_identity_connection_statuses.go @@ -20,6 +20,10 @@ import ( "encoding/json" "errors" "fmt" + "strings" + "sync" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" @@ -31,9 +35,6 @@ import ( "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/network" "google.golang.org/protobuf/proto" - "strings" - "sync" - "time" ) type validateIdentityConnectionStatusesHandler struct { diff --git a/controller/handler_mgmt/validate_router_data_model.go b/controller/handler_mgmt/validate_router_data_model.go index b0773ea23..aaf7cd72d 100644 --- a/controller/handler_mgmt/validate_router_data_model.go +++ b/controller/handler_mgmt/validate_router_data_model.go @@ -18,6 +18,8 @@ package handler_mgmt import ( "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" @@ -28,7 +30,6 @@ import ( "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/network" "google.golang.org/protobuf/proto" - "time" ) type validateRouterDataModelHandler struct { diff --git a/controller/handler_mgmt/validate_router_ert_terminators.go b/controller/handler_mgmt/validate_router_ert_terminators.go index 16a48947d..017c4b4bf 100644 --- a/controller/handler_mgmt/validate_router_ert_terminators.go +++ b/controller/handler_mgmt/validate_router_ert_terminators.go @@ -18,13 +18,14 @@ package handler_mgmt import ( "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" "github.com/openziti/ziti/v2/controller/network" "google.golang.org/protobuf/proto" - "time" ) type validateRouterErtTerminatorsHandler struct { diff --git a/controller/handler_mgmt/validate_router_links.go b/controller/handler_mgmt/validate_router_links.go index 4374b7e2a..66d2e6517 100644 --- a/controller/handler_mgmt/validate_router_links.go +++ b/controller/handler_mgmt/validate_router_links.go @@ -18,13 +18,14 @@ package handler_mgmt import ( "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" "github.com/openziti/ziti/v2/controller/network" "google.golang.org/protobuf/proto" - "time" ) type validateRouterLinksHandler struct { diff --git a/controller/handler_peer_ctrl/bind.go b/controller/handler_peer_ctrl/bind.go index 1754aee9d..17e45f643 100644 --- a/controller/handler_peer_ctrl/bind.go +++ b/controller/handler_peer_ctrl/bind.go @@ -17,6 +17,8 @@ package handler_peer_ctrl import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/latency" @@ -25,7 +27,6 @@ import ( "github.com/openziti/ziti/v2/controller/network" "github.com/openziti/ziti/v2/controller/raft" "github.com/sirupsen/logrus" - "time" ) func NewBindHandler(n *network.Network, raftCtrl *raft.Controller, heartbeatOptions *channel.HeartbeatOptions) channel.BindHandler { diff --git a/controller/handler_peer_ctrl/response.go b/controller/handler_peer_ctrl/response.go index 2825f493d..f6410822d 100644 --- a/controller/handler_peer_ctrl/response.go +++ b/controller/handler_peer_ctrl/response.go @@ -19,6 +19,7 @@ package handler_peer_ctrl import ( "encoding/json" "fmt" + "github.com/hashicorp/raft" "github.com/openziti/channel/v4" "github.com/openziti/foundation/v2/errorz" diff --git a/controller/health.go b/controller/health.go index 6ead5e586..157dd503b 100644 --- a/controller/health.go +++ b/controller/health.go @@ -2,14 +2,15 @@ package controller import ( "context" + "sync/atomic" + "time" + gosundheit "github.com/AppsFlyer/go-sundheit" "github.com/AppsFlyer/go-sundheit/checks" "github.com/openziti/metrics" "github.com/openziti/storage/boltz" "github.com/pkg/errors" "go.etcd.io/bbolt" - "sync/atomic" - "time" ) func (c *Controller) initializeHealthChecks() (gosundheit.Health, error) { diff --git a/controller/idgen/id.go b/controller/idgen/id.go index e76731b70..aa8e05940 100644 --- a/controller/idgen/id.go +++ b/controller/idgen/id.go @@ -3,10 +3,11 @@ package idgen import ( "crypto/rand" "encoding/binary" + "math/big" + "github.com/dineshappavoo/basex" "github.com/google/uuid" "github.com/teris-io/shortid" - "math/big" ) const Alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-" diff --git a/controller/internal/policy/api_session_enforcer.go b/controller/internal/policy/api_session_enforcer.go index f038d432e..939ab2ab0 100644 --- a/controller/internal/policy/api_session_enforcer.go +++ b/controller/internal/policy/api_session_enforcer.go @@ -18,13 +18,14 @@ package policy import ( "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/common/runner" + "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/change" "github.com/sirupsen/logrus" - "time" ) const ( diff --git a/controller/internal/policy/service_policy_enforcer.go b/controller/internal/policy/service_policy_enforcer.go index cc3b20538..64d02f676 100644 --- a/controller/internal/policy/service_policy_enforcer.go +++ b/controller/internal/policy/service_policy_enforcer.go @@ -18,11 +18,12 @@ package policy import ( "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/common/runner" "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/db" - "time" "github.com/openziti/ziti/v2/controller/env" "go.etcd.io/bbolt" diff --git a/controller/internal/policy/session_enforcer_test.go b/controller/internal/policy/session_enforcer_test.go index f691e4c6d..1e384ed5f 100644 --- a/controller/internal/policy/session_enforcer_test.go +++ b/controller/internal/policy/session_enforcer_test.go @@ -17,6 +17,9 @@ package policy import ( + "testing" + "time" + "github.com/google/go-cmp/cmp/cmpopts" "github.com/openziti/storage/boltz" "github.com/openziti/storage/boltztest" @@ -24,8 +27,6 @@ import ( "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/model" "github.com/sirupsen/logrus" - "testing" - "time" ) func Test_SessionEnforcer(t *testing.T) { diff --git a/controller/internal/routes/auth_policy_api_model.go b/controller/internal/routes/auth_policy_api_model.go index 34df98bbf..72bb0cd2a 100644 --- a/controller/internal/routes/auth_policy_api_model.go +++ b/controller/internal/routes/auth_policy_api_model.go @@ -18,11 +18,11 @@ package routes import ( "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" "github.com/openziti/ziti/v2/controller/models" - "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNameAuthPolicy = "auth-policies" diff --git a/controller/internal/routes/base_entity_api_model.go b/controller/internal/routes/base_entity_api_model.go index c5b0cef6c..9df7bae45 100644 --- a/controller/internal/routes/base_entity_api_model.go +++ b/controller/internal/routes/base_entity_api_model.go @@ -17,10 +17,11 @@ package routes import ( + "path" + "github.com/go-openapi/strfmt" "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/controller/models" - "path" ) func BaseEntityToRestModel(entity models.Entity, linkFactory LinksFactory) rest_model.BaseEntity { diff --git a/controller/internal/routes/ca_api_model.go b/controller/internal/routes/ca_api_model.go index dd222fc6c..6c9cb947b 100644 --- a/controller/internal/routes/ca_api_model.go +++ b/controller/internal/routes/ca_api_model.go @@ -20,11 +20,11 @@ import ( "github.com/go-openapi/strfmt" "github.com/google/uuid" "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" "github.com/openziti/ziti/v2/controller/models" - "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNameCa = "cas" diff --git a/controller/internal/routes/config_api_model.go b/controller/internal/routes/config_api_model.go index ca9eab3f8..2162f9205 100644 --- a/controller/internal/routes/config_api_model.go +++ b/controller/internal/routes/config_api_model.go @@ -18,14 +18,15 @@ package routes import ( "fmt" + "math" + "github.com/openziti/edge-api/rest_model" - "github.com/openziti/ziti/v2/controller/env" - "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" - "github.com/openziti/ziti/v2/controller/models" "github.com/openziti/foundation/v2/errorz" "github.com/openziti/foundation/v2/stringz" - "math" + "github.com/openziti/ziti/v2/controller/env" + "github.com/openziti/ziti/v2/controller/model" + "github.com/openziti/ziti/v2/controller/models" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNameConfig = "configs" diff --git a/controller/internal/routes/config_type_api_model.go b/controller/internal/routes/config_type_api_model.go index 30873d351..c582b5238 100644 --- a/controller/internal/routes/config_type_api_model.go +++ b/controller/internal/routes/config_type_api_model.go @@ -18,11 +18,11 @@ package routes import ( "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" "github.com/openziti/ziti/v2/controller/models" - "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNameConfigType = "config-types" diff --git a/controller/internal/routes/current_api_session_api_model.go b/controller/internal/routes/current_api_session_api_model.go index 47cb5b250..fb8f6faf8 100644 --- a/controller/internal/routes/current_api_session_api_model.go +++ b/controller/internal/routes/current_api_session_api_model.go @@ -17,6 +17,8 @@ package routes import ( + "time" + "github.com/go-openapi/strfmt" "github.com/michaelquigley/pfxlog" "github.com/openziti/edge-api/rest_model" @@ -24,7 +26,6 @@ import ( "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/models" "github.com/openziti/ziti/v2/controller/response" - "time" ) const EntityNameCurrentSession = "current-api-session" diff --git a/controller/internal/routes/current_identity_api_model.go b/controller/internal/routes/current_identity_api_model.go index 62e668522..48e5140f3 100644 --- a/controller/internal/routes/current_identity_api_model.go +++ b/controller/internal/routes/current_identity_api_model.go @@ -18,13 +18,14 @@ package routes import ( "fmt" + "path" + "github.com/michaelquigley/pfxlog" "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" "github.com/openziti/ziti/v2/controller/models" - "path" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNameCurrentIdentity = "current-identity" diff --git a/controller/internal/routes/current_identity_authenticator_api_model.go b/controller/internal/routes/current_identity_authenticator_api_model.go index 6f5afe78e..3fc4c1695 100644 --- a/controller/internal/routes/current_identity_authenticator_api_model.go +++ b/controller/internal/routes/current_identity_authenticator_api_model.go @@ -17,10 +17,11 @@ package routes import ( + "path" + "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/models" - "path" ) var CurrentIdentityAuthenticatorLinkFactory LinksFactory = NewCurrentIdentityAuthenticatorLinkFactory() diff --git a/controller/internal/routes/edge_router_policy_api_model.go b/controller/internal/routes/edge_router_policy_api_model.go index 18ec94466..be6db28b4 100644 --- a/controller/internal/routes/edge_router_policy_api_model.go +++ b/controller/internal/routes/edge_router_policy_api_model.go @@ -18,11 +18,11 @@ package routes import ( "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" "github.com/openziti/ziti/v2/controller/models" - "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNameEdgeRouterPolicy = "edge-router-policies" diff --git a/controller/internal/routes/enrollment_api_model.go b/controller/internal/routes/enrollment_api_model.go index fa69af28d..0a5e558c8 100644 --- a/controller/internal/routes/enrollment_api_model.go +++ b/controller/internal/routes/enrollment_api_model.go @@ -19,10 +19,10 @@ package routes import ( "github.com/go-openapi/strfmt" "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/response" - "github.com/openziti/foundation/v2/stringz" ) const EntityNameEnrollment = "enrollments" diff --git a/controller/internal/routes/posture_check_api_model.go b/controller/internal/routes/posture_check_api_model.go index 02e071f44..49020e584 100644 --- a/controller/internal/routes/posture_check_api_model.go +++ b/controller/internal/routes/posture_check_api_model.go @@ -17,15 +17,16 @@ package routes import ( + "strings" + "github.com/go-openapi/strfmt" "github.com/michaelquigley/pfxlog" "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" "github.com/openziti/ziti/v2/controller/models" - "github.com/openziti/foundation/v2/stringz" - "strings" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNamePostureCheck = "posture-checks" diff --git a/controller/internal/routes/posture_check_router.go b/controller/internal/routes/posture_check_router.go index 7f001056c..7de5dc1d4 100644 --- a/controller/internal/routes/posture_check_router.go +++ b/controller/internal/routes/posture_check_router.go @@ -24,7 +24,7 @@ import ( "github.com/openziti/ziti/v2/controller/fields" "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/models" - permissions "github.com/openziti/ziti/v2/controller/permissions" + "github.com/openziti/ziti/v2/controller/permissions" "github.com/openziti/ziti/v2/controller/response" ) diff --git a/controller/internal/routes/posture_check_type_router.go b/controller/internal/routes/posture_check_type_router.go index 2304ca4cb..ffc6cba33 100644 --- a/controller/internal/routes/posture_check_type_router.go +++ b/controller/internal/routes/posture_check_type_router.go @@ -21,7 +21,7 @@ import ( "github.com/openziti/edge-api/rest_management_api_server/operations/posture_checks" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - permissions "github.com/openziti/ziti/v2/controller/permissions" + "github.com/openziti/ziti/v2/controller/permissions" "github.com/openziti/ziti/v2/controller/response" ) diff --git a/controller/internal/routes/posture_response_responder.go b/controller/internal/routes/posture_response_responder.go index 0c8188aed..018ba9e73 100644 --- a/controller/internal/routes/posture_response_responder.go +++ b/controller/internal/routes/posture_response_responder.go @@ -17,10 +17,11 @@ package routes import ( + "net/http" + "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/response" - "net/http" ) type PostureResponseResponder struct { diff --git a/controller/internal/routes/role_attributes_router.go b/controller/internal/routes/role_attributes_router.go index 3f6a4e87f..2733201a3 100644 --- a/controller/internal/routes/role_attributes_router.go +++ b/controller/internal/routes/role_attributes_router.go @@ -22,7 +22,7 @@ import ( "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/models" - permissions "github.com/openziti/ziti/v2/controller/permissions" + "github.com/openziti/ziti/v2/controller/permissions" "github.com/openziti/ziti/v2/controller/response" ) diff --git a/controller/internal/routes/router_router.go b/controller/internal/routes/router_router.go index 9e79c22af..cc7172774 100644 --- a/controller/internal/routes/router_router.go +++ b/controller/internal/routes/router_router.go @@ -23,7 +23,7 @@ import ( "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/fields" "github.com/openziti/ziti/v2/controller/model" - permissions "github.com/openziti/ziti/v2/controller/permissions" + "github.com/openziti/ziti/v2/controller/permissions" "github.com/openziti/ziti/v2/controller/response" ) diff --git a/controller/internal/routes/service_edge_router_policy_api_model.go b/controller/internal/routes/service_edge_router_policy_api_model.go index 24399e92a..42f06d528 100644 --- a/controller/internal/routes/service_edge_router_policy_api_model.go +++ b/controller/internal/routes/service_edge_router_policy_api_model.go @@ -18,11 +18,11 @@ package routes import ( "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" "github.com/openziti/ziti/v2/controller/models" - "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNameServiceEdgeRouterPolicy = "service-edge-router-policies" diff --git a/controller/internal/routes/service_edge_router_policy_router.go b/controller/internal/routes/service_edge_router_policy_router.go index 009fb0f4c..81f666eb8 100644 --- a/controller/internal/routes/service_edge_router_policy_router.go +++ b/controller/internal/routes/service_edge_router_policy_router.go @@ -22,7 +22,7 @@ import ( "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/fields" "github.com/openziti/ziti/v2/controller/model" - permissions "github.com/openziti/ziti/v2/controller/permissions" + "github.com/openziti/ziti/v2/controller/permissions" "github.com/openziti/ziti/v2/controller/response" ) diff --git a/controller/internal/routes/service_policy_api_model.go b/controller/internal/routes/service_policy_api_model.go index f02257e35..0aa20c6f7 100644 --- a/controller/internal/routes/service_policy_api_model.go +++ b/controller/internal/routes/service_policy_api_model.go @@ -18,11 +18,11 @@ package routes import ( "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - "github.com/openziti/ziti/v2/controller/response" "github.com/openziti/ziti/v2/controller/models" - "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/ziti/v2/controller/response" ) const EntityNameServicePolicy = "service-policies" diff --git a/controller/internal/routes/service_policy_router.go b/controller/internal/routes/service_policy_router.go index e03d7f762..1908833e6 100644 --- a/controller/internal/routes/service_policy_router.go +++ b/controller/internal/routes/service_policy_router.go @@ -22,7 +22,7 @@ import ( "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/fields" "github.com/openziti/ziti/v2/controller/model" - permissions "github.com/openziti/ziti/v2/controller/permissions" + "github.com/openziti/ziti/v2/controller/permissions" "github.com/openziti/ziti/v2/controller/response" ) diff --git a/controller/internal/routes/session_api_responder.go b/controller/internal/routes/session_api_responder.go index 5abe49fc2..a352e8292 100644 --- a/controller/internal/routes/session_api_responder.go +++ b/controller/internal/routes/session_api_responder.go @@ -17,10 +17,11 @@ package routes import ( + "net/http" + "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/response" - "net/http" ) type SessionRequestResponder struct { diff --git a/controller/internal/routes/session_router.go b/controller/internal/routes/session_router.go index 312f4b2f5..82a99a58c 100644 --- a/controller/internal/routes/session_router.go +++ b/controller/internal/routes/session_router.go @@ -28,7 +28,7 @@ import ( "github.com/openziti/metrics" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/model" - permissions "github.com/openziti/ziti/v2/controller/permissions" + "github.com/openziti/ziti/v2/controller/permissions" "github.com/openziti/ziti/v2/controller/response" ) diff --git a/controller/internal/routes/terminator_router.go b/controller/internal/routes/terminator_router.go index 5e2234cc2..c3b1f41c7 100644 --- a/controller/internal/routes/terminator_router.go +++ b/controller/internal/routes/terminator_router.go @@ -22,7 +22,7 @@ import ( "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/fields" "github.com/openziti/ziti/v2/controller/model" - permissions "github.com/openziti/ziti/v2/controller/permissions" + "github.com/openziti/ziti/v2/controller/permissions" "github.com/openziti/ziti/v2/controller/response" ) diff --git a/controller/middleware/debug_logging.go b/controller/middleware/debug_logging.go index 12ff47e00..307177d58 100644 --- a/controller/middleware/debug_logging.go +++ b/controller/middleware/debug_logging.go @@ -17,8 +17,9 @@ package middleware import ( - "github.com/michaelquigley/pfxlog" "net/http" + + "github.com/michaelquigley/pfxlog" ) func RequestDebugLogger(next http.Handler) http.Handler { diff --git a/controller/model/api_session_certificate_manager.go b/controller/model/api_session_certificate_manager.go index 28d04813f..c47d40888 100644 --- a/controller/model/api_session_certificate_manager.go +++ b/controller/model/api_session_certificate_manager.go @@ -19,6 +19,9 @@ package model import ( "crypto/x509" "fmt" + "net/url" + "time" + "github.com/openziti/ziti/v2/common/cert" "github.com/openziti/ziti/v2/common/eid" "github.com/openziti/ziti/v2/controller/apierror" @@ -26,8 +29,6 @@ import ( "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "net/url" - "time" ) func NewApiSessionCertificateManager(env Env) *ApiSessionCertificateManager { diff --git a/controller/model/api_session_certificate_model.go b/controller/model/api_session_certificate_model.go index 8e3f4aacd..5e7ca8968 100644 --- a/controller/model/api_session_certificate_model.go +++ b/controller/model/api_session_certificate_model.go @@ -18,13 +18,14 @@ package model import ( "crypto/x509" + "time" + "github.com/openziti/foundation/v2/errorz" nfpem "github.com/openziti/foundation/v2/pem" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "time" ) type ApiSessionCertificate struct { diff --git a/controller/model/api_session_model.go b/controller/model/api_session_model.go index 334426e2b..af82728d6 100644 --- a/controller/model/api_session_model.go +++ b/controller/model/api_session_model.go @@ -17,13 +17,14 @@ package model import ( + "time" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "time" ) type ApiSession struct { diff --git a/controller/model/auth_policy_manager.go b/controller/model/auth_policy_manager.go index 82ebcdb82..82e3ae273 100644 --- a/controller/model/auth_policy_manager.go +++ b/controller/model/auth_policy_manager.go @@ -18,6 +18,7 @@ package model import ( "fmt" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/common/pb/edge_cmd_pb" diff --git a/controller/model/authenticator_mod_updb.go b/controller/model/authenticator_mod_updb.go index c51505028..431047c0c 100644 --- a/controller/model/authenticator_mod_updb.go +++ b/controller/model/authenticator_mod_updb.go @@ -21,12 +21,13 @@ import ( "encoding/base64" "errors" "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/errorz" "github.com/openziti/ziti/v2/controller/apierror" "github.com/openziti/ziti/v2/controller/db" cmap "github.com/orcaman/concurrent-map/v2" - "time" ) var _ AuthProcessor = &AuthModuleUpdb{} diff --git a/controller/model/authenticator_model.go b/controller/model/authenticator_model.go index b8041b471..b4c1be6a0 100644 --- a/controller/model/authenticator_model.go +++ b/controller/model/authenticator_model.go @@ -18,13 +18,14 @@ package model import ( "encoding/base64" + "reflect" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "reflect" - "time" ) type Authenticator struct { diff --git a/controller/model/base_model.go b/controller/model/base_model.go index 88d1a6d1d..242140911 100644 --- a/controller/model/base_model.go +++ b/controller/model/base_model.go @@ -17,8 +17,8 @@ package model import ( - "github.com/openziti/ziti/v2/controller/models" "github.com/openziti/storage/boltz" + "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" ) diff --git a/controller/model/ca_model.go b/controller/model/ca_model.go index 74c38eea0..2de3924c9 100644 --- a/controller/model/ca_model.go +++ b/controller/model/ca_model.go @@ -19,6 +19,8 @@ package model import ( "crypto/x509" "fmt" + "net/url" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/storage/boltz" "github.com/openziti/x509-claims/x509claims" @@ -29,7 +31,6 @@ import ( "github.com/openziti/ziti/v2/controller/models" "github.com/pkg/errors" "go.etcd.io/bbolt" - "net/url" ) type Ca struct { diff --git a/controller/model/ca_test.go b/controller/model/ca_test.go index 9a6621ed9..099dc2bf7 100644 --- a/controller/model/ca_test.go +++ b/controller/model/ca_test.go @@ -2,8 +2,9 @@ package model import ( "fmt" - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func Test_IdentityNameFormatter(t *testing.T) { diff --git a/controller/model/config_manager.go b/controller/model/config_manager.go index 11e6f848f..6c767d11d 100644 --- a/controller/model/config_manager.go +++ b/controller/model/config_manager.go @@ -18,6 +18,8 @@ package model import ( "encoding/json" + "strings" + "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/common/pb/edge_cmd_pb" "github.com/openziti/ziti/v2/controller/change" @@ -27,7 +29,6 @@ import ( "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" "google.golang.org/protobuf/proto" - "strings" ) func NewConfigManager(env Env) *ConfigManager { diff --git a/controller/model/config_type_manager.go b/controller/model/config_type_manager.go index cefa967ae..480514d45 100644 --- a/controller/model/config_type_manager.go +++ b/controller/model/config_type_manager.go @@ -18,6 +18,7 @@ package model import ( "encoding/json" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/storage/boltz" diff --git a/controller/model/config_type_model.go b/controller/model/config_type_model.go index b4e307c01..235a649d5 100644 --- a/controller/model/config_type_model.go +++ b/controller/model/config_type_model.go @@ -18,6 +18,7 @@ package model import ( "fmt" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" diff --git a/controller/model/controller_model.go b/controller/model/controller_model.go index 2ae48a2d5..53ea11533 100644 --- a/controller/model/controller_model.go +++ b/controller/model/controller_model.go @@ -17,12 +17,13 @@ package model import ( + "sort" + "time" + "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "sort" - "time" ) type Controller struct { diff --git a/controller/model/edge_router_manager_test.go b/controller/model/edge_router_manager_test.go index ea67d71d9..3fdb16123 100644 --- a/controller/model/edge_router_manager_test.go +++ b/controller/model/edge_router_manager_test.go @@ -1,10 +1,11 @@ package model import ( + "testing" + "github.com/openziti/ziti/v2/common/eid" "github.com/openziti/ziti/v2/controller/change" "go.etcd.io/bbolt" - "testing" ) func TestEdgeRouterManager(t *testing.T) { diff --git a/controller/model/enrollment_mod_ca.go b/controller/model/enrollment_mod_ca.go index 5a000e328..ad0baec00 100644 --- a/controller/model/enrollment_mod_ca.go +++ b/controller/model/enrollment_mod_ca.go @@ -20,6 +20,7 @@ import ( "crypto/x509" "encoding/pem" "fmt" + "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/common/cert" "github.com/openziti/ziti/v2/common/eid" diff --git a/controller/model/enrollment_mod_erott.go b/controller/model/enrollment_mod_erott.go index 072088eac..8b9cbe183 100644 --- a/controller/model/enrollment_mod_erott.go +++ b/controller/model/enrollment_mod_erott.go @@ -18,13 +18,14 @@ package model import ( "fmt" + "time" + "github.com/openziti/edge-api/rest_model" "github.com/openziti/foundation/v2/errorz" "github.com/openziti/ziti/v2/common/cert" "github.com/openziti/ziti/v2/controller/apierror" "github.com/openziti/ziti/v2/controller/change" "github.com/pkg/errors" - "time" ) const ( diff --git a/controller/model/enrollment_mod_ott.go b/controller/model/enrollment_mod_ott.go index 704a81b28..aff3ac28f 100644 --- a/controller/model/enrollment_mod_ott.go +++ b/controller/model/enrollment_mod_ott.go @@ -17,6 +17,8 @@ package model import ( + "time" + "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/common/cert" "github.com/openziti/ziti/v2/common/eid" @@ -24,7 +26,6 @@ import ( "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" - "time" ) type EnrollModuleOtt struct { diff --git a/controller/model/enrollment_mod_trott.go b/controller/model/enrollment_mod_trott.go index de57e70dc..581a58d50 100644 --- a/controller/model/enrollment_mod_trott.go +++ b/controller/model/enrollment_mod_trott.go @@ -18,11 +18,12 @@ package model import ( "fmt" + "time" + "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/common/cert" "github.com/openziti/ziti/v2/controller/apierror" "github.com/openziti/ziti/v2/controller/change" - "time" ) const ( diff --git a/controller/model/enrollment_mod_updb.go b/controller/model/enrollment_mod_updb.go index e41ddc9d8..282eea029 100644 --- a/controller/model/enrollment_mod_updb.go +++ b/controller/model/enrollment_mod_updb.go @@ -19,6 +19,8 @@ package model import ( "encoding/base64" "errors" + "time" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/ziti/v2/common/cert" "github.com/openziti/ziti/v2/common/eid" @@ -26,7 +28,6 @@ import ( "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" - "time" ) type EnrollModuleUpdb struct { diff --git a/controller/model/hash.go b/controller/model/hash.go index 5494be778..96d20cce9 100644 --- a/controller/model/hash.go +++ b/controller/model/hash.go @@ -19,6 +19,7 @@ package model import ( "crypto/rand" "encoding/binary" + "github.com/michaelquigley/pfxlog" "golang.org/x/crypto/argon2" ) diff --git a/controller/model/identity_manager_test.go b/controller/model/identity_manager_test.go index 077a9bfea..102e77ab9 100644 --- a/controller/model/identity_manager_test.go +++ b/controller/model/identity_manager_test.go @@ -1,12 +1,13 @@ package model import ( + "testing" + "github.com/openziti/storage/ast" "github.com/openziti/storage/boltztest" "github.com/openziti/ziti/v2/common/eid" "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/db" - "testing" ) func TestIdentityManager(t *testing.T) { diff --git a/controller/model/interface_model.go b/controller/model/interface_model.go index 09d20e9b7..80b774c2d 100644 --- a/controller/model/interface_model.go +++ b/controller/model/interface_model.go @@ -17,10 +17,11 @@ package model import ( - "github.com/openziti/foundation/v2/stringz" - "github.com/openziti/ziti/v2/controller/db" "net" "sort" + + "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/ziti/v2/controller/db" ) type Interface struct { diff --git a/controller/model/pbutils.go b/controller/model/pbutils.go index 453bfa21f..7d5b4f918 100644 --- a/controller/model/pbutils.go +++ b/controller/model/pbutils.go @@ -17,10 +17,11 @@ package model import ( + "time" + "github.com/openziti/ziti/v2/common/pb/edge_cmd_pb" "github.com/openziti/ziti/v2/controller/change" "google.golang.org/protobuf/types/known/timestamppb" - "time" ) func timePtrToPb(t *time.Time) *timestamppb.Timestamp { diff --git a/controller/model/posture_check_manager.go b/controller/model/posture_check_manager.go index 369b2d54b..22e370117 100644 --- a/controller/model/posture_check_manager.go +++ b/controller/model/posture_check_manager.go @@ -18,6 +18,8 @@ package model import ( "fmt" + "strings" + lru "github.com/hashicorp/golang-lru/v2" "github.com/openziti/storage/ast" "github.com/openziti/storage/boltz" @@ -29,7 +31,6 @@ import ( "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" "google.golang.org/protobuf/proto" - "strings" ) const ( diff --git a/controller/model/posture_check_model.go b/controller/model/posture_check_model.go index 59804e066..19d642f60 100644 --- a/controller/model/posture_check_model.go +++ b/controller/model/posture_check_model.go @@ -18,12 +18,13 @@ package model import ( "fmt" + "time" + "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/common/pb/edge_cmd_pb" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "time" ) type PostureCheck struct { diff --git a/controller/model/posture_check_model_mfa_test.go b/controller/model/posture_check_model_mfa_test.go index 10536a296..de53a4bc9 100644 --- a/controller/model/posture_check_model_mfa_test.go +++ b/controller/model/posture_check_model_mfa_test.go @@ -17,9 +17,10 @@ package model import ( - "github.com/stretchr/testify/require" "testing" "time" + + "github.com/stretchr/testify/require" ) const ( @@ -650,8 +651,7 @@ func TestPostureCheckModelMfa(t *testing.T) { req.Equal(int64(0), result) }) }) - - + t.Run("getTimeoutRemainingAtSeconds", func(t *testing.T) { t.Run("with a timeout of 600s, passedAt 0s ago, wake = NIL, unlock = NIL will result in 600s timeout", func(t *testing.T) { req := require.New(t) @@ -751,7 +751,6 @@ func TestPostureCheckModelMfa(t *testing.T) { req.Equal(int64(600), timeoutRemaining) }) - t.Run("with a timeout of 600s, passedAt 0s ago, wake 10s ago, unlock 10s ago will result in 600s timeout", func(t *testing.T) { req := require.New(t) mfaCheck, postureData := newMfaCheckAndPostureData() diff --git a/controller/model/posture_check_model_process_multi_test.go b/controller/model/posture_check_model_process_multi_test.go index 4bfcc771f..25d52eb30 100644 --- a/controller/model/posture_check_model_process_multi_test.go +++ b/controller/model/posture_check_model_process_multi_test.go @@ -17,11 +17,12 @@ package model import ( - "github.com/openziti/ziti/v2/controller/db" - "github.com/stretchr/testify/require" "strings" "testing" "time" + + "github.com/openziti/ziti/v2/controller/db" + "github.com/stretchr/testify/require" ) func TestPostureCheckModelProcessMulti_Evaluate(t *testing.T) { diff --git a/controller/model/posture_check_model_process_test.go b/controller/model/posture_check_model_process_test.go index a2c85693d..48387038c 100644 --- a/controller/model/posture_check_model_process_test.go +++ b/controller/model/posture_check_model_process_test.go @@ -17,10 +17,11 @@ package model import ( - "github.com/stretchr/testify/require" "strings" "testing" "time" + + "github.com/stretchr/testify/require" ) func TestPostureCheckModelProcess_Evaluate(t *testing.T) { diff --git a/controller/model/posture_response_manager.go b/controller/model/posture_response_manager.go index 459f03960..4096d096f 100644 --- a/controller/model/posture_response_manager.go +++ b/controller/model/posture_response_manager.go @@ -18,13 +18,14 @@ package model import ( "fmt" + "runtime/debug" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/storage/ast" "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/db" "go.etcd.io/bbolt" - "runtime/debug" - "time" ) func NewPostureResponseManager(env Env) *PostureResponseManager { diff --git a/controller/model/posture_response_manager_test.go b/controller/model/posture_response_manager_test.go index 283db5123..3dea089e9 100644 --- a/controller/model/posture_response_manager_test.go +++ b/controller/model/posture_response_manager_test.go @@ -17,10 +17,11 @@ package model import ( - "github.com/openziti/ziti/v2/controller/db" - "github.com/stretchr/testify/require" "testing" "time" + + "github.com/openziti/ziti/v2/controller/db" + "github.com/stretchr/testify/require" ) func mustParseDuration(s string) time.Duration { diff --git a/controller/model/posture_response_model.go b/controller/model/posture_response_model.go index 13e32b140..c5125dc0e 100644 --- a/controller/model/posture_response_model.go +++ b/controller/model/posture_response_model.go @@ -18,6 +18,11 @@ package model import ( "bytes" + "regexp" + "strings" + "sync/atomic" + "time" + "github.com/jinzhu/copier" "github.com/kataras/go-events" "github.com/michaelquigley/pfxlog" @@ -27,10 +32,6 @@ import ( "github.com/openziti/ziti/v2/controller/db" cmap "github.com/orcaman/concurrent-map/v2" "go.etcd.io/bbolt" - "regexp" - "strings" - "sync/atomic" - "time" ) const ( diff --git a/controller/model/posture_response_model_endpoint_state.go b/controller/model/posture_response_model_endpoint_state.go index 44f348cd7..b6899e971 100644 --- a/controller/model/posture_response_model_endpoint_state.go +++ b/controller/model/posture_response_model_endpoint_state.go @@ -17,8 +17,9 @@ package model import ( - "github.com/michaelquigley/pfxlog" "time" + + "github.com/michaelquigley/pfxlog" ) type PostureResponseEndpointState struct { diff --git a/controller/model/revocation_model.go b/controller/model/revocation_model.go index 418d7529b..39f3445a4 100644 --- a/controller/model/revocation_model.go +++ b/controller/model/revocation_model.go @@ -17,11 +17,12 @@ package model import ( + "time" + "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "time" ) type Revocation struct { diff --git a/controller/model/router_model.go b/controller/model/router_model.go index e3d591e53..8ab0859e8 100644 --- a/controller/model/router_model.go +++ b/controller/model/router_model.go @@ -17,6 +17,9 @@ package model import ( + "sync/atomic" + "time" + "github.com/openziti/channel/v4" "github.com/openziti/foundation/v2/genext" "github.com/openziti/foundation/v2/versions" @@ -25,8 +28,6 @@ import ( "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "sync/atomic" - "time" ) type Listener interface { diff --git a/controller/model/service_manager.go b/controller/model/service_manager.go index 4c8a158f8..1308dc5c1 100644 --- a/controller/model/service_manager.go +++ b/controller/model/service_manager.go @@ -17,6 +17,8 @@ package model import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/common/pb/cmd_pb" @@ -28,7 +30,6 @@ import ( "github.com/orcaman/concurrent-map/v2" "go.etcd.io/bbolt" "google.golang.org/protobuf/proto" - "time" ) func newServiceManager(env Env) *ServiceManager { diff --git a/controller/model/service_model.go b/controller/model/service_model.go index 8cafb8552..4c8dc5640 100644 --- a/controller/model/service_model.go +++ b/controller/model/service_model.go @@ -17,11 +17,12 @@ package model import ( + "time" + "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "time" ) type Service struct { diff --git a/controller/model/service_policy_model.go b/controller/model/service_policy_model.go index a03d4fe76..22380111c 100644 --- a/controller/model/service_policy_model.go +++ b/controller/model/service_policy_model.go @@ -18,12 +18,13 @@ package model import ( "fmt" + "strings" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/models" "go.etcd.io/bbolt" - "strings" ) type ServicePolicy struct { diff --git a/controller/model/session_manager_test.go b/controller/model/session_manager_test.go index 40a5bed52..4602492a6 100644 --- a/controller/model/session_manager_test.go +++ b/controller/model/session_manager_test.go @@ -1,13 +1,14 @@ package model import ( + "testing" + "time" + "github.com/openziti/storage/boltztest" "github.com/openziti/ziti/v2/common/eid" "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/db" "github.com/stretchr/testify/require" - "testing" - "time" ) func TestSessionManager(t *testing.T) { diff --git a/controller/models/errors.go b/controller/models/errors.go index 116e3f042..34f976255 100644 --- a/controller/models/errors.go +++ b/controller/models/errors.go @@ -2,6 +2,7 @@ package models import ( "errors" + "github.com/openziti/foundation/v2/errorz" "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/controller/apierror" diff --git a/controller/network/circuit_lifecycle.go b/controller/network/circuit_lifecycle.go index c6b924567..cc1757326 100644 --- a/controller/network/circuit_lifecycle.go +++ b/controller/network/circuit_lifecycle.go @@ -17,11 +17,12 @@ package network import ( + "time" + "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/xt" "github.com/pkg/errors" - "time" ) func (network *Network) fillCircuitPath(e *event.CircuitEvent, path *model.Path) { diff --git a/controller/network/inspect.go b/controller/network/inspect.go index 670c07779..463336f05 100644 --- a/controller/network/inspect.go +++ b/controller/network/inspect.go @@ -19,6 +19,11 @@ package network import ( "encoding/json" "fmt" + "regexp" + "strings" + "sync" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" @@ -29,10 +34,6 @@ import ( "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/raft" "github.com/openziti/ziti/v2/controller/xt" - "regexp" - "strings" - "sync" - "time" ) type InspectResultValue struct { diff --git a/controller/network/network_path.go b/controller/network/network_path.go index cb9efbffb..e7df0ee46 100644 --- a/controller/network/network_path.go +++ b/controller/network/network_path.go @@ -2,13 +2,14 @@ package network import ( "fmt" + "math" + "time" + "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/controller/idgen" "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/xt" "github.com/pkg/errors" - "math" - "time" ) func (network *Network) CreateRouteMessages(path *model.Path, attempt uint32, circuitId string, terminator xt.Terminator, deadline time.Time) []*ctrl_pb.Route { diff --git a/controller/network/network_test.go b/controller/network/network_test.go index 893dca03f..36fed6e1d 100644 --- a/controller/network/network_test.go +++ b/controller/network/network_test.go @@ -1,13 +1,14 @@ package network import ( + "runtime" + "testing" + "time" + "github.com/openziti/ziti/v2/controller/config" "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/controller/model" "github.com/pkg/errors" - "runtime" - "testing" - "time" "github.com/openziti/foundation/v2/versions" "github.com/openziti/identity" diff --git a/controller/network/path_test.go b/controller/network/path_test.go index 06c57326c..27c254da2 100644 --- a/controller/network/path_test.go +++ b/controller/network/path_test.go @@ -17,11 +17,12 @@ package network import ( - config2 "github.com/openziti/ziti/v2/controller/config" - "github.com/openziti/ziti/v2/controller/model" "testing" "time" + config2 "github.com/openziti/ziti/v2/controller/config" + "github.com/openziti/ziti/v2/controller/model" + "github.com/stretchr/testify/require" "github.com/openziti/transport/v2/tcp" diff --git a/controller/network/router_messaging.go b/controller/network/router_messaging.go index 8ec0bb46f..369cddc72 100644 --- a/controller/network/router_messaging.go +++ b/controller/network/router_messaging.go @@ -18,6 +18,9 @@ package network import ( "errors" + "sync/atomic" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" @@ -30,8 +33,6 @@ import ( "github.com/openziti/ziti/v2/controller/db" "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/xt" - "sync/atomic" - "time" ) type routerUpdates struct { diff --git a/controller/network/routesender.go b/controller/network/routesender.go index 27a18c27c..109e3c2f6 100644 --- a/controller/network/routesender.go +++ b/controller/network/routesender.go @@ -18,9 +18,10 @@ package network import ( "fmt" + "time" + "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/model" - "time" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4/protobufs" diff --git a/controller/network/routesender_test.go b/controller/network/routesender_test.go index 0467adbf8..1ff21e3b7 100644 --- a/controller/network/routesender_test.go +++ b/controller/network/routesender_test.go @@ -1,9 +1,10 @@ package network import ( - "github.com/openziti/ziti/v2/controller/model" "testing" + "github.com/openziti/ziti/v2/controller/model" + "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/common/ctrl_msg" "github.com/openziti/ziti/v2/controller/xt" diff --git a/controller/network/smart.go b/controller/network/smart.go index 815c67c1e..da5855ca5 100644 --- a/controller/network/smart.go +++ b/controller/network/smart.go @@ -17,11 +17,12 @@ package network import ( + "sort" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/controller/config" "github.com/openziti/ziti/v2/controller/model" - "sort" - "time" ) func (network *Network) smart() { diff --git a/controller/network/smart_test.go b/controller/network/smart_test.go index 42b9ebba9..57a281986 100644 --- a/controller/network/smart_test.go +++ b/controller/network/smart_test.go @@ -1,10 +1,11 @@ package network import ( - "github.com/openziti/ziti/v2/controller/model" "testing" "time" + "github.com/openziti/ziti/v2/controller/model" + "github.com/google/uuid" "github.com/openziti/transport/v2/tcp" "github.com/openziti/ziti/v2/common/logcontext" diff --git a/controller/oidc_auth/config.go b/controller/oidc_auth/config.go index e5d41b72f..b65a4a4e7 100644 --- a/controller/oidc_auth/config.go +++ b/controller/oidc_auth/config.go @@ -20,9 +20,10 @@ import ( "crypto" "crypto/sha256" "crypto/x509" + "time" + "github.com/openziti/identity" "github.com/openziti/ziti/v2/common" - "time" ) // Config represents the configuration necessary to operate an OIDC Provider diff --git a/controller/oidc_auth/ctx.go b/controller/oidc_auth/ctx.go index 64e5280e9..c3a4e3bcb 100644 --- a/controller/oidc_auth/ctx.go +++ b/controller/oidc_auth/ctx.go @@ -19,10 +19,11 @@ package oidc_auth import ( "context" "fmt" + "net/http" + "github.com/openziti/ziti/v2/common" "github.com/openziti/ziti/v2/controller/change" "github.com/zitadel/oidc/v3/pkg/oidc" - "net/http" ) // contextKey is a private type used to restrict context value access diff --git a/controller/oidc_auth/errors.go b/controller/oidc_auth/errors.go index 74c379dea..b365d60b4 100644 --- a/controller/oidc_auth/errors.go +++ b/controller/oidc_auth/errors.go @@ -18,6 +18,7 @@ package oidc_auth import ( "fmt" + "github.com/openziti/foundation/v2/errorz" ) diff --git a/controller/oidc_auth/key.go b/controller/oidc_auth/key.go index 6dd32dbfe..e58009b5a 100644 --- a/controller/oidc_auth/key.go +++ b/controller/oidc_auth/key.go @@ -21,6 +21,7 @@ import ( "crypto/ecdsa" "crypto/rsa" "crypto/x509" + "github.com/go-jose/go-jose/v4" "github.com/golang-jwt/jwt/v5" ) diff --git a/controller/oidc_auth/negotiate.go b/controller/oidc_auth/negotiate.go index 75166ae5a..9f5469a3a 100644 --- a/controller/oidc_auth/negotiate.go +++ b/controller/oidc_auth/negotiate.go @@ -18,11 +18,12 @@ package oidc_auth import ( "fmt" - "github.com/openziti/foundation/v2/errorz" "net/http" "sort" "strconv" "strings" + + "github.com/openziti/foundation/v2/errorz" ) // negotiateResponseContentType returns the response content type that should be diff --git a/controller/oidc_auth/negotiate_test.go b/controller/oidc_auth/negotiate_test.go index b888aa83a..7131ce37e 100644 --- a/controller/oidc_auth/negotiate_test.go +++ b/controller/oidc_auth/negotiate_test.go @@ -17,8 +17,9 @@ package oidc_auth import ( - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func Test_parseContentTypeMediaType(t *testing.T) { diff --git a/controller/oidc_auth/parse.go b/controller/oidc_auth/parse.go index 30345acf7..6b44101f8 100644 --- a/controller/oidc_auth/parse.go +++ b/controller/oidc_auth/parse.go @@ -19,13 +19,14 @@ package oidc_auth import ( "encoding/json" "fmt" - "github.com/openziti/edge-api/rest_model" - "github.com/openziti/foundation/v2/errorz" "io" "net/http" "reflect" "strings" "unicode/utf8" + + "github.com/openziti/edge-api/rest_model" + "github.com/openziti/foundation/v2/errorz" ) type TotpRequestBody struct { diff --git a/controller/oidc_auth/parse_test.go b/controller/oidc_auth/parse_test.go index 64aff6769..fb5205018 100644 --- a/controller/oidc_auth/parse_test.go +++ b/controller/oidc_auth/parse_test.go @@ -17,8 +17,9 @@ package oidc_auth import ( - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" ) func Test_Map(t *testing.T) { diff --git a/controller/oidc_auth/provider.go b/controller/oidc_auth/provider.go index c0e12e1f3..0fdd58a31 100644 --- a/controller/oidc_auth/provider.go +++ b/controller/oidc_auth/provider.go @@ -19,6 +19,8 @@ package oidc_auth import ( "context" "fmt" + "net/http" + "github.com/gorilla/mux" "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/common" @@ -27,7 +29,6 @@ import ( "github.com/pkg/errors" "github.com/zitadel/oidc/v3/pkg/op" "golang.org/x/text/language" - "net/http" ) const ( diff --git a/controller/oidc_auth/render.go b/controller/oidc_auth/render.go index 5ab106da9..1ff791f0d 100644 --- a/controller/oidc_auth/render.go +++ b/controller/oidc_auth/render.go @@ -19,10 +19,11 @@ package oidc_auth import ( "encoding" "errors" + "net/http" + "github.com/michaelquigley/pfxlog" "github.com/openziti/edge-api/rest_model" "github.com/openziti/foundation/v2/errorz" - "net/http" ) // render will attempt to send a responses on the provided http.ResponseWriter. All error output will be directed to the diff --git a/controller/oidc_auth/requests.go b/controller/oidc_auth/requests.go index cf0117af7..0df55df0a 100644 --- a/controller/oidc_auth/requests.go +++ b/controller/oidc_auth/requests.go @@ -20,11 +20,12 @@ import ( "crypto/sha1" "crypto/x509" "fmt" + "time" + "github.com/openziti/edge-api/rest_model" "github.com/openziti/foundation/v2/stringz" "github.com/openziti/ziti/v2/common" "github.com/openziti/ziti/v2/controller/model" - "time" "github.com/zitadel/oidc/v3/pkg/oidc" ) diff --git a/controller/raft/hclog_adapter.go b/controller/raft/hclog_adapter.go index da4b23db3..2864996ee 100644 --- a/controller/raft/hclog_adapter.go +++ b/controller/raft/hclog_adapter.go @@ -18,14 +18,15 @@ package raft import ( "fmt" - "github.com/hashicorp/go-hclog" - "github.com/michaelquigley/pfxlog" - "github.com/sirupsen/logrus" "io" "log" "runtime" "strings" "sync" + + "github.com/hashicorp/go-hclog" + "github.com/michaelquigley/pfxlog" + "github.com/sirupsen/logrus" ) func NewHcLogrusLogger() hclog.Logger { diff --git a/controller/raft/index_tracker.go b/controller/raft/index_tracker.go index 58977c81a..67f9beab1 100644 --- a/controller/raft/index_tracker.go +++ b/controller/raft/index_tracker.go @@ -17,9 +17,10 @@ package raft import ( - "github.com/pkg/errors" "sync" "time" + + "github.com/pkg/errors" ) type IndexTracker interface { diff --git a/controller/raft/index_tracker_test.go b/controller/raft/index_tracker_test.go index e159e8d8d..8e2f0d970 100644 --- a/controller/raft/index_tracker_test.go +++ b/controller/raft/index_tracker_test.go @@ -17,9 +17,10 @@ package raft import ( - "github.com/stretchr/testify/require" "testing" "time" + + "github.com/stretchr/testify/require" ) func TestIndexTracker(t *testing.T) { diff --git a/controller/raft/member.go b/controller/raft/member.go index 6d45f524b..ae0c5d684 100644 --- a/controller/raft/member.go +++ b/controller/raft/member.go @@ -18,9 +18,10 @@ package raft import ( "fmt" + "time" + "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/controller/apierror" - "time" "github.com/openziti/channel/v4/protobufs" "github.com/openziti/ziti/v2/common/pb/cmd_pb" diff --git a/controller/raft/mesh/mesh.go b/controller/raft/mesh/mesh.go index 5a8efb356..19c3c3f31 100644 --- a/controller/raft/mesh/mesh.go +++ b/controller/raft/mesh/mesh.go @@ -20,9 +20,6 @@ import ( "crypto/x509" "encoding/json" "fmt" - "github.com/openziti/foundation/v2/concurrenz" - "github.com/openziti/foundation/v2/versions" - "github.com/openziti/ziti/v2/controller/event" "math/rand" "net" "strings" @@ -30,6 +27,10 @@ import ( "sync/atomic" "time" + "github.com/openziti/foundation/v2/concurrenz" + "github.com/openziti/foundation/v2/versions" + "github.com/openziti/ziti/v2/controller/event" + "github.com/hashicorp/raft" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" diff --git a/controller/raft/mesh/mesh_test.go b/controller/raft/mesh/mesh_test.go index fdd69bca3..49e46b96b 100644 --- a/controller/raft/mesh/mesh_test.go +++ b/controller/raft/mesh/mesh_test.go @@ -1,12 +1,13 @@ package mesh import ( - "github.com/openziti/foundation/v2/versions" - "github.com/openziti/ziti/v2/controller/event" "runtime" "testing" "time" + "github.com/openziti/foundation/v2/versions" + "github.com/openziti/ziti/v2/controller/event" + "github.com/stretchr/testify/assert" ) diff --git a/controller/raft/mesh/peerconn.go b/controller/raft/mesh/peerconn.go index fc8a85559..8a92668dd 100644 --- a/controller/raft/mesh/peerconn.go +++ b/controller/raft/mesh/peerconn.go @@ -17,14 +17,15 @@ package mesh import ( - "github.com/michaelquigley/pfxlog" - "github.com/openziti/channel/v4" - "github.com/pkg/errors" - "github.com/sirupsen/logrus" "io" "net" "sync/atomic" "time" + + "github.com/michaelquigley/pfxlog" + "github.com/openziti/channel/v4" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" ) // raftPeerConn presents a net.Conn API over a channel. This allows us to multiplex raft traffic as well diff --git a/controller/response/headers.go b/controller/response/headers.go index 1353dda29..c26bece5e 100644 --- a/controller/response/headers.go +++ b/controller/response/headers.go @@ -17,8 +17,9 @@ package response import ( - "github.com/openziti/ziti/v2/common/build" "strconv" + + "github.com/openziti/ziti/v2/common/build" ) const ( diff --git a/controller/response/responder.go b/controller/response/responder.go index 672f7d16c..fcbf25955 100644 --- a/controller/response/responder.go +++ b/controller/response/responder.go @@ -18,13 +18,14 @@ package response import ( "fmt" + "net/http" + "github.com/go-openapi/errors" "github.com/michaelquigley/pfxlog" "github.com/openziti/edge-api/rest_model" "github.com/openziti/foundation/v2/errorz" "github.com/openziti/ziti/v2/controller/api" "github.com/openziti/ziti/v2/controller/apierror" - "net/http" ) // todo: rename to Responder, remove old Responder and RequestResponder diff --git a/controller/rest_util/capool.go b/controller/rest_util/capool.go index cbe301627..8915d563d 100644 --- a/controller/rest_util/capool.go +++ b/controller/rest_util/capool.go @@ -20,8 +20,9 @@ import ( "crypto/x509" "encoding/base64" "fmt" - "github.com/fullsailor/pkcs7" "io" + + "github.com/fullsailor/pkcs7" ) // GetControllerWellKnownCas will attempt to connect to a controller and retrieve its PKCS11 well-known CA bundle. diff --git a/controller/rest_util/clients.go b/controller/rest_util/clients.go index ab22382f3..bddeeceeb 100644 --- a/controller/rest_util/clients.go +++ b/controller/rest_util/clients.go @@ -19,11 +19,12 @@ package rest_util import ( + "net/url" + "github.com/go-openapi/runtime" httptransport "github.com/go-openapi/runtime/client" - fabric_rest_client "github.com/openziti/ziti/v2/controller/rest_client" "github.com/openziti/identity" - "net/url" + fabric_rest_client "github.com/openziti/ziti/v2/controller/rest_client" ) // TransportConfig provides information about how to access a REST API diff --git a/controller/subcmd/init.go b/controller/subcmd/init.go index d052ff416..60ead88d4 100644 --- a/controller/subcmd/init.go +++ b/controller/subcmd/init.go @@ -18,6 +18,9 @@ package subcmd import ( "errors" + "strconv" + "strings" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/term" "github.com/openziti/foundation/v2/versions" @@ -25,8 +28,6 @@ import ( "github.com/openziti/ziti/v2/controller/config" "github.com/openziti/ziti/v2/controller/server" "github.com/spf13/cobra" - "strconv" - "strings" ) const ( diff --git a/controller/webapis/controller-health.go b/controller/webapis/controller-health.go index 4d63c5740..cf83d1f60 100644 --- a/controller/webapis/controller-health.go +++ b/controller/webapis/controller-health.go @@ -19,13 +19,14 @@ package webapis import ( "encoding/json" "fmt" + "net/http" + "strings" + "time" + gosundheit "github.com/AppsFlyer/go-sundheit" "github.com/openziti/xweb/v3" "github.com/openziti/ziti/v2/controller/env" "github.com/sirupsen/logrus" - "net/http" - "strings" - "time" ) var _ xweb.ApiHandlerFactory = &ControllerHealthCheckApiFactory{} diff --git a/controller/webapis/management-api.go b/controller/webapis/management-api.go index 6eb09608e..47c6e5a1b 100644 --- a/controller/webapis/management-api.go +++ b/controller/webapis/management-api.go @@ -18,6 +18,10 @@ package webapis import ( "fmt" + "net/http" + "strings" + "time" + "github.com/openziti/edge-api/rest_management_api_client" "github.com/openziti/edge-api/rest_management_api_server" "github.com/openziti/xweb/v3" @@ -25,9 +29,6 @@ import ( "github.com/openziti/ziti/v2/controller/apierror" "github.com/openziti/ziti/v2/controller/env" "github.com/openziti/ziti/v2/controller/response" - "net/http" - "strings" - "time" ) const ( diff --git a/controller/webapis/zac.go b/controller/webapis/zac.go index dd3af9345..60cee5989 100644 --- a/controller/webapis/zac.go +++ b/controller/webapis/zac.go @@ -18,9 +18,10 @@ package webapis import ( "fmt" + "strings" + "github.com/openziti/xweb/v3" log "github.com/sirupsen/logrus" - "strings" ) const ( diff --git a/controller/xctrl/ops.go b/controller/xctrl/ops.go index d2c740d30..c1e1e2164 100644 --- a/controller/xctrl/ops.go +++ b/controller/xctrl/ops.go @@ -17,10 +17,11 @@ package xctrl import ( + "time" + "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" - "time" ) type Capabilities struct { diff --git a/controller/xctrl/xctrl.go b/controller/xctrl/xctrl.go index 25aa9d7e0..3a3ea193f 100644 --- a/controller/xctrl/xctrl.go +++ b/controller/xctrl/xctrl.go @@ -18,8 +18,8 @@ package xctrl import ( "github.com/openziti/channel/v4" - "github.com/openziti/ziti/v2/common/config" "github.com/openziti/storage/boltz" + "github.com/openziti/ziti/v2/common/config" ) // An Xctrl allows adding handlers to the router <-> controller connection diff --git a/controller/xctrl_example/example.go b/controller/xctrl_example/example.go index bcc6710ab..3dec7b4da 100644 --- a/controller/xctrl_example/example.go +++ b/controller/xctrl_example/example.go @@ -20,12 +20,13 @@ import ( "bytes" "encoding/binary" "errors" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" - "github.com/openziti/ziti/v2/controller/xctrl" "github.com/openziti/storage/boltz" + "github.com/openziti/ziti/v2/controller/xctrl" "github.com/sirupsen/logrus" - "time" ) type example struct { diff --git a/controller/xctrl_example/receive.go b/controller/xctrl_example/receive.go index 262d0c628..e894115b8 100644 --- a/controller/xctrl_example/receive.go +++ b/controller/xctrl_example/receive.go @@ -19,6 +19,7 @@ package xctrl_example import ( "bytes" "encoding/binary" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" ) diff --git a/controller/xt/costs.go b/controller/xt/costs.go index ead7c625a..03f354209 100644 --- a/controller/xt/costs.go +++ b/controller/xt/costs.go @@ -17,9 +17,10 @@ package xt import ( - "github.com/openziti/ziti/v2/common/inspect" "math" + "github.com/openziti/ziti/v2/common/inspect" + cmap "github.com/orcaman/concurrent-map/v2" ) diff --git a/controller/xt/registry.go b/controller/xt/registry.go index 4f1f94d8e..514627695 100644 --- a/controller/xt/registry.go +++ b/controller/xt/registry.go @@ -17,9 +17,10 @@ package xt import ( - "github.com/openziti/storage/boltz" "sync" "sync/atomic" + + "github.com/openziti/storage/boltz" ) func init() { diff --git a/controller/xt/xt.go b/controller/xt/xt.go index 9789de78b..2eb98b992 100644 --- a/controller/xt/xt.go +++ b/controller/xt/xt.go @@ -18,9 +18,10 @@ package xt import ( "fmt" + "time" + "github.com/openziti/identity" "github.com/openziti/ziti/v2/common/logcontext" - "time" ) type Registry interface { diff --git a/controller/xt_common/cost_visitor.go b/controller/xt_common/cost_visitor.go index 39051a46a..62c5b44e4 100644 --- a/controller/xt_common/cost_visitor.go +++ b/controller/xt_common/cost_visitor.go @@ -1,13 +1,14 @@ package xt_common import ( + "math" + "sync/atomic" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/common/inspect" "github.com/openziti/ziti/v2/controller/xt" cmap "github.com/orcaman/concurrent-map/v2" - "math" - "sync/atomic" - "time" ) type TerminatorCosts struct { diff --git a/controller/xt_common/failure_test.go b/controller/xt_common/failure_test.go index bc9fdcfcc..d04d47ebe 100644 --- a/controller/xt_common/failure_test.go +++ b/controller/xt_common/failure_test.go @@ -2,13 +2,14 @@ package xt_common import ( "fmt" - "github.com/openziti/ziti/v2/controller/xt" - cmap "github.com/orcaman/concurrent-map/v2" "math" "math/rand" "sync" "testing" "time" + + "github.com/openziti/ziti/v2/controller/xt" + cmap "github.com/orcaman/concurrent-map/v2" ) type mockTerminator struct{} diff --git a/controller/xt_random/impl.go b/controller/xt_random/impl.go index 5123f25ed..9676a2d7d 100644 --- a/controller/xt_random/impl.go +++ b/controller/xt_random/impl.go @@ -17,8 +17,9 @@ package xt_random import ( - "github.com/openziti/ziti/v2/controller/xt" "math/rand" + + "github.com/openziti/ziti/v2/controller/xt" ) /** diff --git a/controller/xt_smartrouting/impl.go b/controller/xt_smartrouting/impl.go index d88550b7a..d57b84f92 100644 --- a/controller/xt_smartrouting/impl.go +++ b/controller/xt_smartrouting/impl.go @@ -17,9 +17,10 @@ package xt_smartrouting import ( + "time" + "github.com/openziti/ziti/v2/controller/xt" "github.com/openziti/ziti/v2/controller/xt_common" - "time" ) const ( diff --git a/controller/xt_sticky/impl.go b/controller/xt_sticky/impl.go index 8be52d0d6..5303bfaac 100644 --- a/controller/xt_sticky/impl.go +++ b/controller/xt_sticky/impl.go @@ -17,10 +17,11 @@ package xt_sticky import ( + "time" + "github.com/openziti/ziti/v2/common/ctrl_msg" "github.com/openziti/ziti/v2/controller/xt" "github.com/openziti/ziti/v2/controller/xt_common" - "time" ) const ( diff --git a/controller/xt_weighted/impl.go b/controller/xt_weighted/impl.go index 84306df01..2458e8cf7 100644 --- a/controller/xt_weighted/impl.go +++ b/controller/xt_weighted/impl.go @@ -17,10 +17,11 @@ package xt_weighted import ( - "github.com/openziti/ziti/v2/controller/xt" - "github.com/openziti/ziti/v2/controller/xt_common" "math/rand" "time" + + "github.com/openziti/ziti/v2/controller/xt" + "github.com/openziti/ziti/v2/controller/xt_common" ) /** diff --git a/internal/ascode/cache_util.go b/internal/ascode/cache_util.go index 775670877..3fb58fbad 100644 --- a/internal/ascode/cache_util.go +++ b/internal/ascode/cache_util.go @@ -18,8 +18,9 @@ package ascode import ( "errors" - "github.com/michaelquigley/pfxlog" "reflect" + + "github.com/michaelquigley/pfxlog" ) type CacheGetter func(id string) (interface{}, error) diff --git a/internal/cobra/cobra-utils.go b/internal/cobra/cobra-utils.go index 576f24648..63640c6d5 100644 --- a/internal/cobra/cobra-utils.go +++ b/internal/cobra/cobra-utils.go @@ -18,6 +18,7 @@ package cobra import ( "fmt" + "github.com/openziti/ziti/v2/ziti/cmd/consts" "github.com/spf13/cobra" "github.com/spf13/pflag" diff --git a/internal/log_format.go b/internal/log_format.go index f9d76df30..6dc818acd 100644 --- a/internal/log_format.go +++ b/internal/log_format.go @@ -17,8 +17,9 @@ package internal import ( - "github.com/sirupsen/logrus" "runtime" + + "github.com/sirupsen/logrus" ) func ConfigureLogFormat(level logrus.Level) { diff --git a/internal/rest/client/helper.go b/internal/rest/client/helper.go index 4dde8c6e5..5c3c5218d 100644 --- a/internal/rest/client/helper.go +++ b/internal/rest/client/helper.go @@ -18,6 +18,7 @@ package client import ( "context" + "github.com/michaelquigley/pfxlog" "github.com/openziti/edge-api/rest_client_api_client" "github.com/openziti/edge-api/rest_client_api_client/external_jwt_signer" diff --git a/internal/rest/mgmt/helpers.go b/internal/rest/mgmt/helpers.go index 5cae0390c..c12cde056 100644 --- a/internal/rest/mgmt/helpers.go +++ b/internal/rest/mgmt/helpers.go @@ -19,6 +19,7 @@ package mgmt import ( "context" "fmt" + "github.com/openziti/edge-api/rest_management_api_client" "github.com/openziti/edge-api/rest_management_api_client/auth_policy" "github.com/openziti/edge-api/rest_management_api_client/certificate_authority" diff --git a/router/enroll/csr.go b/router/enroll/csr.go index 436e69cdb..60d7a664b 100644 --- a/router/enroll/csr.go +++ b/router/enroll/csr.go @@ -22,6 +22,7 @@ import ( "crypto/x509" "crypto/x509/pkix" "encoding/pem" + "github.com/openziti/ziti/v2/router/env" ) diff --git a/router/env/config.go b/router/env/config.go index a07b5580e..ea2a69111 100644 --- a/router/env/config.go +++ b/router/env/config.go @@ -19,14 +19,15 @@ package env import ( "bytes" "fmt" - "github.com/openziti/transport/v2/tls" - "github.com/openziti/ziti/v2/controller/command" "io" "os" "path/filepath" "strings" "time" + "github.com/openziti/transport/v2/tls" + "github.com/openziti/ziti/v2/controller/command" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/foundation/v2/concurrenz" diff --git a/router/env/config_forwarder.go b/router/env/config_forwarder.go index cf28048c5..42ac264a4 100644 --- a/router/env/config_forwarder.go +++ b/router/env/config_forwarder.go @@ -17,8 +17,9 @@ package env import ( - "github.com/pkg/errors" "time" + + "github.com/pkg/errors" ) const ( diff --git a/router/forwarder/scanner.go b/router/forwarder/scanner.go index ab519db2b..19c078245 100644 --- a/router/forwarder/scanner.go +++ b/router/forwarder/scanner.go @@ -17,13 +17,14 @@ package forwarder import ( + "sync/atomic" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4/protobufs" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/router/env" "github.com/sirupsen/logrus" - "sync/atomic" - "time" ) type Scanner struct { diff --git a/router/forwarder/tables.go b/router/forwarder/tables.go index 6dbf59d57..87a0ac49f 100644 --- a/router/forwarder/tables.go +++ b/router/forwarder/tables.go @@ -18,12 +18,13 @@ package forwarder import ( "fmt" - "github.com/openziti/sdk-golang/xgress" - "github.com/openziti/ziti/v2/router/env" - "github.com/orcaman/concurrent-map/v2" "reflect" "sync/atomic" "time" + + "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/router/env" + "github.com/orcaman/concurrent-map/v2" ) // circuitTable implements a directory of forwardTables, keyed by circuitId. diff --git a/router/handler_ctrl/timeout_check_test.go b/router/handler_ctrl/timeout_check_test.go index dd1b9d9f1..cab570412 100644 --- a/router/handler_ctrl/timeout_check_test.go +++ b/router/handler_ctrl/timeout_check_test.go @@ -2,8 +2,9 @@ package handler_ctrl import ( "fmt" - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) type testTimeoutErr struct{} diff --git a/router/handler_ctrl/toggle_pipe_traces.go b/router/handler_ctrl/toggle_pipe_traces.go index 469dcbc76..cecc8fc71 100644 --- a/router/handler_ctrl/toggle_pipe_traces.go +++ b/router/handler_ctrl/toggle_pipe_traces.go @@ -20,9 +20,9 @@ import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" trace_pb "github.com/openziti/channel/v4/trace/pb" + "github.com/openziti/identity" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/common/trace" - "github.com/openziti/identity" "google.golang.org/protobuf/proto" ) diff --git a/router/handler_edge_ctrl/serviceList.go b/router/handler_edge_ctrl/serviceList.go index 37522bc99..d3e4cf163 100644 --- a/router/handler_edge_ctrl/serviceList.go +++ b/router/handler_edge_ctrl/serviceList.go @@ -2,6 +2,7 @@ package handler_edge_ctrl import ( "encoding/json" + "github.com/openziti/channel/v4" "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/common/pb/edge_ctrl_pb" diff --git a/router/handler_link/ack.go b/router/handler_link/ack.go index f1348806a..a0f0a412a 100644 --- a/router/handler_link/ack.go +++ b/router/handler_link/ack.go @@ -19,8 +19,8 @@ package handler_link import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" - "github.com/openziti/ziti/v2/router/forwarder" "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/router/forwarder" "github.com/openziti/ziti/v2/router/xlink" ) diff --git a/router/handler_link/control.go b/router/handler_link/control.go index 9856ec934..1591c176f 100644 --- a/router/handler_link/control.go +++ b/router/handler_link/control.go @@ -19,8 +19,8 @@ package handler_link import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" - "github.com/openziti/ziti/v2/router/forwarder" "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/router/forwarder" "github.com/openziti/ziti/v2/router/xlink" ) diff --git a/router/handler_xgress/close.go b/router/handler_xgress/close.go index 4cdfe996f..65ebe8848 100644 --- a/router/handler_xgress/close.go +++ b/router/handler_xgress/close.go @@ -17,13 +17,14 @@ package handler_xgress import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4/protobufs" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/router/env" "github.com/openziti/ziti/v2/router/forwarder" - "github.com/openziti/sdk-golang/xgress" - "time" ) type closeHandler struct { diff --git a/router/internal/apiproxy/proxy.go b/router/internal/apiproxy/proxy.go index 27ce50e10..4f7b77b9a 100644 --- a/router/internal/apiproxy/proxy.go +++ b/router/internal/apiproxy/proxy.go @@ -19,12 +19,13 @@ package apiproxy import ( "crypto/tls" "encoding/base64" - "github.com/michaelquigley/pfxlog" - "github.com/openziti/ziti/v2/router/env" "net/http" "net/http/httputil" "net/url" "time" + + "github.com/michaelquigley/pfxlog" + "github.com/openziti/ziti/v2/router/env" ) const ( diff --git a/router/link/link_registry_test.go b/router/link/link_registry_test.go index b939e9722..26f3bd92e 100644 --- a/router/link/link_registry_test.go +++ b/router/link/link_registry_test.go @@ -18,6 +18,9 @@ package link import ( "errors" + "testing" + "time" + "github.com/openziti/channel/v4" "github.com/openziti/foundation/v2/goroutines" "github.com/openziti/identity" @@ -30,8 +33,6 @@ import ( "github.com/openziti/ziti/v2/router/env" "github.com/openziti/ziti/v2/router/xlink" "github.com/stretchr/testify/require" - "testing" - "time" ) type testEnv struct { diff --git a/router/link/link_state.go b/router/link/link_state.go index fa036ad96..210feac82 100644 --- a/router/link/link_state.go +++ b/router/link/link_state.go @@ -18,13 +18,14 @@ package link import ( "container/heap" + "math/rand" + "sync/atomic" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/router/xlink" - "math/rand" - "sync/atomic" - "time" ) const ( diff --git a/router/link/link_state_heap_test.go b/router/link/link_state_heap_test.go index ff527ce69..0456b27ca 100644 --- a/router/link/link_state_heap_test.go +++ b/router/link/link_state_heap_test.go @@ -18,9 +18,10 @@ package link import ( "container/heap" - "github.com/stretchr/testify/require" "testing" "time" + + "github.com/stretchr/testify/require" ) func TestLinkStateHeap(t *testing.T) { diff --git a/router/metrics/peekhandler.go b/router/metrics/peekhandler.go index eacdfd300..2c3fb038a 100644 --- a/router/metrics/peekhandler.go +++ b/router/metrics/peekhandler.go @@ -17,12 +17,13 @@ package metrics import ( + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/metrics" "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/env" - "time" ) // NewChannelPeekHandler creates a channel PeekHandler which tracks latency, message rate and message size distribution diff --git a/router/metrics/xg_metrics.go b/router/metrics/xg_metrics.go index d1c7cd8b8..e17c7023f 100644 --- a/router/metrics/xg_metrics.go +++ b/router/metrics/xg_metrics.go @@ -17,10 +17,11 @@ package metrics import ( + "time" + "github.com/openziti/metrics" "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/env" - "time" ) func NewXgressMetrics(registry metrics.UsageRegistry) *XgressMetrics { diff --git a/router/monitor_unix.go b/router/monitor_unix.go index b487f4b0a..06858e5bd 100644 --- a/router/monitor_unix.go +++ b/router/monitor_unix.go @@ -19,11 +19,12 @@ package router import ( - "github.com/michaelquigley/pfxlog" - "github.com/openziti/ziti/v2/router/forwarder" "os" "os/signal" "syscall" + + "github.com/michaelquigley/pfxlog" + "github.com/openziti/ziti/v2/router/forwarder" ) type routerMonitor struct { diff --git a/router/posture/access.go b/router/posture/access.go index 853bf51e3..963c6a88f 100644 --- a/router/posture/access.go +++ b/router/posture/access.go @@ -2,6 +2,7 @@ package posture import ( "fmt" + "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/common" "github.com/openziti/ziti/v2/common/eid" diff --git a/router/posture/mfa.go b/router/posture/mfa.go index ae1dc7ae8..59a711a14 100644 --- a/router/posture/mfa.go +++ b/router/posture/mfa.go @@ -2,9 +2,10 @@ package posture import ( "fmt" + "time" + "github.com/openziti/ziti/v2/common/pb/edge_ctrl_pb" "github.com/pkg/errors" - "time" ) const ( diff --git a/router/test/single_router_perf_test.go b/router/test/single_router_perf_test.go index f60ae2a27..f5185d966 100644 --- a/router/test/single_router_perf_test.go +++ b/router/test/single_router_perf_test.go @@ -22,20 +22,21 @@ import ( "encoding/binary" "errors" "fmt" - "github.com/openziti/channel/v4" - "github.com/openziti/metrics" - "github.com/openziti/metrics/metrics_pb" - "github.com/openziti/ziti/v2/common/pb/ctrl_pb" - "github.com/openziti/ziti/v2/router/env" - "github.com/openziti/ziti/v2/router/forwarder" - "github.com/openziti/ziti/v2/router/handler_xgress" - "github.com/openziti/sdk-golang/xgress" - "github.com/openziti/ziti/v2/router/xgress_router" - "github.com/stretchr/testify/require" "io" "sync/atomic" "testing" "time" + + "github.com/openziti/channel/v4" + "github.com/openziti/metrics" + "github.com/openziti/metrics/metrics_pb" + "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/common/pb/ctrl_pb" + "github.com/openziti/ziti/v2/router/env" + "github.com/openziti/ziti/v2/router/forwarder" + "github.com/openziti/ziti/v2/router/handler_xgress" + "github.com/openziti/ziti/v2/router/xgress_router" + "github.com/stretchr/testify/require" ) type testSrcConn struct { diff --git a/router/xgress_edge/connections_test.go b/router/xgress_edge/connections_test.go index 4ffedefb7..842fa2f8d 100644 --- a/router/xgress_edge/connections_test.go +++ b/router/xgress_edge/connections_test.go @@ -20,13 +20,14 @@ import ( "crypto/x509" "encoding/pem" "fmt" + "net/url" + "testing" + "github.com/golang-jwt/jwt/v5" "github.com/openziti/ziti/v2/common" "github.com/openziti/ziti/v2/common/pb/edge_ctrl_pb" "github.com/openziti/ziti/v2/router/state" "github.com/stretchr/testify/require" - "net/url" - "testing" ) func Test_validateBySpiffeId(t *testing.T) { diff --git a/router/xgress_edge/factory_test.go b/router/xgress_edge/factory_test.go index df9fe51ce..befa6c55a 100644 --- a/router/xgress_edge/factory_test.go +++ b/router/xgress_edge/factory_test.go @@ -1,12 +1,13 @@ package xgress_edge import ( - "github.com/openziti/channel/v4" - "github.com/openziti/ziti/v2/common" - "github.com/openziti/sdk-golang/xgress" - "github.com/stretchr/testify/require" "testing" "time" + + "github.com/openziti/channel/v4" + "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/common" + "github.com/stretchr/testify/require" ) /* diff --git a/router/xgress_edge/msg_queue.go b/router/xgress_edge/msg_queue.go index 58f32f475..df5420f6a 100644 --- a/router/xgress_edge/msg_queue.go +++ b/router/xgress_edge/msg_queue.go @@ -2,11 +2,12 @@ package xgress_edge import ( "context" + "sync/atomic" + "github.com/openziti/channel/v4" "github.com/openziti/foundation/v2/sequencer" "github.com/openziti/sdk-golang/ziti/edge" "golang.org/x/sync/semaphore" - "sync/atomic" ) type MsgQueue interface { diff --git a/router/xgress_edge_transport/dialer.go b/router/xgress_edge_transport/dialer.go index 6c428835d..30eb48f07 100644 --- a/router/xgress_edge_transport/dialer.go +++ b/router/xgress_edge_transport/dialer.go @@ -17,17 +17,18 @@ package xgress_edge_transport import ( + "time" + "github.com/openziti/ziti/v2/common/ctrl_msg" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/pkg/errors" - "time" "github.com/michaelquigley/pfxlog" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/sdk-golang/ziti/edge" "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/common/logcontext" "github.com/openziti/ziti/v2/controller/xt" - "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/xgress_common" ) diff --git a/router/xgress_edge_tunnel/dialer.go b/router/xgress_edge_tunnel/dialer.go index 8c1deeac3..9a238358d 100644 --- a/router/xgress_edge_tunnel/dialer.go +++ b/router/xgress_edge_tunnel/dialer.go @@ -18,11 +18,11 @@ package xgress_edge_tunnel import ( "github.com/michaelquigley/pfxlog" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/sdk-golang/ziti/edge" "github.com/openziti/ziti/v2/common/ctrl_msg" "github.com/openziti/ziti/v2/common/logcontext" "github.com/openziti/ziti/v2/controller/xt" - "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/xgress_common" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/openziti/ziti/v2/tunnel" diff --git a/router/xgress_proxy/factory.go b/router/xgress_proxy/factory.go index eac9b1ec3..10124884a 100644 --- a/router/xgress_proxy/factory.go +++ b/router/xgress_proxy/factory.go @@ -18,10 +18,11 @@ package xgress_proxy import ( "fmt" + "github.com/openziti/identity" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/router/env" - "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/pkg/errors" ) diff --git a/router/xgress_proxy/listener.go b/router/xgress_proxy/listener.go index 2e3119b69..965d038a2 100644 --- a/router/xgress_proxy/listener.go +++ b/router/xgress_proxy/listener.go @@ -19,14 +19,15 @@ package xgress_proxy import ( "errors" "fmt" + "io" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/identity" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/router/env" - "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/xgress_router" - "io" ) func newListener(id *identity.TokenId, ctrl env.NetworkControllers, options *xgress.Options, tcfg transport.Configuration, service string) xgress_router.Listener { diff --git a/router/xgress_proxy_udp/factory.go b/router/xgress_proxy_udp/factory.go index f9a1a9439..6b42e1b27 100644 --- a/router/xgress_proxy_udp/factory.go +++ b/router/xgress_proxy_udp/factory.go @@ -18,8 +18,9 @@ package xgress_proxy_udp import ( "fmt" - "github.com/openziti/ziti/v2/router/env" + "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/router/env" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/pkg/errors" ) diff --git a/router/xgress_proxy_udp/listener.go b/router/xgress_proxy_udp/listener.go index e680efe07..fc24cfad7 100644 --- a/router/xgress_proxy_udp/listener.go +++ b/router/xgress_proxy_udp/listener.go @@ -18,15 +18,16 @@ package xgress_proxy_udp import ( "fmt" + "net" + "time" + "github.com/openziti/foundation/v2/info" - "github.com/openziti/ziti/v2/router/env" "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/router/env" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/openziti/ziti/v2/router/xgress_udp" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "net" - "time" ) func (l *listener) Listen(address string, bindHandler xgress.BindHandler) error { diff --git a/router/xgress_router/acker.go b/router/xgress_router/acker.go index 19123ee8e..b9323b161 100644 --- a/router/xgress_router/acker.go +++ b/router/xgress_router/acker.go @@ -1,11 +1,12 @@ package xgress_router import ( + "sync/atomic" + "github.com/ef-ds/deque" "github.com/michaelquigley/pfxlog" "github.com/openziti/metrics" "github.com/openziti/sdk-golang/xgress" - "sync/atomic" ) type AckForwarder interface { diff --git a/router/xgress_router/factory.go b/router/xgress_router/factory.go index 0e782073b..a3391a8da 100644 --- a/router/xgress_router/factory.go +++ b/router/xgress_router/factory.go @@ -1,11 +1,12 @@ package xgress_router import ( + "time" + "github.com/openziti/identity" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/common/logcontext" "github.com/openziti/ziti/v2/controller/xt" - "github.com/openziti/sdk-golang/xgress" - "time" ) type Listener interface { diff --git a/router/xgress_router/readuntil.go b/router/xgress_router/readuntil.go index 6350220e8..7f922a0d4 100644 --- a/router/xgress_router/readuntil.go +++ b/router/xgress_router/readuntil.go @@ -18,6 +18,7 @@ package xgress_router import ( "errors" + "github.com/openziti/transport/v2" ) diff --git a/router/xgress_sdk/api.go b/router/xgress_sdk/api.go index 3f6f63d54..68b391c13 100644 --- a/router/xgress_sdk/api.go +++ b/router/xgress_sdk/api.go @@ -1,8 +1,9 @@ package xgress_sdk import ( - "github.com/openziti/sdk-golang/ziti" "net" + + "github.com/openziti/sdk-golang/ziti" ) // The Fabric API allows users to dial services and stay up-to-date with service/identity changes. diff --git a/router/xgress_transport/client.go b/router/xgress_transport/client.go index 45d338717..ccf0da5ea 100644 --- a/router/xgress_transport/client.go +++ b/router/xgress_transport/client.go @@ -18,6 +18,7 @@ package xgress_transport import ( "errors" + "github.com/openziti/identity" "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/router/xgress_router" diff --git a/router/xgress_transport/dialer.go b/router/xgress_transport/dialer.go index 6fc37d51c..904362f23 100644 --- a/router/xgress_transport/dialer.go +++ b/router/xgress_transport/dialer.go @@ -17,17 +17,18 @@ package xgress_transport import ( + "time" + "github.com/openziti/ziti/v2/common/ctrl_msg" "github.com/openziti/ziti/v2/router/env" "github.com/openziti/ziti/v2/router/xgress_router" - "time" "github.com/michaelquigley/pfxlog" "github.com/openziti/identity" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/common/logcontext" "github.com/openziti/ziti/v2/controller/xt" - "github.com/openziti/sdk-golang/xgress" "github.com/pkg/errors" ) diff --git a/router/xgress_transport/factory.go b/router/xgress_transport/factory.go index e96e7a649..e4858432e 100644 --- a/router/xgress_transport/factory.go +++ b/router/xgress_transport/factory.go @@ -18,9 +18,9 @@ package xgress_transport import ( "github.com/openziti/identity" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/router/env" - "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/pkg/errors" ) diff --git a/router/xgress_transport/listener.go b/router/xgress_transport/listener.go index e89117cf4..86fb5b6dc 100644 --- a/router/xgress_transport/listener.go +++ b/router/xgress_transport/listener.go @@ -19,14 +19,15 @@ package xgress_transport import ( "errors" "fmt" + "io" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/concurrenz" "github.com/openziti/identity" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/router/env" - "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/xgress_router" - "io" ) type listener struct { diff --git a/router/xgress_transport_udp/connection.go b/router/xgress_transport_udp/connection.go index 471a8224a..f987c66c6 100644 --- a/router/xgress_transport_udp/connection.go +++ b/router/xgress_transport_udp/connection.go @@ -17,11 +17,12 @@ package xgress_transport_udp import ( - "github.com/openziti/channel/v4" - "github.com/openziti/sdk-golang/xgress" - "github.com/openziti/foundation/v2/info" - "github.com/pkg/errors" "net" + + "github.com/openziti/channel/v4" + "github.com/openziti/foundation/v2/info" + "github.com/openziti/sdk-golang/xgress" + "github.com/pkg/errors" ) func (p *packetConn) LogContext() string { diff --git a/router/xgress_transport_udp/dialer.go b/router/xgress_transport_udp/dialer.go index dc0cab6f0..c6f23415d 100644 --- a/router/xgress_transport_udp/dialer.go +++ b/router/xgress_transport_udp/dialer.go @@ -17,17 +17,18 @@ package xgress_transport_udp import ( - "github.com/openziti/ziti/v2/router/env" - "github.com/openziti/ziti/v2/router/xgress_router" - "github.com/pkg/errors" "net" "time" + "github.com/openziti/ziti/v2/router/env" + "github.com/openziti/ziti/v2/router/xgress_router" + "github.com/pkg/errors" + "github.com/michaelquigley/pfxlog" "github.com/openziti/identity" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/common/logcontext" "github.com/openziti/ziti/v2/controller/xt" - "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/router/xgress_udp" ) diff --git a/router/xgress_transport_udp/factory.go b/router/xgress_transport_udp/factory.go index fba676141..7198184c9 100644 --- a/router/xgress_transport_udp/factory.go +++ b/router/xgress_transport_udp/factory.go @@ -18,8 +18,8 @@ package xgress_transport_udp import ( "github.com/openziti/identity" - "github.com/openziti/ziti/v2/router/env" "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/router/env" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/pkg/errors" ) diff --git a/router/xgress_transport_udp/listener.go b/router/xgress_transport_udp/listener.go index 2dfbbe0e1..5daa11d39 100644 --- a/router/xgress_transport_udp/listener.go +++ b/router/xgress_transport_udp/listener.go @@ -19,15 +19,16 @@ package xgress_transport_udp import ( "errors" "fmt" + "net" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" "github.com/openziti/identity" - "github.com/openziti/ziti/v2/router/env" "github.com/openziti/sdk-golang/xgress" + "github.com/openziti/ziti/v2/router/env" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/openziti/ziti/v2/router/xgress_udp" - "net" - "time" ) func (l *listener) Listen(address string, bindHandler xgress.BindHandler) error { diff --git a/router/xgress_udp/listener.go b/router/xgress_udp/listener.go index 9b4d0e7d9..dede5f367 100644 --- a/router/xgress_udp/listener.go +++ b/router/xgress_udp/listener.go @@ -17,9 +17,10 @@ package xgress_udp import ( - "github.com/openziti/sdk-golang/xgress" "io" "net" + + "github.com/openziti/sdk-golang/xgress" ) type Listener interface { diff --git a/router/xgress_udp/session.go b/router/xgress_udp/session.go index 0044b88fb..b1cda53e1 100644 --- a/router/xgress_udp/session.go +++ b/router/xgress_udp/session.go @@ -17,12 +17,13 @@ package xgress_udp import ( - "github.com/openziti/channel/v4" - "github.com/openziti/sdk-golang/xgress" - "github.com/pkg/errors" "io" "net" "time" + + "github.com/openziti/channel/v4" + "github.com/openziti/sdk-golang/xgress" + "github.com/pkg/errors" ) func NewPacketSesssion(l Listener, addr net.Addr, timeout int64) Session { diff --git a/router/xgress_validation/buffer_conn.go b/router/xgress_validation/buffer_conn.go index 9b077ee34..6c928336e 100644 --- a/router/xgress_validation/buffer_conn.go +++ b/router/xgress_validation/buffer_conn.go @@ -1,13 +1,14 @@ package xgress_validation import ( - "github.com/michaelquigley/pfxlog" - "github.com/openziti/foundation/v2/concurrenz" "io" "net" "os" "sync/atomic" "time" + + "github.com/michaelquigley/pfxlog" + "github.com/openziti/foundation/v2/concurrenz" ) func NewBufferConn(id string) *BufferConn { diff --git a/router/xgress_validation/xgress_test.go b/router/xgress_validation/xgress_test.go index b20598dd9..79ee7a65e 100644 --- a/router/xgress_validation/xgress_test.go +++ b/router/xgress_validation/xgress_test.go @@ -4,6 +4,11 @@ import ( "bytes" "errors" "fmt" + "math/rand/v2" + "net" + "testing" + "time" + "github.com/openziti/foundation/v2/debugz" "github.com/openziti/metrics" "github.com/openziti/sdk-golang/xgress" @@ -15,10 +20,6 @@ import ( "github.com/openziti/ziti/v2/router/xgress_common" "github.com/openziti/ziti/v2/router/xgress_router" "github.com/stretchr/testify/require" - "math/rand/v2" - "net" - "testing" - "time" ) func newTestSetup() *testSetup { diff --git a/tests/accept_manual_start_test.go b/tests/accept_manual_start_test.go index b0557fdb0..7aa42481e 100644 --- a/tests/accept_manual_start_test.go +++ b/tests/accept_manual_start_test.go @@ -19,15 +19,16 @@ package tests import ( + "sync/atomic" + "testing" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/sdk-golang/ziti" "github.com/openziti/sdk-golang/ziti/edge" "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/xt" "github.com/pkg/errors" - "sync/atomic" - "testing" - "time" ) func Test_ManualStart(t *testing.T) { diff --git a/tests/addressable_terminators_test.go b/tests/addressable_terminators_test.go index 10cab19f7..86a6a7f95 100644 --- a/tests/addressable_terminators_test.go +++ b/tests/addressable_terminators_test.go @@ -19,14 +19,15 @@ package tests import ( - "github.com/openziti/sdk-golang/ziti" - "github.com/openziti/sdk-golang/ziti/edge" - "github.com/openziti/ziti/v2/controller/xt_smartrouting" - "github.com/pkg/errors" "net" "strings" "testing" "time" + + "github.com/openziti/sdk-golang/ziti" + "github.com/openziti/sdk-golang/ziti/edge" + "github.com/openziti/ziti/v2/controller/xt_smartrouting" + "github.com/pkg/errors" ) func Test_AddressableTerminators(t *testing.T) { diff --git a/tests/api_session_certificates_test.go b/tests/api_session_certificates_test.go index d375d3625..6d462d7bd 100644 --- a/tests/api_session_certificates_test.go +++ b/tests/api_session_certificates_test.go @@ -26,6 +26,12 @@ import ( "crypto/x509" "encoding/pem" "fmt" + "net/http" + "net/url" + "os" + "strings" + "testing" + "github.com/Jeffail/gabs" "github.com/michaelquigley/pfxlog" "github.com/openziti/edge-api/rest_client_api_client/current_api_session" @@ -33,11 +39,6 @@ import ( "github.com/openziti/identity/certtools" edge_apis "github.com/openziti/sdk-golang/edge-apis" "github.com/openziti/ziti/v2/common/spiffehlp" - "net/http" - "net/url" - "os" - "strings" - "testing" ) func Test_Api_Session_Certs(t *testing.T) { diff --git a/tests/api_session_test.go b/tests/api_session_test.go index 85091186d..5f8131b1f 100644 --- a/tests/api_session_test.go +++ b/tests/api_session_test.go @@ -19,9 +19,10 @@ package tests import ( - "github.com/openziti/ziti/v2/common/eid" "sort" "testing" + + "github.com/openziti/ziti/v2/common/eid" ) func Test_ApiSession(t *testing.T) { diff --git a/tests/auth_perf_test.go b/tests/auth_perf_test.go index ead703c7f..ac3b1f767 100644 --- a/tests/auth_perf_test.go +++ b/tests/auth_perf_test.go @@ -19,11 +19,12 @@ package tests import ( - "github.com/openziti/sdk-golang/ziti" - "github.com/rcrowley/go-metrics" "os" "testing" "time" + + "github.com/openziti/sdk-golang/ziti" + "github.com/rcrowley/go-metrics" ) func Test_AuthPerformance(t *testing.T) { diff --git a/tests/cert_request_extend_legacy_auth_test.go b/tests/cert_request_extend_legacy_auth_test.go index 987542128..bb745e920 100644 --- a/tests/cert_request_extend_legacy_auth_test.go +++ b/tests/cert_request_extend_legacy_auth_test.go @@ -1,10 +1,11 @@ package tests import ( + "testing" + mangementAuthenticator "github.com/openziti/edge-api/rest_management_api_client/authenticator" "github.com/openziti/edge-api/rest_model" edge_apis "github.com/openziti/sdk-golang/edge-apis" - "testing" ) func Test_Cert_Request_Extend_Legacy_Auth(t *testing.T) { diff --git a/tests/cert_request_extend_oidc_auth_test.go b/tests/cert_request_extend_oidc_auth_test.go index de3400633..65fdc366c 100644 --- a/tests/cert_request_extend_oidc_auth_test.go +++ b/tests/cert_request_extend_oidc_auth_test.go @@ -1,10 +1,11 @@ package tests import ( + "testing" + mangementAuthenticator "github.com/openziti/edge-api/rest_management_api_client/authenticator" "github.com/openziti/edge-api/rest_model" edge_apis "github.com/openziti/sdk-golang/edge-apis" - "testing" ) func Test_Cert_Request_Extend_OIDC_Auth(t *testing.T) { diff --git a/tests/data_flow_test.go b/tests/data_flow_test.go index a10976c09..80b63cf59 100644 --- a/tests/data_flow_test.go +++ b/tests/data_flow_test.go @@ -20,12 +20,13 @@ package tests import ( "bytes" - "github.com/google/uuid" - "github.com/openziti/ziti/v2/common/eid" - "github.com/openziti/ziti/v2/controller/xt_smartrouting" "math" "testing" "time" + + "github.com/google/uuid" + "github.com/openziti/ziti/v2/common/eid" + "github.com/openziti/ziti/v2/controller/xt_smartrouting" ) func Test_Dataflow(t *testing.T) { diff --git a/tests/enrollment_ott_specific_test.go b/tests/enrollment_ott_specific_test.go index 3d99446ff..c3809e938 100644 --- a/tests/enrollment_ott_specific_test.go +++ b/tests/enrollment_ott_specific_test.go @@ -20,15 +20,16 @@ package tests import ( "errors" + "io" + "testing" + "time" + "github.com/go-openapi/runtime" "github.com/golang-jwt/jwt/v5" "github.com/openziti/edge-api/rest_model" edge_apis "github.com/openziti/sdk-golang/edge-apis" "github.com/openziti/sdk-golang/ziti" "github.com/openziti/ziti/v2/common/eid" - "io" - "testing" - "time" ) // Test_EnrollmentOttSpecific uses the /enroll/ott specific endpoint. diff --git a/tests/enrollment_updb_specific_test.go b/tests/enrollment_updb_specific_test.go index 69f610cda..31c2102eb 100644 --- a/tests/enrollment_updb_specific_test.go +++ b/tests/enrollment_updb_specific_test.go @@ -19,10 +19,11 @@ package tests import ( - edge_apis "github.com/openziti/sdk-golang/edge-apis" - "github.com/openziti/ziti/v2/common/eid" "testing" "time" + + edge_apis "github.com/openziti/sdk-golang/edge-apis" + "github.com/openziti/ziti/v2/common/eid" ) // Test_EnrollmentOttSpecific uses the /enroll/updb specific endpoint. diff --git a/tests/enrollment_updb_test.go b/tests/enrollment_updb_test.go index b71224de4..70ef9f236 100644 --- a/tests/enrollment_updb_test.go +++ b/tests/enrollment_updb_test.go @@ -19,11 +19,12 @@ package tests import ( + "net/http" + "testing" + "github.com/Jeffail/gabs" "github.com/google/uuid" "github.com/openziti/edge-api/rest_model" - "net/http" - "testing" ) // Test_EnrollmentUpdb uses the generic legacy and deprecated /enroll endpoint. These test ensure it remains diff --git a/tests/list_services_perf_test.go b/tests/list_services_perf_test.go index edabd883c..6d2e221b2 100644 --- a/tests/list_services_perf_test.go +++ b/tests/list_services_perf_test.go @@ -5,16 +5,17 @@ package tests import ( "encoding/json" "fmt" - "github.com/openziti/foundation/v2/concurrenz" - "github.com/openziti/metrics" - "github.com/openziti/ziti/v2/controller/db" - "github.com/openziti/ziti/v2/controller/model" - "go.etcd.io/bbolt" "net/url" "os" "sort" "testing" "time" + + "github.com/openziti/foundation/v2/concurrenz" + "github.com/openziti/metrics" + "github.com/openziti/ziti/v2/controller/db" + "github.com/openziti/ziti/v2/controller/model" + "go.etcd.io/bbolt" ) func TestServicePerf(t *testing.T) { diff --git a/tests/main_test.go b/tests/main_test.go index 5bd16cd4e..8efc84755 100644 --- a/tests/main_test.go +++ b/tests/main_test.go @@ -19,12 +19,13 @@ package tests import ( - "github.com/spf13/cobra" "os" "testing" + + "github.com/spf13/cobra" ) -//for usages with main +// for usages with main func TestMain(m *testing.M) { root := &cobra.Command{ diff --git a/tests/mfa_ziti_test.go b/tests/mfa_ziti_test.go index 9c27adbea..e70e1ee45 100644 --- a/tests/mfa_ziti_test.go +++ b/tests/mfa_ziti_test.go @@ -23,16 +23,17 @@ import ( "encoding/json" "errors" "fmt" - "github.com/Jeffail/gabs" - "github.com/dgryski/dgoogauth" - "github.com/google/uuid" - "github.com/openziti/foundation/v2/errorz" - "github.com/openziti/ziti/v2/controller/apierror" "image/png" "net/http" "net/url" "testing" "time" + + "github.com/Jeffail/gabs" + "github.com/dgryski/dgoogauth" + "github.com/google/uuid" + "github.com/openziti/foundation/v2/errorz" + "github.com/openziti/ziti/v2/controller/apierror" ) func Test_MFA(t *testing.T) { diff --git a/tests/network_jwt_test.go b/tests/network_jwt_test.go index 5d7179a09..216eac607 100644 --- a/tests/network_jwt_test.go +++ b/tests/network_jwt_test.go @@ -1,8 +1,9 @@ package tests import ( - "github.com/openziti/edge-api/rest_model" "testing" + + "github.com/openziti/edge-api/rest_model" ) func Test_NetworkJwts(t *testing.T) { diff --git a/tests/posture_check_mfa_test.go b/tests/posture_check_mfa_test.go index 906132eef..0e16afb7b 100644 --- a/tests/posture_check_mfa_test.go +++ b/tests/posture_check_mfa_test.go @@ -20,13 +20,14 @@ package tests import ( "fmt" - "github.com/google/uuid" - "github.com/openziti/edge-api/rest_model" - "github.com/openziti/ziti/v2/common/eid" "net/http" "net/url" "testing" "time" + + "github.com/google/uuid" + "github.com/openziti/edge-api/rest_model" + "github.com/openziti/ziti/v2/common/eid" ) func Test_PostureChecks_MFA(t *testing.T) { diff --git a/tests/posture_check_os_test.go b/tests/posture_check_os_test.go index 6b0ebec71..094b26fe4 100644 --- a/tests/posture_check_os_test.go +++ b/tests/posture_check_os_test.go @@ -19,10 +19,11 @@ package tests import ( - "github.com/Jeffail/gabs" - "github.com/google/uuid" "net/http" "testing" + + "github.com/Jeffail/gabs" + "github.com/google/uuid" ) func Test_PostureChecks_Os(t *testing.T) { diff --git a/tests/rest_auth_test.go b/tests/rest_auth_test.go index 775bbb6f2..5b9270430 100644 --- a/tests/rest_auth_test.go +++ b/tests/rest_auth_test.go @@ -3,9 +3,10 @@ package tests import ( - idlib "github.com/openziti/identity" "net/http" "testing" + + idlib "github.com/openziti/identity" ) func Test_TestAuthWithCertFromDifferentChain(t *testing.T) { diff --git a/tests/router_identities_test.go b/tests/router_identities_test.go index 57736c1b3..92ee81569 100644 --- a/tests/router_identities_test.go +++ b/tests/router_identities_test.go @@ -19,10 +19,11 @@ package tests import ( - "github.com/google/uuid" "net/http" "net/url" "testing" + + "github.com/google/uuid" ) func TestEdgeRouterIdentities(t *testing.T) { diff --git a/tests/router_reenroll_test.go b/tests/router_reenroll_test.go index ad481bcf0..5e1f5cfc3 100644 --- a/tests/router_reenroll_test.go +++ b/tests/router_reenroll_test.go @@ -20,9 +20,10 @@ package tests import ( "fmt" - "github.com/openziti/edge-api/rest_model" "net/http" "testing" + + "github.com/openziti/edge-api/rest_model" ) func Test_Router_ReEnroll(t *testing.T) { diff --git a/tests/service_edge_router_policy_test.go b/tests/service_edge_router_policy_test.go index 1ef2bf310..d043cc49b 100644 --- a/tests/service_edge_router_policy_test.go +++ b/tests/service_edge_router_policy_test.go @@ -20,8 +20,9 @@ package tests import ( "fmt" - "github.com/openziti/ziti/v2/common/eid" "testing" + + "github.com/openziti/ziti/v2/common/eid" ) func Test_ServiceEdgeRouterPolicy(t *testing.T) { diff --git a/tests/service_list_refresh_test.go b/tests/service_list_refresh_test.go index 1e73c5189..cf3b2985a 100644 --- a/tests/service_list_refresh_test.go +++ b/tests/service_list_refresh_test.go @@ -3,9 +3,10 @@ package tests import ( - "github.com/openziti/ziti/v2/common/eid" "testing" "time" + + "github.com/openziti/ziti/v2/common/eid" ) func setupServiceListRefreshTest(ctx *TestContext) (string, *identity, *session) { diff --git a/tests/service_policy_test.go b/tests/service_policy_test.go index f09c5f068..96213aa75 100644 --- a/tests/service_policy_test.go +++ b/tests/service_policy_test.go @@ -20,8 +20,9 @@ package tests import ( "fmt" - "github.com/openziti/ziti/v2/common/eid" "testing" + + "github.com/openziti/ziti/v2/common/eid" ) func Test_ServicePolicy(t *testing.T) { diff --git a/tests/service_test.go b/tests/service_test.go index 61f383ee1..c8f89058a 100644 --- a/tests/service_test.go +++ b/tests/service_test.go @@ -20,13 +20,14 @@ package tests import ( "fmt" - "github.com/openziti/foundation/v2/errorz" - "github.com/openziti/foundation/v2/stringz" - "github.com/openziti/ziti/v2/common/eid" "net/url" "sort" "testing" "time" + + "github.com/openziti/foundation/v2/errorz" + "github.com/openziti/foundation/v2/stringz" + "github.com/openziti/ziti/v2/common/eid" ) func Test_Services(t *testing.T) { diff --git a/tests/shaper/main.go b/tests/shaper/main.go index 85198d49b..3bdbaf35c 100644 --- a/tests/shaper/main.go +++ b/tests/shaper/main.go @@ -4,10 +4,11 @@ package main import ( "fmt" - "github.com/openziti/metrics" - "github.com/openziti/transport/v2/shaper" "sync/atomic" "time" + + "github.com/openziti/metrics" + "github.com/openziti/transport/v2/shaper" ) type metricsWriter struct { diff --git a/tests/specs_test.go b/tests/specs_test.go index 63c6ea4bc..41cf4f90a 100644 --- a/tests/specs_test.go +++ b/tests/specs_test.go @@ -20,11 +20,12 @@ package tests import ( "encoding/json" + "net/http" + "testing" + "github.com/Jeffail/gabs" "gopkg.in/resty.v1" "gopkg.in/yaml.v2" - "net/http" - "testing" ) func Test_Specs(t *testing.T) { diff --git a/tests/standard.go b/tests/standard.go index 41b3bd776..7e8002b97 100644 --- a/tests/standard.go +++ b/tests/standard.go @@ -18,13 +18,14 @@ package tests import ( "encoding/json" + "net/url" + "strings" + "testing" + "github.com/Jeffail/gabs" "github.com/go-openapi/strfmt" "github.com/stretchr/testify/require" "gopkg.in/resty.v1" - "net/url" - "strings" - "testing" ) func IsURI(rawurl string) bool { diff --git a/tests/standard_error_test.go b/tests/standard_error_test.go index efada4006..4d8301e4e 100644 --- a/tests/standard_error_test.go +++ b/tests/standard_error_test.go @@ -19,10 +19,11 @@ package tests import ( - "github.com/openziti/ziti/v2/controller/apierror" - "github.com/openziti/foundation/v2/errorz" - "github.com/stretchr/testify/require" "testing" + + "github.com/openziti/foundation/v2/errorz" + "github.com/openziti/ziti/v2/controller/apierror" + "github.com/stretchr/testify/require" ) func Test_StandardErrorMessages(t *testing.T) { diff --git a/tests/terminator_update_test.go b/tests/terminator_update_test.go index 00415da17..ff95fc755 100644 --- a/tests/terminator_update_test.go +++ b/tests/terminator_update_test.go @@ -19,9 +19,10 @@ package tests import ( - "github.com/openziti/sdk-golang/ziti/edge" "testing" "time" + + "github.com/openziti/sdk-golang/ziti/edge" ) func Test_UpdateTerminators(t *testing.T) { diff --git a/tests/testutil/control.go b/tests/testutil/control.go index d85b7163d..ec191d5b6 100644 --- a/tests/testutil/control.go +++ b/tests/testutil/control.go @@ -1,11 +1,12 @@ package testutil import ( + "time" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/handler_common" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/stretchr/testify/require" - "time" ) func AcceptControl(id string, uf channel.UnderlayFactory, assertions *require.Assertions) (channel.Channel, *MessageCollector) { diff --git a/tests/testutil/message_collector.go b/tests/testutil/message_collector.go index d24beec2f..c2380e7bf 100644 --- a/tests/testutil/message_collector.go +++ b/tests/testutil/message_collector.go @@ -2,12 +2,13 @@ package testutil import ( "fmt" + "time" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" - "time" ) func NewMessageCollector(id string) *MessageCollector { diff --git a/tests/testutil/timeout_underlay.go b/tests/testutil/timeout_underlay.go index 3167a53dd..b3c22975e 100644 --- a/tests/testutil/timeout_underlay.go +++ b/tests/testutil/timeout_underlay.go @@ -1,9 +1,10 @@ package testutil import ( + "time" + "github.com/openziti/channel/v4" "github.com/pkg/errors" - "time" ) func NewTimeoutUnderlayFactory(factory channel.UnderlayFactory, timeout time.Duration) *UnderlayFactoryWrapper { diff --git a/tests/transit_router_test.go b/tests/transit_router_test.go index 61029e135..9dc52b89b 100644 --- a/tests/transit_router_test.go +++ b/tests/transit_router_test.go @@ -19,11 +19,12 @@ package tests import ( + "testing" + "time" + "github.com/openziti/ziti/v2/controller/change" "github.com/openziti/ziti/v2/controller/model" "github.com/openziti/ziti/v2/controller/models" - "testing" - "time" ) func Test_TransitRouters(t *testing.T) { diff --git a/tunnel/dns/dns_linux.go b/tunnel/dns/dns_linux.go index 7898b6ef2..67dfd5703 100644 --- a/tunnel/dns/dns_linux.go +++ b/tunnel/dns/dns_linux.go @@ -20,13 +20,14 @@ package dns import ( "fmt" - "github.com/miekg/dns" - "github.com/sirupsen/logrus" "net" "net/url" "os/exec" "sync" "time" + + "github.com/miekg/dns" + "github.com/sirupsen/logrus" ) func NewDnsServer(addr string, upstreamConfig string, unanswered unansweredDisposition) (Resolver, error) { @@ -53,7 +54,7 @@ func NewDnsServer(addr string, upstreamConfig string, unanswered unansweredDispo if err != nil { return nil, fmt.Errorf("failed to parse upstream DNS configuration '%s': %w", upstreamConfig, err) } - + if upstreamURL.Scheme == "udp" || upstreamURL.Scheme == "tcp" { r.upstreamServer = upstreamURL.Host r.upstreamClient = &dns.Client{ diff --git a/tunnel/dns/dummy.go b/tunnel/dns/dummy.go index f3fd42b04..181e1a696 100644 --- a/tunnel/dns/dummy.go +++ b/tunnel/dns/dummy.go @@ -1,8 +1,9 @@ package dns import ( - "github.com/michaelquigley/pfxlog" "net" + + "github.com/michaelquigley/pfxlog" ) type dummy struct{} diff --git a/tunnel/dns/refcount.go b/tunnel/dns/refcount.go index 68f085b3d..5aa2160e4 100644 --- a/tunnel/dns/refcount.go +++ b/tunnel/dns/refcount.go @@ -1,8 +1,9 @@ package dns import ( - cmap "github.com/orcaman/concurrent-map/v2" "net" + + cmap "github.com/orcaman/concurrent-map/v2" ) func NewRefCountingResolver(resolver Resolver) Resolver { diff --git a/tunnel/dns/server.go b/tunnel/dns/server.go index d926ded74..3b7e5ce17 100644 --- a/tunnel/dns/server.go +++ b/tunnel/dns/server.go @@ -19,12 +19,13 @@ package dns import ( "errors" "fmt" - "github.com/miekg/dns" - "github.com/sirupsen/logrus" "net" "net/url" "strings" "sync" + + "github.com/miekg/dns" + "github.com/sirupsen/logrus" ) var log = logrus.StandardLogger() @@ -32,15 +33,15 @@ var log = logrus.StandardLogger() type unansweredDisposition int const ( - unansweredRefused unansweredDisposition = iota - unansweredServfail - unansweredTimeout + unansweredRefused unansweredDisposition = iota + unansweredServfail + unansweredTimeout ) var unansweredKeywords = map[string]unansweredDisposition{ - "refused": unansweredRefused, - "servfail": unansweredServfail, - "timeout": unansweredTimeout, + "refused": unansweredRefused, + "servfail": unansweredServfail, + "timeout": unansweredTimeout, } type resolver struct { @@ -192,7 +193,7 @@ func (r *resolver) queryUpstream(query *dns.Msg) (*dns.Msg, error) { } log.Debugf("forwarding query to upstream server %s: %s", r.upstreamServer, query.Question[0].Name) - + response, _, err := r.upstreamClient.Exchange(query, r.upstreamServer) if err != nil { log.Warnf("upstream query failed: %v", err) diff --git a/tunnel/entities/decode_test.go b/tunnel/entities/decode_test.go index 249516136..e158a5338 100644 --- a/tunnel/entities/decode_test.go +++ b/tunnel/entities/decode_test.go @@ -3,9 +3,10 @@ package entities import ( "bytes" "encoding/json" + "testing" + "github.com/mitchellh/mapstructure" "github.com/stretchr/testify/require" - "testing" ) func Test_LoadHttpCheck(t *testing.T) { diff --git a/tunnel/health/checks_test.go b/tunnel/health/checks_test.go index ba9f34823..c3087cbf5 100644 --- a/tunnel/health/checks_test.go +++ b/tunnel/health/checks_test.go @@ -3,10 +3,11 @@ package health import ( "bytes" "encoding/json" - "github.com/mitchellh/mapstructure" - "github.com/stretchr/testify/require" "testing" "time" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/require" ) func Test_LoadPingTest(t *testing.T) { diff --git a/tunnel/health/round_test.go b/tunnel/health/round_test.go index 0deac1d25..6b30f5086 100644 --- a/tunnel/health/round_test.go +++ b/tunnel/health/round_test.go @@ -2,9 +2,10 @@ package health import ( "fmt" - "github.com/stretchr/testify/assert" "testing" "time" + + "github.com/stretchr/testify/assert" ) func TestRound(t *testing.T) { diff --git a/tunnel/intercept/hosting_resolv.go b/tunnel/intercept/hosting_resolv.go index 5827a9161..7b5ede6fb 100644 --- a/tunnel/intercept/hosting_resolv.go +++ b/tunnel/intercept/hosting_resolv.go @@ -19,11 +19,12 @@ package intercept import ( "encoding/json" "errors" - "github.com/michaelquigley/pfxlog" "io" "net" "strings" "time" + + "github.com/michaelquigley/pfxlog" ) // record type diff --git a/tunnel/intercept/interceptor.go b/tunnel/intercept/interceptor.go index 9d61be5ec..0f4b8e1a9 100644 --- a/tunnel/intercept/interceptor.go +++ b/tunnel/intercept/interceptor.go @@ -18,10 +18,11 @@ package intercept import ( "fmt" + "net" + "github.com/openziti/ziti/v2/tunnel/dns" "github.com/openziti/ziti/v2/tunnel/entities" "github.com/pkg/errors" - "net" ) type Protocol int diff --git a/tunnel/intercept/iputils.go b/tunnel/intercept/iputils.go index 2f42c089a..9b138c96e 100644 --- a/tunnel/intercept/iputils.go +++ b/tunnel/intercept/iputils.go @@ -19,14 +19,15 @@ package intercept import ( "container/list" "fmt" + "net" + "net/netip" + "sync" + "github.com/gaissmai/extnetip" "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/tunnel/dns" "github.com/openziti/ziti/v2/tunnel/entities" "github.com/openziti/ziti/v2/tunnel/utils" - "net" - "net/netip" - "sync" ) var dnsPrefix netip.Prefix diff --git a/tunnel/intercept/source_ip_test.go b/tunnel/intercept/source_ip_test.go index d0ce27030..b6a5ce987 100644 --- a/tunnel/intercept/source_ip_test.go +++ b/tunnel/intercept/source_ip_test.go @@ -1,14 +1,15 @@ package intercept import ( + "net" + "testing" + "github.com/google/uuid" "github.com/openziti/edge-api/rest_model" "github.com/openziti/foundation/v2/util" "github.com/openziti/ziti/v2/tunnel" "github.com/openziti/ziti/v2/tunnel/entities" "github.com/stretchr/testify/require" - "net" - "testing" ) type testProvider struct { diff --git a/tunnel/intercept/svcpoll.go b/tunnel/intercept/svcpoll.go index 53a21b4ea..7b816b686 100644 --- a/tunnel/intercept/svcpoll.go +++ b/tunnel/intercept/svcpoll.go @@ -36,7 +36,7 @@ import ( "github.com/openziti/ziti/v2/tunnel/entities" "github.com/openziti/ziti/v2/tunnel/health" "github.com/pkg/errors" - logrus "github.com/sirupsen/logrus" + "github.com/sirupsen/logrus" ) // variables for substitutions in intercept.v1 sourceIp property diff --git a/tunnel/router/router_linux.go b/tunnel/router/router_linux.go index 60875e068..2692c201d 100644 --- a/tunnel/router/router_linux.go +++ b/tunnel/router/router_linux.go @@ -19,13 +19,14 @@ package router import ( "errors" "fmt" + "net" + "os" + "github.com/mdlayher/netlink" "github.com/mdlayher/netlink/nlenc" "github.com/michaelquigley/pfxlog" "github.com/sirupsen/logrus" "golang.org/x/sys/unix" - "net" - "os" ) // AddLocalAddress adds an address (or prefix) to the specified network interface. diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index 8ea0c9af9..e54198f18 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -18,15 +18,17 @@ package tunnel import ( "encoding/json" - "github.com/michaelquigley/pfxlog" "strconv" "time" - "github.com/openziti/sdk-golang/ziti/edge" - "github.com/sirupsen/logrus" + "github.com/michaelquigley/pfxlog" + "io" "net" "strings" + + "github.com/openziti/sdk-golang/ziti/edge" + "github.com/sirupsen/logrus" ) type Service interface { diff --git a/tunnel/udp_vconn/api.go b/tunnel/udp_vconn/api.go index ff92060de..c61b606d5 100644 --- a/tunnel/udp_vconn/api.go +++ b/tunnel/udp_vconn/api.go @@ -17,12 +17,13 @@ package udp_vconn import ( - "github.com/openziti/ziti/v2/tunnel" - "github.com/openziti/ziti/v2/tunnel/entities" - "github.com/openziti/foundation/v2/mempool" "io" "net" "time" + + "github.com/openziti/foundation/v2/mempool" + "github.com/openziti/ziti/v2/tunnel" + "github.com/openziti/ziti/v2/tunnel/entities" ) type UDPWriterTo interface { diff --git a/tunnel/udp_vconn/conn.go b/tunnel/udp_vconn/conn.go index 2d0b397d5..6061d04a6 100644 --- a/tunnel/udp_vconn/conn.go +++ b/tunnel/udp_vconn/conn.go @@ -17,13 +17,14 @@ package udp_vconn import ( - "github.com/michaelquigley/pfxlog" - "github.com/openziti/foundation/v2/mempool" - "github.com/sirupsen/logrus" "io" "net" "sync/atomic" "time" + + "github.com/michaelquigley/pfxlog" + "github.com/openziti/foundation/v2/mempool" + "github.com/sirupsen/logrus" ) type udpConn struct { diff --git a/tunnel/udp_vconn/manager.go b/tunnel/udp_vconn/manager.go index ab25bea07..2b4d34fbe 100644 --- a/tunnel/udp_vconn/manager.go +++ b/tunnel/udp_vconn/manager.go @@ -18,14 +18,15 @@ package udp_vconn import ( "errors" - "github.com/michaelquigley/pfxlog" - "github.com/openziti/foundation/v2/mempool" - "github.com/openziti/ziti/v2/tunnel" - "github.com/openziti/ziti/v2/tunnel/entities" "io" "net" "strconv" "time" + + "github.com/michaelquigley/pfxlog" + "github.com/openziti/foundation/v2/mempool" + "github.com/openziti/ziti/v2/tunnel" + "github.com/openziti/ziti/v2/tunnel/entities" ) type manager struct { diff --git a/ziti/cmd/agentcli/agent_ch_simple.go b/ziti/cmd/agentcli/agent_ch_simple.go index f33c1bb32..f897852ce 100644 --- a/ziti/cmd/agentcli/agent_ch_simple.go +++ b/ziti/cmd/agentcli/agent_ch_simple.go @@ -18,6 +18,7 @@ package agentcli import ( "fmt" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/ziti/cmd/common" "github.com/spf13/cobra" diff --git a/ziti/cmd/agentcli/agent_cluster_init.go b/ziti/cmd/agentcli/agent_cluster_init.go index 13213b6a6..c7bfa7893 100644 --- a/ziti/cmd/agentcli/agent_cluster_init.go +++ b/ziti/cmd/agentcli/agent_cluster_init.go @@ -18,6 +18,7 @@ package agentcli import ( "fmt" + "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" diff --git a/ziti/cmd/agentcli/agent_cluster_init_from_db.go b/ziti/cmd/agentcli/agent_cluster_init_from_db.go index 40fea8ee5..0c29b736f 100644 --- a/ziti/cmd/agentcli/agent_cluster_init_from_db.go +++ b/ziti/cmd/agentcli/agent_cluster_init_from_db.go @@ -18,6 +18,7 @@ package agentcli import ( "fmt" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" "github.com/openziti/ziti/v2/ziti/cmd/common" diff --git a/ziti/cmd/agentcli/agent_cluster_list.go b/ziti/cmd/agentcli/agent_cluster_list.go index f69e57f41..8e73d0b06 100644 --- a/ziti/cmd/agentcli/agent_cluster_list.go +++ b/ziti/cmd/agentcli/agent_cluster_list.go @@ -18,6 +18,7 @@ package agentcli import ( "fmt" + "google.golang.org/protobuf/proto" "github.com/jedib0t/go-pretty/v6/table" diff --git a/ziti/cmd/agentcli/agent_cluster_restore_from_db.go b/ziti/cmd/agentcli/agent_cluster_restore_from_db.go index 004715079..ab0475304 100644 --- a/ziti/cmd/agentcli/agent_cluster_restore_from_db.go +++ b/ziti/cmd/agentcli/agent_cluster_restore_from_db.go @@ -18,6 +18,7 @@ package agentcli import ( "fmt" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" "github.com/openziti/ziti/v2/ziti/cmd/common" diff --git a/ziti/cmd/agentcli/agent_router_add_route.go b/ziti/cmd/agentcli/agent_router_add_route.go index c69c4649e..f50f6cde3 100644 --- a/ziti/cmd/agentcli/agent_router_add_route.go +++ b/ziti/cmd/agentcli/agent_router_add_route.go @@ -18,6 +18,7 @@ package agentcli import ( "fmt" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" diff --git a/ziti/cmd/agentcli/agent_router_unroute.go b/ziti/cmd/agentcli/agent_router_unroute.go index e8c06f30e..cb984ef63 100644 --- a/ziti/cmd/agentcli/agent_router_unroute.go +++ b/ziti/cmd/agentcli/agent_router_unroute.go @@ -18,6 +18,7 @@ package agentcli import ( "fmt" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" diff --git a/ziti/cmd/agentcli/agent_snapshot_db.go b/ziti/cmd/agentcli/agent_snapshot_db.go index 5aad7936e..3b1803e14 100644 --- a/ziti/cmd/agentcli/agent_snapshot_db.go +++ b/ziti/cmd/agentcli/agent_snapshot_db.go @@ -19,6 +19,7 @@ package agentcli import ( "errors" "fmt" + "github.com/openziti/channel/v4" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" "github.com/openziti/ziti/v2/controller" diff --git a/ziti/cmd/agentcli/agent_trace.go b/ziti/cmd/agentcli/agent_trace.go index 0e46559c8..3d18659d2 100644 --- a/ziti/cmd/agentcli/agent_trace.go +++ b/ziti/cmd/agentcli/agent_trace.go @@ -17,10 +17,11 @@ package agentcli import ( + "os" + "github.com/openziti/agent" "github.com/openziti/ziti/v2/ziti/cmd/common" "github.com/spf13/cobra" - "os" ) type AgentTraceAction struct { diff --git a/ziti/cmd/api/json.go b/ziti/cmd/api/json.go index 0c759dd95..be5fdf45f 100644 --- a/ziti/cmd/api/json.go +++ b/ziti/cmd/api/json.go @@ -19,10 +19,11 @@ package api import ( "encoding/json" "fmt" + "strings" + "github.com/Jeffail/gabs" gabs2 "github.com/Jeffail/gabs/v2" "github.com/pkg/errors" - "strings" ) func SetJSONValue(container *gabs.Container, value interface{}, path ...string) { diff --git a/ziti/cmd/ascode/exporter/exporter_auth_policies.go b/ziti/cmd/ascode/exporter/exporter_auth_policies.go index 791597393..933552863 100644 --- a/ziti/cmd/ascode/exporter/exporter_auth_policies.go +++ b/ziti/cmd/ascode/exporter/exporter_auth_policies.go @@ -17,11 +17,12 @@ package exporter import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/auth_policy" "github.com/openziti/edge-api/rest_management_api_client/external_jwt_signer" "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/internal/ascode" - "slices" ) func (exporter Exporter) IsAuthPolicyExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_certificate_authorities.go b/ziti/cmd/ascode/exporter/exporter_certificate_authorities.go index f3e4012d5..f6e0a0ee1 100644 --- a/ziti/cmd/ascode/exporter/exporter_certificate_authorities.go +++ b/ziti/cmd/ascode/exporter/exporter_certificate_authorities.go @@ -17,9 +17,10 @@ package exporter import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/certificate_authority" "github.com/openziti/edge-api/rest_model" - "slices" ) func (exporter Exporter) IsCertificateAuthorityExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_config_types.go b/ziti/cmd/ascode/exporter/exporter_config_types.go index 8d61ca8a4..858ca785a 100644 --- a/ziti/cmd/ascode/exporter/exporter_config_types.go +++ b/ziti/cmd/ascode/exporter/exporter_config_types.go @@ -17,9 +17,10 @@ package exporter import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/config" "github.com/openziti/edge-api/rest_model" - "slices" ) func (exporter Exporter) IsConfigTypeExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_configs.go b/ziti/cmd/ascode/exporter/exporter_configs.go index eacd8e732..396608628 100644 --- a/ziti/cmd/ascode/exporter/exporter_configs.go +++ b/ziti/cmd/ascode/exporter/exporter_configs.go @@ -18,10 +18,11 @@ package exporter import ( "errors" + "slices" + "github.com/openziti/edge-api/rest_management_api_client/config" "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/internal/ascode" - "slices" ) func (exporter Exporter) IsConfigExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_edgerouter_policies.go b/ziti/cmd/ascode/exporter/exporter_edgerouter_policies.go index 2c6794fdb..a10df8e95 100644 --- a/ziti/cmd/ascode/exporter/exporter_edgerouter_policies.go +++ b/ziti/cmd/ascode/exporter/exporter_edgerouter_policies.go @@ -17,9 +17,10 @@ package exporter import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/edge_router_policy" "github.com/openziti/edge-api/rest_model" - "slices" ) func (exporter Exporter) IsEdgeRouterPolicyExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_edgerouters.go b/ziti/cmd/ascode/exporter/exporter_edgerouters.go index 07b088c9e..126ec6005 100644 --- a/ziti/cmd/ascode/exporter/exporter_edgerouters.go +++ b/ziti/cmd/ascode/exporter/exporter_edgerouters.go @@ -17,9 +17,10 @@ package exporter import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/edge_router" "github.com/openziti/edge-api/rest_model" - "slices" ) func (exporter Exporter) IsEdgeRouterExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_external_jwt_signers.go b/ziti/cmd/ascode/exporter/exporter_external_jwt_signers.go index 3f9823512..aa7e29187 100644 --- a/ziti/cmd/ascode/exporter/exporter_external_jwt_signers.go +++ b/ziti/cmd/ascode/exporter/exporter_external_jwt_signers.go @@ -17,9 +17,10 @@ package exporter import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/external_jwt_signer" "github.com/openziti/edge-api/rest_model" - "slices" ) func (exporter Exporter) IsExtJwtSignerExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_identities.go b/ziti/cmd/ascode/exporter/exporter_identities.go index 8bd3ab635..a453b279a 100644 --- a/ziti/cmd/ascode/exporter/exporter_identities.go +++ b/ziti/cmd/ascode/exporter/exporter_identities.go @@ -18,11 +18,12 @@ package exporter import ( "errors" + "slices" + "github.com/openziti/edge-api/rest_management_api_client/auth_policy" "github.com/openziti/edge-api/rest_management_api_client/identity" "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/internal/ascode" - "slices" ) func (exporter Exporter) IsIdentityExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_service_edgerouter_policies.go b/ziti/cmd/ascode/exporter/exporter_service_edgerouter_policies.go index c2107b24c..224dbf0eb 100644 --- a/ziti/cmd/ascode/exporter/exporter_service_edgerouter_policies.go +++ b/ziti/cmd/ascode/exporter/exporter_service_edgerouter_policies.go @@ -17,9 +17,10 @@ package exporter import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/service_edge_router_policy" "github.com/openziti/edge-api/rest_model" - "slices" ) func (exporter Exporter) IsServiceEdgeRouterPolicyExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_service_policies.go b/ziti/cmd/ascode/exporter/exporter_service_policies.go index 57fc0b390..14220331c 100644 --- a/ziti/cmd/ascode/exporter/exporter_service_policies.go +++ b/ziti/cmd/ascode/exporter/exporter_service_policies.go @@ -17,9 +17,10 @@ package exporter import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/service_policy" "github.com/openziti/edge-api/rest_model" - "slices" ) func (exporter Exporter) IsServicePolicyExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_services.go b/ziti/cmd/ascode/exporter/exporter_services.go index e4b245c0b..2aceb793a 100644 --- a/ziti/cmd/ascode/exporter/exporter_services.go +++ b/ziti/cmd/ascode/exporter/exporter_services.go @@ -18,11 +18,12 @@ package exporter import ( "errors" + "slices" + "github.com/openziti/edge-api/rest_management_api_client/config" "github.com/openziti/edge-api/rest_management_api_client/service" "github.com/openziti/edge-api/rest_model" "github.com/openziti/ziti/v2/internal/ascode" - "slices" ) func (exporter Exporter) IsServiceExportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/exporter/exporter_test.go b/ziti/cmd/ascode/exporter/exporter_test.go index 037066ed8..dbd707ef8 100644 --- a/ziti/cmd/ascode/exporter/exporter_test.go +++ b/ziti/cmd/ascode/exporter/exporter_test.go @@ -1,8 +1,9 @@ package exporter import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func Test_InputArgs(t *testing.T) { diff --git a/ziti/cmd/ascode/importer/importer_auth_policies.go b/ziti/cmd/ascode/importer/importer_auth_policies.go index a00599c27..e06b68094 100644 --- a/ziti/cmd/ascode/importer/importer_auth_policies.go +++ b/ziti/cmd/ascode/importer/importer_auth_policies.go @@ -18,6 +18,8 @@ package importer import ( "encoding/json" + "slices" + "github.com/Jeffail/gabs/v2" "github.com/openziti/edge-api/rest_management_api_client/auth_policy" "github.com/openziti/edge-api/rest_model" @@ -25,7 +27,6 @@ import ( "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/ascode" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsAuthPolicyImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_certificate_authorities.go b/ziti/cmd/ascode/importer/importer_certificate_authorities.go index 5a48ce995..a8b7561d4 100644 --- a/ziti/cmd/ascode/importer/importer_certificate_authorities.go +++ b/ziti/cmd/ascode/importer/importer_certificate_authorities.go @@ -17,12 +17,13 @@ package importer import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/certificate_authority" "github.com/openziti/edge-api/rest_model" "github.com/openziti/edge-api/rest_util" "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsCertificateAuthorityImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_config_types.go b/ziti/cmd/ascode/importer/importer_config_types.go index b285f2914..c78738de7 100644 --- a/ziti/cmd/ascode/importer/importer_config_types.go +++ b/ziti/cmd/ascode/importer/importer_config_types.go @@ -17,12 +17,13 @@ package importer import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/config" "github.com/openziti/edge-api/rest_model" "github.com/openziti/edge-api/rest_util" "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsConfigTypeImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_configs.go b/ziti/cmd/ascode/importer/importer_configs.go index 40260bba9..636379e2a 100644 --- a/ziti/cmd/ascode/importer/importer_configs.go +++ b/ziti/cmd/ascode/importer/importer_configs.go @@ -19,6 +19,8 @@ package importer import ( "encoding/json" "errors" + "slices" + "github.com/Jeffail/gabs/v2" "github.com/openziti/edge-api/rest_management_api_client/config" "github.com/openziti/edge-api/rest_model" @@ -26,7 +28,6 @@ import ( "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/ascode" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsConfigImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_edgerouter_policies.go b/ziti/cmd/ascode/importer/importer_edgerouter_policies.go index 9c9c02b61..63ceb7cbb 100644 --- a/ziti/cmd/ascode/importer/importer_edgerouter_policies.go +++ b/ziti/cmd/ascode/importer/importer_edgerouter_policies.go @@ -17,12 +17,13 @@ package importer import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/edge_router_policy" "github.com/openziti/edge-api/rest_model" "github.com/openziti/edge-api/rest_util" "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsEdgeRouterPolicyImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_edgerouters.go b/ziti/cmd/ascode/importer/importer_edgerouters.go index a4532cacd..482fa1996 100644 --- a/ziti/cmd/ascode/importer/importer_edgerouters.go +++ b/ziti/cmd/ascode/importer/importer_edgerouters.go @@ -18,13 +18,14 @@ package importer import ( "errors" + "slices" + "github.com/openziti/edge-api/rest_management_api_client/edge_router" "github.com/openziti/edge-api/rest_model" "github.com/openziti/edge-api/rest_util" "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/ascode" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsEdgeRouterImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_external_jwt_signers.go b/ziti/cmd/ascode/importer/importer_external_jwt_signers.go index 284fde429..9382b9fe6 100644 --- a/ziti/cmd/ascode/importer/importer_external_jwt_signers.go +++ b/ziti/cmd/ascode/importer/importer_external_jwt_signers.go @@ -17,12 +17,13 @@ package importer import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/external_jwt_signer" "github.com/openziti/edge-api/rest_model" "github.com/openziti/edge-api/rest_util" "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsExtJwtSignerImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_posture_check.go b/ziti/cmd/ascode/importer/importer_posture_check.go index 0387d94e3..b8ced0606 100644 --- a/ziti/cmd/ascode/importer/importer_posture_check.go +++ b/ziti/cmd/ascode/importer/importer_posture_check.go @@ -18,14 +18,15 @@ package importer import ( "encoding/json" + "slices" + "strings" + "github.com/Jeffail/gabs/v2" "github.com/openziti/edge-api/rest_management_api_client/posture_checks" "github.com/openziti/edge-api/rest_model" "github.com/openziti/edge-api/rest_util" "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" - "strings" ) func (importer *Importer) IsPostureCheckImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_service_edgerouter_policies.go b/ziti/cmd/ascode/importer/importer_service_edgerouter_policies.go index b08645c5a..e8ab7a5b1 100644 --- a/ziti/cmd/ascode/importer/importer_service_edgerouter_policies.go +++ b/ziti/cmd/ascode/importer/importer_service_edgerouter_policies.go @@ -17,12 +17,13 @@ package importer import ( + "slices" + "github.com/openziti/edge-api/rest_management_api_client/service_edge_router_policy" "github.com/openziti/edge-api/rest_model" "github.com/openziti/edge-api/rest_util" "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsServiceEdgeRouterPolicyImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_services.go b/ziti/cmd/ascode/importer/importer_services.go index d0b209c19..abef04b6f 100644 --- a/ziti/cmd/ascode/importer/importer_services.go +++ b/ziti/cmd/ascode/importer/importer_services.go @@ -19,6 +19,8 @@ package importer import ( "encoding/json" "errors" + "slices" + "github.com/Jeffail/gabs/v2" "github.com/openziti/edge-api/rest_management_api_client/service" "github.com/openziti/edge-api/rest_model" @@ -26,7 +28,6 @@ import ( "github.com/openziti/ziti/v2/internal" "github.com/openziti/ziti/v2/internal/ascode" "github.com/openziti/ziti/v2/internal/rest/mgmt" - "slices" ) func (importer *Importer) IsServiceImportRequired(args []string) bool { diff --git a/ziti/cmd/ascode/importer/importer_test.go b/ziti/cmd/ascode/importer/importer_test.go index 173d95a3a..57d5f8027 100644 --- a/ziti/cmd/ascode/importer/importer_test.go +++ b/ziti/cmd/ascode/importer/importer_test.go @@ -1,8 +1,9 @@ package importer import ( - "github.com/stretchr/testify/assert" "testing" + + "github.com/stretchr/testify/assert" ) func Test_InputArgs(t *testing.T) { diff --git a/ziti/cmd/common/options.go b/ziti/cmd/common/options.go index 392ff5761..044afa829 100644 --- a/ziti/cmd/common/options.go +++ b/ziti/cmd/common/options.go @@ -19,9 +19,10 @@ package common import ( "context" "fmt" - "github.com/spf13/cobra" "io" "time" + + "github.com/spf13/cobra" ) type Printer interface { diff --git a/ziti/cmd/common/viper.go b/ziti/cmd/common/viper.go index e5918f44d..03aafe6e8 100644 --- a/ziti/cmd/common/viper.go +++ b/ziti/cmd/common/viper.go @@ -17,9 +17,10 @@ package common import ( + "strings" + c "github.com/openziti/ziti/v2/ziti/constants" "github.com/spf13/viper" - "strings" ) func NewViper() *viper.Viper { diff --git a/ziti/cmd/create/create_config_controller_test.go b/ziti/cmd/create/create_config_controller_test.go index 509cf5b67..684b5db01 100644 --- a/ziti/cmd/create/create_config_controller_test.go +++ b/ziti/cmd/create/create_config_controller_test.go @@ -2,17 +2,18 @@ package create import ( "fmt" - cmdhelper "github.com/openziti/ziti/v2/ziti/cmd/helpers" - "github.com/openziti/ziti/v2/ziti/constants" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "gopkg.in/yaml.v3" "os" "runtime" "strings" "syscall" "testing" "time" + + cmdhelper "github.com/openziti/ziti/v2/ziti/cmd/helpers" + "github.com/openziti/ziti/v2/ziti/constants" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "gopkg.in/yaml.v3" ) /* BEGIN Controller config template structure */ diff --git a/ziti/cmd/create/create_config_router_edge_test.go b/ziti/cmd/create/create_config_router_edge_test.go index d35835ce3..598ce0178 100644 --- a/ziti/cmd/create/create_config_router_edge_test.go +++ b/ziti/cmd/create/create_config_router_edge_test.go @@ -1,16 +1,17 @@ package create import ( - "github.com/openziti/ziti/v2/ziti/constants" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "os" "strconv" "strings" "syscall" "testing" "time" + + "github.com/openziti/ziti/v2/ziti/constants" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var defaultArgs = []string{"edge", "--routerName", "test-router"} diff --git a/ziti/cmd/create/create_config_router_fabric_test.go b/ziti/cmd/create/create_config_router_fabric_test.go index 38e773950..da95a2d5a 100644 --- a/ziti/cmd/create/create_config_router_fabric_test.go +++ b/ziti/cmd/create/create_config_router_fabric_test.go @@ -1,15 +1,16 @@ package create import ( - "github.com/openziti/ziti/v2/ziti/constants" - "github.com/pkg/errors" - "github.com/stretchr/testify/assert" "os" "strconv" "strings" "syscall" "testing" "time" + + "github.com/openziti/ziti/v2/ziti/constants" + "github.com/pkg/errors" + "github.com/stretchr/testify/assert" ) func TestExecuteCreateConfigRouterFabricHasNonBlankTemplateValues(t *testing.T) { diff --git a/ziti/cmd/create/create_config_router_test.go b/ziti/cmd/create/create_config_router_test.go index ccdd24a1e..05a782670 100644 --- a/ziti/cmd/create/create_config_router_test.go +++ b/ziti/cmd/create/create_config_router_test.go @@ -2,12 +2,13 @@ package create import ( "fmt" + "os" + "testing" + cmdhelper "github.com/openziti/ziti/v2/ziti/cmd/helpers" "github.com/openziti/ziti/v2/ziti/constants" "github.com/stretchr/testify/assert" "gopkg.in/yaml.v3" - "os" - "testing" ) // TEST constants diff --git a/ziti/cmd/demo/zcat_closetest.go b/ziti/cmd/demo/zcat_closetest.go index e8e650969..119f8d587 100644 --- a/ziti/cmd/demo/zcat_closetest.go +++ b/ziti/cmd/demo/zcat_closetest.go @@ -19,15 +19,16 @@ package demo import ( "bufio" "fmt" + "net" + "os" + "strings" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/debugz" "github.com/openziti/sdk-golang/ziti" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "net" - "os" - "strings" - "time" ) type zcatCloseTestAction struct { diff --git a/ziti/cmd/edge/create_authenticator.go b/ziti/cmd/edge/create_authenticator.go index 7804007f6..03851e1d5 100644 --- a/ziti/cmd/edge/create_authenticator.go +++ b/ziti/cmd/edge/create_authenticator.go @@ -17,10 +17,11 @@ package edge import ( + "io" + "github.com/openziti/ziti/v2/ziti/cmd/api" "github.com/openziti/ziti/v2/ziti/cmd/common" "github.com/spf13/cobra" - "io" ) // newCreateAuthenticatorCmd creates the 'edge controller create authenticator' command diff --git a/ziti/cmd/edge/detail.go b/ziti/cmd/edge/detail.go index d4f4c7b42..658e116d5 100644 --- a/ziti/cmd/edge/detail.go +++ b/ziti/cmd/edge/detail.go @@ -17,9 +17,10 @@ package edge import ( + "io" + "github.com/Jeffail/gabs" "github.com/openziti/ziti/v2/ziti/util" - "io" ) func DetailEntityOfType(entityType, entityId string, logJSON bool, out io.Writer, timeout int, verbose bool) (*gabs.Container, error) { diff --git a/ziti/cmd/edge/update_authenticator.go b/ziti/cmd/edge/update_authenticator.go index c3ed169ca..23afe1b7b 100644 --- a/ziti/cmd/edge/update_authenticator.go +++ b/ziti/cmd/edge/update_authenticator.go @@ -17,10 +17,11 @@ package edge import ( + "io" + "github.com/openziti/ziti/v2/ziti/cmd/api" "github.com/openziti/ziti/v2/ziti/cmd/common" "github.com/spf13/cobra" - "io" ) // newUpdateAuthenticatorCmd creates the 'edge controller update authenticator' command diff --git a/ziti/cmd/edge/validate_service_hosting.go b/ziti/cmd/edge/validate_service_hosting.go index cdceffa25..325d7ee15 100644 --- a/ziti/cmd/edge/validate_service_hosting.go +++ b/ziti/cmd/edge/validate_service_hosting.go @@ -18,6 +18,7 @@ package edge import ( "fmt" + "github.com/openziti/edge-api/rest_management_api_client/service" "github.com/openziti/ziti/v2/controller/rest_client/terminator" "github.com/openziti/ziti/v2/controller/rest_model" diff --git a/ziti/cmd/fabric/create_router.go b/ziti/cmd/fabric/create_router.go index 4755abdba..f4e45583e 100644 --- a/ziti/cmd/fabric/create_router.go +++ b/ziti/cmd/fabric/create_router.go @@ -19,6 +19,7 @@ package fabric import ( "crypto/sha1" "fmt" + "github.com/Jeffail/gabs" "github.com/openziti/identity/certtools" "github.com/openziti/ziti/v2/ziti/cmd/api" diff --git a/ziti/cmd/fabric/inspect.go b/ziti/cmd/fabric/inspect.go index 32a308017..f33e78b44 100644 --- a/ziti/cmd/fabric/inspect.go +++ b/ziti/cmd/fabric/inspect.go @@ -5,6 +5,10 @@ import ( "encoding/json" "errors" "fmt" + "io" + "os" + "strings" + "github.com/fatih/color" "github.com/openziti/foundation/v2/stringz" inspectCommon "github.com/openziti/ziti/v2/common/inspect" @@ -15,9 +19,6 @@ import ( "github.com/openziti/ziti/v2/ziti/util" "github.com/spf13/cobra" "gopkg.in/yaml.v2" - "io" - "os" - "strings" ) // newListCmd creates a command object for the "controller list" command diff --git a/ziti/cmd/fabric/stream_traces.go b/ziti/cmd/fabric/stream_traces.go index dbcebfd72..494b85e01 100644 --- a/ziti/cmd/fabric/stream_traces.go +++ b/ziti/cmd/fabric/stream_traces.go @@ -19,18 +19,19 @@ package fabric import ( "encoding/json" "fmt" + "reflect" + "sort" + "time" + "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/trace/pb" + "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/common/pb/ctrl_pb" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" - "github.com/openziti/sdk-golang/xgress" "github.com/openziti/ziti/v2/ziti/cmd/api" "github.com/openziti/ziti/v2/ziti/cmd/common" "github.com/spf13/cobra" "google.golang.org/protobuf/proto" - "reflect" - "sort" - "time" ) type streamTracesAction struct { diff --git a/ziti/cmd/helpers/env_helpers.go b/ziti/cmd/helpers/env_helpers.go index 87179f160..79bee0537 100644 --- a/ziti/cmd/helpers/env_helpers.go +++ b/ziti/cmd/helpers/env_helpers.go @@ -17,15 +17,16 @@ package helpers import ( - edge "github.com/openziti/ziti/v2/controller/config" - "github.com/openziti/ziti/v2/router/xgress_edge_tunnel" - "github.com/openziti/ziti/v2/ziti/constants" - "github.com/pkg/errors" "os" "path/filepath" "strconv" "strings" "time" + + edge "github.com/openziti/ziti/v2/controller/config" + "github.com/openziti/ziti/v2/router/xgress_edge_tunnel" + "github.com/openziti/ziti/v2/ziti/constants" + "github.com/pkg/errors" ) func HomeDir() string { diff --git a/ziti/cmd/helpers/helpers_test.go b/ziti/cmd/helpers/helpers_test.go index 9864ae5de..2ab53eff9 100644 --- a/ziti/cmd/helpers/helpers_test.go +++ b/ziti/cmd/helpers/helpers_test.go @@ -2,11 +2,12 @@ package helpers import ( "fmt" - "github.com/stretchr/testify/assert" "os" "strings" "testing" "time" + + "github.com/stretchr/testify/assert" ) var hostname string diff --git a/ziti/cmd/lets_encrypt/certs_storage.go b/ziti/cmd/lets_encrypt/certs_storage.go index c24797536..96aa6fb34 100644 --- a/ziti/cmd/lets_encrypt/certs_storage.go +++ b/ziti/cmd/lets_encrypt/certs_storage.go @@ -20,13 +20,14 @@ import ( "bytes" "crypto/x509" "encoding/json" - "github.com/openziti/ziti/v2/ziti/internal/log" "os" "path/filepath" "strconv" "strings" "time" + "github.com/openziti/ziti/v2/ziti/internal/log" + "github.com/go-acme/lego/v4/certcrypto" "github.com/go-acme/lego/v4/certificate" "golang.org/x/net/idna" diff --git a/ziti/cmd/lets_encrypt/root.go b/ziti/cmd/lets_encrypt/root.go index 4c11bf8be..10f857af9 100644 --- a/ziti/cmd/lets_encrypt/root.go +++ b/ziti/cmd/lets_encrypt/root.go @@ -17,9 +17,10 @@ package lets_encrypt import ( - "github.com/openziti/ziti/v2/ziti/util" "io" + "github.com/openziti/ziti/v2/ziti/util" + "github.com/spf13/cobra" ) diff --git a/ziti/cmd/lets_encrypt/setup.go b/ziti/cmd/lets_encrypt/setup.go index 0413cd5ce..209c3dcb1 100644 --- a/ziti/cmd/lets_encrypt/setup.go +++ b/ziti/cmd/lets_encrypt/setup.go @@ -17,10 +17,11 @@ package lets_encrypt import ( - "github.com/openziti/ziti/v2/ziti/internal/log" "os" "time" + "github.com/openziti/ziti/v2/ziti/internal/log" + "github.com/go-acme/lego/v4/challenge/http01" "github.com/go-acme/lego/v4/lego" "github.com/go-acme/lego/v4/registration" diff --git a/ziti/cmd/ops/database/compact.go b/ziti/cmd/ops/database/compact.go index ee23f27f5..e69a5028c 100644 --- a/ziti/cmd/ops/database/compact.go +++ b/ziti/cmd/ops/database/compact.go @@ -17,9 +17,10 @@ package database import ( + "math" + "github.com/spf13/cobra" "go.etcd.io/bbolt" - "math" ) type CompactAction struct { diff --git a/ziti/cmd/ops/database/du.go b/ziti/cmd/ops/database/du.go index 4520129d5..7ae8580ee 100644 --- a/ziti/cmd/ops/database/du.go +++ b/ziti/cmd/ops/database/du.go @@ -18,6 +18,7 @@ package database import ( "fmt" + "github.com/openziti/storage/boltz" "github.com/openziti/ziti/v2/common/outputz" "github.com/spf13/cobra" diff --git a/ziti/cmd/pki/common_test.go b/ziti/cmd/pki/common_test.go index 14821d70e..227049797 100644 --- a/ziti/cmd/pki/common_test.go +++ b/ziti/cmd/pki/common_test.go @@ -18,13 +18,14 @@ package pki import ( "bytes" "fmt" - "github.com/openziti/ziti/v2/ziti/pki/pki" - "github.com/openziti/ziti/v2/ziti/pki/store" - "github.com/sirupsen/logrus" "net" "net/url" "os" "testing" + + "github.com/openziti/ziti/v2/ziti/pki/pki" + "github.com/openziti/ziti/v2/ziti/pki/store" + "github.com/sirupsen/logrus" ) var where = "/tmp/pki-test" diff --git a/ziti/cmd/pki/pki_create_ca_test.go b/ziti/cmd/pki/pki_create_ca_test.go index 01cfb4667..39b1de598 100644 --- a/ziti/cmd/pki/pki_create_ca_test.go +++ b/ziti/cmd/pki/pki_create_ca_test.go @@ -17,9 +17,10 @@ package pki import ( "fmt" - "github.com/google/uuid" "testing" + "github.com/google/uuid" + "github.com/stretchr/testify/assert" ) diff --git a/ziti/cmd/pki/pki_create_client_test.go b/ziti/cmd/pki/pki_create_client_test.go index 6e73f02da..a74acd1e1 100644 --- a/ziti/cmd/pki/pki_create_client_test.go +++ b/ziti/cmd/pki/pki_create_client_test.go @@ -17,9 +17,10 @@ package pki import ( "fmt" - "github.com/google/uuid" "testing" + "github.com/google/uuid" + "github.com/stretchr/testify/assert" ) diff --git a/ziti/cmd/pki/pki_create_intermediate_test.go b/ziti/cmd/pki/pki_create_intermediate_test.go index a20a106fd..48f93dc9e 100644 --- a/ziti/cmd/pki/pki_create_intermediate_test.go +++ b/ziti/cmd/pki/pki_create_intermediate_test.go @@ -17,9 +17,10 @@ package pki import ( "fmt" - "github.com/google/uuid" "testing" + "github.com/google/uuid" + "github.com/stretchr/testify/assert" ) diff --git a/ziti/cmd/pki/pki_create_server_test.go b/ziti/cmd/pki/pki_create_server_test.go index 4793b534b..2eb556f3d 100644 --- a/ziti/cmd/pki/pki_create_server_test.go +++ b/ziti/cmd/pki/pki_create_server_test.go @@ -17,9 +17,10 @@ package pki import ( "fmt" - "github.com/google/uuid" "testing" + "github.com/google/uuid" + "github.com/stretchr/testify/assert" ) diff --git a/ziti/enroll/enroll_edge_router.go b/ziti/enroll/enroll_edge_router.go index d6b3e5357..77648f3c0 100644 --- a/ziti/enroll/enroll_edge_router.go +++ b/ziti/enroll/enroll_edge_router.go @@ -17,12 +17,13 @@ package enroll import ( + "os" + "github.com/michaelquigley/pfxlog" "github.com/openziti/sdk-golang/ziti" "github.com/openziti/ziti/v2/router/enroll" "github.com/openziti/ziti/v2/router/env" "github.com/spf13/cobra" - "os" ) type enrollEdgeRouterAction struct { diff --git a/ziti/enroll/enroll_identity.go b/ziti/enroll/enroll_identity.go index 6b9f6083a..4e5de31d9 100644 --- a/ziti/enroll/enroll_identity.go +++ b/ziti/enroll/enroll_identity.go @@ -19,11 +19,12 @@ package enroll import ( "encoding/json" "fmt" + "os" + "strings" + "github.com/openziti/identity/engines" "github.com/openziti/sdk-golang/ziti" "github.com/openziti/ziti/v2/ziti/cmd/common" - "os" - "strings" "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/term" diff --git a/ziti/eventdoc/main.go b/ziti/eventdoc/main.go index 5d63d2d23..eecf57ed7 100644 --- a/ziti/eventdoc/main.go +++ b/ziti/eventdoc/main.go @@ -7,7 +7,6 @@ import ( "bytes" "errors" "fmt" - "github.com/openziti/foundation/v2/stringz" "go/ast" "go/parser" "go/token" @@ -16,6 +15,8 @@ import ( "sort" "strconv" "strings" + + "github.com/openziti/foundation/v2/stringz" ) type TypeDef struct { diff --git a/ziti/pki/store/store.go b/ziti/pki/store/store.go index 2f33b0d46..7d0ca8c19 100644 --- a/ziti/pki/store/store.go +++ b/ziti/pki/store/store.go @@ -19,8 +19,9 @@ package store import ( "crypto/x509/pkix" - "github.com/openziti/ziti/v2/ziti/pki/certificate" "math/big" + + "github.com/openziti/ziti/v2/ziti/pki/certificate" ) // Store represents a way to store a Certificate Authority. diff --git a/ziti/run/quickstart_automated_test.go b/ziti/run/quickstart_automated_test.go index f0830258d..9890a6336 100644 --- a/ziti/run/quickstart_automated_test.go +++ b/ziti/run/quickstart_automated_test.go @@ -5,11 +5,12 @@ package run import ( "context" "fmt" - "github.com/openziti/ziti/v2/ziti/cmd/helpers" - log "github.com/sirupsen/logrus" "os" "testing" "time" + + "github.com/openziti/ziti/v2/ziti/cmd/helpers" + log "github.com/sirupsen/logrus" ) func TestEdgeQuickstartAutomated(t *testing.T) { diff --git a/ziti/run/root.go b/ziti/run/root.go index 834bac633..8918353dc 100644 --- a/ziti/run/root.go +++ b/ziti/run/root.go @@ -18,12 +18,13 @@ package run import ( "context" + "io" + "github.com/michaelquigley/pfxlog" "github.com/openziti/ziti/v2/ziti/tunnel" "github.com/openziti/ziti/v2/ziti/util" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "io" ) type Options struct { diff --git a/ziti/util/updates.go b/ziti/util/updates.go index 4a1180d68..d84042f91 100644 --- a/ziti/util/updates.go +++ b/ziti/util/updates.go @@ -18,11 +18,12 @@ package util import ( "fmt" - "github.com/openziti/ziti/v2/common/getziti" - "github.com/openziti/ziti/v2/ziti/constants" "os" "strings" + "github.com/openziti/ziti/v2/common/getziti" + "github.com/openziti/ziti/v2/ziti/constants" + "github.com/fatih/color" "github.com/blang/semver" diff --git a/zititest/models/circuit-perf/bootstrap.go b/zititest/models/circuit-perf/bootstrap.go index 116b843a3..e3d3b4e4c 100644 --- a/zititest/models/circuit-perf/bootstrap.go +++ b/zititest/models/circuit-perf/bootstrap.go @@ -17,9 +17,10 @@ package main import ( - "github.com/openziti/ziti/zititest/zitilab" "time" + "github.com/openziti/ziti/zititest/zitilab" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" diff --git a/zititest/models/circuit-test/bootstrap.go b/zititest/models/circuit-test/bootstrap.go index 55acabdf3..f79edbb5e 100644 --- a/zititest/models/circuit-test/bootstrap.go +++ b/zititest/models/circuit-test/bootstrap.go @@ -18,9 +18,10 @@ package main import ( "fmt" + "time" + "github.com/openziti/fablab/kernel/lib/actions/semaphore" "github.com/openziti/ziti/zititest/zitilab" - "time" "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" diff --git a/zititest/models/circuit-test/sim_metrics.go b/zititest/models/circuit-test/sim_metrics.go index a965a2e17..4d29a15c1 100644 --- a/zititest/models/circuit-test/sim_metrics.go +++ b/zititest/models/circuit-test/sim_metrics.go @@ -3,13 +3,14 @@ package main import ( "errors" "fmt" - "github.com/michaelquigley/pfxlog" - "github.com/openziti/fablab/kernel/model" - "github.com/openziti/ziti/v2/common/outputz" "strings" "sync" "sync/atomic" "time" + + "github.com/michaelquigley/pfxlog" + "github.com/openziti/fablab/kernel/model" + "github.com/openziti/ziti/v2/common/outputz" ) type SimMetricsValidator struct { diff --git a/zititest/models/circuit-test/validation.go b/zititest/models/circuit-test/validation.go index 0880453f1..1a1002b21 100644 --- a/zititest/models/circuit-test/validation.go +++ b/zititest/models/circuit-test/validation.go @@ -19,6 +19,8 @@ package main import ( "errors" "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" @@ -30,7 +32,6 @@ import ( "github.com/openziti/ziti/zititest/zitilab/chaos" zitiLibOps "github.com/openziti/ziti/zititest/zitilab/runlevel/5_operation" "google.golang.org/protobuf/proto" - "time" ) type simCallback struct { diff --git a/zititest/models/db-creation/actions/bootstrap.go b/zititest/models/db-creation/actions/bootstrap.go index c532913b5..c4752bd3c 100644 --- a/zititest/models/db-creation/actions/bootstrap.go +++ b/zititest/models/db-creation/actions/bootstrap.go @@ -19,6 +19,9 @@ package actions import ( "encoding/json" "fmt" + "os" + "time" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" @@ -28,8 +31,6 @@ import ( zitilib_actions "github.com/openziti/ziti/zititest/zitilab/actions" "github.com/openziti/ziti/zititest/zitilab/actions/edge" "github.com/openziti/ziti/zititest/zitilab/models" - "os" - "time" ) const DomainName = "controller.testing.openziti.org" diff --git a/zititest/models/db-creation/main.go b/zititest/models/db-creation/main.go index 10d8b4146..ac2c2f060 100644 --- a/zititest/models/db-creation/main.go +++ b/zititest/models/db-creation/main.go @@ -2,6 +2,10 @@ package main import ( "embed" + "os" + "path" + "time" + "github.com/openziti/fablab" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" @@ -19,9 +23,6 @@ import ( "github.com/openziti/ziti/zititest/models/test_resources" "github.com/openziti/ziti/zititest/zitilab" "github.com/openziti/ziti/zititest/zitilab/actions/edge" - "os" - "path" - "time" ) //go:embed configs diff --git a/zititest/models/db-ctrl-test/provision.go b/zititest/models/db-ctrl-test/provision.go index a564efac8..ccf5ac370 100644 --- a/zititest/models/db-ctrl-test/provision.go +++ b/zititest/models/db-ctrl-test/provision.go @@ -18,13 +18,14 @@ package main import ( "fmt" + "os" + "path/filepath" + "github.com/openziti/fablab/kernel/lib/parallel" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/zititest/zitilab" zitilib_actions "github.com/openziti/ziti/zititest/zitilab/actions" "github.com/openziti/ziti/zititest/zitilab/cli" - "os" - "path/filepath" ) func provisionIdentities(identities []string, run model.Run) error { diff --git a/zititest/models/dtls-west/actions/bootstrap.go b/zititest/models/dtls-west/actions/bootstrap.go index 3ba8f5f29..bf07279e6 100644 --- a/zititest/models/dtls-west/actions/bootstrap.go +++ b/zititest/models/dtls-west/actions/bootstrap.go @@ -18,9 +18,10 @@ package actions import ( "fmt" - "github.com/openziti/ziti/zititest/zitilab" "time" + "github.com/openziti/ziti/zititest/zitilab" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" diff --git a/zititest/models/dtls-west/actions/start.go b/zititest/models/dtls-west/actions/start.go index ead6e6788..1f6df0256 100644 --- a/zititest/models/dtls-west/actions/start.go +++ b/zititest/models/dtls-west/actions/start.go @@ -17,9 +17,10 @@ package actions import ( - "github.com/openziti/ziti/zititest/zitilab/actions/edge" "time" + "github.com/openziti/ziti/zititest/zitilab/actions/edge" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/semaphore" diff --git a/zititest/models/dtls-west/main.go b/zititest/models/dtls-west/main.go index b2ea903bf..eceab363d 100644 --- a/zititest/models/dtls-west/main.go +++ b/zititest/models/dtls-west/main.go @@ -18,6 +18,10 @@ package main import ( "embed" + "os" + "strings" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/fablab" "github.com/openziti/fablab/kernel/lib/actions/component" @@ -38,9 +42,6 @@ import ( "github.com/openziti/ziti/zititest/zitilab/actions/edge" "github.com/openziti/ziti/zititest/zitilab/models" zitilib_5_operation "github.com/openziti/ziti/zititest/zitilab/runlevel/5_operation" - "os" - "strings" - "time" ) //go:embed configs diff --git a/zititest/models/dtls/actions/bootstrap.go b/zititest/models/dtls/actions/bootstrap.go index 3ba8f5f29..bf07279e6 100644 --- a/zititest/models/dtls/actions/bootstrap.go +++ b/zititest/models/dtls/actions/bootstrap.go @@ -18,9 +18,10 @@ package actions import ( "fmt" - "github.com/openziti/ziti/zititest/zitilab" "time" + "github.com/openziti/ziti/zititest/zitilab" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" diff --git a/zititest/models/dtls/actions/start.go b/zititest/models/dtls/actions/start.go index ead6e6788..1f6df0256 100644 --- a/zititest/models/dtls/actions/start.go +++ b/zititest/models/dtls/actions/start.go @@ -17,9 +17,10 @@ package actions import ( - "github.com/openziti/ziti/zititest/zitilab/actions/edge" "time" + "github.com/openziti/ziti/zititest/zitilab/actions/edge" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/semaphore" diff --git a/zititest/models/dtls/main.go b/zititest/models/dtls/main.go index 828e7c8c1..69511cc72 100644 --- a/zititest/models/dtls/main.go +++ b/zititest/models/dtls/main.go @@ -18,6 +18,10 @@ package main import ( "embed" + "os" + "strings" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/fablab" "github.com/openziti/fablab/kernel/lib/actions/component" @@ -38,9 +42,6 @@ import ( "github.com/openziti/ziti/zititest/zitilab/actions/edge" "github.com/openziti/ziti/zititest/zitilab/models" zitilib_5_operation "github.com/openziti/ziti/zititest/zitilab/runlevel/5_operation" - "os" - "strings" - "time" ) //go:embed configs diff --git a/zititest/models/scp-speed/actions/bootstrap.go b/zititest/models/scp-speed/actions/bootstrap.go index d693f9bc6..a686a112c 100644 --- a/zititest/models/scp-speed/actions/bootstrap.go +++ b/zititest/models/scp-speed/actions/bootstrap.go @@ -18,9 +18,10 @@ package actions import ( "fmt" - "github.com/openziti/ziti/zititest/zitilab" "time" + "github.com/openziti/ziti/zititest/zitilab" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" diff --git a/zititest/models/scp-speed/actions/start.go b/zititest/models/scp-speed/actions/start.go index e9db47c98..be95433c0 100644 --- a/zititest/models/scp-speed/actions/start.go +++ b/zititest/models/scp-speed/actions/start.go @@ -17,9 +17,10 @@ package actions import ( - "github.com/openziti/ziti/zititest/zitilab/actions/edge" "time" + "github.com/openziti/ziti/zititest/zitilab/actions/edge" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/semaphore" diff --git a/zititest/models/scp-speed/main.go b/zititest/models/scp-speed/main.go index 22bf843ae..732f0a328 100644 --- a/zititest/models/scp-speed/main.go +++ b/zititest/models/scp-speed/main.go @@ -18,6 +18,10 @@ package main import ( "embed" + "os" + "strings" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/fablab" "github.com/openziti/fablab/kernel/lib/actions/component" @@ -38,9 +42,6 @@ import ( "github.com/openziti/ziti/zititest/zitilab/actions/edge" "github.com/openziti/ziti/zititest/zitilab/models" zitilib_5_operation "github.com/openziti/ziti/zititest/zitilab/runlevel/5_operation" - "os" - "strings" - "time" ) //go:embed configs diff --git a/zititest/models/sdk-status-test/validation.go b/zititest/models/sdk-status-test/validation.go index a4f4926d4..bd5d10ad9 100644 --- a/zititest/models/sdk-status-test/validation.go +++ b/zititest/models/sdk-status-test/validation.go @@ -19,6 +19,9 @@ package main import ( "errors" "fmt" + "math/rand" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/channel/v4/protobufs" @@ -27,8 +30,6 @@ import ( "github.com/openziti/ziti/v2/zitirest" "github.com/openziti/ziti/zititest/zitilab/chaos" "google.golang.org/protobuf/proto" - "math/rand" - "time" ) // start with a random scenario then cycle through them diff --git a/zititest/models/smart/actions/bootstrap.go b/zititest/models/smart/actions/bootstrap.go index 02eb9e8c5..537915c79 100644 --- a/zititest/models/smart/actions/bootstrap.go +++ b/zititest/models/smart/actions/bootstrap.go @@ -18,6 +18,9 @@ package actions import ( "fmt" + "path/filepath" + "time" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" @@ -26,8 +29,6 @@ import ( zitilib_actions "github.com/openziti/ziti/zititest/zitilab/actions" "github.com/openziti/ziti/zititest/zitilab/models" "github.com/sirupsen/logrus" - "path/filepath" - "time" ) func NewBootstrapAction() model.ActionBinder { diff --git a/zititest/models/smart/actions/start.go b/zititest/models/smart/actions/start.go index ab7a41f1f..1f7d7ae09 100644 --- a/zititest/models/smart/actions/start.go +++ b/zititest/models/smart/actions/start.go @@ -17,12 +17,13 @@ package actions import ( + "time" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/semaphore" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/zititest/zitilab/models" - "time" ) func NewStartAction() model.ActionBinder { diff --git a/zititest/models/smart/stages.go b/zititest/models/smart/stages.go index a061b2634..49fa858cd 100644 --- a/zititest/models/smart/stages.go +++ b/zititest/models/smart/stages.go @@ -18,6 +18,8 @@ package main import ( "fmt" + "time" + aws_ssh_keys0 "github.com/openziti/fablab/kernel/lib/runlevel/0_infrastructure/aws_ssh_key" semaphore0 "github.com/openziti/fablab/kernel/lib/runlevel/0_infrastructure/semaphore" terraform0 "github.com/openziti/fablab/kernel/lib/runlevel/0_infrastructure/terraform" @@ -30,7 +32,6 @@ import ( "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/zititest/zitilab/models" zitilab_5_operation "github.com/openziti/ziti/zititest/zitilab/runlevel/5_operation" - "time" ) func newStageFactory() model.Factory { diff --git a/zititest/models/smoke/actions/bootstrap.go b/zititest/models/smoke/actions/bootstrap.go index 363531a7b..e3f826208 100644 --- a/zititest/models/smoke/actions/bootstrap.go +++ b/zititest/models/smoke/actions/bootstrap.go @@ -18,9 +18,10 @@ package actions import ( "fmt" + "time" + "github.com/openziti/fablab/kernel/lib/actions/semaphore" "github.com/openziti/ziti/zititest/zitilab" - "time" "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" diff --git a/zititest/models/smoke/actions/start.go b/zititest/models/smoke/actions/start.go index dce599127..1fd3c1762 100644 --- a/zititest/models/smoke/actions/start.go +++ b/zititest/models/smoke/actions/start.go @@ -17,9 +17,10 @@ package actions import ( - "github.com/openziti/ziti/zititest/zitilab/actions/edge" "time" + "github.com/openziti/ziti/zititest/zitilab/actions/edge" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/semaphore" diff --git a/zititest/models/smoke/tests.go b/zititest/models/smoke/tests.go index 2a1d63ba8..0be3232b4 100644 --- a/zititest/models/smoke/tests.go +++ b/zititest/models/smoke/tests.go @@ -2,9 +2,10 @@ package smoke import ( "fmt" + "time" + "github.com/google/uuid" "github.com/openziti/fablab/kernel/model" - "time" ) var hashes = map[string]string{ diff --git a/zititest/models/stall/action_bootstrap.go b/zititest/models/stall/action_bootstrap.go index d1e341f0b..562974a10 100644 --- a/zititest/models/stall/action_bootstrap.go +++ b/zititest/models/stall/action_bootstrap.go @@ -17,6 +17,8 @@ package main import ( + "time" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" @@ -25,7 +27,6 @@ import ( zitilib_actions "github.com/openziti/ziti/zititest/zitilab/actions" "github.com/openziti/ziti/zititest/zitilab/actions/edge" "github.com/openziti/ziti/zititest/zitilab/models" - "time" ) func NewBootstrapAction() model.ActionBinder { diff --git a/zititest/models/stall/action_start.go b/zititest/models/stall/action_start.go index 100bc343a..8296c9439 100644 --- a/zititest/models/stall/action_start.go +++ b/zititest/models/stall/action_start.go @@ -17,12 +17,13 @@ package main import ( + "time" + "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/semaphore" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/zititest/zitilab/models" - "time" ) func NewStartAction() model.ActionBinder { diff --git a/zititest/models/stall/main.go b/zititest/models/stall/main.go index fcc911149..d3c328d8c 100644 --- a/zititest/models/stall/main.go +++ b/zititest/models/stall/main.go @@ -3,6 +3,9 @@ package main import ( "embed" _ "embed" + "os" + "time" + "github.com/openziti/fablab" "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" @@ -19,8 +22,6 @@ import ( "github.com/openziti/fablab/resources" "github.com/openziti/ziti/zititest/zitilab" "github.com/openziti/ziti/zititest/zitilab/actions/edge" - "os" - "time" ) //go:embed configs diff --git a/zititest/models/stall/stages.go b/zititest/models/stall/stages.go index 600885ab5..c94459d7b 100644 --- a/zititest/models/stall/stages.go +++ b/zititest/models/stall/stages.go @@ -2,12 +2,13 @@ package main import ( "fmt" + "strings" + "time" + fablib_5_operation "github.com/openziti/fablab/kernel/lib/runlevel/5_operation" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/zititest/zitilab/models" zitilib_5_operation "github.com/openziti/ziti/zititest/zitilab/runlevel/5_operation" - "strings" - "time" ) func newStageFactory() model.Factory { diff --git a/zititest/models/test_resources/resource.go b/zititest/models/test_resources/resource.go index 9d24b3088..1cf14adbb 100644 --- a/zititest/models/test_resources/resource.go +++ b/zititest/models/test_resources/resource.go @@ -2,8 +2,9 @@ package test_resources import ( "embed" - "github.com/openziti/fablab/resources" "io/fs" + + "github.com/openziti/fablab/resources" ) //go:embed terraform diff --git a/zititest/models/zrok-test/main.go b/zititest/models/zrok-test/main.go index afee2b059..b56460257 100644 --- a/zititest/models/zrok-test/main.go +++ b/zititest/models/zrok-test/main.go @@ -19,6 +19,10 @@ package main import ( "embed" _ "embed" + "os" + "path" + "time" + "github.com/openziti/fablab" "github.com/openziti/fablab/kernel/lib/actions" "github.com/openziti/fablab/kernel/lib/actions/component" @@ -38,9 +42,6 @@ import ( "github.com/openziti/ziti/zititest/zitilab" "github.com/openziti/ziti/zititest/zitilab/actions/edge" "github.com/openziti/ziti/zititest/zitilab/models" - "os" - "path" - "time" ) const TargetZitiVersion = "" diff --git a/zititest/simple-sim/simple-sim.go b/zititest/simple-sim/simple-sim.go index 6d3994f96..43613fb36 100644 --- a/zititest/simple-sim/simple-sim.go +++ b/zititest/simple-sim/simple-sim.go @@ -18,6 +18,12 @@ package main import ( "fmt" + "math/rand" + "os" + "path/filepath" + "slices" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/edge-api/rest_model" "github.com/openziti/sdk-golang/ziti" @@ -25,11 +31,6 @@ import ( cmap "github.com/orcaman/concurrent-map/v2" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "math/rand" - "os" - "path/filepath" - "slices" - "time" ) type simpleSimAction struct { diff --git a/zititest/tests/files_test.go b/zititest/tests/files_test.go index f6dcd2413..c2b00448d 100644 --- a/zititest/tests/files_test.go +++ b/zititest/tests/files_test.go @@ -18,9 +18,10 @@ package tests import ( "fmt" + "testing" + "github.com/openziti/ziti/zititest/models/smoke" "github.com/stretchr/testify/require" - "testing" ) func TestDownloadFiles(t *testing.T) { diff --git a/zititest/tests/iperf_test.go b/zititest/tests/iperf_test.go index de36e464f..4ddcc1630 100644 --- a/zititest/tests/iperf_test.go +++ b/zititest/tests/iperf_test.go @@ -18,9 +18,10 @@ package tests import ( "fmt" + "testing" + "github.com/openziti/ziti/zititest/models/smoke" "github.com/stretchr/testify/require" - "testing" ) func TestIPerf(t *testing.T) { diff --git a/zititest/ziti-traffic-test/client/http.go b/zititest/ziti-traffic-test/client/http.go index a9b8b8960..2b6aacd38 100644 --- a/zititest/ziti-traffic-test/client/http.go +++ b/zititest/ziti-traffic-test/client/http.go @@ -20,6 +20,10 @@ import ( "context" "crypto/tls" "fmt" + "io" + "net" + "net/http" + "github.com/michaelquigley/pfxlog" "github.com/openziti/identity" "github.com/openziti/identity/dotziti" @@ -27,9 +31,6 @@ import ( "github.com/openziti/ziti/v2/router/xgress_transport" "github.com/openziti/ziti/zititest/ziti-traffic-test/subcmd" "github.com/spf13/cobra" - "io" - "net" - "net/http" ) func init() { diff --git a/zititest/ziti-traffic-test/client/nc.go b/zititest/ziti-traffic-test/client/nc.go index a0b8cb632..08b9dafec 100644 --- a/zititest/ziti-traffic-test/client/nc.go +++ b/zititest/ziti-traffic-test/client/nc.go @@ -18,6 +18,9 @@ package client import ( "fmt" + "io" + "os" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" "github.com/openziti/identity" @@ -26,8 +29,6 @@ import ( "github.com/openziti/ziti/v2/router/xgress_transport" "github.com/openziti/ziti/zititest/ziti-traffic-test/subcmd" "github.com/spf13/cobra" - "io" - "os" ) func init() { diff --git a/zititest/ziti-traffic-test/loop2/dialer.go b/zititest/ziti-traffic-test/loop2/dialer.go index 82438feb9..1c7bc5670 100644 --- a/zititest/ziti-traffic-test/loop2/dialer.go +++ b/zititest/ziti-traffic-test/loop2/dialer.go @@ -18,11 +18,12 @@ package loop2 import ( "fmt" - "github.com/openziti/ziti/zititest/ziti-traffic-test/loop2/pb" "net" "strings" "time" + "github.com/openziti/ziti/zititest/ziti-traffic-test/loop2/pb" + "github.com/michaelquigley/pfxlog" "github.com/openziti/identity" "github.com/openziti/identity/dotziti" diff --git a/zititest/ziti-traffic-test/loop2/generator.go b/zititest/ziti-traffic-test/loop2/generator.go index ec9c20f90..5874eb903 100644 --- a/zititest/ziti-traffic-test/loop2/generator.go +++ b/zititest/ziti-traffic-test/loop2/generator.go @@ -18,10 +18,11 @@ package loop2 import ( "crypto/sha512" + "math/rand" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" "github.com/openziti/ziti/zititest/ziti-traffic-test/loop2/pb" - "math/rand" ) type generator struct { diff --git a/zititest/ziti-traffic-test/loop2/listener.go b/zititest/ziti-traffic-test/loop2/listener.go index 244086a60..c00554c78 100644 --- a/zititest/ziti-traffic-test/loop2/listener.go +++ b/zititest/ziti-traffic-test/loop2/listener.go @@ -17,6 +17,9 @@ package loop2 import ( + "net" + "strings" + "github.com/michaelquigley/pfxlog" "github.com/openziti/identity" "github.com/openziti/identity/dotziti" @@ -24,8 +27,6 @@ import ( "github.com/openziti/transport/v2" "github.com/openziti/ziti/zititest/ziti-traffic-test/loop2/pb" "github.com/spf13/cobra" - "net" - "strings" ) func init() { diff --git a/zititest/ziti-traffic-test/loop2/protocol.go b/zititest/ziti-traffic-test/loop2/protocol.go index 7d63479d3..f42a55214 100644 --- a/zititest/ziti-traffic-test/loop2/protocol.go +++ b/zititest/ziti-traffic-test/loop2/protocol.go @@ -22,14 +22,15 @@ import ( "encoding/binary" "encoding/hex" "fmt" + "io" + "math/rand" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" "github.com/openziti/ziti/zititest/ziti-traffic-test/loop2/pb" "github.com/pkg/errors" "google.golang.org/protobuf/proto" - "io" - "math/rand" - "time" ) type protocol struct { diff --git a/zititest/ziti-traffic-test/loop2/scenario.go b/zititest/ziti-traffic-test/loop2/scenario.go index 8586cd77f..d048f83b5 100644 --- a/zititest/ziti-traffic-test/loop2/scenario.go +++ b/zititest/ziti-traffic-test/loop2/scenario.go @@ -17,8 +17,9 @@ package loop2 import ( - "gopkg.in/yaml.v2" "os" + + "gopkg.in/yaml.v2" ) type Scenario struct { diff --git a/zititest/ziti-traffic-test/loop3/dialer.go b/zititest/ziti-traffic-test/loop3/dialer.go index df2e68156..0a142566b 100644 --- a/zititest/ziti-traffic-test/loop3/dialer.go +++ b/zititest/ziti-traffic-test/loop3/dialer.go @@ -18,6 +18,10 @@ package loop3 import ( "fmt" + "net" + "strings" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/agent" "github.com/openziti/identity" @@ -26,9 +30,6 @@ import ( "github.com/openziti/transport/v2" "github.com/openziti/ziti/v2/router/xgress_transport" "github.com/spf13/cobra" - "net" - "strings" - "time" ) func init() { diff --git a/zititest/ziti-traffic-test/loop3/generator.go b/zititest/ziti-traffic-test/loop3/generator.go index b5a10bc6a..b0cf0c1bc 100644 --- a/zititest/ziti-traffic-test/loop3/generator.go +++ b/zititest/ziti-traffic-test/loop3/generator.go @@ -18,9 +18,10 @@ package loop3 import ( "crypto/sha512" + "math/rand" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" - "math/rand" ) type randomHashedBlockGenerator struct { diff --git a/zititest/ziti-traffic-test/loop3/listener.go b/zititest/ziti-traffic-test/loop3/listener.go index abb665146..ebe4879cb 100644 --- a/zititest/ziti-traffic-test/loop3/listener.go +++ b/zititest/ziti-traffic-test/loop3/listener.go @@ -18,6 +18,10 @@ package loop3 import ( "errors" + "net" + "net/http" + "strings" + "github.com/michaelquigley/pfxlog" "github.com/openziti/agent" "github.com/openziti/identity" @@ -27,9 +31,6 @@ import ( "github.com/openziti/ziti/zititest/ziti-traffic-test/loop3/pb" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "net" - "net/http" - "strings" ) func init() { diff --git a/zititest/ziti-traffic-test/loop3/messages.go b/zititest/ziti-traffic-test/loop3/messages.go index 336792843..3173b58b3 100644 --- a/zititest/ziti-traffic-test/loop3/messages.go +++ b/zititest/ziti-traffic-test/loop3/messages.go @@ -6,10 +6,11 @@ import ( "encoding/binary" "encoding/hex" "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" "github.com/pkg/errors" - "time" ) type Message interface { diff --git a/zititest/ziti-traffic-test/loop3/messages_test.go b/zititest/ziti-traffic-test/loop3/messages_test.go index d4ad37dab..7056d8a9b 100644 --- a/zititest/ziti-traffic-test/loop3/messages_test.go +++ b/zititest/ziti-traffic-test/loop3/messages_test.go @@ -4,11 +4,12 @@ import ( "bytes" "crypto/rand" "crypto/sha512" + "reflect" + "testing" + "github.com/google/go-cmp/cmp" "github.com/openziti/ziti/zititest/ziti-traffic-test/loop3/pb" "github.com/stretchr/testify/require" - "reflect" - "testing" ) type testPeer struct { diff --git a/zititest/ziti-traffic-test/loop3/metrics.go b/zititest/ziti-traffic-test/loop3/metrics.go index 38e48fa18..eb6a91c9b 100644 --- a/zititest/ziti-traffic-test/loop3/metrics.go +++ b/zititest/ziti-traffic-test/loop3/metrics.go @@ -2,6 +2,8 @@ package loop3 import ( "encoding/binary" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/sdk-golang/ziti" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" @@ -9,7 +11,6 @@ import ( "github.com/rcrowley/go-metrics" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" - "time" ) var registry = metrics.NewRegistry() diff --git a/zititest/ziti-traffic-test/loop3/protocol.go b/zititest/ziti-traffic-test/loop3/protocol.go index bf4409205..00922c61a 100644 --- a/zititest/ziti-traffic-test/loop3/protocol.go +++ b/zititest/ziti-traffic-test/loop3/protocol.go @@ -20,15 +20,16 @@ import ( "bytes" "encoding/binary" "fmt" + "io" + "math/rand" + "sync/atomic" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" "github.com/openziti/ziti/zititest/ziti-traffic-test/loop3/pb" "github.com/pkg/errors" "google.golang.org/protobuf/proto" - "io" - "math/rand" - "sync/atomic" - "time" ) type protocol struct { diff --git a/zititest/ziti-traffic-test/loop3/scenario.go b/zititest/ziti-traffic-test/loop3/scenario.go index de53eee2a..77d2decaf 100644 --- a/zititest/ziti-traffic-test/loop3/scenario.go +++ b/zititest/ziti-traffic-test/loop3/scenario.go @@ -17,10 +17,11 @@ package loop3 import ( - "github.com/openziti/ziti/zititest/ziti-traffic-test/loop3/pb" - "gopkg.in/yaml.v2" "os" "time" + + "github.com/openziti/ziti/zititest/ziti-traffic-test/loop3/pb" + "gopkg.in/yaml.v2" ) type Scenario struct { diff --git a/zititest/ziti-traffic-test/loop4/generator.go b/zititest/ziti-traffic-test/loop4/generator.go index 2d2183d5f..ae598e1a3 100644 --- a/zititest/ziti-traffic-test/loop4/generator.go +++ b/zititest/ziti-traffic-test/loop4/generator.go @@ -18,9 +18,10 @@ package loop4 import ( "crypto/sha512" + "math/rand" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" - "math/rand" ) type randomHashedBlockGenerator struct { diff --git a/zititest/ziti-traffic-test/loop4/listener.go b/zititest/ziti-traffic-test/loop4/listener.go index d4ce1fe27..6821c05bd 100644 --- a/zititest/ziti-traffic-test/loop4/listener.go +++ b/zititest/ziti-traffic-test/loop4/listener.go @@ -18,12 +18,13 @@ package loop4 import ( "fmt" + "net" + "net/http" + "github.com/michaelquigley/pfxlog" "github.com/openziti/sdk-golang/ziti/edge" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "net" - "net/http" ) func init() { diff --git a/zititest/ziti-traffic-test/loop4/messages.go b/zititest/ziti-traffic-test/loop4/messages.go index 49330bdf9..0d4536e7a 100644 --- a/zititest/ziti-traffic-test/loop4/messages.go +++ b/zititest/ziti-traffic-test/loop4/messages.go @@ -6,10 +6,11 @@ import ( "encoding/binary" "encoding/hex" "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/info" "github.com/pkg/errors" - "time" ) type Message interface { diff --git a/zititest/ziti-traffic-test/loop4/messages_test.go b/zititest/ziti-traffic-test/loop4/messages_test.go index 6b58fae84..f2983e69f 100644 --- a/zititest/ziti-traffic-test/loop4/messages_test.go +++ b/zititest/ziti-traffic-test/loop4/messages_test.go @@ -4,12 +4,13 @@ import ( "bytes" "crypto/rand" "crypto/sha512" + "reflect" + "testing" + "github.com/google/go-cmp/cmp" "github.com/openziti/metrics" loopPb "github.com/openziti/ziti/zititest/ziti-traffic-test/loop4/pb" "github.com/stretchr/testify/require" - "reflect" - "testing" ) type testPeer struct { diff --git a/zititest/ziti-traffic-test/loop4/protocol.go b/zititest/ziti-traffic-test/loop4/protocol.go index fc77bd252..0b3c81cea 100644 --- a/zititest/ziti-traffic-test/loop4/protocol.go +++ b/zititest/ziti-traffic-test/loop4/protocol.go @@ -20,6 +20,12 @@ import ( "bytes" "encoding/binary" "fmt" + "io" + "math/rand" + "net" + "sync/atomic" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/debugz" "github.com/openziti/foundation/v2/info" @@ -28,11 +34,6 @@ import ( loopPb "github.com/openziti/ziti/zititest/ziti-traffic-test/loop4/pb" "github.com/pkg/errors" "google.golang.org/protobuf/proto" - "io" - "math/rand" - "net" - "sync/atomic" - "time" ) type protocol struct { diff --git a/zititest/ziti-traffic-test/loop4/remoteControlled.go b/zititest/ziti-traffic-test/loop4/remoteControlled.go index ac719b8a8..40f777ba5 100644 --- a/zititest/ziti-traffic-test/loop4/remoteControlled.go +++ b/zititest/ziti-traffic-test/loop4/remoteControlled.go @@ -19,6 +19,9 @@ package loop4 import ( "errors" "fmt" + "net" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" "github.com/openziti/foundation/v2/concurrenz" @@ -28,8 +31,6 @@ import ( "github.com/openziti/sdk-golang/ziti" loop4Pb "github.com/openziti/ziti/zititest/ziti-traffic-test/loop4/pb" "github.com/spf13/cobra" - "net" - "time" ) const ( diff --git a/zititest/ziti-traffic-test/loop4/remoteController.go b/zititest/ziti-traffic-test/loop4/remoteController.go index df0227062..30b837d3c 100644 --- a/zititest/ziti-traffic-test/loop4/remoteController.go +++ b/zititest/ziti-traffic-test/loop4/remoteController.go @@ -19,6 +19,11 @@ package loop4 import ( "errors" "fmt" + "net" + "strings" + "sync/atomic" + "time" + "github.com/google/uuid" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" @@ -26,10 +31,6 @@ import ( "github.com/openziti/sdk-golang/ziti" loop4Pb "github.com/openziti/ziti/zititest/ziti-traffic-test/loop4/pb" cmap "github.com/orcaman/concurrent-map/v2" - "net" - "strings" - "sync/atomic" - "time" ) type ControllerCallback interface { diff --git a/zititest/ziti-traffic-test/main.go b/zititest/ziti-traffic-test/main.go index b7bd7dfa4..0393351dd 100644 --- a/zititest/ziti-traffic-test/main.go +++ b/zititest/ziti-traffic-test/main.go @@ -22,6 +22,9 @@ import ( "bytes" "encoding/json" "fmt" + "runtime" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/foundation/v2/debugz" "github.com/openziti/transport/v2" @@ -36,8 +39,6 @@ import ( _ "github.com/openziti/ziti/zititest/ziti-traffic-test/loop4" "github.com/openziti/ziti/zititest/ziti-traffic-test/subcmd" "github.com/sirupsen/logrus" - "runtime" - "time" ) func init() { diff --git a/zititest/ziti-traffic-test/metrics/metrics.go b/zititest/ziti-traffic-test/metrics/metrics.go index b3cf58a24..bebe2f3d3 100644 --- a/zititest/ziti-traffic-test/metrics/metrics.go +++ b/zititest/ziti-traffic-test/metrics/metrics.go @@ -4,6 +4,8 @@ import ( "encoding/binary" "errors" "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/metrics" "github.com/openziti/sdk-golang/ziti" @@ -12,7 +14,6 @@ import ( gometrics "github.com/rcrowley/go-metrics" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" - "time" ) type ZitiReporter struct { diff --git a/zititest/ziti-traffic-test/subcmd/root.go b/zititest/ziti-traffic-test/subcmd/root.go index a8de7968d..022c2bc0b 100644 --- a/zititest/ziti-traffic-test/subcmd/root.go +++ b/zititest/ziti-traffic-test/subcmd/root.go @@ -18,10 +18,11 @@ package subcmd import ( "fmt" - "github.com/sirupsen/logrus" - "github.com/spf13/cobra" "os" "path/filepath" + + "github.com/sirupsen/logrus" + "github.com/spf13/cobra" ) func init() { diff --git a/zititest/ziti-traffic-test/subcmd/version.go b/zititest/ziti-traffic-test/subcmd/version.go index cf85bc536..5e53c22be 100644 --- a/zititest/ziti-traffic-test/subcmd/version.go +++ b/zititest/ziti-traffic-test/subcmd/version.go @@ -18,6 +18,7 @@ package subcmd import ( "fmt" + "github.com/openziti/ziti/v2/common/version" "github.com/spf13/cobra" ) diff --git a/zititest/zitilab/actions/edge/ctrl_available.go b/zititest/zitilab/actions/edge/ctrl_available.go index 819a09536..17720ef22 100644 --- a/zititest/zitilab/actions/edge/ctrl_available.go +++ b/zititest/zitilab/actions/edge/ctrl_available.go @@ -1,10 +1,11 @@ package edge import ( + "time" + "github.com/openziti/fablab/kernel/model" "github.com/openziti/foundation/v2/netz" "github.com/pkg/errors" - "time" ) func ControllerAvailable(componentSpec string, timeout time.Duration) model.Action { diff --git a/zititest/zitilab/actions/edge/ctrl_init.go b/zititest/zitilab/actions/edge/ctrl_init.go index 975674a48..b0ecda159 100644 --- a/zititest/zitilab/actions/edge/ctrl_init.go +++ b/zititest/zitilab/actions/edge/ctrl_init.go @@ -2,12 +2,13 @@ package edge import ( "fmt" + "time" + "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/lib/actions/host" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/zititest/zitilab" "github.com/pkg/errors" - "time" ) func InitController(componentSpec string) model.Action { diff --git a/zititest/zitilab/actions/edge/init_identities.go b/zititest/zitilab/actions/edge/init_identities.go index 47faa42bd..7ff073d45 100644 --- a/zititest/zitilab/actions/edge/init_identities.go +++ b/zititest/zitilab/actions/edge/init_identities.go @@ -1,12 +1,13 @@ package edge import ( + "path/filepath" + "strings" + "github.com/openziti/fablab/kernel/libssh" "github.com/openziti/fablab/kernel/model" zitilib_actions "github.com/openziti/ziti/zititest/zitilab/actions" "github.com/openziti/ziti/zititest/zitilab/cli" - "path/filepath" - "strings" ) func InitIdentities(componentSpec string, concurrency int) model.Action { diff --git a/zititest/zitilab/actions/edge/login.go b/zititest/zitilab/actions/edge/login.go index ac8eb00d2..bfc7897c0 100644 --- a/zititest/zitilab/actions/edge/login.go +++ b/zititest/zitilab/actions/edge/login.go @@ -2,11 +2,12 @@ package edge import ( "errors" + "path/filepath" + "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/v2/ziti/cmd/common" "github.com/openziti/ziti/v2/ziti/util" "github.com/openziti/ziti/zititest/zitilab/cli" - "path/filepath" ) func Login(componentSelector string) model.Action { diff --git a/zititest/zitilab/actions/edge/raft_join.go b/zititest/zitilab/actions/edge/raft_join.go index 172982ac3..5d9cf7b25 100644 --- a/zititest/zitilab/actions/edge/raft_join.go +++ b/zititest/zitilab/actions/edge/raft_join.go @@ -2,12 +2,13 @@ package edge import ( "fmt" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/fablab/kernel/lib/actions/component" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/zititest/zitilab" "github.com/pkg/errors" - "time" ) func RaftJoin(primaryId string, componentSpec string) model.Action { diff --git a/zititest/zitilab/actions/edge/sync_model_edge_state.go b/zititest/zitilab/actions/edge/sync_model_edge_state.go index 9f8754094..81944d64b 100644 --- a/zititest/zitilab/actions/edge/sync_model_edge_state.go +++ b/zititest/zitilab/actions/edge/sync_model_edge_state.go @@ -1,11 +1,12 @@ package edge import ( + "strings" + "github.com/Jeffail/gabs" "github.com/openziti/fablab/kernel/model" zitilibActions "github.com/openziti/ziti/zititest/zitilab/actions" "github.com/pkg/errors" - "strings" ) func SyncModelEdgeState(componentSpec string) model.Action { diff --git a/zititest/zitilab/actions/logs.go b/zititest/zitilab/actions/logs.go index b3b63d81c..6084e1966 100644 --- a/zititest/zitilab/actions/logs.go +++ b/zititest/zitilab/actions/logs.go @@ -18,10 +18,11 @@ package zitilib_actions import ( "fmt" - "github.com/openziti/fablab/kernel/libssh" "os" "path/filepath" + "github.com/openziti/fablab/kernel/libssh" + "github.com/openziti/fablab/kernel/model" "github.com/openziti/foundation/v2/info" "github.com/sirupsen/logrus" diff --git a/zititest/zitilab/actions/metricbeat.go b/zititest/zitilab/actions/metricbeat.go index dd834e9dc..2c3f5e857 100644 --- a/zititest/zitilab/actions/metricbeat.go +++ b/zititest/zitilab/actions/metricbeat.go @@ -2,6 +2,7 @@ package zitilib_actions import ( "fmt" + "github.com/openziti/fablab/kernel/libssh" "github.com/openziti/fablab/kernel/model" diff --git a/zititest/zitilab/chaos/chaos.go b/zititest/zitilab/chaos/chaos.go index 1b385c3e7..7989d33a1 100644 --- a/zititest/zitilab/chaos/chaos.go +++ b/zititest/zitilab/chaos/chaos.go @@ -18,11 +18,12 @@ package chaos import ( "fmt" + "math/rand" + "time" + "github.com/michaelquigley/pfxlog" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/v2/zitirest" - "math/rand" - "time" ) func StaticNumber(val int) func(int) int { diff --git a/zititest/zitilab/cli/get_entity_id.go b/zititest/zitilab/cli/get_entity_id.go index 8755aeb8f..8d39568d6 100644 --- a/zititest/zitilab/cli/get_entity_id.go +++ b/zititest/zitilab/cli/get_entity_id.go @@ -2,6 +2,7 @@ package cli import ( "fmt" + "github.com/Jeffail/gabs" "github.com/openziti/fablab/kernel/model" "github.com/pkg/errors" diff --git a/zititest/zitilab/component_caddy.go b/zititest/zitilab/component_caddy.go index 860659bce..752cf7e3a 100644 --- a/zititest/zitilab/component_caddy.go +++ b/zititest/zitilab/component_caddy.go @@ -18,13 +18,14 @@ package zitilab import ( "fmt" + "io/fs" + "strings" + "github.com/openziti/fablab/kernel/lib" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/v2/ziti/constants" "github.com/openziti/ziti/zititest/zitilab/stageziti" "github.com/sirupsen/logrus" - "io/fs" - "strings" ) var _ model.ComponentType = (*CaddyType)(nil) diff --git a/zititest/zitilab/component_common.go b/zititest/zitilab/component_common.go index 0280828bb..c69680546 100644 --- a/zititest/zitilab/component_common.go +++ b/zititest/zitilab/component_common.go @@ -18,11 +18,12 @@ package zitilab import ( "fmt" + "path/filepath" + "strings" + "github.com/openziti/fablab/kernel/model" zitilib_actions "github.com/openziti/ziti/zititest/zitilab/actions" "github.com/sirupsen/logrus" - "path/filepath" - "strings" ) func getZitiProcessFilter(c *model.Component, zitiType string) func(string) bool { diff --git a/zititest/zitilab/component_iperf.go b/zititest/zitilab/component_iperf.go index 738b1f16d..bb7c9641e 100644 --- a/zititest/zitilab/component_iperf.go +++ b/zititest/zitilab/component_iperf.go @@ -18,9 +18,10 @@ package zitilab import ( "fmt" + "strings" + "github.com/openziti/fablab/kernel/model" "github.com/sirupsen/logrus" - "strings" ) var _ model.ComponentType = (*IPerfServerType)(nil) diff --git a/zititest/zitilab/component_simple_sim.go b/zititest/zitilab/component_simple_sim.go index 319aad6a4..a94f8fde4 100644 --- a/zititest/zitilab/component_simple_sim.go +++ b/zititest/zitilab/component_simple_sim.go @@ -18,10 +18,11 @@ package zitilab import ( "fmt" + "strings" + "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/zititest/zitilab/stageziti" "github.com/sirupsen/logrus" - "strings" ) var _ model.ComponentType = (*SimpleSimType)(nil) diff --git a/zititest/zitilab/component_tcpdump.go b/zititest/zitilab/component_tcpdump.go index 8b2e289d3..127de9301 100644 --- a/zititest/zitilab/component_tcpdump.go +++ b/zititest/zitilab/component_tcpdump.go @@ -18,9 +18,10 @@ package zitilab import ( "fmt" + "strings" + "github.com/openziti/fablab/kernel/model" "github.com/sirupsen/logrus" - "strings" ) var _ model.ComponentType = (*TcpDumpType)(nil) diff --git a/zititest/zitilab/component_zrok_controller.go b/zititest/zitilab/component_zrok_controller.go index bb6f970f0..6344eaab5 100644 --- a/zititest/zitilab/component_zrok_controller.go +++ b/zititest/zitilab/component_zrok_controller.go @@ -18,6 +18,9 @@ package zitilab import ( "fmt" + "io/fs" + "strings" + "github.com/michaelquigley/pfxlog" "github.com/openziti/fablab/kernel/lib" "github.com/openziti/fablab/kernel/lib/actions/host" @@ -25,8 +28,6 @@ import ( "github.com/openziti/ziti/v2/ziti/constants" "github.com/openziti/ziti/zititest/zitilab/stageziti" "github.com/sirupsen/logrus" - "io/fs" - "strings" ) var _ model.ComponentType = (*ZrokControllerType)(nil) diff --git a/zititest/zitilab/component_zrok_frontend.go b/zititest/zitilab/component_zrok_frontend.go index d664b3b51..d89862ac0 100644 --- a/zititest/zitilab/component_zrok_frontend.go +++ b/zititest/zitilab/component_zrok_frontend.go @@ -18,6 +18,10 @@ package zitilab import ( "fmt" + "io/fs" + "path/filepath" + "strings" + "github.com/michaelquigley/pfxlog" "github.com/openziti/fablab/kernel/lib" "github.com/openziti/fablab/kernel/lib/actions/host" @@ -27,9 +31,6 @@ import ( "github.com/openziti/ziti/zititest/zitilab/cli" "github.com/openziti/ziti/zititest/zitilab/stageziti" "github.com/sirupsen/logrus" - "io/fs" - "path/filepath" - "strings" ) var _ model.ComponentType = (*ZrokFrontendType)(nil) diff --git a/zititest/zitilab/console/action.go b/zititest/zitilab/console/action.go index d9863a58f..ab94558b3 100644 --- a/zititest/zitilab/console/action.go +++ b/zititest/zitilab/console/action.go @@ -18,9 +18,10 @@ package console import ( "embed" - "github.com/openziti/fablab/kernel/model" "io/fs" "net/http" + + "github.com/openziti/fablab/kernel/model" ) //go:embed webroot diff --git a/zititest/zitilab/console/server.go b/zititest/zitilab/console/server.go index 793be794f..345fada64 100644 --- a/zititest/zitilab/console/server.go +++ b/zititest/zitilab/console/server.go @@ -17,9 +17,10 @@ package console import ( + "net/http" + "github.com/sirupsen/logrus" "golang.org/x/net/websocket" - "net/http" ) func NewServer() *Server { diff --git a/zititest/zitilab/runlevel/0_infrastructure/consul.go b/zititest/zitilab/runlevel/0_infrastructure/consul.go index 95b76ac62..9e2c1e9b9 100644 --- a/zititest/zitilab/runlevel/0_infrastructure/consul.go +++ b/zititest/zitilab/runlevel/0_infrastructure/consul.go @@ -2,6 +2,7 @@ package zitilib_runlevel_0_infrastructure import ( "fmt" + "github.com/openziti/fablab/kernel/libssh" "github.com/openziti/fablab/kernel/model" diff --git a/zititest/zitilab/runlevel/0_infrastructure/metricbeat.go b/zititest/zitilab/runlevel/0_infrastructure/metricbeat.go index 575aabc5f..18d5a5f9d 100644 --- a/zititest/zitilab/runlevel/0_infrastructure/metricbeat.go +++ b/zititest/zitilab/runlevel/0_infrastructure/metricbeat.go @@ -2,6 +2,7 @@ package zitilib_runlevel_0_infrastructure import ( "fmt" + "github.com/openziti/fablab/kernel/libssh" "github.com/openziti/fablab/kernel/model" diff --git a/zititest/zitilab/runlevel/5_operation/circuit_metrics.go b/zititest/zitilab/runlevel/5_operation/circuit_metrics.go index a0da8f21a..6336e229d 100644 --- a/zititest/zitilab/runlevel/5_operation/circuit_metrics.go +++ b/zititest/zitilab/runlevel/5_operation/circuit_metrics.go @@ -2,6 +2,8 @@ package zitilib_runlevel_5_operation import ( "encoding/json" + "time" + "github.com/Jeffail/gabs/v2" "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v4" @@ -11,7 +13,6 @@ import ( "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/ziti/cmd/api" "github.com/sirupsen/logrus" - "time" ) func CircuitMetrics(pollFreq time.Duration, closer <-chan struct{}, f func(string) string) model.Stage { diff --git a/zititest/zitilab/runlevel/5_operation/loop_dialer.go b/zititest/zitilab/runlevel/5_operation/loop_dialer.go index a1444ff46..667f1135e 100644 --- a/zititest/zitilab/runlevel/5_operation/loop_dialer.go +++ b/zititest/zitilab/runlevel/5_operation/loop_dialer.go @@ -18,10 +18,11 @@ package zitilib_runlevel_5_operation import ( "fmt" + "strings" + "github.com/openziti/fablab/kernel/libssh" "github.com/openziti/fablab/kernel/model" "github.com/sirupsen/logrus" - "strings" ) func Loop3Dialer(host *model.Host, scenario, endpoint string, joiner chan struct{}, extraArgs ...string) model.Stage { diff --git a/zititest/zitilab/runlevel/5_operation/loop_listener.go b/zititest/zitilab/runlevel/5_operation/loop_listener.go index b9cf8319c..8dc9e2dc8 100644 --- a/zititest/zitilab/runlevel/5_operation/loop_listener.go +++ b/zititest/zitilab/runlevel/5_operation/loop_listener.go @@ -2,10 +2,11 @@ package zitilib_runlevel_5_operation import ( "fmt" + "strings" + "github.com/openziti/fablab/kernel/libssh" "github.com/openziti/fablab/kernel/model" "github.com/sirupsen/logrus" - "strings" ) func Loop3Listener(host *model.Host, joiner chan struct{}, bindAddress string, extraArgs ...string) model.Stage { diff --git a/zititest/zitilab/runlevel/5_operation/mesh.go b/zititest/zitilab/runlevel/5_operation/mesh.go index 8fc5ffc8c..a17dbdb5a 100644 --- a/zititest/zitilab/runlevel/5_operation/mesh.go +++ b/zititest/zitilab/runlevel/5_operation/mesh.go @@ -18,12 +18,13 @@ package zitilib_runlevel_5_operation import ( "fmt" + "time" + "github.com/openziti/channel/v4" "github.com/openziti/fablab/kernel/model" "github.com/openziti/identity/dotziti" "github.com/openziti/transport/v2" "github.com/sirupsen/logrus" - "time" ) func Mesh(closer <-chan struct{}) model.Stage { diff --git a/zititest/zitilab/runlevel/5_operation/model_metrics.go b/zititest/zitilab/runlevel/5_operation/model_metrics.go index 57e075374..0a5711848 100644 --- a/zititest/zitilab/runlevel/5_operation/model_metrics.go +++ b/zititest/zitilab/runlevel/5_operation/model_metrics.go @@ -18,13 +18,14 @@ package zitilib_runlevel_5_operation import ( "encoding/json" + "time" + "github.com/openziti/channel/v4" "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/v2/common/pb/mgmt_pb" "github.com/openziti/ziti/v2/controller/event" "github.com/openziti/ziti/v2/ziti/cmd/api" "github.com/sirupsen/logrus" - "time" ) func ModelMetrics(closer <-chan struct{}) model.Stage { diff --git a/zititest/zitilab/stageziti/stageziti.go b/zititest/zitilab/stageziti/stageziti.go index cc13bbc75..56e3442ca 100644 --- a/zititest/zitilab/stageziti/stageziti.go +++ b/zititest/zitilab/stageziti/stageziti.go @@ -2,15 +2,16 @@ package stageziti import ( "fmt" + "os" + "os/exec" + "path/filepath" + "strings" + "github.com/openziti/fablab/kernel/model" "github.com/openziti/ziti/v2/common/getziti" "github.com/openziti/ziti/v2/ziti/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "os" - "os/exec" - "path/filepath" - "strings" ) func StageZitiOnce(run model.Run, component *model.Component, version string, source string) error {