diff --git a/agent/agent.go b/agent/agent.go index 8157a3f411..a73f54deed 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -27,8 +27,8 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "golang.org/x/time/rate" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/handler" diff --git a/agent/agent_test.go b/agent/agent_test.go index a9ce1fae60..ed3a8c5316 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" sensutesting "github.com/sensu/sensu-go/testing" "github.com/sensu/sensu-go/transport" "github.com/sensu/sensu-go/types" diff --git a/agent/check_handler.go b/agent/check_handler.go index f78433bca6..03c49a66af 100644 --- a/agent/check_handler.go +++ b/agent/check_handler.go @@ -12,7 +12,7 @@ import ( "github.com/google/uuid" "github.com/sensu/sensu-go/agent/transformers" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/token" diff --git a/agent/check_handler_internal_test.go b/agent/check_handler_internal_test.go index f37dd00dea..9c10eda6a0 100644 --- a/agent/check_handler_internal_test.go +++ b/agent/check_handler_internal_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/testing/mockexecutor" "github.com/sensu/sensu-go/token" diff --git a/agent/cmd/start.go b/agent/cmd/start.go index 90ea5572b2..f6bc917643 100644 --- a/agent/cmd/start.go +++ b/agent/cmd/start.go @@ -10,7 +10,7 @@ import ( "time" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/util/path" "github.com/sensu/sensu-go/util/url" diff --git a/agent/cmd/start_test.go b/agent/cmd/start_test.go index 6d7408f05c..c98998ef85 100644 --- a/agent/cmd/start_test.go +++ b/agent/cmd/start_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/spf13/cobra" "github.com/spf13/viper" ) diff --git a/agent/config.go b/agent/config.go index d6357e9cdf..9fe959927b 100644 --- a/agent/config.go +++ b/agent/config.go @@ -5,7 +5,7 @@ import ( "os" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "golang.org/x/time/rate" ) diff --git a/agent/entity.go b/agent/entity.go index b684ba9f69..33780a0b31 100644 --- a/agent/entity.go +++ b/agent/entity.go @@ -3,8 +3,8 @@ package agent import ( time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/version" ) diff --git a/agent/entity_config_handler.go b/agent/entity_config_handler.go index d8c0c2fee3..31f4b524da 100644 --- a/agent/entity_config_handler.go +++ b/agent/entity_config_handler.go @@ -4,7 +4,7 @@ import ( "context" time "github.com/echlebek/timeproxy" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" ) func (a *Agent) handleEntityConfig(ctx context.Context, payload []byte) error { diff --git a/agent/entity_config_handler_test.go b/agent/entity_config_handler_test.go index 88f31aa798..136774e946 100644 --- a/agent/entity_config_handler_test.go +++ b/agent/entity_config_handler_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" ) func TestHandleEntityConfig(t *testing.T) { diff --git a/agent/entity_test.go b/agent/entity_test.go index 06ad7484f0..baf1ef076c 100644 --- a/agent/entity_test.go +++ b/agent/entity_test.go @@ -3,8 +3,8 @@ package agent import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/stretchr/testify/assert" ) diff --git a/agent/event.go b/agent/event.go index bb67d266c9..ea4aa2cddd 100644 --- a/agent/event.go +++ b/agent/event.go @@ -6,7 +6,7 @@ import ( time "github.com/echlebek/timeproxy" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" corev1 "github.com/sensu/sensu-go/types/v1" ) diff --git a/agent/event_test.go b/agent/event_test.go index 7055a38464..c081347a46 100644 --- a/agent/event_test.go +++ b/agent/event_test.go @@ -7,8 +7,8 @@ import ( time "github.com/echlebek/timeproxy" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" corev1 "github.com/sensu/sensu-go/types/v1" ) diff --git a/agent/hook.go b/agent/hook.go index 6e22f4135b..1d3114bafa 100644 --- a/agent/hook.go +++ b/agent/hook.go @@ -10,7 +10,7 @@ import ( "strings" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/token" diff --git a/agent/hook_test.go b/agent/hook_test.go index e1a4b8f51f..e14e034e20 100644 --- a/agent/hook_test.go +++ b/agent/hook_test.go @@ -6,7 +6,7 @@ import ( "testing" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/command" "github.com/sensu/sensu-go/testing/mockexecutor" diff --git a/agent/queue_test.go b/agent/queue_test.go index 0294dff20e..290f941547 100644 --- a/agent/queue_test.go +++ b/agent/queue_test.go @@ -5,7 +5,7 @@ import ( "encoding/json" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestCompressionRoundTrip(t *testing.T) { diff --git a/asset/asset.go b/asset/asset.go index f9e8b2f04d..45c4708413 100644 --- a/asset/asset.go +++ b/asset/asset.go @@ -19,7 +19,7 @@ import ( "path/filepath" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/util/environment" ) diff --git a/asset/boltdb_manager.go b/asset/boltdb_manager.go index 75947413b7..eb9e008db6 100644 --- a/asset/boltdb_manager.go +++ b/asset/boltdb_manager.go @@ -9,7 +9,7 @@ import ( "github.com/dustin/go-humanize" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" metricspkg "github.com/sensu/sensu-go/metrics" bolt "go.etcd.io/bbolt" "golang.org/x/time/rate" diff --git a/asset/filtered_manager.go b/asset/filtered_manager.go index 6f226d6064..556e1574ac 100644 --- a/asset/filtered_manager.go +++ b/asset/filtered_manager.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/js" "github.com/sensu/sensu-go/token" "github.com/sensu/sensu-go/types/dynamic" diff --git a/asset/filtered_manager_test.go b/asset/filtered_manager_test.go index 84aabe507e..697cf6789a 100644 --- a/asset/filtered_manager_test.go +++ b/asset/filtered_manager_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" ) diff --git a/asset/set_test.go b/asset/set_test.go index 1c4efe0200..e9d5634854 100644 --- a/asset/set_test.go +++ b/asset/set_test.go @@ -9,7 +9,7 @@ import ( "strings" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" ) diff --git a/backend/agentd/agentd.go b/backend/agentd/agentd.go index 46fb687003..54f26eda2d 100644 --- a/backend/agentd/agentd.go +++ b/backend/agentd/agentd.go @@ -18,7 +18,7 @@ import ( "github.com/gorilla/websocket" "github.com/prometheus/client_golang/prometheus" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/middlewares" "github.com/sensu/sensu-go/backend/apid/routers" diff --git a/backend/agentd/agentd_test.go b/backend/agentd/agentd_test.go index 1da483c7ce..27a7549779 100644 --- a/backend/agentd/agentd_test.go +++ b/backend/agentd/agentd_test.go @@ -11,8 +11,8 @@ import ( "net/http/httptest" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/middlewares" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/agentd/middlewares.go b/backend/agentd/middlewares.go index dd7aaa7639..b513cb7287 100644 --- a/backend/agentd/middlewares.go +++ b/backend/agentd/middlewares.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AuthenticationMiddleware represents the middleware used for authentication diff --git a/backend/agentd/session.go b/backend/agentd/session.go index 34c270a024..034b801cfc 100644 --- a/backend/agentd/session.go +++ b/backend/agentd/session.go @@ -12,8 +12,8 @@ import ( "github.com/google/uuid" "github.com/prometheus/client_golang/prometheus" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/metrics" "github.com/sensu/sensu-go/backend/ringv2" diff --git a/backend/agentd/session_test.go b/backend/agentd/session_test.go index a5fb5fcc55..35d18b3acf 100644 --- a/backend/agentd/session_test.go +++ b/backend/agentd/session_test.go @@ -11,8 +11,8 @@ import ( "github.com/gogo/protobuf/proto" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/agentd/watcher.go b/backend/agentd/watcher.go index e9adb59aa4..dc38220a74 100644 --- a/backend/agentd/watcher.go +++ b/backend/agentd/watcher.go @@ -5,8 +5,8 @@ import ( "errors" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" etcdstore "github.com/sensu/sensu-go/backend/store/etcd" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/api/asset.go b/backend/api/asset.go index 6546b009bb..ced254f99a 100644 --- a/backend/api/asset.go +++ b/backend/api/asset.go @@ -6,7 +6,7 @@ import ( "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AssetClient is an API client for assets. diff --git a/backend/api/asset_test.go b/backend/api/asset_test.go index 7fb64f6f57..f4a964355c 100644 --- a/backend/api/asset_test.go +++ b/backend/api/asset_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/authentication.go b/backend/api/authentication.go index 15f0802c76..a09ffe4c34 100644 --- a/backend/api/authentication.go +++ b/backend/api/authentication.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authentication/providers/basic" diff --git a/backend/api/authentication_test.go b/backend/api/authentication_test.go index ed6901991a..b8652d5f84 100644 --- a/backend/api/authentication_test.go +++ b/backend/api/authentication_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authentication/providers/basic" diff --git a/backend/api/check.go b/backend/api/check.go index f6090bc330..d8b68db004 100644 --- a/backend/api/check.go +++ b/backend/api/check.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/check_test.go b/backend/api/check_test.go index 84468ced2f..02281a1329 100644 --- a/backend/api/check_test.go +++ b/backend/api/check_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/entity.go b/backend/api/entity.go index f876eccffe..125b4d1202 100644 --- a/backend/api/entity.go +++ b/backend/api/entity.go @@ -6,8 +6,8 @@ import ( "github.com/sirupsen/logrus" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/api/entity_test.go b/backend/api/entity_test.go index e72e5a7432..926f4bd516 100644 --- a/backend/api/entity_test.go +++ b/backend/api/entity_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/event.go b/backend/api/event.go index c81d992fa8..43479f9932 100644 --- a/backend/api/event.go +++ b/backend/api/event.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/api/event_test.go b/backend/api/event_test.go index 55ec27ca0b..efed7a58fe 100644 --- a/backend/api/event_test.go +++ b/backend/api/event_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/api/filter.go b/backend/api/filter.go index 647324dbcc..5d5c58f61e 100644 --- a/backend/api/filter.go +++ b/backend/api/filter.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/filter_test.go b/backend/api/filter_test.go index 6df718594d..ced0befc19 100644 --- a/backend/api/filter_test.go +++ b/backend/api/filter_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/generic.go b/backend/api/generic.go index 625adef719..c82e5eb5e6 100644 --- a/backend/api/generic.go +++ b/backend/api/generic.go @@ -6,12 +6,12 @@ import ( "fmt" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" - "github.com/sensu/sensu-go/types" ) type RBACVerb string @@ -89,7 +89,7 @@ func (g *GenericClient) SetTypeMeta(meta corev2.TypeMeta) error { } g.APIGroup = path.Dir(meta.APIVersion) g.APIVersion = path.Base(meta.APIVersion) - kind, err := types.ResolveRaw(meta.APIVersion, meta.Type) + kind, err := apitools.Resolve(meta.APIVersion, meta.Type) if err != nil { return fmt.Errorf("error (SetTypeMeta): %s", err) } diff --git a/backend/api/generic_test.go b/backend/api/generic_test.go index e9117f4bff..2a6c65d69a 100644 --- a/backend/api/generic_test.go +++ b/backend/api/generic_test.go @@ -7,8 +7,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/api/handler.go b/backend/api/handler.go index 6e0255ec59..1e8df67cc0 100644 --- a/backend/api/handler.go +++ b/backend/api/handler.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/handler_test.go b/backend/api/handler_test.go index 23c76d63ad..34b819e613 100644 --- a/backend/api/handler_test.go +++ b/backend/api/handler_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/hook.go b/backend/api/hook.go index 220bac8b2a..08463c4058 100644 --- a/backend/api/hook.go +++ b/backend/api/hook.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/hook_test.go b/backend/api/hook_test.go index 0710f76632..f7f0fbedb1 100644 --- a/backend/api/hook_test.go +++ b/backend/api/hook_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/meta.go b/backend/api/meta.go index 0eed96669e..5fe3f90534 100644 --- a/backend/api/meta.go +++ b/backend/api/meta.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" ) diff --git a/backend/api/mutator.go b/backend/api/mutator.go index 2be668715d..7d97415016 100644 --- a/backend/api/mutator.go +++ b/backend/api/mutator.go @@ -3,7 +3,7 @@ package api import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/mutator_test.go b/backend/api/mutator_test.go index 35120c5cbc..cdb55b9cc2 100644 --- a/backend/api/mutator_test.go +++ b/backend/api/mutator_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/namespace.go b/backend/api/namespace.go index 35d5d3103e..a71e22d7c9 100644 --- a/backend/api/namespace.go +++ b/backend/api/namespace.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/namespace_test.go b/backend/api/namespace_test.go index 99f136e679..7c46a54344 100644 --- a/backend/api/namespace_test.go +++ b/backend/api/namespace_test.go @@ -15,8 +15,8 @@ import ( "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" ) func TestFetchNamespace(t *testing.T) { diff --git a/backend/api/rbac.go b/backend/api/rbac.go index c1ace986ac..fbfcc79938 100644 --- a/backend/api/rbac.go +++ b/backend/api/rbac.go @@ -6,7 +6,7 @@ import ( "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) type RBACClient struct { diff --git a/backend/api/rbac_test.go b/backend/api/rbac_test.go index 4551265fee..f340cc9bd8 100644 --- a/backend/api/rbac_test.go +++ b/backend/api/rbac_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/silenced.go b/backend/api/silenced.go index 84c3bc25c4..fffafc8f0e 100644 --- a/backend/api/silenced.go +++ b/backend/api/silenced.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/api/silenced_test.go b/backend/api/silenced_test.go index 09aefd8617..0d7e36ad29 100644 --- a/backend/api/silenced_test.go +++ b/backend/api/silenced_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/api/user.go b/backend/api/user.go index fdc2f933e7..989f74c247 100644 --- a/backend/api/user.go +++ b/backend/api/user.go @@ -6,7 +6,7 @@ import ( "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // UserClient is an API client for users. diff --git a/backend/api/user_test.go b/backend/api/user_test.go index a619a54cc8..ac8b0eb57e 100644 --- a/backend/api/user_test.go +++ b/backend/api/user_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/actions/checks.go b/backend/apid/actions/checks.go index 5a8764463b..05b6e60969 100644 --- a/backend/apid/actions/checks.go +++ b/backend/apid/actions/checks.go @@ -5,7 +5,7 @@ import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" utilstrings "github.com/sensu/sensu-go/util/strings" diff --git a/backend/apid/actions/entities.go b/backend/apid/actions/entities.go index c857f6a112..134e5b6c29 100644 --- a/backend/apid/actions/entities.go +++ b/backend/apid/actions/entities.go @@ -4,8 +4,8 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" ) diff --git a/backend/apid/actions/entities_test.go b/backend/apid/actions/entities_test.go index e0de05c53c..4921e32b51 100644 --- a/backend/apid/actions/entities_test.go +++ b/backend/apid/actions/entities_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/v2/storetest" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/apid/actions/events.go b/backend/apid/actions/events.go index 0faaa5ac36..fdc346b08b 100644 --- a/backend/apid/actions/events.go +++ b/backend/apid/actions/events.go @@ -8,7 +8,7 @@ import ( "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const deletedEventSentinel = -1 diff --git a/backend/apid/actions/events_test.go b/backend/apid/actions/events_test.go index 8579f5d657..bd34809f27 100644 --- a/backend/apid/actions/events_test.go +++ b/backend/apid/actions/events_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/actions/health.go b/backend/apid/actions/health.go index bcedbbadf4..bbc3548ace 100644 --- a/backend/apid/actions/health.go +++ b/backend/apid/actions/health.go @@ -3,7 +3,7 @@ package actions import ( "crypto/tls" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/client/v3" "golang.org/x/net/context" diff --git a/backend/apid/actions/silenced.go b/backend/apid/actions/silenced.go index 04808bb982..aa7396dcc7 100644 --- a/backend/apid/actions/silenced.go +++ b/backend/apid/actions/silenced.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/actions/silenced_test.go b/backend/apid/actions/silenced_test.go index 260316ee9d..f2baaa5e87 100644 --- a/backend/apid/actions/silenced_test.go +++ b/backend/apid/actions/silenced_test.go @@ -7,7 +7,7 @@ import ( "testing" jwt "github.com/golang-jwt/jwt/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" coreJWT "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/testing/mockstore" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/actions/tessen.go b/backend/apid/actions/tessen.go index cb462209a9..5320bdcede 100644 --- a/backend/apid/actions/tessen.go +++ b/backend/apid/actions/tessen.go @@ -1,7 +1,7 @@ package actions import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" "golang.org/x/net/context" diff --git a/backend/apid/actions/tessen_test.go b/backend/apid/actions/tessen_test.go index b1575bb8d5..cdd0d1e26d 100644 --- a/backend/apid/actions/tessen_test.go +++ b/backend/apid/actions/tessen_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockbus" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/apid/actions/users.go b/backend/apid/actions/users.go index a4e0113d38..deefa8d453 100644 --- a/backend/apid/actions/users.go +++ b/backend/apid/actions/users.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/bcrypt" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/actions/version.go b/backend/apid/actions/version.go index 8b47188681..46956ba2dd 100644 --- a/backend/apid/actions/version.go +++ b/backend/apid/actions/version.go @@ -1,8 +1,8 @@ package actions import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/types" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/version" etcdVersion "go.etcd.io/etcd/api/v3/version" "golang.org/x/net/context" @@ -28,6 +28,6 @@ func (v VersionController) GetVersion(ctx context.Context) *corev2.Version { Cluster: v.clusterVersion, }, SensuBackend: version.Semver(), - APIGroups: types.APIModuleVersions(), + APIGroups: apitools.APIModuleVersions(), } } diff --git a/backend/apid/graphql/asset.go b/backend/apid/graphql/asset.go index 2f26308fab..31ddeb8344 100644 --- a/backend/apid/graphql/asset.go +++ b/backend/apid/graphql/asset.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/asset_test.go b/backend/apid/graphql/asset_test.go index c0ccbe2154..2cbad42a92 100644 --- a/backend/apid/graphql/asset_test.go +++ b/backend/apid/graphql/asset_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/backendEntity.go b/backend/apid/graphql/backendEntity.go index 4cf466dc86..800371797b 100644 --- a/backend/apid/graphql/backendEntity.go +++ b/backend/apid/graphql/backendEntity.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" ) diff --git a/backend/apid/graphql/check.go b/backend/apid/graphql/check.go index 4d039e6caa..e4558fc1c6 100644 --- a/backend/apid/graphql/check.go +++ b/backend/apid/graphql/check.go @@ -4,7 +4,7 @@ import ( "time" "github.com/graphql-go/graphql" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/graphql/check_filters.go b/backend/apid/graphql/check_filters.go index a897a16626..7c8260f368 100644 --- a/backend/apid/graphql/check_filters.go +++ b/backend/apid/graphql/check_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/util/strings" ) diff --git a/backend/apid/graphql/check_filters_test.go b/backend/apid/graphql/check_filters_test.go index beab59cc3e..96800972eb 100644 --- a/backend/apid/graphql/check_filters_test.go +++ b/backend/apid/graphql/check_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/check_test.go b/backend/apid/graphql/check_test.go index a31d6da833..055af63f91 100644 --- a/backend/apid/graphql/check_test.go +++ b/backend/apid/graphql/check_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" diff --git a/backend/apid/graphql/context.go b/backend/apid/graphql/context.go index 63cacf18b8..ec84de6f26 100644 --- a/backend/apid/graphql/context.go +++ b/backend/apid/graphql/context.go @@ -3,7 +3,7 @@ package graphql import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" ) diff --git a/backend/apid/graphql/corev2.go b/backend/apid/graphql/corev2.go index fee7ecf679..2062425e58 100644 --- a/backend/apid/graphql/corev2.go +++ b/backend/apid/graphql/corev2.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/corev2_test.go b/backend/apid/graphql/corev2_test.go index 18692c0e79..f89d439027 100644 --- a/backend/apid/graphql/corev2_test.go +++ b/backend/apid/graphql/corev2_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/sensu/sensu-go/types" ) diff --git a/backend/apid/graphql/corev3.go b/backend/apid/graphql/corev3.go index a62cef86d4..bca0504d90 100644 --- a/backend/apid/graphql/corev3.go +++ b/backend/apid/graphql/corev3.go @@ -3,8 +3,8 @@ package graphql import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" util_api "github.com/sensu/sensu-go/backend/apid/graphql/util/api" diff --git a/backend/apid/graphql/corev3_test.go b/backend/apid/graphql/corev3_test.go index c7ea9a4452..ce5a29c56e 100644 --- a/backend/apid/graphql/corev3_test.go +++ b/backend/apid/graphql/corev3_test.go @@ -7,8 +7,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" util_api "github.com/sensu/sensu-go/backend/apid/graphql/util/api" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/dataloader.go b/backend/apid/graphql/dataloader.go index 3ee20173f5..9cc087d572 100644 --- a/backend/apid/graphql/dataloader.go +++ b/backend/apid/graphql/dataloader.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/graph-gophers/dataloader" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/graphql/dataloader_test.go b/backend/apid/graphql/dataloader_test.go index 86877a9eff..47a6977d15 100644 --- a/backend/apid/graphql/dataloader_test.go +++ b/backend/apid/graphql/dataloader_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/graph-gophers/dataloader" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/mock" ) diff --git a/backend/apid/graphql/entity.go b/backend/apid/graphql/entity.go index 776795e80e..6f95503ad2 100644 --- a/backend/apid/graphql/entity.go +++ b/backend/apid/graphql/entity.go @@ -5,7 +5,7 @@ import ( "sort" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" diff --git a/backend/apid/graphql/entity_filters.go b/backend/apid/graphql/entity_filters.go index d51eae0bbf..70341aca49 100644 --- a/backend/apid/graphql/entity_filters.go +++ b/backend/apid/graphql/entity_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/util/strings" ) diff --git a/backend/apid/graphql/entity_filters_test.go b/backend/apid/graphql/entity_filters_test.go index 9b123685c6..1be0a24b1b 100644 --- a/backend/apid/graphql/entity_filters_test.go +++ b/backend/apid/graphql/entity_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/entity_test.go b/backend/apid/graphql/entity_test.go index e912107283..ccd577ddf9 100644 --- a/backend/apid/graphql/entity_test.go +++ b/backend/apid/graphql/entity_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" diff --git a/backend/apid/graphql/event.go b/backend/apid/graphql/event.go index 14089566ef..2bb884afd3 100644 --- a/backend/apid/graphql/event.go +++ b/backend/apid/graphql/event.go @@ -3,7 +3,7 @@ package graphql import ( "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/event_filter.go b/backend/apid/graphql/event_filter.go index 1ecab1af5c..7d42f8b465 100644 --- a/backend/apid/graphql/event_filter.go +++ b/backend/apid/graphql/event_filter.go @@ -4,7 +4,7 @@ import ( "errors" gostrings "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/event_filter_filters.go b/backend/apid/graphql/event_filter_filters.go index 98d23feb94..998a62eed5 100644 --- a/backend/apid/graphql/event_filter_filters.go +++ b/backend/apid/graphql/event_filter_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" ) diff --git a/backend/apid/graphql/event_filter_filters_test.go b/backend/apid/graphql/event_filter_filters_test.go index 482c9e3664..224ae0d912 100644 --- a/backend/apid/graphql/event_filter_filters_test.go +++ b/backend/apid/graphql/event_filter_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/event_filter_test.go b/backend/apid/graphql/event_filter_test.go index 7e086bc910..f7de258ac8 100644 --- a/backend/apid/graphql/event_filter_test.go +++ b/backend/apid/graphql/event_filter_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/event_filters.go b/backend/apid/graphql/event_filters.go index 23709290b4..fa4bb0dd7a 100644 --- a/backend/apid/graphql/event_filters.go +++ b/backend/apid/graphql/event_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" ) diff --git a/backend/apid/graphql/event_filters_test.go b/backend/apid/graphql/event_filters_test.go index 725c57ab01..648b93236c 100644 --- a/backend/apid/graphql/event_filters_test.go +++ b/backend/apid/graphql/event_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/event_test.go b/backend/apid/graphql/event_test.go index 2a1bd1bb9e..94c3d7e72f 100644 --- a/backend/apid/graphql/event_test.go +++ b/backend/apid/graphql/event_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/filter.go b/backend/apid/graphql/filter.go index 19af2abcb8..1e895f0e38 100644 --- a/backend/apid/graphql/filter.go +++ b/backend/apid/graphql/filter.go @@ -1,6 +1,6 @@ package graphql -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" // TODO: It would be more ideal to generate the functions in this package diff --git a/backend/apid/graphql/filter/boolean.go b/backend/apid/graphql/filter/boolean.go index f8131628e6..ebf062aa2c 100644 --- a/backend/apid/graphql/filter/boolean.go +++ b/backend/apid/graphql/filter/boolean.go @@ -4,7 +4,7 @@ import ( "strconv" "strings" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" ) type BooleanMatcher func(v2.Resource, bool) bool diff --git a/backend/apid/graphql/filter/boolean_test.go b/backend/apid/graphql/filter/boolean_test.go index 787b50dea8..3110e2da5a 100644 --- a/backend/apid/graphql/filter/boolean_test.go +++ b/backend/apid/graphql/filter/boolean_test.go @@ -3,7 +3,7 @@ package filter import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/backend/apid/graphql/filter/filter.go b/backend/apid/graphql/filter/filter.go index f7303a14c4..92e44dcd90 100644 --- a/backend/apid/graphql/filter/filter.go +++ b/backend/apid/graphql/filter/filter.go @@ -4,7 +4,7 @@ import ( "errors" "strings" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" ) var ( diff --git a/backend/apid/graphql/filter/filter_test.go b/backend/apid/graphql/filter/filter_test.go index a61112a47c..4497f64608 100644 --- a/backend/apid/graphql/filter/filter_test.go +++ b/backend/apid/graphql/filter/filter_test.go @@ -3,7 +3,7 @@ package filter import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/backend/apid/graphql/filter/string.go b/backend/apid/graphql/filter/string.go index aa5f873606..57a2f2a3b9 100644 --- a/backend/apid/graphql/filter/string.go +++ b/backend/apid/graphql/filter/string.go @@ -1,7 +1,7 @@ package filter import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" ) type StringMatcher func(v2.Resource, string) bool diff --git a/backend/apid/graphql/filter/string_test.go b/backend/apid/graphql/filter/string_test.go index d973fcad6c..d66df6a422 100644 --- a/backend/apid/graphql/filter/string_test.go +++ b/backend/apid/graphql/filter/string_test.go @@ -3,7 +3,7 @@ package filter import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/backend/apid/graphql/globalid/encoder.go b/backend/apid/graphql/globalid/encoder.go index 42e3814092..57ae3762a8 100644 --- a/backend/apid/graphql/globalid/encoder.go +++ b/backend/apid/graphql/globalid/encoder.go @@ -3,7 +3,7 @@ package globalid import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) type EncodeFn func(context.Context, interface{}) *StandardComponents diff --git a/backend/apid/graphql/globalid/encoder_test.go b/backend/apid/graphql/globalid/encoder_test.go index e86af70adf..352f617e26 100644 --- a/backend/apid/graphql/globalid/encoder_test.go +++ b/backend/apid/graphql/globalid/encoder_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/fixture" ) diff --git a/backend/apid/graphql/globalid/pipeline.go b/backend/apid/graphql/globalid/pipeline.go index c7b94e9d00..3d0d7f2439 100644 --- a/backend/apid/graphql/globalid/pipeline.go +++ b/backend/apid/graphql/globalid/pipeline.go @@ -1,6 +1,6 @@ package globalid -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" var pipelineName = "corev2/pipeline" diff --git a/backend/apid/graphql/globalid/util_test.go b/backend/apid/graphql/globalid/util_test.go index a8c7abffea..52dc980249 100644 --- a/backend/apid/graphql/globalid/util_test.go +++ b/backend/apid/graphql/globalid/util_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" ) diff --git a/backend/apid/graphql/handler.go b/backend/apid/graphql/handler.go index ce09261d0b..ce1322c5d3 100644 --- a/backend/apid/graphql/handler.go +++ b/backend/apid/graphql/handler.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/handler_filters.go b/backend/apid/graphql/handler_filters.go index 384c0fd949..f5701f7032 100644 --- a/backend/apid/graphql/handler_filters.go +++ b/backend/apid/graphql/handler_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" ) diff --git a/backend/apid/graphql/handler_filters_test.go b/backend/apid/graphql/handler_filters_test.go index d570f52178..3cc4906be3 100644 --- a/backend/apid/graphql/handler_filters_test.go +++ b/backend/apid/graphql/handler_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/handler_test.go b/backend/apid/graphql/handler_test.go index b94642bac3..6e00622c97 100644 --- a/backend/apid/graphql/handler_test.go +++ b/backend/apid/graphql/handler_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/health.go b/backend/apid/graphql/health.go index 294f0d0242..ac76184160 100644 --- a/backend/apid/graphql/health.go +++ b/backend/apid/graphql/health.go @@ -5,7 +5,7 @@ import ( "strconv" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "go.etcd.io/etcd/api/v3/etcdserverpb" diff --git a/backend/apid/graphql/health_test.go b/backend/apid/graphql/health_test.go index a2a1a1f393..96e9fbacd1 100644 --- a/backend/apid/graphql/health_test.go +++ b/backend/apid/graphql/health_test.go @@ -6,7 +6,7 @@ import ( "strconv" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/hook.go b/backend/apid/graphql/hook.go index 654f208fa5..98d8d0326d 100644 --- a/backend/apid/graphql/hook.go +++ b/backend/apid/graphql/hook.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/hook_test.go b/backend/apid/graphql/hook_test.go index 31d03f69a8..c192636e6e 100644 --- a/backend/apid/graphql/hook_test.go +++ b/backend/apid/graphql/hook_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/interfaces.go b/backend/apid/graphql/interfaces.go index 10982da0e0..e6652b0eaa 100644 --- a/backend/apid/graphql/interfaces.go +++ b/backend/apid/graphql/interfaces.go @@ -4,7 +4,7 @@ import ( "context" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/api" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/graphql/meta.go b/backend/apid/graphql/meta.go index f8583f0441..624d166756 100644 --- a/backend/apid/graphql/meta.go +++ b/backend/apid/graphql/meta.go @@ -3,7 +3,7 @@ package graphql import ( "sort" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" ) diff --git a/backend/apid/graphql/meta_test.go b/backend/apid/graphql/meta_test.go index 3235e70546..f2669e26e8 100644 --- a/backend/apid/graphql/meta_test.go +++ b/backend/apid/graphql/meta_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/mock_test.go b/backend/apid/graphql/mock_test.go index 357a8c7b6b..69323241db 100644 --- a/backend/apid/graphql/mock_test.go +++ b/backend/apid/graphql/mock_test.go @@ -4,7 +4,7 @@ import ( "context" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/api" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/mutations.go b/backend/apid/graphql/mutations.go index 21f7716e61..2a878c743c 100644 --- a/backend/apid/graphql/mutations.go +++ b/backend/apid/graphql/mutations.go @@ -7,7 +7,7 @@ import ( "time" "github.com/mitchellh/mapstructure" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/graphql/mutations_test.go b/backend/apid/graphql/mutations_test.go index d038b9b6a1..116dc1b9aa 100644 --- a/backend/apid/graphql/mutations_test.go +++ b/backend/apid/graphql/mutations_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/mutator.go b/backend/apid/graphql/mutator.go index 519e81979c..5c6280eb28 100644 --- a/backend/apid/graphql/mutator.go +++ b/backend/apid/graphql/mutator.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/mutator_test.go b/backend/apid/graphql/mutator_test.go index 78105ecca4..45f08f9c55 100644 --- a/backend/apid/graphql/mutator_test.go +++ b/backend/apid/graphql/mutator_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/namespace.go b/backend/apid/graphql/namespace.go index 665259a5a8..2b914cbab9 100644 --- a/backend/apid/graphql/namespace.go +++ b/backend/apid/graphql/namespace.go @@ -3,7 +3,7 @@ package graphql import ( "sort" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" diff --git a/backend/apid/graphql/namespace_test.go b/backend/apid/graphql/namespace_test.go index 99aa0c8f5a..7bb9424da1 100644 --- a/backend/apid/graphql/namespace_test.go +++ b/backend/apid/graphql/namespace_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/node.go b/backend/apid/graphql/node.go index a35973e324..3416cba4bb 100644 --- a/backend/apid/graphql/node.go +++ b/backend/apid/graphql/node.go @@ -3,7 +3,7 @@ package graphql import ( "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/backend/apid/graphql/schema" diff --git a/backend/apid/graphql/node_test.go b/backend/apid/graphql/node_test.go index 71b28c0839..f8ca17265f 100644 --- a/backend/apid/graphql/node_test.go +++ b/backend/apid/graphql/node_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/query.go b/backend/apid/graphql/query.go index 72a200b7a7..08f821db26 100644 --- a/backend/apid/graphql/query.go +++ b/backend/apid/graphql/query.go @@ -9,7 +9,8 @@ import ( "time" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/backend/apid/graphql/schema" @@ -115,7 +116,7 @@ func (r *queryImpl) Suggest(p schema.QuerySuggestFieldResolverParams) (interface return results, fmt.Errorf("could not find field for '%s'", ref.FieldPath) } - t, err := types.ResolveType(res.Group, res.Name) + t, err := apitools.Resolve(res.Group, res.Name) if err != nil { return results, err } diff --git a/backend/apid/graphql/query_test.go b/backend/apid/graphql/query_test.go index 9e0797bc8e..d6614346d5 100644 --- a/backend/apid/graphql/query_test.go +++ b/backend/apid/graphql/query_test.go @@ -7,8 +7,8 @@ import ( "testing" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" diff --git a/backend/apid/graphql/relay/resolver.go b/backend/apid/graphql/relay/resolver.go index fc9b037172..9c245b9aad 100644 --- a/backend/apid/graphql/relay/resolver.go +++ b/backend/apid/graphql/relay/resolver.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/graphql" ) diff --git a/backend/apid/graphql/relay/resolver_test.go b/backend/apid/graphql/relay/resolver_test.go index e321a8fff9..3fd3b8924f 100644 --- a/backend/apid/graphql/relay/resolver_test.go +++ b/backend/apid/graphql/relay/resolver_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/service.go b/backend/apid/graphql/service.go index 5aec88aa86..2d4794d14f 100644 --- a/backend/apid/graphql/service.go +++ b/backend/apid/graphql/service.go @@ -3,7 +3,7 @@ package graphql import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/cli/client" diff --git a/backend/apid/graphql/silence_filters.go b/backend/apid/graphql/silence_filters.go index 61303a8e53..02a516a6a3 100644 --- a/backend/apid/graphql/silence_filters.go +++ b/backend/apid/graphql/silence_filters.go @@ -1,7 +1,7 @@ package graphql import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" ) diff --git a/backend/apid/graphql/silence_filters_test.go b/backend/apid/graphql/silence_filters_test.go index 26fd2b3e98..ebbb349356 100644 --- a/backend/apid/graphql/silence_filters_test.go +++ b/backend/apid/graphql/silence_filters_test.go @@ -3,7 +3,7 @@ package graphql import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/filter" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/apid/graphql/silenced.go b/backend/apid/graphql/silenced.go index 7591149f4c..cfb1d64cb0 100644 --- a/backend/apid/graphql/silenced.go +++ b/backend/apid/graphql/silenced.go @@ -3,7 +3,7 @@ package graphql import ( "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/silenced_test.go b/backend/apid/graphql/silenced_test.go index 4ff7fd30f6..7d9322b62a 100644 --- a/backend/apid/graphql/silenced_test.go +++ b/backend/apid/graphql/silenced_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/graphql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/suggest.go b/backend/apid/graphql/suggest.go index bd61905628..4875f481d7 100644 --- a/backend/apid/graphql/suggest.go +++ b/backend/apid/graphql/suggest.go @@ -3,7 +3,7 @@ package graphql import ( "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/suggest" ) diff --git a/backend/apid/graphql/suggest/field.go b/backend/apid/graphql/suggest/field.go index 973aba0e5d..cac4566f83 100644 --- a/backend/apid/graphql/suggest/field.go +++ b/backend/apid/graphql/suggest/field.go @@ -1,7 +1,7 @@ package suggest import ( - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" ) var ( diff --git a/backend/apid/graphql/suggest/field_test.go b/backend/apid/graphql/suggest/field_test.go index 3ec2d3fdf4..3b06842da4 100644 --- a/backend/apid/graphql/suggest/field_test.go +++ b/backend/apid/graphql/suggest/field_test.go @@ -4,7 +4,7 @@ import ( "sort" "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" ) diff --git a/backend/apid/graphql/suggest/resource.go b/backend/apid/graphql/suggest/resource.go index 0d50f905c7..319dc19b75 100644 --- a/backend/apid/graphql/suggest/resource.go +++ b/backend/apid/graphql/suggest/resource.go @@ -1,6 +1,6 @@ package suggest -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" // Resource represents a Sensu resource type Resource struct { diff --git a/backend/apid/graphql/user.go b/backend/apid/graphql/user.go index 1b5d741cab..dfd6151f2b 100644 --- a/backend/apid/graphql/user.go +++ b/backend/apid/graphql/user.go @@ -1,7 +1,7 @@ package graphql import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/schema" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/graphql/util.go b/backend/apid/graphql/util.go index 2f499631c0..61971b2a25 100644 --- a/backend/apid/graphql/util.go +++ b/backend/apid/graphql/util.go @@ -4,7 +4,7 @@ import ( "sort" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/schema" ) diff --git a/backend/apid/graphql/util/api/api.go b/backend/apid/graphql/util/api/api.go index 40a505d883..04652ef592 100644 --- a/backend/apid/graphql/util/api/api.go +++ b/backend/apid/graphql/util/api/api.go @@ -3,8 +3,8 @@ package util_api import ( "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/graphql/util/api/api_test.go b/backend/apid/graphql/util/api/api_test.go index c8855f2dd5..137e8f8e65 100644 --- a/backend/apid/graphql/util/api/api_test.go +++ b/backend/apid/graphql/util/api/api_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/graphql/util/relay/node.go b/backend/apid/graphql/util/relay/node.go index eccdf77b3d..9e9ed94360 100644 --- a/backend/apid/graphql/util/relay/node.go +++ b/backend/apid/graphql/util/relay/node.go @@ -3,11 +3,11 @@ package util_relay import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/relay" util_api "github.com/sensu/sensu-go/backend/apid/graphql/util/api" - "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" ) @@ -23,7 +23,7 @@ func MakeNodeResolver(client Fetcher, tm corev2.TypeMeta) func(relay.NodeResolve if err := client.SetTypeMeta(tm); err != nil { return nil, err } - raw, err := types.ResolveRaw(tm.APIVersion, tm.Type) + raw, err := apitools.Resolve(tm.APIVersion, tm.Type) if err != nil { return nil, err } diff --git a/backend/apid/graphql/util/relay/node_test.go b/backend/apid/graphql/util/relay/node_test.go index c5f1d64741..9a9899d883 100644 --- a/backend/apid/graphql/util/relay/node_test.go +++ b/backend/apid/graphql/util/relay/node_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/graphql/globalid" "github.com/sensu/sensu-go/backend/apid/graphql/relay" "github.com/stretchr/testify/mock" diff --git a/backend/apid/graphql/viewer_test.go b/backend/apid/graphql/viewer_test.go index 586c1b4440..b367c23e7d 100644 --- a/backend/apid/graphql/viewer_test.go +++ b/backend/apid/graphql/viewer_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/handlers/create.go b/backend/apid/handlers/create.go index 44fc8080b7..4ccdea6b28 100644 --- a/backend/apid/handlers/create.go +++ b/backend/apid/handlers/create.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/create_test.go b/backend/apid/handlers/create_test.go index f382aafe4d..d2a4b6c035 100644 --- a/backend/apid/handlers/create_test.go +++ b/backend/apid/handlers/create_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/handlers/create_v3.go b/backend/apid/handlers/create_v3.go index c8dbacaffe..c86500f55b 100644 --- a/backend/apid/handlers/create_v3.go +++ b/backend/apid/handlers/create_v3.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/create_v3_test.go b/backend/apid/handlers/create_v3_test.go index 3f7a184e6c..b08d816702 100644 --- a/backend/apid/handlers/create_v3_test.go +++ b/backend/apid/handlers/create_v3_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/handlers/get.go b/backend/apid/handlers/get.go index 885d781c96..f3d2d71767 100644 --- a/backend/apid/handlers/get.go +++ b/backend/apid/handlers/get.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/handlers/get_v3.go b/backend/apid/handlers/get_v3.go index 2b736e4979..8d809b6fc6 100644 --- a/backend/apid/handlers/get_v3.go +++ b/backend/apid/handlers/get_v3.go @@ -6,7 +6,7 @@ import ( "github.com/gorilla/mux" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/apid/handlers/get_v3_test.go b/backend/apid/handlers/get_v3_test.go index fdbb802c29..2e2c47f179 100644 --- a/backend/apid/handlers/get_v3_test.go +++ b/backend/apid/handlers/get_v3_test.go @@ -8,7 +8,7 @@ import ( "github.com/gorilla/mux" "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/handlers/handlers.go b/backend/apid/handlers/handlers.go index 911b60ebf0..dfbbd40eee 100644 --- a/backend/apid/handlers/handlers.go +++ b/backend/apid/handlers/handlers.go @@ -5,8 +5,8 @@ import ( "fmt" "net/url" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" ) diff --git a/backend/apid/handlers/handlers_test.go b/backend/apid/handlers/handlers_test.go index 13da395c73..58e91a09df 100644 --- a/backend/apid/handlers/handlers_test.go +++ b/backend/apid/handlers/handlers_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/fixture" ) diff --git a/backend/apid/handlers/list.go b/backend/apid/handlers/list.go index 65d233bbba..7da450a54f 100644 --- a/backend/apid/handlers/list.go +++ b/backend/apid/handlers/list.go @@ -4,7 +4,7 @@ import ( "context" "reflect" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/handlers/list_test.go b/backend/apid/handlers/list_test.go index 8dc4177e68..892693b1fc 100644 --- a/backend/apid/handlers/list_test.go +++ b/backend/apid/handlers/list_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/apid/handlers/list_v3.go b/backend/apid/handlers/list_v3.go index 8537bfb205..eb8866f9e9 100644 --- a/backend/apid/handlers/list_v3.go +++ b/backend/apid/handlers/list_v3.go @@ -3,8 +3,8 @@ package handlers import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" ) diff --git a/backend/apid/handlers/list_v3_test.go b/backend/apid/handlers/list_v3_test.go index 32d3a26365..7675958611 100644 --- a/backend/apid/handlers/list_v3_test.go +++ b/backend/apid/handlers/list_v3_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/wrap" diff --git a/backend/apid/handlers/patch.go b/backend/apid/handlers/patch.go index f0be61789d..bf336c2cca 100644 --- a/backend/apid/handlers/patch.go +++ b/backend/apid/handlers/patch.go @@ -12,8 +12,8 @@ import ( "strings" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/patch" diff --git a/backend/apid/handlers/patch_integration_test.go b/backend/apid/handlers/patch_integration_test.go index df713348b1..8e2ac5ef19 100644 --- a/backend/apid/handlers/patch_integration_test.go +++ b/backend/apid/handlers/patch_integration_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/seeds" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/update.go b/backend/apid/handlers/update.go index 64dc733a6c..b435e963e7 100644 --- a/backend/apid/handlers/update.go +++ b/backend/apid/handlers/update.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/update_test.go b/backend/apid/handlers/update_test.go index 1f37c49bd4..7f2fb69227 100644 --- a/backend/apid/handlers/update_test.go +++ b/backend/apid/handlers/update_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/handlers/update_v3.go b/backend/apid/handlers/update_v3.go index c688583293..f2eb47f0a7 100644 --- a/backend/apid/handlers/update_v3.go +++ b/backend/apid/handlers/update_v3.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/gorilla/mux" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/handlers/update_v3_test.go b/backend/apid/handlers/update_v3_test.go index 08e19c83b6..5475b65527 100644 --- a/backend/apid/handlers/update_v3_test.go +++ b/backend/apid/handlers/update_v3_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" diff --git a/backend/apid/middlewares/authentication.go b/backend/apid/middlewares/authentication.go index 7e73e743f2..0e1e09fa56 100644 --- a/backend/apid/middlewares/authentication.go +++ b/backend/apid/middlewares/authentication.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/middlewares/authentication_test.go b/backend/apid/middlewares/authentication_test.go index cb7e909a80..faf159d09f 100644 --- a/backend/apid/middlewares/authentication_test.go +++ b/backend/apid/middlewares/authentication_test.go @@ -7,7 +7,7 @@ import ( "net/http/httptest" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/assert" diff --git a/backend/apid/middlewares/authorization.go b/backend/apid/middlewares/authorization.go index 83aaa99e2f..4d1bf60f63 100644 --- a/backend/apid/middlewares/authorization.go +++ b/backend/apid/middlewares/authorization.go @@ -3,7 +3,7 @@ package middlewares import ( "net/http" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/authorization/rbac" diff --git a/backend/apid/middlewares/authorization_test.go b/backend/apid/middlewares/authorization_test.go index 2914be3340..d57584f5d7 100644 --- a/backend/apid/middlewares/authorization_test.go +++ b/backend/apid/middlewares/authorization_test.go @@ -11,7 +11,7 @@ import ( "github.com/sirupsen/logrus" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" sensuJWT "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/seeds" diff --git a/backend/apid/middlewares/pagination.go b/backend/apid/middlewares/pagination.go index 2707b8bf77..cbb6544abd 100644 --- a/backend/apid/middlewares/pagination.go +++ b/backend/apid/middlewares/pagination.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // Pagination retrieves the "limit" and "continue" query parameters and add them diff --git a/backend/apid/middlewares/pagination_test.go b/backend/apid/middlewares/pagination_test.go index 3a74243f28..bac6e651b7 100644 --- a/backend/apid/middlewares/pagination_test.go +++ b/backend/apid/middlewares/pagination_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestPaginationMiddleware(t *testing.T) { diff --git a/backend/apid/middlewares/refresh_token_test.go b/backend/apid/middlewares/refresh_token_test.go index 1ba4bb9e99..340429eb38 100644 --- a/backend/apid/middlewares/refresh_token_test.go +++ b/backend/apid/middlewares/refresh_token_test.go @@ -9,7 +9,7 @@ import ( "net/http/httptest" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" diff --git a/backend/apid/routers/apikeys.go b/backend/apid/routers/apikeys.go index 00eabac7d1..c24a90411c 100644 --- a/backend/apid/routers/apikeys.go +++ b/backend/apid/routers/apikeys.go @@ -11,7 +11,7 @@ import ( "github.com/google/uuid" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/apikeys_test.go b/backend/apid/routers/apikeys_test.go index 707894c7f4..e448c96faa 100644 --- a/backend/apid/routers/apikeys_test.go +++ b/backend/apid/routers/apikeys_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/assets.go b/backend/apid/routers/assets.go index 05a3d2a32d..abccf0bc20 100644 --- a/backend/apid/routers/assets.go +++ b/backend/apid/routers/assets.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/assets_test.go b/backend/apid/routers/assets_test.go index ce11aa369f..3df79abbe2 100644 --- a/backend/apid/routers/assets_test.go +++ b/backend/apid/routers/assets_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/authentication.go b/backend/apid/routers/authentication.go index d72337e315..4d75c1bc71 100644 --- a/backend/apid/routers/authentication.go +++ b/backend/apid/routers/authentication.go @@ -12,7 +12,7 @@ import ( "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/store" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AuthenticationRouter handles authentication related requests diff --git a/backend/apid/routers/authentication_test.go b/backend/apid/routers/authentication_test.go index 3e698aefcd..86619b7f0e 100644 --- a/backend/apid/routers/authentication_test.go +++ b/backend/apid/routers/authentication_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication" "github.com/sensu/sensu-go/backend/authentication/providers/basic" realStore "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/routers/checks.go b/backend/apid/routers/checks.go index 471dea88ea..b72d8a564d 100644 --- a/backend/apid/routers/checks.go +++ b/backend/apid/routers/checks.go @@ -9,7 +9,7 @@ import ( "time" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/routers/checks_test.go b/backend/apid/routers/checks_test.go index 98dab62de9..120d7a3e05 100644 --- a/backend/apid/routers/checks_test.go +++ b/backend/apid/routers/checks_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/testing/mockqueue" diff --git a/backend/apid/routers/clusterrolebindings.go b/backend/apid/routers/clusterrolebindings.go index 347877f34e..46ad129b80 100644 --- a/backend/apid/routers/clusterrolebindings.go +++ b/backend/apid/routers/clusterrolebindings.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/clusterrolebindings_test.go b/backend/apid/routers/clusterrolebindings_test.go index 9b5ffd9b0f..56085e29ec 100644 --- a/backend/apid/routers/clusterrolebindings_test.go +++ b/backend/apid/routers/clusterrolebindings_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/clusterroles.go b/backend/apid/routers/clusterroles.go index 0c5e21b67c..783fc23b36 100644 --- a/backend/apid/routers/clusterroles.go +++ b/backend/apid/routers/clusterroles.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/clusterroles_test.go b/backend/apid/routers/clusterroles_test.go index 555e48c990..4c6cfc10a9 100644 --- a/backend/apid/routers/clusterroles_test.go +++ b/backend/apid/routers/clusterroles_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/entities.go b/backend/apid/routers/entities.go index 2104632742..1abc1f861f 100644 --- a/backend/apid/routers/entities.go +++ b/backend/apid/routers/entities.go @@ -7,8 +7,8 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/routers/entities_test.go b/backend/apid/routers/entities_test.go index 89e4ef892b..17fd25fa92 100644 --- a/backend/apid/routers/entities_test.go +++ b/backend/apid/routers/entities_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/v2/storetest" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/apid/routers/events.go b/backend/apid/routers/events.go index c23ab102d7..dcd2af8ad4 100644 --- a/backend/apid/routers/events.go +++ b/backend/apid/routers/events.go @@ -7,7 +7,7 @@ import ( "path" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/apid/routers/events_test.go b/backend/apid/routers/events_test.go index 6ac2f4570e..f9e708fd6c 100644 --- a/backend/apid/routers/events_test.go +++ b/backend/apid/routers/events_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/filters.go b/backend/apid/routers/filters.go index cb0a78650a..cd771ab51f 100644 --- a/backend/apid/routers/filters.go +++ b/backend/apid/routers/filters.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/filters_test.go b/backend/apid/routers/filters_test.go index 9938518be0..b682676f7a 100644 --- a/backend/apid/routers/filters_test.go +++ b/backend/apid/routers/filters_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/graphql.go b/backend/apid/routers/graphql.go index f52c4fcc4f..836dd0f8f5 100644 --- a/backend/apid/routers/graphql.go +++ b/backend/apid/routers/graphql.go @@ -8,7 +8,7 @@ import ( "time" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/graphql" diff --git a/backend/apid/routers/handlers.go b/backend/apid/routers/handlers.go index 67af705eec..f59f68e204 100644 --- a/backend/apid/routers/handlers.go +++ b/backend/apid/routers/handlers.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/handlers_test.go b/backend/apid/routers/handlers_test.go index 27c52a46d9..cf873d1d61 100644 --- a/backend/apid/routers/handlers_test.go +++ b/backend/apid/routers/handlers_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/health.go b/backend/apid/routers/health.go index c07644d2a7..ca789ec12f 100644 --- a/backend/apid/routers/health.go +++ b/backend/apid/routers/health.go @@ -8,7 +8,7 @@ import ( "time" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/helpers_test.go b/backend/apid/routers/helpers_test.go index 5727d65141..d31710cb67 100644 --- a/backend/apid/routers/helpers_test.go +++ b/backend/apid/routers/helpers_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/hooks.go b/backend/apid/routers/hooks.go index 91a691c583..8f964f8e81 100644 --- a/backend/apid/routers/hooks.go +++ b/backend/apid/routers/hooks.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/hooks_test.go b/backend/apid/routers/hooks_test.go index f26366d229..6718334b16 100644 --- a/backend/apid/routers/hooks_test.go +++ b/backend/apid/routers/hooks_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/lister.go b/backend/apid/routers/lister.go index 0764c2feed..a8bced6c3a 100644 --- a/backend/apid/routers/lister.go +++ b/backend/apid/routers/lister.go @@ -7,7 +7,7 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/lister_test.go b/backend/apid/routers/lister_test.go index b749f05546..e21798ce03 100644 --- a/backend/apid/routers/lister_test.go +++ b/backend/apid/routers/lister_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/middlewares" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/assert" diff --git a/backend/apid/routers/mutators.go b/backend/apid/routers/mutators.go index f0b262fc1a..f0ee73d0c0 100644 --- a/backend/apid/routers/mutators.go +++ b/backend/apid/routers/mutators.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/mutators_test.go b/backend/apid/routers/mutators_test.go index 2540af2733..939c4430b1 100644 --- a/backend/apid/routers/mutators_test.go +++ b/backend/apid/routers/mutators_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/namespaces.go b/backend/apid/routers/namespaces.go index bfdc654c20..c43c929544 100644 --- a/backend/apid/routers/namespaces.go +++ b/backend/apid/routers/namespaces.go @@ -7,7 +7,7 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/api" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" diff --git a/backend/apid/routers/namespaces_test.go b/backend/apid/routers/namespaces_test.go index 440bc32842..9fbb9b0209 100644 --- a/backend/apid/routers/namespaces_test.go +++ b/backend/apid/routers/namespaces_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization/rbac" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/v2/wrap" diff --git a/backend/apid/routers/pipelines.go b/backend/apid/routers/pipelines.go index f50a4b4b16..663efbc0c8 100644 --- a/backend/apid/routers/pipelines.go +++ b/backend/apid/routers/pipelines.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/pipelines_test.go b/backend/apid/routers/pipelines_test.go index 3ca3a2fc89..ec85ce2476 100644 --- a/backend/apid/routers/pipelines_test.go +++ b/backend/apid/routers/pipelines_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/rolebindings.go b/backend/apid/routers/rolebindings.go index 0afe10773c..c5f8ed7a00 100644 --- a/backend/apid/routers/rolebindings.go +++ b/backend/apid/routers/rolebindings.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/rolebindings_test.go b/backend/apid/routers/rolebindings_test.go index 782d0d8f70..022d77092d 100644 --- a/backend/apid/routers/rolebindings_test.go +++ b/backend/apid/routers/rolebindings_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/roles.go b/backend/apid/routers/roles.go index 2ff68537d4..85c110561b 100644 --- a/backend/apid/routers/roles.go +++ b/backend/apid/routers/roles.go @@ -2,7 +2,7 @@ package routers import ( "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/roles_test.go b/backend/apid/routers/roles_test.go index a39719c76c..65cdaa2556 100644 --- a/backend/apid/routers/roles_test.go +++ b/backend/apid/routers/roles_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" ) diff --git a/backend/apid/routers/routers.go b/backend/apid/routers/routers.go index a61b700853..abac563d3b 100644 --- a/backend/apid/routers/routers.go +++ b/backend/apid/routers/routers.go @@ -7,8 +7,8 @@ import ( "path" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/apid/routers/routers_test.go b/backend/apid/routers/routers_test.go index 15c0173160..6cdf747aa1 100644 --- a/backend/apid/routers/routers_test.go +++ b/backend/apid/routers/routers_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/types" ) diff --git a/backend/apid/routers/silenced.go b/backend/apid/routers/silenced.go index 0eeb59458c..f11d3824c2 100644 --- a/backend/apid/routers/silenced.go +++ b/backend/apid/routers/silenced.go @@ -6,7 +6,7 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/apid/handlers" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/apid/routers/silenced_test.go b/backend/apid/routers/silenced_test.go index d4b5b4e906..eda85cdfc5 100644 --- a/backend/apid/routers/silenced_test.go +++ b/backend/apid/routers/silenced_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/testing/mockstore" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/tessen.go b/backend/apid/routers/tessen.go index 1bfe4cfa31..3b14b0aba5 100644 --- a/backend/apid/routers/tessen.go +++ b/backend/apid/routers/tessen.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // TessenController represents the controller needs of the TessenRouter. diff --git a/backend/apid/routers/tessen_test.go b/backend/apid/routers/tessen_test.go index 334ec24ae0..e4c47ea8b2 100644 --- a/backend/apid/routers/tessen_test.go +++ b/backend/apid/routers/tessen_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/backend/apid/routers/users.go b/backend/apid/routers/users.go index 1df343730f..2b81d4e913 100644 --- a/backend/apid/routers/users.go +++ b/backend/apid/routers/users.go @@ -7,7 +7,7 @@ import ( "net/url" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/apid/routers/users_test.go b/backend/apid/routers/users_test.go index dfd1a2894e..7d8b0cfe59 100644 --- a/backend/apid/routers/users_test.go +++ b/backend/apid/routers/users_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/mock" diff --git a/backend/apid/routers/version.go b/backend/apid/routers/version.go index 24fa535c7a..9268410e0e 100644 --- a/backend/apid/routers/version.go +++ b/backend/apid/routers/version.go @@ -6,7 +6,7 @@ import ( "net/http" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // VersionController represents the controller needs of the VersionRouter diff --git a/backend/apid/routers/version_test.go b/backend/apid/routers/version_test.go index 1fe5418bfc..24c8d9248f 100644 --- a/backend/apid/routers/version_test.go +++ b/backend/apid/routers/version_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/gorilla/mux" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/backend/authentication/authenticator.go b/backend/authentication/authenticator.go index 218f1048a4..889b3c4e5e 100644 --- a/backend/authentication/authenticator.go +++ b/backend/authentication/authenticator.go @@ -8,7 +8,7 @@ import ( "github.com/sirupsen/logrus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // Authenticator contains the list of authentication providers diff --git a/backend/authentication/jwt/jwt.go b/backend/authentication/jwt/jwt.go index e431b0f3eb..397fd58257 100644 --- a/backend/authentication/jwt/jwt.go +++ b/backend/authentication/jwt/jwt.go @@ -12,7 +12,7 @@ import ( time "github.com/echlebek/timeproxy" jwt "github.com/golang-jwt/jwt/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" utilbytes "github.com/sensu/sensu-go/util/bytes" diff --git a/backend/authentication/jwt/jwt_test.go b/backend/authentication/jwt/jwt_test.go index 9a347da0d3..7ffaba5878 100644 --- a/backend/authentication/jwt/jwt_test.go +++ b/backend/authentication/jwt/jwt_test.go @@ -8,7 +8,7 @@ import ( "github.com/echlebek/crock" time "github.com/echlebek/timeproxy" jwt "github.com/golang-jwt/jwt/v4" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/mockstore" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" diff --git a/backend/authentication/providers/basic/basic.go b/backend/authentication/providers/basic/basic.go index f9081d1ae7..acc29f45a3 100644 --- a/backend/authentication/providers/basic/basic.go +++ b/backend/authentication/providers/basic/basic.go @@ -5,7 +5,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/authorization/rbac/rbac.go b/backend/authorization/rbac/rbac.go index 4f11832e2d..1e19922137 100644 --- a/backend/authorization/rbac/rbac.go +++ b/backend/authorization/rbac/rbac.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" "github.com/sirupsen/logrus" diff --git a/backend/authorization/rbac/rbac_test.go b/backend/authorization/rbac/rbac_test.go index 006ad01b2c..9da8be14c7 100644 --- a/backend/authorization/rbac/rbac_test.go +++ b/backend/authorization/rbac/rbac_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authorization" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockstore" diff --git a/backend/backend.go b/backend/backend.go index 2450ee7b3d..e1ec22f4cf 100644 --- a/backend/backend.go +++ b/backend/backend.go @@ -20,7 +20,7 @@ import ( "golang.org/x/time/rate" "google.golang.org/grpc" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/agentd" "github.com/sensu/sensu-go/backend/api" diff --git a/backend/cmd/init.go b/backend/cmd/init.go index 666d4c7d47..d082423155 100644 --- a/backend/cmd/init.go +++ b/backend/cmd/init.go @@ -8,7 +8,7 @@ import ( "time" "github.com/AlecAivazis/survey/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/seeds" diff --git a/backend/cmd/start.go b/backend/cmd/start.go index 9d319beb69..d1ae71a48e 100644 --- a/backend/cmd/start.go +++ b/backend/cmd/start.go @@ -16,7 +16,7 @@ import ( "github.com/sensu/sensu-go/backend/apid/middlewares" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend" "github.com/sensu/sensu-go/backend/etcd" diff --git a/backend/cmd/upgrade.go b/backend/cmd/upgrade.go index 2a929fbaa3..861d540919 100644 --- a/backend/cmd/upgrade.go +++ b/backend/cmd/upgrade.go @@ -8,7 +8,7 @@ import ( "time" "github.com/AlecAivazis/survey/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend" "github.com/sensu/sensu-go/backend/etcd" etcdstore "github.com/sensu/sensu-go/backend/store/etcd" diff --git a/backend/config.go b/backend/config.go index 03b7d4516a..25d1bf153c 100644 --- a/backend/config.go +++ b/backend/config.go @@ -3,7 +3,7 @@ package backend import ( "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/licensing" "golang.org/x/time/rate" diff --git a/backend/eventd/entity.go b/backend/eventd/entity.go index 98cc48c671..969924fa87 100644 --- a/backend/eventd/entity.go +++ b/backend/eventd/entity.go @@ -4,8 +4,8 @@ import ( "context" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" metricspkg "github.com/sensu/sensu-go/metrics" diff --git a/backend/eventd/entity_test.go b/backend/eventd/entity_test.go index 689297cc60..560e5146a9 100644 --- a/backend/eventd/entity_test.go +++ b/backend/eventd/entity_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/mock" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/storetest" diff --git a/backend/eventd/eventd.go b/backend/eventd/eventd.go index dd82230b45..d62dc381f6 100644 --- a/backend/eventd/eventd.go +++ b/backend/eventd/eventd.go @@ -13,8 +13,8 @@ import ( "github.com/sirupsen/logrus" clientv3 "go.etcd.io/etcd/client/v3" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/keepalived" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/eventd/eventd_test.go b/backend/eventd/eventd_test.go index 8795d45f5c..b5410b0bea 100644 --- a/backend/eventd/eventd_test.go +++ b/backend/eventd/eventd_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/eventd/integration_test.go b/backend/eventd/integration_test.go index 55ee179592..373ef69e22 100644 --- a/backend/eventd/integration_test.go +++ b/backend/eventd/integration_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/eventd/silenced.go b/backend/eventd/silenced.go index 3939a0de86..88fc75b77f 100644 --- a/backend/eventd/silenced.go +++ b/backend/eventd/silenced.go @@ -4,7 +4,7 @@ import ( "context" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" stringsutil "github.com/sensu/sensu-go/util/strings" ) diff --git a/backend/eventd/silenced_test.go b/backend/eventd/silenced_test.go index 48c1772574..2610c3fba3 100644 --- a/backend/eventd/silenced_test.go +++ b/backend/eventd/silenced_test.go @@ -5,8 +5,8 @@ import ( "sync" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store/cache" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/keepalived/deregisterer.go b/backend/keepalived/deregisterer.go index dd89af78ae..d5a5b4f206 100644 --- a/backend/keepalived/deregisterer.go +++ b/backend/keepalived/deregisterer.go @@ -6,7 +6,7 @@ import ( "time" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/keepalived/integration_test.go b/backend/keepalived/integration_test.go index a3e9e6492f..19f536b5b6 100644 --- a/backend/keepalived/integration_test.go +++ b/backend/keepalived/integration_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" diff --git a/backend/keepalived/keepalived.go b/backend/keepalived/keepalived.go index 9cf5b39c70..58f3ba4d0a 100644 --- a/backend/keepalived/keepalived.go +++ b/backend/keepalived/keepalived.go @@ -11,8 +11,8 @@ import ( "github.com/google/uuid" "github.com/prometheus/client_golang/prometheus" "github.com/sensu/sensu-go/agent" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" diff --git a/backend/keepalived/keepalived_test.go b/backend/keepalived/keepalived_test.go index 766e5faf5f..726997c1af 100644 --- a/backend/keepalived/keepalived_test.go +++ b/backend/keepalived/keepalived_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/liveness" "github.com/sensu/sensu-go/backend/messaging" stor "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/adapter.go b/backend/pipeline/adapter.go index 60c1f91c99..c1844dbd0a 100644 --- a/backend/pipeline/adapter.go +++ b/backend/pipeline/adapter.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // Adapter specifies an interface for pipeline adapters which are used to diff --git a/backend/pipeline/adapterv1.go b/backend/pipeline/adapterv1.go index a35b5c58b0..caea9e7c98 100644 --- a/backend/pipeline/adapterv1.go +++ b/backend/pipeline/adapterv1.go @@ -8,7 +8,7 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" metricspkg "github.com/sensu/sensu-go/metrics" "github.com/sirupsen/logrus" diff --git a/backend/pipeline/adapterv1_test.go b/backend/pipeline/adapterv1_test.go index 4d46921312..d9c3ac97c4 100644 --- a/backend/pipeline/adapterv1_test.go +++ b/backend/pipeline/adapterv1_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/golang/protobuf/proto" //nolint:staticcheck // ignore SA1019 - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/pipeline/filter" "github.com/sensu/sensu-go/backend/pipeline/handler" "github.com/sensu/sensu-go/backend/pipeline/mutator" diff --git a/backend/pipeline/filter.go b/backend/pipeline/filter.go index 32ae709d36..6064f9f554 100644 --- a/backend/pipeline/filter.go +++ b/backend/pipeline/filter.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" metricspkg "github.com/sensu/sensu-go/metrics" ) diff --git a/backend/pipeline/filter/has_metrics.go b/backend/pipeline/filter/has_metrics.go index 8cc737925c..95716a296b 100644 --- a/backend/pipeline/filter/has_metrics.go +++ b/backend/pipeline/filter/has_metrics.go @@ -3,7 +3,7 @@ package filter import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" utillogging "github.com/sensu/sensu-go/util/logging" ) diff --git a/backend/pipeline/filter/has_metrics_test.go b/backend/pipeline/filter/has_metrics_test.go index 9e3de448cf..cfcd0b6ab3 100644 --- a/backend/pipeline/filter/has_metrics_test.go +++ b/backend/pipeline/filter/has_metrics_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestHasMetricsAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/filter/is_incident.go b/backend/pipeline/filter/is_incident.go index f76f35494d..110a113b69 100644 --- a/backend/pipeline/filter/is_incident.go +++ b/backend/pipeline/filter/is_incident.go @@ -3,7 +3,7 @@ package filter import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" utillogging "github.com/sensu/sensu-go/util/logging" ) diff --git a/backend/pipeline/filter/is_incident_test.go b/backend/pipeline/filter/is_incident_test.go index e42f24fba0..888f907827 100644 --- a/backend/pipeline/filter/is_incident_test.go +++ b/backend/pipeline/filter/is_incident_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestIsIncidentAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/filter/legacy.go b/backend/pipeline/filter/legacy.go index fe644ea687..e2f58f62c5 100644 --- a/backend/pipeline/filter/legacy.go +++ b/backend/pipeline/filter/legacy.go @@ -7,7 +7,7 @@ import ( "time" "github.com/robertkrimen/otto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/js" diff --git a/backend/pipeline/filter/legacy_test.go b/backend/pipeline/filter/legacy_test.go index 3a8ac9485f..6f595337a0 100644 --- a/backend/pipeline/filter/legacy_test.go +++ b/backend/pipeline/filter/legacy_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/api" "github.com/sensu/sensu-go/backend/authorization/rbac" diff --git a/backend/pipeline/filter/not_silenced.go b/backend/pipeline/filter/not_silenced.go index dd8f7ee26c..1640ffc16d 100644 --- a/backend/pipeline/filter/not_silenced.go +++ b/backend/pipeline/filter/not_silenced.go @@ -3,7 +3,7 @@ package filter import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" utillogging "github.com/sensu/sensu-go/util/logging" ) diff --git a/backend/pipeline/filter/not_silenced_test.go b/backend/pipeline/filter/not_silenced_test.go index 3a0952e532..b5af6983af 100644 --- a/backend/pipeline/filter/not_silenced_test.go +++ b/backend/pipeline/filter/not_silenced_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestNotSilencedAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/filter_test.go b/backend/pipeline/filter_test.go index 72d2fd8494..785ee642e3 100644 --- a/backend/pipeline/filter_test.go +++ b/backend/pipeline/filter_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/pipeline/filter" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/pipeline/handler.go b/backend/pipeline/handler.go index 42958a3359..6bcb7f53db 100644 --- a/backend/pipeline/handler.go +++ b/backend/pipeline/handler.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" metricspkg "github.com/sensu/sensu-go/metrics" ) diff --git a/backend/pipeline/handler/legacy.go b/backend/pipeline/handler/legacy.go index 4907e417fb..79e4976295 100644 --- a/backend/pipeline/handler/legacy.go +++ b/backend/pipeline/handler/legacy.go @@ -8,7 +8,7 @@ import ( "os" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/licensing" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/pipeline/handler/legacy_test.go b/backend/pipeline/handler/legacy_test.go index eadfff6a67..9b4ed0abc8 100644 --- a/backend/pipeline/handler/legacy_test.go +++ b/backend/pipeline/handler/legacy_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/licensing" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/pipeline/handler_test.go b/backend/pipeline/handler_test.go index cf171e4e41..f89ea06a64 100644 --- a/backend/pipeline/handler_test.go +++ b/backend/pipeline/handler_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockpipeline" "github.com/stretchr/testify/mock" diff --git a/backend/pipeline/mutator.go b/backend/pipeline/mutator.go index 26dc3aacad..a54a202f55 100644 --- a/backend/pipeline/mutator.go +++ b/backend/pipeline/mutator.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" metricspkg "github.com/sensu/sensu-go/metrics" ) diff --git a/backend/pipeline/mutator/javascript.go b/backend/pipeline/mutator/javascript.go index f0127ec7ab..6de0e49a50 100644 --- a/backend/pipeline/mutator/javascript.go +++ b/backend/pipeline/mutator/javascript.go @@ -10,7 +10,7 @@ import ( "time" "github.com/robertkrimen/otto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/js" diff --git a/backend/pipeline/mutator/javascript_test.go b/backend/pipeline/mutator/javascript_test.go index a0e7454afb..b43a717c01 100644 --- a/backend/pipeline/mutator/javascript_test.go +++ b/backend/pipeline/mutator/javascript_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/js" diff --git a/backend/pipeline/mutator/json.go b/backend/pipeline/mutator/json.go index eda3dba60b..ca6b741b2a 100644 --- a/backend/pipeline/mutator/json.go +++ b/backend/pipeline/mutator/json.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/pipeline/mutator/json_test.go b/backend/pipeline/mutator/json_test.go index 075a7a3fc8..bdcc0679da 100644 --- a/backend/pipeline/mutator/json_test.go +++ b/backend/pipeline/mutator/json_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestJSONAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/mutator/legacy.go b/backend/pipeline/mutator/legacy.go index 6b2531a4e2..ce4ae08489 100644 --- a/backend/pipeline/mutator/legacy.go +++ b/backend/pipeline/mutator/legacy.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/mutator/legacy_test.go b/backend/pipeline/mutator/legacy_test.go index 41706a9e7d..57757a8fcf 100644 --- a/backend/pipeline/mutator/legacy_test.go +++ b/backend/pipeline/mutator/legacy_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/mutator/only_check_output.go b/backend/pipeline/mutator/only_check_output.go index 6a1cb44969..b4b3142663 100644 --- a/backend/pipeline/mutator/only_check_output.go +++ b/backend/pipeline/mutator/only_check_output.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/pipeline/mutator/only_check_output_test.go b/backend/pipeline/mutator/only_check_output_test.go index 07ffda26ee..1673f6fee5 100644 --- a/backend/pipeline/mutator/only_check_output_test.go +++ b/backend/pipeline/mutator/only_check_output_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestOnlyCheckOutputAdapter_Name(t *testing.T) { diff --git a/backend/pipeline/mutator/pipe.go b/backend/pipeline/mutator/pipe.go index 39873b07bb..a7c832da78 100644 --- a/backend/pipeline/mutator/pipe.go +++ b/backend/pipeline/mutator/pipe.go @@ -7,7 +7,7 @@ import ( "os" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/mutator/pipe_test.go b/backend/pipeline/mutator/pipe_test.go index 2aca004397..ff8bf7acd7 100644 --- a/backend/pipeline/mutator/pipe_test.go +++ b/backend/pipeline/mutator/pipe_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipeline/mutator_test.go b/backend/pipeline/mutator_test.go index 097b7f427c..c2358986ba 100644 --- a/backend/pipeline/mutator_test.go +++ b/backend/pipeline/mutator_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/mockpipeline" "github.com/stretchr/testify/mock" diff --git a/backend/pipelined/pipelined.go b/backend/pipelined/pipelined.go index 3f7fbf8427..9bd52f277f 100644 --- a/backend/pipelined/pipelined.go +++ b/backend/pipelined/pipelined.go @@ -9,7 +9,7 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/pipeline" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/pipelined/pipelined_test.go b/backend/pipelined/pipelined_test.go index 25bdc635db..f992ab1fca 100644 --- a/backend/pipelined/pipelined_test.go +++ b/backend/pipelined/pipelined_test.go @@ -4,7 +4,7 @@ package pipelined import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/resource/backend.go b/backend/resource/backend.go index bdf49967b4..a421493454 100644 --- a/backend/resource/backend.go +++ b/backend/resource/backend.go @@ -6,7 +6,7 @@ import ( "time" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/system" diff --git a/backend/resource/backend_test.go b/backend/resource/backend_test.go index 9c77367f40..8b2635f2f6 100644 --- a/backend/resource/backend_test.go +++ b/backend/resource/backend_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" diff --git a/backend/schedulerd/check_scheduler_test.go b/backend/schedulerd/check_scheduler_test.go index 382424e347..24154fac79 100644 --- a/backend/schedulerd/check_scheduler_test.go +++ b/backend/schedulerd/check_scheduler_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/queue" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/check_watcher.go b/backend/schedulerd/check_watcher.go index 5815d2d333..1777525bc2 100644 --- a/backend/schedulerd/check_watcher.go +++ b/backend/schedulerd/check_watcher.go @@ -5,7 +5,7 @@ import ( "strings" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/check_watcher_test.go b/backend/schedulerd/check_watcher_test.go index f8bb4b66bd..8eaa77a26e 100644 --- a/backend/schedulerd/check_watcher_test.go +++ b/backend/schedulerd/check_watcher_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/schedulerd/cron_scheduler.go b/backend/schedulerd/cron_scheduler.go index 4c925bc131..b24c7c4311 100644 --- a/backend/schedulerd/cron_scheduler.go +++ b/backend/schedulerd/cron_scheduler.go @@ -10,7 +10,7 @@ import ( cachev2 "github.com/sensu/sensu-go/backend/store/cache/v2" "github.com/sirupsen/logrus" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CronScheduler schedules checks to be executed on a cron schedule. diff --git a/backend/schedulerd/executor.go b/backend/schedulerd/executor.go index 2774be71ac..a6b30570e1 100644 --- a/backend/schedulerd/executor.go +++ b/backend/schedulerd/executor.go @@ -7,8 +7,8 @@ import ( "strings" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/schedulerd/executor_test.go b/backend/schedulerd/executor_test.go index 13a84f9516..d59bf2b69d 100644 --- a/backend/schedulerd/executor_test.go +++ b/backend/schedulerd/executor_test.go @@ -10,8 +10,8 @@ import ( "sync" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/queue" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/interface.go b/backend/schedulerd/interface.go index a845aa89db..1fcf5a07e8 100644 --- a/backend/schedulerd/interface.go +++ b/backend/schedulerd/interface.go @@ -1,6 +1,6 @@ package schedulerd -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" // Scheduler is a check scheduler. It is responsible for determining the // scheduling interval of a check, given a particular configuration. diff --git a/backend/schedulerd/interval_scheduler.go b/backend/schedulerd/interval_scheduler.go index 28b839562b..4942d86b68 100644 --- a/backend/schedulerd/interval_scheduler.go +++ b/backend/schedulerd/interval_scheduler.go @@ -4,7 +4,7 @@ import ( "context" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/secrets" "github.com/sensu/sensu-go/backend/store" diff --git a/backend/schedulerd/proxy_check.go b/backend/schedulerd/proxy_check.go index 57685a257b..8ed419d966 100644 --- a/backend/schedulerd/proxy_check.go +++ b/backend/schedulerd/proxy_check.go @@ -6,8 +6,8 @@ import ( time "github.com/echlebek/timeproxy" cron "github.com/robfig/cron/v3" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" cachev2 "github.com/sensu/sensu-go/backend/store/cache/v2" "github.com/sensu/sensu-go/js" "github.com/sensu/sensu-go/token" diff --git a/backend/schedulerd/proxy_check_test.go b/backend/schedulerd/proxy_check_test.go index 79eede8289..4441a1d9ac 100644 --- a/backend/schedulerd/proxy_check_test.go +++ b/backend/schedulerd/proxy_check_test.go @@ -5,8 +5,8 @@ import ( "testing" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" cachev2 "github.com/sensu/sensu-go/backend/store/cache/v2" "github.com/stretchr/testify/assert" ) diff --git a/backend/schedulerd/roundrobin_cron.go b/backend/schedulerd/roundrobin_cron.go index 608e3bcf7a..3b76eb466e 100644 --- a/backend/schedulerd/roundrobin_cron.go +++ b/backend/schedulerd/roundrobin_cron.go @@ -4,8 +4,8 @@ import ( "context" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/roundrobin_interval.go b/backend/schedulerd/roundrobin_interval.go index d6f34d9551..3b7d67255a 100644 --- a/backend/schedulerd/roundrobin_interval.go +++ b/backend/schedulerd/roundrobin_interval.go @@ -5,8 +5,8 @@ import ( "reflect" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/schedulerd/schedulerd.go b/backend/schedulerd/schedulerd.go index ac3deb84e2..44c86bf07e 100644 --- a/backend/schedulerd/schedulerd.go +++ b/backend/schedulerd/schedulerd.go @@ -4,7 +4,7 @@ import ( "context" "github.com/prometheus/client_golang/prometheus" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" "github.com/sensu/sensu-go/backend/secrets" diff --git a/backend/secrets/broken_provider.go b/backend/secrets/broken_provider.go index 911fb96e6b..e1a7db27bc 100644 --- a/backend/secrets/broken_provider.go +++ b/backend/secrets/broken_provider.go @@ -3,7 +3,7 @@ package secrets import ( "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // BrokenProvider is a sentinel provider that can be used in place of a real diff --git a/backend/secrets/provider.go b/backend/secrets/provider.go index 857198ee94..5379119b98 100644 --- a/backend/secrets/provider.go +++ b/backend/secrets/provider.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/resource" "github.com/sirupsen/logrus" ) diff --git a/backend/secrets/provider_test.go b/backend/secrets/provider_test.go index 653a0273de..c7ae8cbb42 100644 --- a/backend/secrets/provider_test.go +++ b/backend/secrets/provider_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/backend/seeds/seeds.go b/backend/seeds/seeds.go index 35c93c754f..d762ac1074 100644 --- a/backend/seeds/seeds.go +++ b/backend/seeds/seeds.go @@ -6,7 +6,7 @@ import ( "fmt" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/bcrypt" storev1 "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd" diff --git a/backend/store/cache/cache.go b/backend/store/cache/cache.go index 9cb3429794..e171112a37 100644 --- a/backend/store/cache/cache.go +++ b/backend/store/cache/cache.go @@ -9,7 +9,7 @@ import ( "sync/atomic" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd" "github.com/sensu/sensu-go/types/dynamic" diff --git a/backend/store/cache/cache_integration_test.go b/backend/store/cache/cache_integration_test.go index 394e7d8bc9..d3558ac568 100644 --- a/backend/store/cache/cache_integration_test.go +++ b/backend/store/cache/cache_integration_test.go @@ -10,7 +10,7 @@ import ( "github.com/echlebek/crock" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" store "github.com/sensu/sensu-go/backend/store/etcd" "github.com/sensu/sensu-go/types" diff --git a/backend/store/cache/cache_test.go b/backend/store/cache/cache_test.go index 58f8bde67e..c8228f4dc6 100644 --- a/backend/store/cache/cache_test.go +++ b/backend/store/cache/cache_test.go @@ -9,7 +9,7 @@ import ( "github.com/sensu/sensu-go/backend/store/etcd" "github.com/sensu/sensu-go/types" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" "github.com/sensu/sensu-go/types/dynamic" diff --git a/backend/store/cache/v2/cache.go b/backend/store/cache/v2/cache.go index 36171d6adb..b690876196 100644 --- a/backend/store/cache/v2/cache.go +++ b/backend/store/cache/v2/cache.go @@ -9,7 +9,7 @@ import ( "sync/atomic" "time" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/etcdstore" diff --git a/backend/store/cache/v2/cache_integration_test.go b/backend/store/cache/v2/cache_integration_test.go index 2ba08253d6..6613d10f0f 100644 --- a/backend/store/cache/v2/cache_integration_test.go +++ b/backend/store/cache/v2/cache_integration_test.go @@ -10,8 +10,8 @@ import ( "github.com/echlebek/crock" time "github.com/echlebek/timeproxy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/store/cache/v2/cache_test.go b/backend/store/cache/v2/cache_test.go index e537625b12..9029344e77 100644 --- a/backend/store/cache/v2/cache_test.go +++ b/backend/store/cache/v2/cache_test.go @@ -5,8 +5,8 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/etcdstore" diff --git a/backend/store/etcd/asset_store.go b/backend/store/etcd/asset_store.go index 680ad065db..f0fae1d50b 100644 --- a/backend/store/etcd/asset_store.go +++ b/backend/store/etcd/asset_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/check_store.go b/backend/store/etcd/check_store.go index 9e9160f625..1d693ee9b1 100644 --- a/backend/store/etcd/check_store.go +++ b/backend/store/etcd/check_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/check_store_test.go b/backend/store/etcd/check_store_test.go index 153b49c9df..e40fb0157d 100644 --- a/backend/store/etcd/check_store_test.go +++ b/backend/store/etcd/check_store_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/backend/store/etcd/entity_store.go b/backend/store/etcd/entity_store.go index 58f181c194..ca59e9b11b 100644 --- a/backend/store/etcd/entity_store.go +++ b/backend/store/etcd/entity_store.go @@ -6,8 +6,8 @@ import ( "errors" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" storev2 "github.com/sensu/sensu-go/backend/store/v2" diff --git a/backend/store/etcd/entity_store_test.go b/backend/store/etcd/entity_store_test.go index d81ce37f31..aec6a9b76d 100644 --- a/backend/store/etcd/entity_store_test.go +++ b/backend/store/etcd/entity_store_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" "github.com/stretchr/testify/assert" diff --git a/backend/store/etcd/event_store.go b/backend/store/etcd/event_store.go index aa39b474f0..bb9620a107 100644 --- a/backend/store/etcd/event_store.go +++ b/backend/store/etcd/event_store.go @@ -16,7 +16,7 @@ import ( "github.com/sensu/sensu-go/backend/store/provider" clientv3 "go.etcd.io/etcd/client/v3" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/store/etcd/event_store_integration_test.go b/backend/store/etcd/event_store_integration_test.go index 833cbc8598..026b281ae0 100644 --- a/backend/store/etcd/event_store_integration_test.go +++ b/backend/store/etcd/event_store_integration_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestEventStorageMaxOutputSize(t *testing.T) { diff --git a/backend/store/etcd/event_store_test.go b/backend/store/etcd/event_store_test.go index fbadf7fc66..048cf0990b 100644 --- a/backend/store/etcd/event_store_test.go +++ b/backend/store/etcd/event_store_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/assert" ) diff --git a/backend/store/etcd/filter_store.go b/backend/store/etcd/filter_store.go index de27e96fc8..b040389ad0 100644 --- a/backend/store/etcd/filter_store.go +++ b/backend/store/etcd/filter_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/generic_object.pb.go b/backend/store/etcd/generic_object.pb.go index 988c424a59..97d4ede6b1 100644 --- a/backend/store/etcd/generic_object.pb.go +++ b/backend/store/etcd/generic_object.pb.go @@ -7,7 +7,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import v2 "github.com/sensu/sensu-go/api/core/v2" +import v2 "github.com/sensu/core/v2" import bytes "bytes" diff --git a/backend/store/etcd/generic_object_test.go b/backend/store/etcd/generic_object_test.go index 5fff43fca5..568b8ba64c 100644 --- a/backend/store/etcd/generic_object_test.go +++ b/backend/store/etcd/generic_object_test.go @@ -1,6 +1,6 @@ package etcd -import corev2 "github.com/sensu/sensu-go/api/core/v2" +import corev2 "github.com/sensu/core/v2" //go:generate -command protoc protoc --gofast_out=plugins:. -I=${GOPATH}/src:. -I=../../../vendor/ -I=./ -I=../../../vendor/github.com/gogo/protobuf/protobuf/ //go:generate protoc generic_object.proto diff --git a/backend/store/etcd/generic_objectpb_test.go b/backend/store/etcd/generic_objectpb_test.go index 09a27507d6..64bd7553e8 100644 --- a/backend/store/etcd/generic_objectpb_test.go +++ b/backend/store/etcd/generic_objectpb_test.go @@ -12,7 +12,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/sensu/sensu-go/api/core/v2" +import _ "github.com/sensu/core/v2" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/backend/store/etcd/handler_store.go b/backend/store/etcd/handler_store.go index cb651e26c9..d58c15243c 100644 --- a/backend/store/etcd/handler_store.go +++ b/backend/store/etcd/handler_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/handler_store_test.go b/backend/store/etcd/handler_store_test.go index a91f64f1fa..0332c6f5c6 100644 --- a/backend/store/etcd/handler_store_test.go +++ b/backend/store/etcd/handler_store_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestHandlerStorage(t *testing.T) { diff --git a/backend/store/etcd/health_store.go b/backend/store/etcd/health_store.go index 8d57e28e90..afde4a0c26 100644 --- a/backend/store/etcd/health_store.go +++ b/backend/store/etcd/health_store.go @@ -9,7 +9,7 @@ import ( "sync" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/client/v3" diff --git a/backend/store/etcd/hook_store.go b/backend/store/etcd/hook_store.go index 72fa568d2d..5e8916e2ac 100644 --- a/backend/store/etcd/hook_store.go +++ b/backend/store/etcd/hook_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/hook_store_test.go b/backend/store/etcd/hook_store_test.go index 791a11c31d..4e9fb69f4a 100644 --- a/backend/store/etcd/hook_store_test.go +++ b/backend/store/etcd/hook_store_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestHookConfigStorage(t *testing.T) { diff --git a/backend/store/etcd/keepalive_store.go b/backend/store/etcd/keepalive_store.go index 9799ae0d2a..cd7c499664 100644 --- a/backend/store/etcd/keepalive_store.go +++ b/backend/store/etcd/keepalive_store.go @@ -4,7 +4,7 @@ import ( "context" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" "go.etcd.io/etcd/client/v3" diff --git a/backend/store/etcd/migrations.go b/backend/store/etcd/migrations.go index e00461cb18..3a16876fae 100644 --- a/backend/store/etcd/migrations.go +++ b/backend/store/etcd/migrations.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/client/v3" ) diff --git a/backend/store/etcd/migrations_test.go b/backend/store/etcd/migrations_test.go index f4b35ecf99..02b5d0d394 100644 --- a/backend/store/etcd/migrations_test.go +++ b/backend/store/etcd/migrations_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "go.etcd.io/etcd/client/v3" ) diff --git a/backend/store/etcd/mutator_store.go b/backend/store/etcd/mutator_store.go index 3aa14b77ce..3f38e14616 100644 --- a/backend/store/etcd/mutator_store.go +++ b/backend/store/etcd/mutator_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/mutator_store_test.go b/backend/store/etcd/mutator_store_test.go index e04fd8fef0..9aeaf47d71 100644 --- a/backend/store/etcd/mutator_store_test.go +++ b/backend/store/etcd/mutator_store_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestMutatorStorage(t *testing.T) { diff --git a/backend/store/etcd/namespace_store.go b/backend/store/etcd/namespace_store.go index 9a12000a09..d17ea16d69 100644 --- a/backend/store/etcd/namespace_store.go +++ b/backend/store/etcd/namespace_store.go @@ -6,7 +6,7 @@ import ( "path" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" clientv3 "go.etcd.io/etcd/client/v3" diff --git a/backend/store/etcd/namespace_store_test.go b/backend/store/etcd/namespace_store_test.go index 7e5720f2e1..a97d8f63b1 100644 --- a/backend/store/etcd/namespace_store_test.go +++ b/backend/store/etcd/namespace_store_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestNamespaceStorage(t *testing.T) { diff --git a/backend/store/etcd/pipeline_store.go b/backend/store/etcd/pipeline_store.go index 1955c89999..ba98afc721 100644 --- a/backend/store/etcd/pipeline_store.go +++ b/backend/store/etcd/pipeline_store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/resource.go b/backend/store/etcd/resource.go index 39538db936..c11c5c25b8 100644 --- a/backend/store/etcd/resource.go +++ b/backend/store/etcd/resource.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" "github.com/sensu/sensu-go/backend/store/patch" diff --git a/backend/store/etcd/resource_integration_test.go b/backend/store/etcd/resource_integration_test.go index a7ad3f8e3b..983fe62653 100644 --- a/backend/store/etcd/resource_integration_test.go +++ b/backend/store/etcd/resource_integration_test.go @@ -8,7 +8,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/patch" "go.etcd.io/etcd/client/v3" diff --git a/backend/store/etcd/silenced_store.go b/backend/store/etcd/silenced_store.go index b5019aa6ed..7c9127f914 100644 --- a/backend/store/etcd/silenced_store.go +++ b/backend/store/etcd/silenced_store.go @@ -7,7 +7,7 @@ import ( "time" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" diff --git a/backend/store/etcd/store.go b/backend/store/etcd/store.go index 3d8311d103..f1bd46c22e 100644 --- a/backend/store/etcd/store.go +++ b/backend/store/etcd/store.go @@ -14,7 +14,7 @@ import ( "github.com/sensu/sensu-go/types" clientv3 "go.etcd.io/etcd/client/v3" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/store/etcd/store_test.go b/backend/store/etcd/store_test.go index 49c79bea3f..58b729c0ff 100644 --- a/backend/store/etcd/store_test.go +++ b/backend/store/etcd/store_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" diff --git a/backend/store/etcd/tessen_store.go b/backend/store/etcd/tessen_store.go index 2c66758e92..a220d5dced 100644 --- a/backend/store/etcd/tessen_store.go +++ b/backend/store/etcd/tessen_store.go @@ -3,7 +3,7 @@ package etcd import ( "context" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/backend/store/etcd/tessen_store_test.go b/backend/store/etcd/tessen_store_test.go index 5d2ad732c5..dc6b9c02fe 100644 --- a/backend/store/etcd/tessen_store_test.go +++ b/backend/store/etcd/tessen_store_test.go @@ -7,7 +7,7 @@ import ( "context" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/stretchr/testify/assert" ) diff --git a/backend/store/etcd/user_store.go b/backend/store/etcd/user_store.go index b249bbade9..12c7bbab60 100644 --- a/backend/store/etcd/user_store.go +++ b/backend/store/etcd/user_store.go @@ -6,7 +6,7 @@ import ( "path" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/bcrypt" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" diff --git a/backend/store/etcd/user_store_test.go b/backend/store/etcd/user_store_test.go index d56f3cc979..c7da9657d7 100644 --- a/backend/store/etcd/user_store_test.go +++ b/backend/store/etcd/user_store_test.go @@ -16,7 +16,7 @@ import ( "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/types" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) func TestUserStorage(t *testing.T) { diff --git a/backend/store/etcd/watcher_test.go b/backend/store/etcd/watcher_test.go index 52ad29ffe2..a52200604b 100644 --- a/backend/store/etcd/watcher_test.go +++ b/backend/store/etcd/watcher_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/testing/fixture" "github.com/sirupsen/logrus/hooks/test" diff --git a/backend/store/etcd/watchers.go b/backend/store/etcd/watchers.go index f582163abd..b0b1ad454b 100644 --- a/backend/store/etcd/watchers.go +++ b/backend/store/etcd/watchers.go @@ -4,7 +4,7 @@ import ( "context" "reflect" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/v2/wrap" "go.etcd.io/etcd/client/v3" diff --git a/backend/store/key_builder.go b/backend/store/key_builder.go index d019656196..fcd7674ea3 100644 --- a/backend/store/key_builder.go +++ b/backend/store/key_builder.go @@ -4,7 +4,7 @@ import ( "context" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" ) diff --git a/backend/store/provider/provider.go b/backend/store/provider/provider.go index 455531b72b..7e354be3e2 100644 --- a/backend/store/provider/provider.go +++ b/backend/store/provider/provider.go @@ -1,7 +1,7 @@ package provider import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // Info represents the config of a store provider. diff --git a/backend/store/proxy.go b/backend/store/proxy.go index f4ad0b82ca..3d93705500 100644 --- a/backend/store/proxy.go +++ b/backend/store/proxy.go @@ -6,7 +6,7 @@ import ( "sync" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store/patch" "github.com/sensu/sensu-go/backend/store/provider" "github.com/sensu/sensu-go/types" diff --git a/backend/store/store.go b/backend/store/store.go index 9aadac63cf..51c5da1d35 100644 --- a/backend/store/store.go +++ b/backend/store/store.go @@ -5,8 +5,8 @@ import ( "crypto/tls" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store/patch" "github.com/sensu/sensu-go/types" clientv3 "go.etcd.io/etcd/client/v3" diff --git a/backend/store/v2/etcdstore/benchmark_test.go b/backend/store/v2/etcdstore/benchmark_test.go index 859c530703..464b62c101 100644 --- a/backend/store/v2/etcdstore/benchmark_test.go +++ b/backend/store/v2/etcdstore/benchmark_test.go @@ -5,8 +5,8 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/etcdstore" diff --git a/backend/store/v2/etcdstore/fixtures_test.go b/backend/store/v2/etcdstore/fixtures_test.go index ebfbb9a5cc..c4e97b1812 100644 --- a/backend/store/v2/etcdstore/fixtures_test.go +++ b/backend/store/v2/etcdstore/fixtures_test.go @@ -1,16 +1,15 @@ package etcdstore_test import ( - "errors" "io/ioutil" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/store" etcdstore "github.com/sensu/sensu-go/backend/store/etcd" etcdstorev2 "github.com/sensu/sensu-go/backend/store/v2/etcdstore" - "github.com/sensu/sensu-go/types" "github.com/sirupsen/logrus" ) @@ -49,17 +48,8 @@ func (t *testResource) GetTypeMeta() corev2.TypeMeta { } } -func fixtureResolver(name string) (interface{}, error) { - switch name { - case "testResource": - return &testResource{}, nil - default: - return nil, errors.New("type does not exist") - } -} - func init() { - types.RegisterResolver("store/wrap_test", fixtureResolver) + apitools.RegisterType("store/wrap_test", new(testResource)) } func testWithEtcdStore(t testing.TB, f func(*etcdstorev2.Store)) { diff --git a/backend/store/v2/etcdstore/store.go b/backend/store/v2/etcdstore/store.go index 3d3669d1f4..4852ef19ad 100644 --- a/backend/store/v2/etcdstore/store.go +++ b/backend/store/v2/etcdstore/store.go @@ -7,8 +7,8 @@ import ( "strings" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/etcd/kvc" "github.com/sensu/sensu-go/backend/store/patch" diff --git a/backend/store/v2/etcdstore/store_test.go b/backend/store/v2/etcdstore/store_test.go index d4f11131ff..e63b2951a6 100644 --- a/backend/store/v2/etcdstore/store_test.go +++ b/backend/store/v2/etcdstore/store_test.go @@ -9,7 +9,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" storev2 "github.com/sensu/sensu-go/backend/store/v2" "github.com/sensu/sensu-go/backend/store/v2/etcdstore" diff --git a/backend/store/v2/interface.go b/backend/store/v2/interface.go index e66a57570a..c06128ff81 100644 --- a/backend/store/v2/interface.go +++ b/backend/store/v2/interface.go @@ -1,7 +1,7 @@ package v2 import ( - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/patch" ) diff --git a/backend/store/v2/resource.go b/backend/store/v2/resource.go index 18c2588572..418456fc6b 100644 --- a/backend/store/v2/resource.go +++ b/backend/store/v2/resource.go @@ -4,8 +4,8 @@ import ( "context" "errors" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/store/v2/wrap" ) diff --git a/backend/store/v2/resource_test.go b/backend/store/v2/resource_test.go index 5c1d7c978e..6a1536b528 100644 --- a/backend/store/v2/resource_test.go +++ b/backend/store/v2/resource_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) type testResource struct { diff --git a/backend/store/v2/wrap/wrapper.go b/backend/store/v2/wrap/wrapper.go index 9b47f8305f..1ce8d77b11 100644 --- a/backend/store/v2/wrap/wrapper.go +++ b/backend/store/v2/wrap/wrapper.go @@ -4,16 +4,18 @@ import ( "encoding/json" "errors" "fmt" + "path" "reflect" + "strings" //nolint:staticcheck // SA1004 Replacing this will take some planning. "github.com/golang/protobuf/proto" "github.com/golang/snappy" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/store" - "github.com/sensu/sensu-go/types" ) //go:generate go run ../../../../scripts/check_protoc/main.go @@ -158,7 +160,7 @@ func wrapWithoutValidation(r interface{}, opts ...Option) (*Wrapper, error) { typ := reflect.Indirect(reflect.ValueOf(r)).Type() tm = corev2.TypeMeta{ Type: typ.Name(), - APIVersion: types.ApiVersion(typ.PkgPath()), + APIVersion: apiVersion(typ.PkgPath()), } } w := Wrapper{ @@ -220,7 +222,7 @@ func (w *Wrapper) Unwrap() (corev3.Resource, error) { // UnwrapRaw is like Unwrap, but returns a raw interface{} value. func (w *Wrapper) UnwrapRaw() (interface{}, error) { - resource, err := types.ResolveRaw(w.TypeMeta.APIVersion, w.TypeMeta.Type) + resource, err := apitools.Resolve(w.TypeMeta.APIVersion, w.TypeMeta.Type) if err != nil { return nil, err } @@ -323,3 +325,14 @@ func (l List) UnwrapInto(ptr interface{}) error { } return nil } + +func apiVersion(version string) string { + parts := strings.Split(version, "/") + if len(parts) == 0 { + return "" + } + if len(parts) == 1 { + return parts[0] + } + return path.Join(parts[len(parts)-2], parts[len(parts)-1]) +} diff --git a/backend/store/v2/wrap/wrapper.pb.go b/backend/store/v2/wrap/wrapper.pb.go index 6dda66cf4e..67d14cd2b4 100644 --- a/backend/store/v2/wrap/wrapper.pb.go +++ b/backend/store/v2/wrap/wrapper.pb.go @@ -8,7 +8,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/golang/protobuf/proto" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" io "io" math "math" math_bits "math/bits" diff --git a/backend/store/v2/wrap/wrapper_test.go b/backend/store/v2/wrap/wrapper_test.go index d23bb7fd00..7948dec1c0 100644 --- a/backend/store/v2/wrap/wrapper_test.go +++ b/backend/store/v2/wrap/wrapper_test.go @@ -2,32 +2,22 @@ package wrap_test import ( "encoding/json" - fmt "fmt" "testing" //nolint:staticcheck // SA1004 Replacing this will take some planning. "github.com/golang/protobuf/proto" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/backend/store/v2/wrap" - "github.com/sensu/sensu-go/types" ) func init() { - types.RegisterResolver("wrap_test/v2", testResolver) - types.RegisterResolver("v2/wrap_test", testResolver) -} - -func testResolver(name string) (interface{}, error) { - switch name { - case "testResource": - return &testResource{}, nil - case "testResource2": - return &testResource2{}, nil - default: - return nil, fmt.Errorf("invalid resource: %s", name) - } + apitools.RegisterType("wrap_test/v2", new(testResource)) + apitools.RegisterType("wrap_test/v2", new(testResource2)) + apitools.RegisterType("v2/wrap_test", new(testResource)) + apitools.RegisterType("v2/wrap_test", new(testResource2)) } type testResource struct { diff --git a/backend/tessend/data.go b/backend/tessend/data.go index e8b586c7f6..fa1348a7e2 100644 --- a/backend/tessend/data.go +++ b/backend/tessend/data.go @@ -1,7 +1,7 @@ package tessend import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/backend/tessend/tessend.go b/backend/tessend/tessend.go index 058bea8c33..6be727d592 100644 --- a/backend/tessend/tessend.go +++ b/backend/tessend/tessend.go @@ -15,7 +15,7 @@ import ( "github.com/google/uuid" dto "github.com/prometheus/client_model/go" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/eventd" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" diff --git a/backend/tessend/tessend_test.go b/backend/tessend/tessend_test.go index b93b8de20c..49d3c761e7 100644 --- a/backend/tessend/tessend_test.go +++ b/backend/tessend/tessend_test.go @@ -12,7 +12,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/etcd" "github.com/sensu/sensu-go/backend/messaging" "github.com/sensu/sensu-go/backend/ringv2" diff --git a/bonsai/bonsai.go b/bonsai/bonsai.go index fc8692d405..158fbc3e73 100644 --- a/bonsai/bonsai.go +++ b/bonsai/bonsai.go @@ -7,7 +7,7 @@ import ( "strings" goversion "github.com/hashicorp/go-version" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const ( diff --git a/cli/cli.go b/cli/cli.go index 6cd61afb21..dd5c502839 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -4,7 +4,7 @@ import ( "crypto/tls" "os" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/client/config" "github.com/sensu/sensu-go/cli/client/config/basic" diff --git a/cli/client/apikey.go b/cli/client/apikey.go index 6fde3b6a4e..8caa084b62 100644 --- a/cli/client/apikey.go +++ b/cli/client/apikey.go @@ -5,7 +5,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // PostAPIKey sends a POST request with obj as the payload to the given path diff --git a/cli/client/apikey_test.go b/cli/client/apikey_test.go index 7ae464eb13..5c6322c399 100644 --- a/cli/client/apikey_test.go +++ b/cli/client/apikey_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/go-resty/resty/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli/client/config" "github.com/stretchr/testify/assert" ) diff --git a/cli/client/asset.go b/cli/client/asset.go index 49965a28e8..58aefad9cb 100644 --- a/cli/client/asset.go +++ b/cli/client/asset.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AssetsPath is the api path for assets. diff --git a/cli/client/authentication.go b/cli/client/authentication.go index 8b0917588c..f045416b0e 100644 --- a/cli/client/authentication.go +++ b/cli/client/authentication.go @@ -7,7 +7,7 @@ import ( "github.com/go-resty/resty/v2" jwt "github.com/golang-jwt/jwt/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateAccessToken returns a new access token given userid and password diff --git a/cli/client/authentication_test.go b/cli/client/authentication_test.go index 915d6b7ed6..5c83bc70a1 100644 --- a/cli/client/authentication_test.go +++ b/cli/client/authentication_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/go-resty/resty/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli/client/config" "github.com/stretchr/testify/assert" ) diff --git a/cli/client/check.go b/cli/client/check.go index 0453ca908e..3f9b51e912 100644 --- a/cli/client/check.go +++ b/cli/client/check.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // ChecksPath is the api path for checks. diff --git a/cli/client/clusterrole.go b/cli/client/clusterrole.go index 1e358f8c06..bee45c225f 100644 --- a/cli/client/clusterrole.go +++ b/cli/client/clusterrole.go @@ -1,7 +1,7 @@ package client import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // ClusterRolesPath is the api path for cluster roles. diff --git a/cli/client/clusterrolebinding.go b/cli/client/clusterrolebinding.go index 7a01ed9ac2..21bc1a9197 100644 --- a/cli/client/clusterrolebinding.go +++ b/cli/client/clusterrolebinding.go @@ -1,7 +1,7 @@ package client import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // ClusterRoleBindingsPath is the api path for cluster role bindings. diff --git a/cli/client/config/mock.go b/cli/client/config/mock.go index 6225944759..21360f75e7 100644 --- a/cli/client/config/mock.go +++ b/cli/client/config/mock.go @@ -3,7 +3,7 @@ package config import ( "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/cli/client/entity.go b/cli/client/entity.go index b38c66e695..7f36f66cea 100644 --- a/cli/client/entity.go +++ b/cli/client/entity.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // EntitiesPath is the api path for entities. diff --git a/cli/client/event.go b/cli/client/event.go index f453ba9411..a6f1da16bf 100644 --- a/cli/client/event.go +++ b/cli/client/event.go @@ -4,7 +4,7 @@ import ( "encoding/json" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // EventsPath is the api path for events. diff --git a/cli/client/filter.go b/cli/client/filter.go index 5a5c1edd22..b9fa609997 100644 --- a/cli/client/filter.go +++ b/cli/client/filter.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FiltersPath is the api path for filters. diff --git a/cli/client/generic.go b/cli/client/generic.go index c50180e671..b34a1a7c4b 100644 --- a/cli/client/generic.go +++ b/cli/client/generic.go @@ -7,8 +7,8 @@ import ( "reflect" "github.com/go-resty/resty/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/types" ) diff --git a/cli/client/handler.go b/cli/client/handler.go index 0adb147269..c9bdfd7555 100644 --- a/cli/client/handler.go +++ b/cli/client/handler.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // HandlersPath is the api path for handlers. diff --git a/cli/client/health.go b/cli/client/health.go index c3ee619034..ba277a45fd 100644 --- a/cli/client/health.go +++ b/cli/client/health.go @@ -4,7 +4,7 @@ import ( "encoding/json" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) const healthPath = "/health" diff --git a/cli/client/hook.go b/cli/client/hook.go index 896d597411..e9e5782a67 100644 --- a/cli/client/hook.go +++ b/cli/client/hook.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // HooksPath is the api path for hooks. diff --git a/cli/client/interface.go b/cli/client/interface.go index 836c28d378..53063c2609 100644 --- a/cli/client/interface.go +++ b/cli/client/interface.go @@ -4,7 +4,7 @@ import ( "net/http" "github.com/go-resty/resty/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/cli/client/mutator.go b/cli/client/mutator.go index 77bf415e59..57ce989898 100644 --- a/cli/client/mutator.go +++ b/cli/client/mutator.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // MutatorsPath is the api path for mutators. diff --git a/cli/client/namespace.go b/cli/client/namespace.go index 2ac06611fc..ca986d03ac 100644 --- a/cli/client/namespace.go +++ b/cli/client/namespace.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // NamespacesPath is the api path for namespaces. diff --git a/cli/client/pipeline.go b/cli/client/pipeline.go index 2610704753..83f6a745b1 100644 --- a/cli/client/pipeline.go +++ b/cli/client/pipeline.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // PipelinesPath is the api path for pipelines. diff --git a/cli/client/role.go b/cli/client/role.go index f7eb20a777..2cc24a2566 100644 --- a/cli/client/role.go +++ b/cli/client/role.go @@ -1,7 +1,7 @@ package client import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // RolesPath is the api path for roles. diff --git a/cli/client/rolebinding.go b/cli/client/rolebinding.go index d759c80851..4aeb1522d1 100644 --- a/cli/client/rolebinding.go +++ b/cli/client/rolebinding.go @@ -1,7 +1,7 @@ package client import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // RoleBindingsPath is the api path for role bindings. diff --git a/cli/client/silenced.go b/cli/client/silenced.go index 0e2d1052c9..6a045bd917 100644 --- a/cli/client/silenced.go +++ b/cli/client/silenced.go @@ -4,7 +4,7 @@ import ( "encoding/json" "net/http" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) var silencedPath = createNSBasePath(coreAPIGroup, coreAPIVersion, "silenced") diff --git a/cli/client/testing/mock_asset_client.go b/cli/client/testing/mock_asset_client.go index be7b2c1247..17f545781f 100644 --- a/cli/client/testing/mock_asset_client.go +++ b/cli/client/testing/mock_asset_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FetchAsset for use with mock lib diff --git a/cli/client/testing/mock_authentication_client.go b/cli/client/testing/mock_authentication_client.go index 163cce0c09..7a9ac5b929 100644 --- a/cli/client/testing/mock_authentication_client.go +++ b/cli/client/testing/mock_authentication_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateAccessToken for use with mock lib diff --git a/cli/client/testing/mock_check_client.go b/cli/client/testing/mock_check_client.go index 7a3312d7d5..3aa3949e11 100644 --- a/cli/client/testing/mock_check_client.go +++ b/cli/client/testing/mock_check_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateCheck for use with mock lib diff --git a/cli/client/testing/mock_clusterrole_client.go b/cli/client/testing/mock_clusterrole_client.go index 661d81415a..ab5df935be 100644 --- a/cli/client/testing/mock_clusterrole_client.go +++ b/cli/client/testing/mock_clusterrole_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateClusterRole ... diff --git a/cli/client/testing/mock_clusterrolebinding_client.go b/cli/client/testing/mock_clusterrolebinding_client.go index 83e3abc66b..b60cffdf4c 100644 --- a/cli/client/testing/mock_clusterrolebinding_client.go +++ b/cli/client/testing/mock_clusterrolebinding_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateClusterRoleBinding ... diff --git a/cli/client/testing/mock_entity_client.go b/cli/client/testing/mock_entity_client.go index 951fc44a74..dcb8ace722 100644 --- a/cli/client/testing/mock_entity_client.go +++ b/cli/client/testing/mock_entity_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FetchEntity for use with mock lib diff --git a/cli/client/testing/mock_event_client.go b/cli/client/testing/mock_event_client.go index bbab085fdf..c3ca2f66cf 100644 --- a/cli/client/testing/mock_event_client.go +++ b/cli/client/testing/mock_event_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FetchEvent for use with mock lib diff --git a/cli/client/testing/mock_filter_client.go b/cli/client/testing/mock_filter_client.go index 3fb381d3cf..6ce56eb6f7 100644 --- a/cli/client/testing/mock_filter_client.go +++ b/cli/client/testing/mock_filter_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateFilter for use with mock lib diff --git a/cli/client/testing/mock_handler_client.go b/cli/client/testing/mock_handler_client.go index 85824a9329..a833bd44e6 100644 --- a/cli/client/testing/mock_handler_client.go +++ b/cli/client/testing/mock_handler_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateHandler for use with mock package diff --git a/cli/client/testing/mock_hook_client.go b/cli/client/testing/mock_hook_client.go index 7bfafd2d04..295ad82d77 100644 --- a/cli/client/testing/mock_hook_client.go +++ b/cli/client/testing/mock_hook_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateHook for use with mock lib diff --git a/cli/client/testing/mock_mutator_client.go b/cli/client/testing/mock_mutator_client.go index 1a4e4a22b3..4faa3771a4 100644 --- a/cli/client/testing/mock_mutator_client.go +++ b/cli/client/testing/mock_mutator_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateMutator for use with mock package diff --git a/cli/client/testing/mock_namespace_client.go b/cli/client/testing/mock_namespace_client.go index b663335eef..2e81140150 100644 --- a/cli/client/testing/mock_namespace_client.go +++ b/cli/client/testing/mock_namespace_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateNamespace for use with mock lib diff --git a/cli/client/testing/mock_pipeline_client.go b/cli/client/testing/mock_pipeline_client.go index 90bf677ddd..ccce6b13df 100644 --- a/cli/client/testing/mock_pipeline_client.go +++ b/cli/client/testing/mock_pipeline_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // FetchPipeline for use with mock lib diff --git a/cli/client/testing/mock_role_client.go b/cli/client/testing/mock_role_client.go index 83fa1a4af5..131a31d858 100644 --- a/cli/client/testing/mock_role_client.go +++ b/cli/client/testing/mock_role_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateRole ... diff --git a/cli/client/testing/mock_rolebinding_client.go b/cli/client/testing/mock_rolebinding_client.go index 17f43708f8..c321beac9b 100644 --- a/cli/client/testing/mock_rolebinding_client.go +++ b/cli/client/testing/mock_rolebinding_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateRoleBinding ... diff --git a/cli/client/testing/mock_silenced_client.go b/cli/client/testing/mock_silenced_client.go index 5a9d35eaf1..d9de3c455c 100644 --- a/cli/client/testing/mock_silenced_client.go +++ b/cli/client/testing/mock_silenced_client.go @@ -6,7 +6,7 @@ import ( "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/types" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // CreateSilenced for use with mock lib diff --git a/cli/client/testing/mock_user_client.go b/cli/client/testing/mock_user_client.go index 34b7abf02f..63f094df7b 100644 --- a/cli/client/testing/mock_user_client.go +++ b/cli/client/testing/mock_user_client.go @@ -1,7 +1,7 @@ package testing import ( - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // AddGroupToUser for use with mock lib diff --git a/cli/client/user.go b/cli/client/user.go index 67ce8dabf8..acbe6a656b 100644 --- a/cli/client/user.go +++ b/cli/client/user.go @@ -3,7 +3,7 @@ package client import ( "encoding/json" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // UsersPath is the api path for users. diff --git a/cli/cmdmanager/manager.go b/cli/cmdmanager/manager.go index 49bd474b9e..386cb1c6aa 100644 --- a/cli/cmdmanager/manager.go +++ b/cli/cmdmanager/manager.go @@ -21,7 +21,7 @@ import ( sensupath "github.com/sensu/sensu-go/util/path" goversion "github.com/hashicorp/go-version" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" bolt "go.etcd.io/bbolt" ) diff --git a/cli/cmdmanager/manager_test.go b/cli/cmdmanager/manager_test.go index e5f0bed1f3..355a4b2bf4 100644 --- a/cli/cmdmanager/manager_test.go +++ b/cli/cmdmanager/manager_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/sensu/sensu-go/bonsai" "github.com/sensu/sensu-go/testing/mockassetgetter" diff --git a/cli/commands/apikey/grant.go b/cli/commands/apikey/grant.go index 98c4e3ce8d..9ffc625150 100644 --- a/cli/commands/apikey/grant.go +++ b/cli/commands/apikey/grant.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) diff --git a/cli/commands/apikey/info.go b/cli/commands/apikey/info.go index fb04fd490e..086b7aadc8 100644 --- a/cli/commands/apikey/info.go +++ b/cli/commands/apikey/info.go @@ -6,7 +6,7 @@ import ( "io" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/cli/elements/list" diff --git a/cli/commands/apikey/info_test.go b/cli/commands/apikey/info_test.go index 8e9735a65b..f23015af61 100644 --- a/cli/commands/apikey/info_test.go +++ b/cli/commands/apikey/info_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/apikey/list.go b/cli/commands/apikey/list.go index d19495ffb7..c26dad1d50 100644 --- a/cli/commands/apikey/list.go +++ b/cli/commands/apikey/list.go @@ -5,7 +5,7 @@ import ( "io" "net/http" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/cli/commands/timeutil" diff --git a/cli/commands/apikey/list_test.go b/cli/commands/apikey/list_test.go index bcd60db5fc..e9b840d06b 100644 --- a/cli/commands/apikey/list_test.go +++ b/cli/commands/apikey/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/apikey/revoke.go b/cli/commands/apikey/revoke.go index 0f4579cb4b..131b81e836 100644 --- a/cli/commands/apikey/revoke.go +++ b/cli/commands/apikey/revoke.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/AlecAivazis/survey/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/asset/delete.go b/cli/commands/asset/delete.go index de0bf91332..ce2078c8dd 100644 --- a/cli/commands/asset/delete.go +++ b/cli/commands/asset/delete.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/AlecAivazis/survey/v2" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/asset/list.go b/cli/commands/asset/list.go index fbe7abc49c..d976642234 100644 --- a/cli/commands/asset/list.go +++ b/cli/commands/asset/list.go @@ -8,7 +8,7 @@ import ( "net/url" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/client/config" diff --git a/cli/commands/asset/list_test.go b/cli/commands/asset/list_test.go index 1ab9b508e3..d23dfc406a 100644 --- a/cli/commands/asset/list_test.go +++ b/cli/commands/asset/list_test.go @@ -6,7 +6,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/asset/outdated.go b/cli/commands/asset/outdated.go index d019c16ce4..9aeb8433e0 100644 --- a/cli/commands/asset/outdated.go +++ b/cli/commands/asset/outdated.go @@ -7,7 +7,7 @@ import ( "net/http" goversion "github.com/hashicorp/go-version" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/bonsai" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" diff --git a/cli/commands/asset/outdated_test.go b/cli/commands/asset/outdated_test.go index 5137281fbf..51c1c88b9d 100644 --- a/cli/commands/asset/outdated_test.go +++ b/cli/commands/asset/outdated_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/bonsai" cliClient "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/check/execute_test.go b/cli/commands/check/execute_test.go index 6398be665d..9ccc5444d9 100644 --- a/cli/commands/check/execute_test.go +++ b/cli/commands/check/execute_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" clientmock "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/check/list.go b/cli/commands/check/list.go index aec03212a7..000e5a6b09 100644 --- a/cli/commands/check/list.go +++ b/cli/commands/check/list.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/check/list_test.go b/cli/commands/check/list_test.go index 043c80f2a4..402d150ce3 100644 --- a/cli/commands/check/list_test.go +++ b/cli/commands/check/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/clusterrole/create.go b/cli/commands/clusterrole/create.go index 9eeb842578..1c0aeca08d 100644 --- a/cli/commands/clusterrole/create.go +++ b/cli/commands/clusterrole/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/types" diff --git a/cli/commands/clusterrole/list.go b/cli/commands/clusterrole/list.go index ec3cde6cda..1c0801b9f5 100644 --- a/cli/commands/clusterrole/list.go +++ b/cli/commands/clusterrole/list.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/clusterrole/list_test.go b/cli/commands/clusterrole/list_test.go index 12825e4fe2..92d6aa901f 100644 --- a/cli/commands/clusterrole/list_test.go +++ b/cli/commands/clusterrole/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/clusterrolebinding/create.go b/cli/commands/clusterrolebinding/create.go index 416e674a4e..d5ac973747 100644 --- a/cli/commands/clusterrolebinding/create.go +++ b/cli/commands/clusterrolebinding/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/types" diff --git a/cli/commands/clusterrolebinding/list.go b/cli/commands/clusterrolebinding/list.go index ea5dda59d6..1a6f1886b6 100644 --- a/cli/commands/clusterrolebinding/list.go +++ b/cli/commands/clusterrolebinding/list.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/clusterrolebinding/list_test.go b/cli/commands/clusterrolebinding/list_test.go index 8b63ec4872..c20cf47c09 100644 --- a/cli/commands/clusterrolebinding/list_test.go +++ b/cli/commands/clusterrolebinding/list_test.go @@ -4,7 +4,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/command/list.go b/cli/commands/command/list.go index 3dde4ffc61..87d6aa6895 100644 --- a/cli/commands/command/list.go +++ b/cli/commands/command/list.go @@ -8,7 +8,7 @@ import ( "net/url" "path" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/cmdmanager" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/config/view_test.go b/cli/commands/config/view_test.go index 12ed9082bf..1d21b8eba0 100644 --- a/cli/commands/config/view_test.go +++ b/cli/commands/config/view_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" clienttest "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/describetype/describe_type.go b/cli/commands/describetype/describe_type.go index 4b54a36b23..c6b79cab27 100644 --- a/cli/commands/describetype/describe_type.go +++ b/cli/commands/describetype/describe_type.go @@ -6,7 +6,7 @@ import ( "io" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client/config" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/dump/dump.go b/cli/commands/dump/dump.go index c415ef7ffb..bd1b03efb0 100644 --- a/cli/commands/dump/dump.go +++ b/cli/commands/dump/dump.go @@ -8,8 +8,8 @@ import ( "os" "reflect" - corev2 "github.com/sensu/sensu-go/api/core/v2" - corev3 "github.com/sensu/sensu-go/api/core/v3" + corev2 "github.com/sensu/core/v2" + corev3 "github.com/sensu/core/v3" "github.com/sensu/sensu-go/backend/apid/actions" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" diff --git a/cli/commands/edit/edit.go b/cli/commands/edit/edit.go index 7fa6afe6e6..be8387059a 100644 --- a/cli/commands/edit/edit.go +++ b/cli/commands/edit/edit.go @@ -14,7 +14,7 @@ import ( "runtime" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client/config" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/edit/edit_test.go b/cli/commands/edit/edit_test.go index 42bfa586f2..13e83c752e 100644 --- a/cli/commands/edit/edit_test.go +++ b/cli/commands/edit/edit_test.go @@ -7,7 +7,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "gopkg.in/yaml.v2" ) diff --git a/cli/commands/entity/create.go b/cli/commands/entity/create.go index ee2388bb34..859744ca39 100644 --- a/cli/commands/entity/create.go +++ b/cli/commands/entity/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/entity/list.go b/cli/commands/entity/list.go index 526d90a4a4..ae5a1c8e26 100644 --- a/cli/commands/entity/list.go +++ b/cli/commands/entity/list.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/entity/list_test.go b/cli/commands/entity/list_test.go index 464b6d3dc0..1fcf164a2e 100644 --- a/cli/commands/entity/list_test.go +++ b/cli/commands/entity/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/env/env_test.go b/cli/commands/env/env_test.go index 651b202821..b582767909 100644 --- a/cli/commands/env/env_test.go +++ b/cli/commands/env/env_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" mockclient "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/event/list.go b/cli/commands/event/list.go index e3ece0d61a..5ab4d5bda8 100644 --- a/cli/commands/event/list.go +++ b/cli/commands/event/list.go @@ -8,7 +8,7 @@ import ( "time" "github.com/google/uuid" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/event/list_test.go b/cli/commands/event/list_test.go index d385c6273f..9ad8e04225 100644 --- a/cli/commands/event/list_test.go +++ b/cli/commands/event/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/filter/list.go b/cli/commands/filter/list.go index fa8ec7a38f..51bd688534 100644 --- a/cli/commands/filter/list.go +++ b/cli/commands/filter/list.go @@ -7,7 +7,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/filter/list_test.go b/cli/commands/filter/list_test.go index a978944d4d..399b03abf9 100644 --- a/cli/commands/filter/list_test.go +++ b/cli/commands/filter/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/handler/list.go b/cli/commands/handler/list.go index ba662160ad..f72e248e65 100644 --- a/cli/commands/handler/list.go +++ b/cli/commands/handler/list.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/handler/list_test.go b/cli/commands/handler/list_test.go index 9423612777..5e13e81a20 100644 --- a/cli/commands/handler/list_test.go +++ b/cli/commands/handler/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/helpers/user.go b/cli/commands/helpers/user.go index f73772ce14..58db00911c 100644 --- a/cli/commands/helpers/user.go +++ b/cli/commands/helpers/user.go @@ -2,7 +2,7 @@ package helpers import ( jwt "github.com/golang-jwt/jwt/v4" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli/client/config" ) diff --git a/cli/commands/hook/list.go b/cli/commands/hook/list.go index 89f354012b..3ac0dc6980 100644 --- a/cli/commands/hook/list.go +++ b/cli/commands/hook/list.go @@ -6,7 +6,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/hook/list_test.go b/cli/commands/hook/list_test.go index 1d8e3348ca..842358b0f9 100644 --- a/cli/commands/hook/list_test.go +++ b/cli/commands/hook/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/mutator/list.go b/cli/commands/mutator/list.go index 31648699e9..ebec3422ae 100644 --- a/cli/commands/mutator/list.go +++ b/cli/commands/mutator/list.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/mutator/list_test.go b/cli/commands/mutator/list_test.go index c06d92f7ee..d69e97e6ba 100644 --- a/cli/commands/mutator/list_test.go +++ b/cli/commands/mutator/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/namespace/list.go b/cli/commands/namespace/list.go index 92ae15b7ff..aea4957b23 100644 --- a/cli/commands/namespace/list.go +++ b/cli/commands/namespace/list.go @@ -5,7 +5,7 @@ import ( "io" "net/http" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/namespace/list_test.go b/cli/commands/namespace/list_test.go index fb8db17a53..6bc1ab6ad8 100644 --- a/cli/commands/namespace/list_test.go +++ b/cli/commands/namespace/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/pipeline/info.go b/cli/commands/pipeline/info.go index 2c397b0c32..24e20d84e4 100644 --- a/cli/commands/pipeline/info.go +++ b/cli/commands/pipeline/info.go @@ -5,7 +5,7 @@ import ( "fmt" "io" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/cli/elements/list" diff --git a/cli/commands/pipeline/info_test.go b/cli/commands/pipeline/info_test.go index 7a321fe506..d0add6d657 100644 --- a/cli/commands/pipeline/info_test.go +++ b/cli/commands/pipeline/info_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/pipeline/list.go b/cli/commands/pipeline/list.go index 196d772b8c..9169295142 100644 --- a/cli/commands/pipeline/list.go +++ b/cli/commands/pipeline/list.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/pipeline/list_test.go b/cli/commands/pipeline/list_test.go index cf38fe905f..5d29c039f7 100644 --- a/cli/commands/pipeline/list_test.go +++ b/cli/commands/pipeline/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/role/create.go b/cli/commands/role/create.go index 2e8f5d80db..475a890e4f 100644 --- a/cli/commands/role/create.go +++ b/cli/commands/role/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/role/list.go b/cli/commands/role/list.go index ef4f1b9709..568a836656 100644 --- a/cli/commands/role/list.go +++ b/cli/commands/role/list.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/role/list_test.go b/cli/commands/role/list_test.go index b7b8ed2e4f..4a05e6dbd5 100644 --- a/cli/commands/role/list_test.go +++ b/cli/commands/role/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/rolebinding/create.go b/cli/commands/rolebinding/create.go index 3ac0873f5a..1c762eec45 100644 --- a/cli/commands/rolebinding/create.go +++ b/cli/commands/rolebinding/create.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/sensu/sensu-go/api/core/v2" + "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/rolebinding/list.go b/cli/commands/rolebinding/list.go index bb89d3b297..b61f1bea93 100644 --- a/cli/commands/rolebinding/list.go +++ b/cli/commands/rolebinding/list.go @@ -5,7 +5,7 @@ import ( "net/http" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/flags" diff --git a/cli/commands/rolebinding/list_test.go b/cli/commands/rolebinding/list_test.go index 3c8832832e..949077b9f2 100644 --- a/cli/commands/rolebinding/list_test.go +++ b/cli/commands/rolebinding/list_test.go @@ -4,7 +4,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/silenced/list.go b/cli/commands/silenced/list.go index 54dfa6dd6d..0d8a1ff5dd 100644 --- a/cli/commands/silenced/list.go +++ b/cli/commands/silenced/list.go @@ -7,7 +7,7 @@ import ( "net/http" "time" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/silenced/list_test.go b/cli/commands/silenced/list_test.go index dcf08312bd..f3f8f86943 100644 --- a/cli/commands/silenced/list_test.go +++ b/cli/commands/silenced/list_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/flags" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/tessen/info.go b/cli/commands/tessen/info.go index a75f2aefd3..eb660c0dff 100644 --- a/cli/commands/tessen/info.go +++ b/cli/commands/tessen/info.go @@ -6,7 +6,7 @@ import ( "io" "strconv" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/sensu/sensu-go/cli/elements/list" diff --git a/cli/commands/tessen/info_test.go b/cli/commands/tessen/info_test.go index 78b31d24a8..8fe81293e1 100644 --- a/cli/commands/tessen/info_test.go +++ b/cli/commands/tessen/info_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" "github.com/stretchr/testify/assert" diff --git a/cli/commands/tessen/opt_in.go b/cli/commands/tessen/opt_in.go index 47dc2b4443..1d6765e03d 100644 --- a/cli/commands/tessen/opt_in.go +++ b/cli/commands/tessen/opt_in.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/spf13/cobra" ) diff --git a/cli/commands/tessen/opt_out.go b/cli/commands/tessen/opt_out.go index 0f1e41012d..5f43acf29a 100644 --- a/cli/commands/tessen/opt_out.go +++ b/cli/commands/tessen/opt_out.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/commands/helpers" "github.com/spf13/cobra" diff --git a/cli/commands/user/change_password_test.go b/cli/commands/user/change_password_test.go index dfceccab50..f13a7f68b5 100644 --- a/cli/commands/user/change_password_test.go +++ b/cli/commands/user/change_password_test.go @@ -3,7 +3,7 @@ package user import ( "testing" - v2 "github.com/sensu/sensu-go/api/core/v2" + v2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/authentication/jwt" client "github.com/sensu/sensu-go/cli/client/testing" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/commands/user/list.go b/cli/commands/user/list.go index 2f7f69d4ce..fcc45652c6 100644 --- a/cli/commands/user/list.go +++ b/cli/commands/user/list.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/cli/commands/helpers" diff --git a/cli/commands/user/list_test.go b/cli/commands/user/list_test.go index f7543cd399..3c657a1a57 100644 --- a/cli/commands/user/list_test.go +++ b/cli/commands/user/list_test.go @@ -6,7 +6,7 @@ import ( "net/http" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" client "github.com/sensu/sensu-go/cli/client/testing" "github.com/sensu/sensu-go/cli/commands/helpers" test "github.com/sensu/sensu-go/cli/commands/testing" diff --git a/cli/resource/parse.go b/cli/resource/parse.go index edc91dac30..92d5d290f9 100644 --- a/cli/resource/parse.go +++ b/cli/resource/parse.go @@ -12,7 +12,8 @@ import ( "strings" "github.com/ghodss/yaml" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" ) @@ -94,7 +95,7 @@ func stripWrapperAndMaybeWarn(dec *json.Decoder, wrapper *types.Wrapper, count i if msg == nil { return } - resource, err := types.ResolveRaw(wrapper.APIVersion, wrapper.Type) + resource, err := apitools.Resolve(wrapper.APIVersion, wrapper.Type) if err != nil { return } diff --git a/cli/resource/parse_test.go b/cli/resource/parse_test.go index 70fe808dc6..83ca7d4e35 100644 --- a/cli/resource/parse_test.go +++ b/cli/resource/parse_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/go-test/deep" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" ) diff --git a/cli/resource/process.go b/cli/resource/process.go index 7cc6279849..9c06e0019e 100644 --- a/cli/resource/process.go +++ b/cli/resource/process.go @@ -12,7 +12,7 @@ import ( "path/filepath" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/cli" "github.com/sensu/sensu-go/cli/client" "github.com/sensu/sensu-go/types" diff --git a/cli/resource/process_test.go b/cli/resource/process_test.go index f10f1c4280..2168f6fd90 100644 --- a/cli/resource/process_test.go +++ b/cli/resource/process_test.go @@ -11,7 +11,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" "github.com/stretchr/testify/assert" diff --git a/cli/resource/resolve.go b/cli/resource/resolve.go index 20c3e8947f..e1ec0fb1c7 100644 --- a/cli/resource/resolve.go +++ b/cli/resource/resolve.go @@ -6,7 +6,8 @@ import ( "regexp" "strings" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" "github.com/sensu/sensu-go/types" "github.com/sensu/sensu-go/types/compat" ) @@ -65,7 +66,7 @@ func Resolve(resource string) (corev2.Resource, error) { if apiVersion == "" { apiVersion = "core/v2" } - value, err := types.ResolveRaw(apiVersion, typeName) + value, err := apitools.Resolve(apiVersion, typeName) if err != nil { return nil, err } diff --git a/go.mod b/go.mod index e94b7b5435..48a05ca070 100644 --- a/go.mod +++ b/go.mod @@ -17,10 +17,10 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/go-resty/resty/v2 v2.5.0 github.com/gogo/protobuf v1.3.2 - github.com/golang-jwt/jwt/v4 v4.0.0 + github.com/golang-jwt/jwt/v4 v4.4.2 github.com/golang/protobuf v1.5.2 github.com/golang/snappy v0.0.4 - github.com/google/uuid v1.1.2 + github.com/google/uuid v1.3.0 github.com/gorilla/mux v1.8.0 github.com/gorilla/websocket v1.4.2 github.com/graph-gophers/dataloader v0.0.0-20180104184831-78139374585c @@ -44,19 +44,15 @@ require ( github.com/prometheus/client_golang v1.11.1 github.com/prometheus/client_model v0.2.0 github.com/prometheus/common v0.26.0 - github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff + github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 github.com/robfig/cron/v3 v3.0.1 github.com/sensu/lasr v1.2.1 - github.com/sensu/sensu-go/api/core/v2 v2.16.0 - github.com/sensu/sensu-go/api/core/v3 v3.8.0 - github.com/sensu/sensu-go/types v0.11.0 github.com/shirou/gopsutil/v3 v3.21.12 - github.com/sirupsen/logrus v1.7.0 + github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.1.3 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.7.0 - github.com/stretchr/objx v0.2.0 // indirect - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.8.0 github.com/ulikunitz/xz v0.5.10 // indirect github.com/willf/pad v0.0.0-20160331131008-b3d780601022 go.etcd.io/bbolt v1.3.6 @@ -69,7 +65,7 @@ require ( go.uber.org/zap v1.17.0 golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 - golang.org/x/sys v0.0.0-20211013075003-97ac67df715c + golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba google.golang.org/grpc v1.41.0 gopkg.in/h2non/filetype.v1 v1.0.3 @@ -81,6 +77,10 @@ require ( github.com/go-test/deep v1.0.8 github.com/google/go-cmp v0.5.8 // indirect github.com/kr/pty v1.1.8 // indirect + github.com/sensu/core/v2 v2.16.0-alpha6 + github.com/sensu/core/v3 v3.8.0-alpha6 + github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 + github.com/sensu/sensu-go/types v0.12.0-alpha6 golang.org/x/text v0.3.7 // indirect ) diff --git a/go.sum b/go.sum index 5a4c3407d3..eae22096a0 100644 --- a/go.sum +++ b/go.sum @@ -54,6 +54,8 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -141,8 +143,8 @@ github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zV github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= +github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= +github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -188,8 +190,9 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= @@ -385,8 +388,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff h1:+6NUiITWwE5q1KO6SAfUX918c+Tab0+tGAM/mtdlUyA= -github.com/robertkrimen/otto v0.0.0-20191219234010-c382bd3c16ff/go.mod h1:xvqspoSXJTIpemEonrMDFq6XzwHYYgToXWj5eRX1OtY= +github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52 h1:AFhmAXZqMm6PgNkco+BTBk//EQS8NLE1YLc2EO3bcLE= +github.com/robertkrimen/otto v0.0.0-20221006114523-201ab5b34f52/go.mod h1:/mK7FZ3mFYEn9zvNPhpngTyatyehSwte5bJZ4ehL5Xw= github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -396,27 +399,26 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/schollz/progressbar/v2 v2.13.2/go.mod h1:6YZjqdthH6SCZKv2rqGryrxPtfmRB/DWZxSMfCXPyD8= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/sensu/core/v2 v2.16.0-alpha1/go.mod h1:vFoPc++U8m30t0fXKNGqOqHLOFr7VuqFc+Hkz+eTdmU= +github.com/sensu/core/v2 v2.16.0-alpha6 h1:6WTEevm2tQEgCx50IL4aXomAXQip7s6kX4xR3uNVYlI= +github.com/sensu/core/v2 v2.16.0-alpha6/go.mod h1:2etWGsa+nx5G2Q3CKiSJY9kSg8VhCgGzgp1VyxbC6U8= +github.com/sensu/core/v3 v3.8.0-alpha6 h1:ywO14aIHippeIAe2HBHrPhSdyBMs1pQtjvkYaHmEwGw= +github.com/sensu/core/v3 v3.8.0-alpha6/go.mod h1:HUrsxGfeUSvd+iU5ROGgfBchv3eYjhS3Apz6XzNB8Gg= github.com/sensu/lasr v1.2.1 h1:4H1QfOrPkwYHMFE5qAI6GwKEFkcI1YRyjjWidz1MihQ= github.com/sensu/lasr v1.2.1/go.mod h1:VIMtIK67Bcef6dTfctRCBg8EY9M9TtCY9NEFT6Zw5xQ= -github.com/sensu/sensu-go/api/core/v2 v2.14.0/go.mod h1:XCgUjY78ApTahizBz/pkc5KU17L/E5BexeZHkGDdTls= -github.com/sensu/sensu-go/api/core/v2 v2.15.0/go.mod h1:QxGKxqQv4rpweFrR4Jkp1tas3amGzAy0wO0fUwq0suU= -github.com/sensu/sensu-go/api/core/v2 v2.16.0 h1:HOq4rFkQ1S5ZjxmMTLc5J5mAbECrnKWvtXXbMqr3j9s= -github.com/sensu/sensu-go/api/core/v2 v2.16.0/go.mod h1:MjM7+MCGEyTAgaZ589SiGHwYiaYF7N/58dU0J070u/0= -github.com/sensu/sensu-go/api/core/v3 v3.6.1/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.6.2/go.mod h1:aqNOkJxkrwRq+rPW47XtVWeb5Rk1K5adlCZGBW9nsvM= -github.com/sensu/sensu-go/api/core/v3 v3.8.0 h1:IlHqv/2Yu6dUp2+M1dwxmZu8cJmZ/TMiOhbWMIWCI2o= -github.com/sensu/sensu-go/api/core/v3 v3.8.0/go.mod h1:/elCzc+L10QXYVJeiHnZjCJVWkxSrdSlIxd30hsa7MQ= -github.com/sensu/sensu-go/types v0.10.0/go.mod h1:vFZJ9TYBAjSPYtYt+82PpS9P6m73Vzr4O23lmJonzrA= -github.com/sensu/sensu-go/types v0.11.0 h1:jsVa/apRaJJEdk0Jl7ZUksiBkuEAjCZd/gSBWlrptJA= -github.com/sensu/sensu-go/types v0.11.0/go.mod h1:fhgW3xlvkPFMZiT0IppHySeyN61ZTIKevgSPFSoaQEk= +github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099 h1:FJUWcuFiTdEn2N0bGnxOaEUDCxIQqRhwERadacNCnXA= +github.com/sensu/sensu-api-tools v0.0.0-20221025205055-db03ae2f8099/go.mod h1:SNISS4OhwNSZI9/YKTQr1bghOEwed9ZT4v+ztKk1Mq0= +github.com/sensu/sensu-go/types v0.12.0-alpha6 h1:tPuPysl6Ew0x0u5USLeSk/3NMMt7GLJh2uO1kVFRwQY= +github.com/sensu/sensu-go/types v0.12.0-alpha6/go.mod h1:PHk3pUJHCsFzoXnKmm9ERfnHnerzaG2rjISWGcZq3os= github.com/shirou/gopsutil/v3 v3.21.12 h1:VoGxEW2hpmz0Vt3wUvHIl9fquzYLNpVpgNNB7pGJimA= github.com/shirou/gopsutil/v3 v3.21.12/go.mod h1:BToYZVTlSVlfazpDDYFnsVZLaoRG+g8ufT6fPQLdJzA= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= @@ -440,16 +442,17 @@ github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= @@ -476,8 +479,6 @@ github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQ go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0= go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8= @@ -636,8 +637,9 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211013075003-97ac67df715c h1:taxlMj0D/1sOAuv/CbSD+MMDof2vbyPTqz5FNYKpXt8= golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w= golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= @@ -747,6 +749,7 @@ gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/readline.v1 v1.0.0-20160726135117-62c6fe619375/go.mod h1:lNEQeAhU009zbRxng+XOj5ITVgY24WcbNnQopyfKoYQ= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/sourcemap.v1 v1.0.5 h1:inv58fC9f9J3TK2Y2R1NPntXEn3/wjWHkonhIUODNTI= gopkg.in/sourcemap.v1 v1.0.5/go.mod h1:2RlvNNSMglmRrcvhfuzp4hQHwOtjxlbjX7UPY/GXb78= @@ -762,8 +765,9 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/js/js_bench_test.go b/js/js_bench_test.go index 0468d3750b..ca71f325f4 100644 --- a/js/js_bench_test.go +++ b/js/js_bench_test.go @@ -3,7 +3,7 @@ package js_test import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/js" "github.com/sensu/sensu-go/types/dynamic" ) diff --git a/js/js_test.go b/js/js_test.go index bd7b665a55..6e5e04b9fb 100644 --- a/js/js_test.go +++ b/js/js_test.go @@ -3,7 +3,7 @@ package js import ( "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types/dynamic" "github.com/stretchr/testify/assert" ) diff --git a/process/process.go b/process/process.go index 11863d1518..458ac46f77 100644 --- a/process/process.go +++ b/process/process.go @@ -3,7 +3,7 @@ package process import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // A Getter is responsible for getting the process info of an agent. diff --git a/system/system.go b/system/system.go index 572766776f..41e72beb09 100644 --- a/system/system.go +++ b/system/system.go @@ -15,7 +15,7 @@ import ( "strings" "sync" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types" "github.com/shirou/gopsutil/v3/host" shirounet "github.com/shirou/gopsutil/v3/net" diff --git a/testing/fixture/resource.go b/testing/fixture/resource.go index d24d0f8e71..d995a2d9b5 100644 --- a/testing/fixture/resource.go +++ b/testing/fixture/resource.go @@ -3,7 +3,7 @@ package fixture import ( "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" ) // GetObjectMeta ... diff --git a/testing/fixture/resource.pb.go b/testing/fixture/resource.pb.go index 7f1cbe141a..7e6f10d07f 100644 --- a/testing/fixture/resource.pb.go +++ b/testing/fixture/resource.pb.go @@ -7,7 +7,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import v2 "github.com/sensu/sensu-go/api/core/v2" +import v2 "github.com/sensu/core/v2" import bytes "bytes" diff --git a/testing/fixture/resourcepb_test.go b/testing/fixture/resourcepb_test.go index 34c38a2e0e..cedf452b4e 100644 --- a/testing/fixture/resourcepb_test.go +++ b/testing/fixture/resourcepb_test.go @@ -12,7 +12,7 @@ import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/sensu/sensu-go/api/core/v2" +import _ "github.com/sensu/core/v2" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal diff --git a/testing/fixture/v3resource.go b/testing/fixture/v3resource.go index 181c9b596a..2ec1c8f44b 100644 --- a/testing/fixture/v3resource.go +++ b/testing/fixture/v3resource.go @@ -3,19 +3,12 @@ package fixture import ( "fmt" - corev2 "github.com/sensu/sensu-go/api/core/v2" - "github.com/sensu/sensu-go/types" + corev2 "github.com/sensu/core/v2" + apitools "github.com/sensu/sensu-api-tools" ) func init() { - types.RegisterResolver("testing/fixture", func(name string) (interface{}, error) { - switch name { - case "V3Resource", "v3_resource": - return new(V3Resource), nil - default: - return nil, fmt.Errorf("invalid resource: %s", name) - } - }) + apitools.RegisterType("testing/fixture", new(V3Resource), apitools.WithAlias("v3_resource")) } type V3Resource struct { diff --git a/testing/mockassetgetter/mockassetgetter.go b/testing/mockassetgetter/mockassetgetter.go index ffddf06860..db33c6eb2b 100644 --- a/testing/mockassetgetter/mockassetgetter.go +++ b/testing/mockassetgetter/mockassetgetter.go @@ -3,7 +3,7 @@ package mockassetgetter import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/asset" "github.com/stretchr/testify/mock" ) diff --git a/testing/mockpipeline/filter.go b/testing/mockpipeline/filter.go index 31267d915f..a4576a50e8 100644 --- a/testing/mockpipeline/filter.go +++ b/testing/mockpipeline/filter.go @@ -3,7 +3,7 @@ package mockpipeline import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/testing/mockpipeline/handler.go b/testing/mockpipeline/handler.go index 947d6567c5..b3c2a763cc 100644 --- a/testing/mockpipeline/handler.go +++ b/testing/mockpipeline/handler.go @@ -3,7 +3,7 @@ package mockpipeline import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/testing/mockpipeline/mutator.go b/testing/mockpipeline/mutator.go index 0bac65e7b1..c0de02baf6 100644 --- a/testing/mockpipeline/mutator.go +++ b/testing/mockpipeline/mutator.go @@ -3,7 +3,7 @@ package mockpipeline import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/stretchr/testify/mock" ) diff --git a/testing/mocksecrets/providermanager.go b/testing/mocksecrets/providermanager.go index 818d154b68..79b69d3f9d 100644 --- a/testing/mocksecrets/providermanager.go +++ b/testing/mocksecrets/providermanager.go @@ -3,7 +3,7 @@ package mocksecrets import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/secrets" "github.com/stretchr/testify/mock" ) diff --git a/testing/mockstore/events.go b/testing/mockstore/events.go index 543d3b6db3..73b443a29c 100644 --- a/testing/mockstore/events.go +++ b/testing/mockstore/events.go @@ -3,7 +3,7 @@ package mockstore import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/testing/mockstore/pipelines.go b/testing/mockstore/pipelines.go index bfc7802bd2..09c0cda94a 100644 --- a/testing/mockstore/pipelines.go +++ b/testing/mockstore/pipelines.go @@ -3,7 +3,7 @@ package mockstore import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/testing/mockstore/resource.go b/testing/mockstore/resource.go index 035fd3c1e6..b07330953d 100644 --- a/testing/mockstore/resource.go +++ b/testing/mockstore/resource.go @@ -3,7 +3,7 @@ package mockstore import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" "github.com/sensu/sensu-go/backend/store/patch" ) diff --git a/testing/mockstore/tessen.go b/testing/mockstore/tessen.go index afd7ba4a6d..9eb9664cf4 100644 --- a/testing/mockstore/tessen.go +++ b/testing/mockstore/tessen.go @@ -3,7 +3,7 @@ package mockstore import ( "context" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/backend/store" ) diff --git a/token/token.go b/token/token.go index 43103d82e5..d509a557b4 100644 --- a/token/token.go +++ b/token/token.go @@ -7,7 +7,7 @@ import ( "strings" "text/template" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/types/dynamic" ) diff --git a/token/token_test.go b/token/token_test.go index 5418f2cb6b..52bee376f3 100644 --- a/token/token_test.go +++ b/token/token_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - corev2 "github.com/sensu/sensu-go/api/core/v2" + corev2 "github.com/sensu/core/v2" "github.com/sensu/sensu-go/testing/testutil" "github.com/sensu/sensu-go/types/dynamic" "github.com/stretchr/testify/assert"