From 00786f4596ad7e8c53483d89d91ac6fc8e58c3e6 Mon Sep 17 00:00:00 2001 From: Makoto Toriyama Date: Sat, 25 Jun 2022 17:37:11 +0900 Subject: [PATCH 1/8] rename module to m3dev --- server/config/admin_config.go | 2 +- server/config/admin_config_test.go | 4 ++-- server/config/channel_config.go | 2 +- server/config/channel_config_test.go | 4 ++-- server/config/config.go | 2 +- server/config/config_test.go | 4 ++-- server/config/http_server_config.go | 2 +- server/config/http_server_config_test.go | 4 ++-- server/config/internal_utils.go | 2 +- server/config/jwt_validation_config.go | 4 ++-- server/config/jwt_validation_config_test.go | 6 ++--- server/config/outgoing_webhook_config.go | 2 +- server/config/outgoing_webhook_config_test.go | 4 ++-- server/config/redis_storage_config.go | 2 +- server/config/redis_storage_config_test.go | 4 ++-- server/config/sentry_config.go | 2 +- server/config/sentry_config_test.go | 2 +- server/config/storage_config.go | 2 +- server/config/storage_config_test.go | 2 +- server/config/telemetry_config.go | 2 +- server/config/telemetry_config_test.go | 2 +- .../domain/channel/cached_channel_provider.go | 2 +- .../channel/cached_channel_provider_test.go | 6 ++--- server/domain/channel/channel.go | 6 ++--- server/domain/channel/channel_atom.go | 8 +++---- .../domain/channel/channel_atom_test_utils.go | 8 +++---- server/domain/channel/channel_provider.go | 8 +++---- .../domain/channel/channel_provider_test.go | 10 ++++----- server/domain/channel/channel_test.go | 4 ++-- server/domain/channel/channel_test_utils.go | 2 +- server/domain/channel_test.go | 2 +- server/domain/datatype_cidr_test.go | 2 +- server/domain/datatype_duration_test.go | 2 +- server/domain/datatype_regex_test.go | 2 +- .../domain/datatype_template_string_test.go | 2 +- .../domain/datatype_teplate_strings_test.go | 2 +- server/domain/errors_test.go | 2 +- server/domain/jwt_test.go | 2 +- server/domain/message_test.go | 2 +- server/domain/storage_test.go | 2 +- server/domain/subscriber_test.go | 2 +- server/domain/system_clock_test.go | 2 +- server/dsps/README.md | 2 +- server/go.mod | 2 +- server/http/endpoints.go | 10 ++++----- server/http/endpoints/admin_jwt.go | 8 +++---- server/http/endpoints/admin_jwt_test.go | 10 ++++----- server/http/endpoints/admin_logging.go | 6 ++--- server/http/endpoints/admin_logging_test.go | 6 ++--- .../endpoints/channel_polling_subscriber.go | 10 ++++----- .../channel_polling_subscriber_test.go | 8 +++---- server/http/endpoints/channel_publish.go | 8 +++---- server/http/endpoints/channel_publish_test.go | 8 +++---- server/http/endpoints/path_prefix_test.go | 4 ++-- server/http/endpoints/probe.go | 6 ++--- server/http/endpoints/probe_test.go | 4 ++-- server/http/lifecycle/server_close_test.go | 4 ++-- server/http/middleware/admin_auth.go | 6 ++--- server/http/middleware/admin_auth_test.go | 4 ++-- server/http/middleware/default_headers.go | 2 +- .../http/middleware/default_headers_test.go | 4 ++-- server/http/middleware/errors.go | 2 +- server/http/middleware/logger.go | 8 +++---- server/http/middleware/logger_test.go | 16 +++++++------- server/http/middleware/middleware_test.go | 2 +- server/http/middleware/normal_auth.go | 12 +++++----- server/http/middleware/normal_auth_test.go | 14 ++++++------ server/http/middleware/real_ip.go | 6 ++--- server/http/middleware/real_ip_test.go | 12 +++++----- server/http/middleware/sentry.go | 4 ++-- server/http/middleware/sentry_test.go | 10 ++++----- server/http/middleware/tracing.go | 4 ++-- server/http/middleware/tracing_test.go | 6 ++--- server/http/router/middleware_test.go | 6 ++--- server/http/router/request_test.go | 2 +- server/http/router/response_writer_test.go | 2 +- server/http/router/router_test.go | 6 ++--- server/http/server_dependencies.go | 12 +++++----- server/http/testing/http_recorder.go | 2 +- server/http/testing/http_request.go | 2 +- server/http/testing/http_response.go | 2 +- server/http/testing/mock_storage.go | 2 +- server/http/testing/server.go | 20 ++++++++--------- server/http/utils/request.go | 2 +- server/http/utils/response.go | 4 ++-- server/http/webserver.go | 10 ++++----- server/jwt/alg.go | 2 +- server/jwt/alg_test.go | 4 ++-- server/jwt/jti.go | 2 +- server/jwt/jti_test.go | 6 ++--- server/jwt/signing_key.go | 2 +- server/jwt/signing_key_test.go | 4 ++-- server/jwt/testing/generate.go | 4 ++-- server/jwt/validator/validator.go | 6 ++--- server/jwt/validator/validator_test.go | 8 +++---- server/logger/filter_test.go | 2 +- server/logger/global_handler_test.go | 2 +- server/logger/global_logger.go | 2 +- server/logger/global_logger_test.go | 2 +- server/logger/level_test.go | 2 +- server/logger/logger_test.go | 2 +- server/main.go | 22 +++++++++---------- server/sentry/sentry.go | 2 +- server/sentry/sentry_test.go | 4 ++-- server/sentry/stub_test.go | 2 +- server/storage/deps/storage_deps.go | 4 ++-- server/storage/deps/testing/empty_deps.go | 6 ++--- server/storage/multiplex/ack_handle.go | 2 +- server/storage/multiplex/ack_handle_test.go | 4 ++-- server/storage/multiplex/jwt.go | 2 +- server/storage/multiplex/probe.go | 2 +- server/storage/multiplex/pubsub_messaging.go | 4 ++-- server/storage/multiplex/pubsub_subscriber.go | 2 +- .../storage/multiplex/storage_multiplexer.go | 2 +- .../storage_multiplexer_generic_test.go | 12 +++++----- .../multiplex/storage_multiplexer_test.go | 16 +++++++------- server/storage/multiplex/sync_utils.go | 4 ++-- server/storage/onmemory/ack_handle.go | 2 +- server/storage/onmemory/ack_handle_test.go | 4 ++-- server/storage/onmemory/direct_test.go | 8 +++---- server/storage/onmemory/gc.go | 2 +- server/storage/onmemory/jwt.go | 2 +- server/storage/onmemory/onmemory_storage.go | 10 ++++----- .../onmemory/onmemory_storage_lock_test.go | 6 ++--- .../storage/onmemory/onmemory_storage_test.go | 10 ++++----- server/storage/onmemory/pubsub_messaging.go | 2 +- server/storage/onmemory/pubsub_subscriber.go | 2 +- server/storage/redis/ack_handle.go | 2 +- server/storage/redis/ack_handle_test.go | 4 ++-- server/storage/redis/channel_ttl.go | 2 +- .../redis/internal/pubsub/awaiter_test.go | 2 +- .../redis/internal/pubsub/dispatcher.go | 8 +++---- .../redis/internal/pubsub/dispatcher_test.go | 2 +- .../redis/internal/pubsub/stub/dispatcher.go | 2 +- .../storage/redis/internal/pubsub/worker.go | 2 +- .../redis/internal/pubsub/worker_test.go | 2 +- .../storage/redis/internal/redis_command.go | 2 +- .../redis/internal/redis_connection.go | 6 ++--- server/storage/redis/jwt.go | 2 +- server/storage/redis/jwt_test.go | 4 ++-- server/storage/redis/message_envelope.go | 2 +- server/storage/redis/probe_test.go | 2 +- server/storage/redis/pubsub_messaging.go | 6 ++--- .../redis/pubsub_messaging__fetch_test.go | 6 ++--- .../redis/pubsub_messaging__oldmsg_test.go | 4 ++-- .../redis/pubsub_messaging__publish_test.go | 4 ++-- server/storage/redis/pubsub_messaging_lua.go | 6 ++--- .../redis/pubsub_messaging_lua_test.go | 6 ++--- server/storage/redis/pubsub_subscriber.go | 2 +- server/storage/redis/pubsub_subscriber_lua.go | 6 ++--- .../redis/pubsub_subscriber_lua_test.go | 4 ++-- .../storage/redis/pubsub_subscriber_test.go | 6 ++--- server/storage/redis/redis_keys.go | 2 +- server/storage/redis/redis_scripts.go | 2 +- server/storage/redis/redis_storage.go | 14 ++++++------ .../storage/redis/redis_storage_ctor_test.go | 8 +++---- .../redis/redis_storage_private_test.go | 14 ++++++------ server/storage/redis/redis_storage_test.go | 12 +++++----- server/storage/redis/test_utils.go | 4 ++-- server/storage/storage.go | 16 +++++++------- server/storage/testing/channel.go | 4 ++-- server/storage/testing/core.go | 2 +- server/storage/testing/jwt.go | 2 +- server/storage/testing/pubsub.go | 4 ++-- server/storage/testing/tests.go | 2 +- server/storage/tracing/jwt.go | 2 +- server/storage/tracing/jwt_test.go | 2 +- server/storage/tracing/pubsub.go | 2 +- server/storage/tracing/pubsub_test.go | 2 +- server/storage/tracing/tracing_storage.go | 6 ++--- .../tracing_storage_passthrough_test.go | 10 ++++----- .../storage/tracing/tracing_storage_test.go | 14 ++++++------ server/sync/daemon.go | 4 ++-- server/sync/daemon_test.go | 6 ++--- server/sync/lock_test.go | 4 ++-- server/telemetry/opentelemetry/exporter.go | 2 +- .../telemetry/opentelemetry/open_telemetry.go | 4 ++-- .../opentelemetry/open_telemetry_test.go | 6 ++--- server/telemetry/opentelemetry/tracing.go | 4 ++-- .../telemetry/opentelemetry/tracing_test.go | 6 ++--- server/telemetry/telemetry.go | 6 ++--- server/telemetry/telemetry_test.go | 2 +- server/telemetry/testing.go | 6 ++--- server/telemetry/tracing.go | 4 ++-- server/telemetry/tracing_test.go | 2 +- server/testing/channel.go | 2 +- server/testing/datatype_utils.go | 2 +- server/testing/message_utils.go | 2 +- server/testing/stub_clock.go | 2 +- server/unix/check_ulimit_unix.go | 2 +- server/webhook/outgoing/body.go | 2 +- server/webhook/outgoing/client.go | 8 +++---- server/webhook/outgoing/client_multiplexer.go | 4 ++-- .../outgoing/client_multiplexer_test.go | 2 +- server/webhook/outgoing/client_template.go | 8 +++---- .../webhook/outgoing/client_template_test.go | 6 ++--- server/webhook/outgoing/client_test.go | 6 ++--- server/webhook/outgoing/http_client.go | 2 +- server/webhook/outgoing/http_client_test.go | 4 ++-- server/webhook/outgoing/retry.go | 6 ++--- server/webhook/outgoing/retry_test.go | 2 +- 201 files changed, 470 insertions(+), 470 deletions(-) diff --git a/server/config/admin_config.go b/server/config/admin_config.go index 5940717..e6d2e8b 100644 --- a/server/config/admin_config.go +++ b/server/config/admin_config.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // AdminConfig represents administration feature settings diff --git a/server/config/admin_config_test.go b/server/config/admin_config_test.go index bc86a60..87bcd8c 100644 --- a/server/config/admin_config_test.go +++ b/server/config/admin_config_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" ) func TestAdminDefaultConfig(t *testing.T) { diff --git a/server/config/channel_config.go b/server/config/channel_config.go index ad0680c..fa8d052 100644 --- a/server/config/channel_config.go +++ b/server/config/channel_config.go @@ -3,7 +3,7 @@ package config import ( "fmt" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) var channlesConfigDefault = ChannelsConfig{ diff --git a/server/config/channel_config_test.go b/server/config/channel_config_test.go index 23b5908..20fe9c2 100644 --- a/server/config/channel_config_test.go +++ b/server/config/channel_config_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" - . "github.com/saiya/dsps/server/testing" + . "github.com/m3dev/dsps/server/config" + . "github.com/m3dev/dsps/server/testing" ) func TestChannelDefaultConfig(t *testing.T) { diff --git a/server/config/config.go b/server/config/config.go index cddd70f..f33f81c 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -14,7 +14,7 @@ import ( "github.com/go-playground/validator/v10" goyaml "github.com/goccy/go-yaml" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // Overrides is to override configuration file. diff --git a/server/config/config_test.go b/server/config/config_test.go index c8b0abd..6dfaa03 100644 --- a/server/config/config_test.go +++ b/server/config/config_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" - . "github.com/saiya/dsps/server/testing" + . "github.com/m3dev/dsps/server/config" + . "github.com/m3dev/dsps/server/testing" ) func TestTabInYaml(t *testing.T) { diff --git a/server/config/http_server_config.go b/server/config/http_server_config.go index d5d7ee0..839cd55 100644 --- a/server/config/http_server_config.go +++ b/server/config/http_server_config.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // HTTPServerConfig represents HTTP webserver settings diff --git a/server/config/http_server_config_test.go b/server/config/http_server_config_test.go index 33eb2d2..d9a40ef 100644 --- a/server/config/http_server_config_test.go +++ b/server/config/http_server_config_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" ) func TestHttpServerDefaultValues(t *testing.T) { diff --git a/server/config/internal_utils.go b/server/config/internal_utils.go index 6c00312..010191b 100644 --- a/server/config/internal_utils.go +++ b/server/config/internal_utils.go @@ -5,7 +5,7 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func makeIntPtr(value int) *int { diff --git a/server/config/jwt_validation_config.go b/server/config/jwt_validation_config.go index 17d4954..f30cde4 100644 --- a/server/config/jwt_validation_config.go +++ b/server/config/jwt_validation_config.go @@ -3,8 +3,8 @@ package config import ( "fmt" - "github.com/saiya/dsps/server/domain" - jwtpkg "github.com/saiya/dsps/server/jwt" + "github.com/m3dev/dsps/server/domain" + jwtpkg "github.com/m3dev/dsps/server/jwt" ) // JwtValidationConfig is JWT configuration of a channel diff --git a/server/config/jwt_validation_config_test.go b/server/config/jwt_validation_config_test.go index 970d3aa..5ce7884 100644 --- a/server/config/jwt_validation_config_test.go +++ b/server/config/jwt_validation_config_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/testing" + . "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/testing" ) func TestChannelJwtDefaultConfig(t *testing.T) { diff --git a/server/config/outgoing_webhook_config.go b/server/config/outgoing_webhook_config.go index 3e98f7a..cfabd8c 100644 --- a/server/config/outgoing_webhook_config.go +++ b/server/config/outgoing_webhook_config.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // OutgoingWebhookConfig is webhook configuration of a channel diff --git a/server/config/outgoing_webhook_config_test.go b/server/config/outgoing_webhook_config_test.go index 405cdd9..9dd5b3c 100644 --- a/server/config/outgoing_webhook_config_test.go +++ b/server/config/outgoing_webhook_config_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" - . "github.com/saiya/dsps/server/testing" + . "github.com/m3dev/dsps/server/config" + . "github.com/m3dev/dsps/server/testing" ) func TestChannelWebhookDefaultConfig(t *testing.T) { diff --git a/server/config/redis_storage_config.go b/server/config/redis_storage_config.go index 7fd0c3d..8ffb9a7 100644 --- a/server/config/redis_storage_config.go +++ b/server/config/redis_storage_config.go @@ -5,7 +5,7 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // RedisStorageConfig is definition of "storage.redis" configuration diff --git a/server/config/redis_storage_config_test.go b/server/config/redis_storage_config_test.go index aa0b6e6..7075061 100644 --- a/server/config/redis_storage_config_test.go +++ b/server/config/redis_storage_config_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" - . "github.com/saiya/dsps/server/testing" + . "github.com/m3dev/dsps/server/config" + . "github.com/m3dev/dsps/server/testing" ) func TestRedisMissingAddrs(t *testing.T) { diff --git a/server/config/sentry_config.go b/server/config/sentry_config.go index 20acebd..d8d066a 100644 --- a/server/config/sentry_config.go +++ b/server/config/sentry_config.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // SentryConfig contains Sentry configuration diff --git a/server/config/sentry_config_test.go b/server/config/sentry_config_test.go index 768d6d1..1f266e5 100644 --- a/server/config/sentry_config_test.go +++ b/server/config/sentry_config_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" + . "github.com/m3dev/dsps/server/config" ) func TestSentryDefaults(t *testing.T) { diff --git a/server/config/storage_config.go b/server/config/storage_config.go index f4d2f25..2095f43 100644 --- a/server/config/storage_config.go +++ b/server/config/storage_config.go @@ -3,7 +3,7 @@ package config import ( "fmt" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // StoragesConfig is list of storage configs diff --git a/server/config/storage_config_test.go b/server/config/storage_config_test.go index 63e2175..a4f56d5 100644 --- a/server/config/storage_config_test.go +++ b/server/config/storage_config_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" + . "github.com/m3dev/dsps/server/config" ) func TestEmptyStorages(t *testing.T) { diff --git a/server/config/telemetry_config.go b/server/config/telemetry_config.go index e17fa07..bc35dd7 100644 --- a/server/config/telemetry_config.go +++ b/server/config/telemetry_config.go @@ -3,7 +3,7 @@ package config import ( "fmt" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // TelemetryConfig is to setup tracing/metrics. diff --git a/server/config/telemetry_config_test.go b/server/config/telemetry_config_test.go index 8e0077e..0457c31 100644 --- a/server/config/telemetry_config_test.go +++ b/server/config/telemetry_config_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/config" + . "github.com/m3dev/dsps/server/config" ) func TestTracingEmptyConfig(t *testing.T) { diff --git a/server/domain/channel/cached_channel_provider.go b/server/domain/channel/cached_channel_provider.go index 84d6c79..7d7ddc7 100644 --- a/server/domain/channel/cached_channel_provider.go +++ b/server/domain/channel/cached_channel_provider.go @@ -6,7 +6,7 @@ import ( "sync" "time" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" "golang.org/x/xerrors" ) diff --git a/server/domain/channel/cached_channel_provider_test.go b/server/domain/channel/cached_channel_provider_test.go index 74b87c3..781df14 100644 --- a/server/domain/channel/cached_channel_provider_test.go +++ b/server/domain/channel/cached_channel_provider_test.go @@ -10,9 +10,9 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/domain/mock" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/domain/mock" + dspstesting "github.com/m3dev/dsps/server/testing" ) func TestPositiveCache(t *testing.T) { diff --git a/server/domain/channel/channel.go b/server/domain/channel/channel.go index 3f90fa3..e430842 100644 --- a/server/domain/channel/channel.go +++ b/server/domain/channel/channel.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/saiya/dsps/server/domain" - jwtv "github.com/saiya/dsps/server/jwt/validator" - "github.com/saiya/dsps/server/webhook/outgoing" + "github.com/m3dev/dsps/server/domain" + jwtv "github.com/m3dev/dsps/server/jwt/validator" + "github.com/m3dev/dsps/server/webhook/outgoing" "golang.org/x/xerrors" ) diff --git a/server/domain/channel/channel_atom.go b/server/domain/channel/channel_atom.go index 3f72f99..6a438aa 100644 --- a/server/domain/channel/channel_atom.go +++ b/server/domain/channel/channel_atom.go @@ -6,10 +6,10 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - jwtv "github.com/saiya/dsps/server/jwt/validator" - "github.com/saiya/dsps/server/webhook/outgoing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + jwtv "github.com/m3dev/dsps/server/jwt/validator" + "github.com/m3dev/dsps/server/webhook/outgoing" ) // channelAtom is an Channel implementation corresponds to a ChannelConfiguration diff --git a/server/domain/channel/channel_atom_test_utils.go b/server/domain/channel/channel_atom_test_utils.go index 26240e9..d7d375f 100644 --- a/server/domain/channel/channel_atom_test_utils.go +++ b/server/domain/channel/channel_atom_test_utils.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) func newChannelAtomByYaml(t *testing.T, yaml string, validate bool) *channelAtom { diff --git a/server/domain/channel/channel_provider.go b/server/domain/channel/channel_provider.go index a9cc08a..89b540f 100644 --- a/server/domain/channel/channel_provider.go +++ b/server/domain/channel/channel_provider.go @@ -5,10 +5,10 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) // ProviderDeps contains objects required by ChannelProvider diff --git a/server/domain/channel/channel_provider_test.go b/server/domain/channel/channel_provider_test.go index b1e6cae..4fdbf54 100644 --- a/server/domain/channel/channel_provider_test.go +++ b/server/domain/channel/channel_provider_test.go @@ -8,11 +8,11 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" + dspstesting "github.com/m3dev/dsps/server/testing" ) func TestProvider(t *testing.T) { diff --git a/server/domain/channel/channel_test.go b/server/domain/channel/channel_test.go index 4316fdb..d4ca9d8 100644 --- a/server/domain/channel/channel_test.go +++ b/server/domain/channel/channel_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain/channel" - . "github.com/saiya/dsps/server/jwt/testing" + "github.com/m3dev/dsps/server/domain/channel" + . "github.com/m3dev/dsps/server/jwt/testing" ) func TestChannelExpire(t *testing.T) { diff --git a/server/domain/channel/channel_test_utils.go b/server/domain/channel/channel_test_utils.go index 9d4c6bc..508b567 100644 --- a/server/domain/channel/channel_test_utils.go +++ b/server/domain/channel/channel_test_utils.go @@ -3,7 +3,7 @@ package channel import ( "testing" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/domain/channel_test.go b/server/domain/channel_test.go index d87cec6..5e1d8ad 100644 --- a/server/domain/channel_test.go +++ b/server/domain/channel_test.go @@ -3,7 +3,7 @@ package domain_test import ( "testing" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/domain/datatype_cidr_test.go b/server/domain/datatype_cidr_test.go index 1110aae..6f3d3da 100644 --- a/server/domain/datatype_cidr_test.go +++ b/server/domain/datatype_cidr_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" ) func TestCIDRStrings(t *testing.T) { diff --git a/server/domain/datatype_duration_test.go b/server/domain/datatype_duration_test.go index af199c3..33fb101 100644 --- a/server/domain/datatype_duration_test.go +++ b/server/domain/datatype_duration_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" ) func TestDurationJsonMarshal(t *testing.T) { diff --git a/server/domain/datatype_regex_test.go b/server/domain/datatype_regex_test.go index 36108a0..a672408 100644 --- a/server/domain/datatype_regex_test.go +++ b/server/domain/datatype_regex_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" ) func TestNewRegex(t *testing.T) { diff --git a/server/domain/datatype_template_string_test.go b/server/domain/datatype_template_string_test.go index d926d48..260f1e3 100644 --- a/server/domain/datatype_template_string_test.go +++ b/server/domain/datatype_template_string_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" ) func TestNewTemplateString(t *testing.T) { diff --git a/server/domain/datatype_teplate_strings_test.go b/server/domain/datatype_teplate_strings_test.go index 6a74834..9e69605 100644 --- a/server/domain/datatype_teplate_strings_test.go +++ b/server/domain/datatype_teplate_strings_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" ) func TestSingleTemplateStringsJSONMapping(t *testing.T) { diff --git a/server/domain/errors_test.go b/server/domain/errors_test.go index 5e53cd9..ba40007 100644 --- a/server/domain/errors_test.go +++ b/server/domain/errors_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/domain/jwt_test.go b/server/domain/jwt_test.go index 53d13d3..b4f89e0 100644 --- a/server/domain/jwt_test.go +++ b/server/domain/jwt_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/domain/message_test.go b/server/domain/message_test.go index 8e31520..bf7fe7d 100644 --- a/server/domain/message_test.go +++ b/server/domain/message_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/domain/storage_test.go b/server/domain/storage_test.go index f14edc6..4095922 100644 --- a/server/domain/storage_test.go +++ b/server/domain/storage_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/domain/subscriber_test.go b/server/domain/subscriber_test.go index 200935e..1a2e40a 100644 --- a/server/domain/subscriber_test.go +++ b/server/domain/subscriber_test.go @@ -3,7 +3,7 @@ package domain_test import ( "testing" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/domain/system_clock_test.go b/server/domain/system_clock_test.go index b9c092f..9ab5e60 100644 --- a/server/domain/system_clock_test.go +++ b/server/domain/system_clock_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - . "github.com/saiya/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/dsps/README.md b/server/dsps/README.md index db6ce15..a28424a 100644 --- a/server/dsps/README.md +++ b/server/dsps/README.md @@ -1,6 +1,6 @@ # DSPS - Durable & Simple PubSub -Go to https://github.com/saiya/dsps for information. +Go to https://github.com/m3dev/dsps for information. ## Which binary file to use? diff --git a/server/go.mod b/server/go.mod index 769e756..99d0947 100644 --- a/server/go.mod +++ b/server/go.mod @@ -1,4 +1,4 @@ -module github.com/saiya/dsps/server +module github.com/m3dev/dsps/server go 1.18 diff --git a/server/http/endpoints.go b/server/http/endpoints.go index 4e86a55..b27ebdb 100644 --- a/server/http/endpoints.go +++ b/server/http/endpoints.go @@ -3,11 +3,11 @@ package http import ( "context" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/http/endpoints" - "github.com/saiya/dsps/server/http/middleware" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/http/endpoints" + "github.com/m3dev/dsps/server/http/middleware" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/logger" ) // InitEndpoints registers endpoints of the DSPS server diff --git a/server/http/endpoints/admin_jwt.go b/server/http/endpoints/admin_jwt.go index 13d1c0d..290b1e6 100644 --- a/server/http/endpoints/admin_jwt.go +++ b/server/http/endpoints/admin_jwt.go @@ -3,9 +3,9 @@ package endpoints import ( "context" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/http/utils" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/utils" ) // AdminJwtEndpointDependency is to inject required objects to the endpoint @@ -35,7 +35,7 @@ func InitAdminJwtEndpoints(adminRouter *router.Router, deps AdminJwtEndpointDepe utils.SendInvalidParameter(ctx, args.W, "exp", err) return } - // Add clock skew leeway to prevent timing attack: https://github.com/saiya/dsps/pull/54 + // Add clock skew leeway to prevent timing attack: https://github.com/m3dev/dsps/pull/54 exp = domain.JwtExp(exp.Time().Add(cp.JWTClockSkewLeewayMax().Duration)) if err := storage.RevokeJwt(ctx, exp, domain.JwtJti(jti)); err != nil { diff --git a/server/http/endpoints/admin_jwt_test.go b/server/http/endpoints/admin_jwt_test.go index 66b6cfc..068c3d7 100644 --- a/server/http/endpoints/admin_jwt_test.go +++ b/server/http/endpoints/admin_jwt_test.go @@ -10,10 +10,10 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/domain/mock" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain/mock" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" ) func TestJwtRevokeWithoutPubSubSupport(t *testing.T) { @@ -63,7 +63,7 @@ func TestJwtRevokeSuccess(t *testing.T) { }) } -// Regression of https://github.com/saiya/dsps/pull/54 +// Regression of https://github.com/m3dev/dsps/pull/54 func TestJwtRevokeLeeway(t *testing.T) { ctx := context.Background() ctrl := gomock.NewController(t) diff --git a/server/http/endpoints/admin_logging.go b/server/http/endpoints/admin_logging.go index d6765e6..1347cc0 100644 --- a/server/http/endpoints/admin_logging.go +++ b/server/http/endpoints/admin_logging.go @@ -3,9 +3,9 @@ package endpoints import ( "context" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/http/utils" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/utils" + "github.com/m3dev/dsps/server/logger" ) // AdminLoggingEndpointDependency is to inject required objects to the endpoint diff --git a/server/http/endpoints/admin_logging_test.go b/server/http/endpoints/admin_logging_test.go index c7793c1..00efe3c 100644 --- a/server/http/endpoints/admin_logging_test.go +++ b/server/http/endpoints/admin_logging_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" - "github.com/saiya/dsps/server/logger" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" + "github.com/m3dev/dsps/server/logger" ) func TestLogLevelChangeSuccess(t *testing.T) { diff --git a/server/http/endpoints/channel_polling_subscriber.go b/server/http/endpoints/channel_polling_subscriber.go index 12b427a..86b6a5e 100644 --- a/server/http/endpoints/channel_polling_subscriber.go +++ b/server/http/endpoints/channel_polling_subscriber.go @@ -7,11 +7,11 @@ import ( "strconv" "time" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/http/lifecycle" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/http/utils" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/http/lifecycle" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/utils" + "github.com/m3dev/dsps/server/logger" ) // PollingEndpointDependency is to inject required objects to the endpoint diff --git a/server/http/endpoints/channel_polling_subscriber_test.go b/server/http/endpoints/channel_polling_subscriber_test.go index 1431fd3..261a73a 100644 --- a/server/http/endpoints/channel_polling_subscriber_test.go +++ b/server/http/endpoints/channel_polling_subscriber_test.go @@ -11,10 +11,10 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/domain/mock" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain/mock" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" ) func TestPollingEndpointsWithoutPubSubSupport(t *testing.T) { diff --git a/server/http/endpoints/channel_publish.go b/server/http/endpoints/channel_publish.go index 023728e..2008798 100644 --- a/server/http/endpoints/channel_publish.go +++ b/server/http/endpoints/channel_publish.go @@ -9,10 +9,10 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/http/utils" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/utils" + "github.com/m3dev/dsps/server/logger" ) // PublishEndpointDependency is to inject required objects to the endpoint diff --git a/server/http/endpoints/channel_publish_test.go b/server/http/endpoints/channel_publish_test.go index 28621db..12656f5 100644 --- a/server/http/endpoints/channel_publish_test.go +++ b/server/http/endpoints/channel_publish_test.go @@ -9,10 +9,10 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/domain/mock" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain/mock" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" ) func TestPublishEndpointsWithoutPubSubSupport(t *testing.T) { diff --git a/server/http/endpoints/path_prefix_test.go b/server/http/endpoints/path_prefix_test.go index cb2bcb1..700841d 100644 --- a/server/http/endpoints/path_prefix_test.go +++ b/server/http/endpoints/path_prefix_test.go @@ -6,8 +6,8 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" ) func TestPathPrefix(t *testing.T) { diff --git a/server/http/endpoints/probe.go b/server/http/endpoints/probe.go index cbe41ec..f1d1b29 100644 --- a/server/http/endpoints/probe.go +++ b/server/http/endpoints/probe.go @@ -4,9 +4,9 @@ import ( "context" "net/http" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/http/utils" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/utils" ) // ProbeEndpointDependency is to inject required objects to the endpoint diff --git a/server/http/endpoints/probe_test.go b/server/http/endpoints/probe_test.go index 6fb9908..b747d0e 100644 --- a/server/http/endpoints/probe_test.go +++ b/server/http/endpoints/probe_test.go @@ -7,8 +7,8 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" ) func TestProbeSuccess(t *testing.T) { diff --git a/server/http/lifecycle/server_close_test.go b/server/http/lifecycle/server_close_test.go index 81202d3..3a77391 100644 --- a/server/http/lifecycle/server_close_test.go +++ b/server/http/lifecycle/server_close_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - . "github.com/saiya/dsps/server/http/lifecycle" - . "github.com/saiya/dsps/server/testing" + . "github.com/m3dev/dsps/server/http/lifecycle" + . "github.com/m3dev/dsps/server/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/http/middleware/admin_auth.go b/server/http/middleware/admin_auth.go index c354602..4dc76d9 100644 --- a/server/http/middleware/admin_auth.go +++ b/server/http/middleware/admin_auth.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/http/utils" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/utils" ) // AdminAuthDependency is to inject required objects to the middleware diff --git a/server/http/middleware/admin_auth_test.go b/server/http/middleware/admin_auth_test.go index 79f6871..9cd9695 100644 --- a/server/http/middleware/admin_auth_test.go +++ b/server/http/middleware/admin_auth_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" ) func TestAdminAuthMiddleware(t *testing.T) { diff --git a/server/http/middleware/default_headers.go b/server/http/middleware/default_headers.go index c4c16f2..46da037 100644 --- a/server/http/middleware/default_headers.go +++ b/server/http/middleware/default_headers.go @@ -3,7 +3,7 @@ package middleware import ( "context" - "github.com/saiya/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/router" ) // DefaultHeadersDependency is to inject required objects to the middleware diff --git a/server/http/middleware/default_headers_test.go b/server/http/middleware/default_headers_test.go index 46b78bc..4345ccf 100644 --- a/server/http/middleware/default_headers_test.go +++ b/server/http/middleware/default_headers_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" ) func TestDefaultHeadersFilter(t *testing.T) { diff --git a/server/http/middleware/errors.go b/server/http/middleware/errors.go index 3eb25ec..1b49efc 100644 --- a/server/http/middleware/errors.go +++ b/server/http/middleware/errors.go @@ -1,7 +1,7 @@ package middleware import ( - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) var ( diff --git a/server/http/middleware/logger.go b/server/http/middleware/logger.go index 1d1f7d0..198e42c 100644 --- a/server/http/middleware/logger.go +++ b/server/http/middleware/logger.go @@ -5,10 +5,10 @@ import ( "fmt" "time" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/http/utils" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/utils" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" ) // LoggingMiddleware is middleware for logging diff --git a/server/http/middleware/logger_test.go b/server/http/middleware/logger_test.go index 8558ffc..e290447 100644 --- a/server/http/middleware/logger_test.go +++ b/server/http/middleware/logger_test.go @@ -13,14 +13,14 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap/zapcore" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/middleware" - . "github.com/saiya/dsps/server/http/router" - . "github.com/saiya/dsps/server/http/testing" - "github.com/saiya/dsps/server/http/utils" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/middleware" + . "github.com/m3dev/dsps/server/http/router" + . "github.com/m3dev/dsps/server/http/testing" + "github.com/m3dev/dsps/server/http/utils" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" ) func TestLoggerMiddleware(t *testing.T) { diff --git a/server/http/middleware/middleware_test.go b/server/http/middleware/middleware_test.go index e1c025d..69680f2 100644 --- a/server/http/middleware/middleware_test.go +++ b/server/http/middleware/middleware_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/saiya/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/router" "github.com/stretchr/testify/assert" ) diff --git a/server/http/middleware/normal_auth.go b/server/http/middleware/normal_auth.go index 3bf1847..75d38b5 100644 --- a/server/http/middleware/normal_auth.go +++ b/server/http/middleware/normal_auth.go @@ -7,12 +7,12 @@ import ( sentrygo "github.com/getsentry/sentry-go" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/http/utils" - "github.com/saiya/dsps/server/jwt" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/utils" + "github.com/m3dev/dsps/server/jwt" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" ) // NormalAuthDependency is to inject required objects to the middleware diff --git a/server/http/middleware/normal_auth_test.go b/server/http/middleware/normal_auth_test.go index 7ee5e0e..1f32a71 100644 --- a/server/http/middleware/normal_auth_test.go +++ b/server/http/middleware/normal_auth_test.go @@ -12,13 +12,13 @@ import ( "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/middleware" - "github.com/saiya/dsps/server/http/router" - . "github.com/saiya/dsps/server/http/testing" - . "github.com/saiya/dsps/server/jwt/testing" - "github.com/saiya/dsps/server/sentry" + . "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/middleware" + "github.com/m3dev/dsps/server/http/router" + . "github.com/m3dev/dsps/server/http/testing" + . "github.com/m3dev/dsps/server/jwt/testing" + "github.com/m3dev/dsps/server/sentry" ) const jwtDir = "../../jwt" diff --git a/server/http/middleware/real_ip.go b/server/http/middleware/real_ip.go index ce426b8..bd49a0f 100644 --- a/server/http/middleware/real_ip.go +++ b/server/http/middleware/real_ip.go @@ -7,9 +7,9 @@ import ( "github.com/natureglobal/realip" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/sentry" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/sentry" ) // RealIPDependency is to inject required objects to the middleware diff --git a/server/http/middleware/real_ip_test.go b/server/http/middleware/real_ip_test.go index e1c4a09..9dd2c74 100644 --- a/server/http/middleware/real_ip_test.go +++ b/server/http/middleware/real_ip_test.go @@ -9,12 +9,12 @@ import ( "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/middleware" - . "github.com/saiya/dsps/server/http/router" - . "github.com/saiya/dsps/server/http/testing" - "github.com/saiya/dsps/server/sentry" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/middleware" + . "github.com/m3dev/dsps/server/http/router" + . "github.com/m3dev/dsps/server/http/testing" + "github.com/m3dev/dsps/server/sentry" ) type stubRealIPDeps struct { diff --git a/server/http/middleware/sentry.go b/server/http/middleware/sentry.go index 0d682ff..5d4cdfb 100644 --- a/server/http/middleware/sentry.go +++ b/server/http/middleware/sentry.go @@ -5,8 +5,8 @@ import ( sentryhttp "github.com/getsentry/sentry-go/http" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/sentry" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/sentry" ) // SentryDependency is to inject required objects to the middleware diff --git a/server/http/middleware/sentry_test.go b/server/http/middleware/sentry_test.go index 69968f6..9f352f3 100644 --- a/server/http/middleware/sentry_test.go +++ b/server/http/middleware/sentry_test.go @@ -11,11 +11,11 @@ import ( "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/middleware" - . "github.com/saiya/dsps/server/http/router" - . "github.com/saiya/dsps/server/http/testing" - "github.com/saiya/dsps/server/sentry" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/middleware" + . "github.com/m3dev/dsps/server/http/router" + . "github.com/m3dev/dsps/server/http/testing" + "github.com/m3dev/dsps/server/sentry" ) func TestSentryMiddleware(t *testing.T) { diff --git a/server/http/middleware/tracing.go b/server/http/middleware/tracing.go index ad1367c..1f06066 100644 --- a/server/http/middleware/tracing.go +++ b/server/http/middleware/tracing.go @@ -3,8 +3,8 @@ package middleware import ( "context" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/telemetry" ) // TracingDependency is to inject required objects to the middleware diff --git a/server/http/middleware/tracing_test.go b/server/http/middleware/tracing_test.go index dd0ce4c..71b93af 100644 --- a/server/http/middleware/tracing_test.go +++ b/server/http/middleware/tracing_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/trace" - . "github.com/saiya/dsps/server/http" - . "github.com/saiya/dsps/server/http/testing" - "github.com/saiya/dsps/server/telemetry" + . "github.com/m3dev/dsps/server/http" + . "github.com/m3dev/dsps/server/http/testing" + "github.com/m3dev/dsps/server/telemetry" ) func TestTracingMiddleware(t *testing.T) { diff --git a/server/http/router/middleware_test.go b/server/http/router/middleware_test.go index ffa661e..d15b305 100644 --- a/server/http/router/middleware_test.go +++ b/server/http/router/middleware_test.go @@ -10,9 +10,9 @@ import ( "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http/router" - . "github.com/saiya/dsps/server/http/testing" - "github.com/saiya/dsps/server/http/utils" + . "github.com/m3dev/dsps/server/http/router" + . "github.com/m3dev/dsps/server/http/testing" + "github.com/m3dev/dsps/server/http/utils" ) func TestRouterMiddlewares(t *testing.T) { diff --git a/server/http/router/request_test.go b/server/http/router/request_test.go index 89bc5d1..2839b82 100644 --- a/server/http/router/request_test.go +++ b/server/http/router/request_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http/router" + . "github.com/m3dev/dsps/server/http/router" ) func TestRequest(t *testing.T) { diff --git a/server/http/router/response_writer_test.go b/server/http/router/response_writer_test.go index abd1c36..43dce6e 100644 --- a/server/http/router/response_writer_test.go +++ b/server/http/router/response_writer_test.go @@ -4,7 +4,7 @@ import ( "net/http/httptest" "testing" - . "github.com/saiya/dsps/server/http/router" + . "github.com/m3dev/dsps/server/http/router" "github.com/stretchr/testify/assert" ) diff --git a/server/http/router/router_test.go b/server/http/router/router_test.go index c9f9e0f..adc7c2d 100644 --- a/server/http/router/router_test.go +++ b/server/http/router/router_test.go @@ -9,9 +9,9 @@ import ( "github.com/julienschmidt/httprouter" "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/http/router" - . "github.com/saiya/dsps/server/http/testing" - "github.com/saiya/dsps/server/http/utils" + . "github.com/m3dev/dsps/server/http/router" + . "github.com/m3dev/dsps/server/http/testing" + "github.com/m3dev/dsps/server/http/utils" ) func TestRouterHTTPMethods(t *testing.T) { diff --git a/server/http/server_dependencies.go b/server/http/server_dependencies.go index fc2129d..c5545d9 100644 --- a/server/http/server_dependencies.go +++ b/server/http/server_dependencies.go @@ -1,12 +1,12 @@ package http import ( - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/http/lifecycle" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/http/lifecycle" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) // ServerDependencies struct holds all resource references to build web server diff --git a/server/http/testing/http_recorder.go b/server/http/testing/http_recorder.go index af6b4e0..f8f158c 100644 --- a/server/http/testing/http_recorder.go +++ b/server/http/testing/http_recorder.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // AssertRecordedCode assert DSPS standard HTTP error response diff --git a/server/http/testing/http_request.go b/server/http/testing/http_request.go index b0150a5..11c4ddf 100644 --- a/server/http/testing/http_request.go +++ b/server/http/testing/http_request.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" - dspshttp "github.com/saiya/dsps/server/http" + dspshttp "github.com/m3dev/dsps/server/http" ) // DoHTTPRequest performs HTTP request diff --git a/server/http/testing/http_response.go b/server/http/testing/http_response.go index 71d9b2a..9293857 100644 --- a/server/http/testing/http_response.go +++ b/server/http/testing/http_response.go @@ -6,7 +6,7 @@ import ( "net/http" "testing" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/http/testing/mock_storage.go b/server/http/testing/mock_storage.go index d816242..96c7cac 100644 --- a/server/http/testing/mock_storage.go +++ b/server/http/testing/mock_storage.go @@ -3,7 +3,7 @@ package testing import ( "github.com/golang/mock/gomock" - "github.com/saiya/dsps/server/domain/mock" + "github.com/m3dev/dsps/server/domain/mock" ) // NewMockStorages creates storage mock objects diff --git a/server/http/testing/server.go b/server/http/testing/server.go index 60fb4b0..6b1d6cd 100644 --- a/server/http/testing/server.go +++ b/server/http/testing/server.go @@ -8,16 +8,16 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/domain/channel" - "github.com/saiya/dsps/server/http" - httplifecycle "github.com/saiya/dsps/server/http/lifecycle" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/storage" - "github.com/saiya/dsps/server/storage/deps" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/domain/channel" + "github.com/m3dev/dsps/server/http" + httplifecycle "github.com/m3dev/dsps/server/http/lifecycle" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/storage" + "github.com/m3dev/dsps/server/storage/deps" + "github.com/m3dev/dsps/server/telemetry" ) // WithServerDeps runs given test function with ServerDependencies diff --git a/server/http/utils/request.go b/server/http/utils/request.go index c0a8825..de22245 100644 --- a/server/http/utils/request.go +++ b/server/http/utils/request.go @@ -4,7 +4,7 @@ import ( "context" "regexp" - "github.com/saiya/dsps/server/http/router" + "github.com/m3dev/dsps/server/http/router" ) var bearerTokenRegex = regexp.MustCompile("^Bearer ") diff --git a/server/http/utils/response.go b/server/http/utils/response.go index 5532403..3c3c028 100644 --- a/server/http/utils/response.go +++ b/server/http/utils/response.go @@ -9,8 +9,8 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" ) // SendNoContent sends 204 No Content diff --git a/server/http/webserver.go b/server/http/webserver.go index e39773b..a7a1639 100644 --- a/server/http/webserver.go +++ b/server/http/webserver.go @@ -11,11 +11,11 @@ import ( "github.com/julienschmidt/httprouter" - "github.com/saiya/dsps/server/config" - httplifecycle "github.com/saiya/dsps/server/http/lifecycle" - "github.com/saiya/dsps/server/http/middleware" - "github.com/saiya/dsps/server/http/router" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/config" + httplifecycle "github.com/m3dev/dsps/server/http/lifecycle" + "github.com/m3dev/dsps/server/http/middleware" + "github.com/m3dev/dsps/server/http/router" + "github.com/m3dev/dsps/server/logger" ) // StartServer starts HTTP web server diff --git a/server/jwt/alg.go b/server/jwt/alg.go index 60af072..db45194 100644 --- a/server/jwt/alg.go +++ b/server/jwt/alg.go @@ -4,7 +4,7 @@ import ( "fmt" "regexp" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // ValidateAlg validates JWT alg diff --git a/server/jwt/alg_test.go b/server/jwt/alg_test.go index a6b3c99..bac5c92 100644 --- a/server/jwt/alg_test.go +++ b/server/jwt/alg_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/jwt" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/jwt" ) func TestValidateAlg(t *testing.T) { diff --git a/server/jwt/jti.go b/server/jwt/jti.go index dcb60ea..980235f 100644 --- a/server/jwt/jti.go +++ b/server/jwt/jti.go @@ -3,7 +3,7 @@ package jwt import ( jwtgo "github.com/dgrijalva/jwt-go/v4" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // ExtractJti read "jti" claim of JWT. Does not perform any JWT validation. diff --git a/server/jwt/jti_test.go b/server/jwt/jti_test.go index fcea871..43c7ba1 100644 --- a/server/jwt/jti_test.go +++ b/server/jwt/jti_test.go @@ -5,9 +5,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/jwt" - . "github.com/saiya/dsps/server/jwt/testing" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/jwt" + . "github.com/m3dev/dsps/server/jwt/testing" ) func TestExtractJti(t *testing.T) { diff --git a/server/jwt/signing_key.go b/server/jwt/signing_key.go index bd922ff..b37f945 100644 --- a/server/jwt/signing_key.go +++ b/server/jwt/signing_key.go @@ -6,7 +6,7 @@ import ( jwtgo "github.com/dgrijalva/jwt-go/v4" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // ValidateVerificationKey validates plain-text representation of public key diff --git a/server/jwt/signing_key_test.go b/server/jwt/signing_key_test.go index bbc3138..faa4121 100644 --- a/server/jwt/signing_key_test.go +++ b/server/jwt/signing_key_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/jwt" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/jwt" ) func TestKeyLoading(t *testing.T) { diff --git a/server/jwt/testing/generate.go b/server/jwt/testing/generate.go index c8fb6b1..98c2f5f 100644 --- a/server/jwt/testing/generate.go +++ b/server/jwt/testing/generate.go @@ -6,8 +6,8 @@ import ( jwtgo "github.com/dgrijalva/jwt-go/v4" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/jwt" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/jwt" "github.com/stretchr/testify/assert" ) diff --git a/server/jwt/validator/validator.go b/server/jwt/validator/validator.go index 539eb0f..d7fcd97 100644 --- a/server/jwt/validator/validator.go +++ b/server/jwt/validator/validator.go @@ -8,9 +8,9 @@ import ( jwtgo "github.com/dgrijalva/jwt-go/v4" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/jwt" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/jwt" ) // Template is a template of Validator diff --git a/server/jwt/validator/validator_test.go b/server/jwt/validator/validator_test.go index 62f8c0a..682bfa8 100644 --- a/server/jwt/validator/validator_test.go +++ b/server/jwt/validator/validator_test.go @@ -8,10 +8,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/jwt/testing" - . "github.com/saiya/dsps/server/jwt/validator" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/jwt/testing" + . "github.com/m3dev/dsps/server/jwt/validator" ) var pregeneratedPublicKeys = map[domain.JwtAlg][]string{ diff --git a/server/logger/filter_test.go b/server/logger/filter_test.go index ef49083..8298e9b 100644 --- a/server/logger/filter_test.go +++ b/server/logger/filter_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/logger" + . "github.com/m3dev/dsps/server/logger" ) func TestFilter(t *testing.T) { diff --git a/server/logger/global_handler_test.go b/server/logger/global_handler_test.go index 4ba4217..a7e34be 100644 --- a/server/logger/global_handler_test.go +++ b/server/logger/global_handler_test.go @@ -6,7 +6,7 @@ import ( "sync/atomic" "testing" - . "github.com/saiya/dsps/server/logger" + . "github.com/m3dev/dsps/server/logger" "github.com/stretchr/testify/assert" ) diff --git a/server/logger/global_logger.go b/server/logger/global_logger.go index 5e43360..1187dfc 100644 --- a/server/logger/global_logger.go +++ b/server/logger/global_logger.go @@ -8,7 +8,7 @@ import ( "go.uber.org/zap/zapcore" "golang.org/x/xerrors" - "github.com/saiya/dsps/server/config" + "github.com/m3dev/dsps/server/config" ) var rootLoggerLock sync.RWMutex diff --git a/server/logger/global_logger_test.go b/server/logger/global_logger_test.go index 50eb8ed..8d7084c 100644 --- a/server/logger/global_logger_test.go +++ b/server/logger/global_logger_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" + "github.com/m3dev/dsps/server/config" ) func TestInitLogger(t *testing.T) { diff --git a/server/logger/level_test.go b/server/logger/level_test.go index ee00ef1..205133d 100644 --- a/server/logger/level_test.go +++ b/server/logger/level_test.go @@ -4,7 +4,7 @@ import ( "strings" "testing" - . "github.com/saiya/dsps/server/logger" + . "github.com/m3dev/dsps/server/logger" "github.com/stretchr/testify/assert" ) diff --git a/server/logger/logger_test.go b/server/logger/logger_test.go index 873e2f6..a211bbd 100644 --- a/server/logger/logger_test.go +++ b/server/logger/logger_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "go.uber.org/zap/zapcore" - . "github.com/saiya/dsps/server/logger" + . "github.com/m3dev/dsps/server/logger" ) func TestLoggerMethods(t *testing.T) { diff --git a/server/main.go b/server/main.go index 4a23f7f..c72c2f8 100644 --- a/server/main.go +++ b/server/main.go @@ -7,17 +7,17 @@ import ( "fmt" "os" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/domain/channel" - "github.com/saiya/dsps/server/http" - httplifecycle "github.com/saiya/dsps/server/http/lifecycle" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/storage" - "github.com/saiya/dsps/server/storage/deps" - "github.com/saiya/dsps/server/telemetry" - "github.com/saiya/dsps/server/unix" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/domain/channel" + "github.com/m3dev/dsps/server/http" + httplifecycle "github.com/m3dev/dsps/server/http/lifecycle" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/storage" + "github.com/m3dev/dsps/server/storage/deps" + "github.com/m3dev/dsps/server/telemetry" + "github.com/m3dev/dsps/server/unix" ) // Git commit hash or tag diff --git a/server/sentry/sentry.go b/server/sentry/sentry.go index a7f9959..dfe359a 100644 --- a/server/sentry/sentry.go +++ b/server/sentry/sentry.go @@ -5,7 +5,7 @@ import ( "time" sentrygo "github.com/getsentry/sentry-go" - "github.com/saiya/dsps/server/config" + "github.com/m3dev/dsps/server/config" "golang.org/x/xerrors" ) diff --git a/server/sentry/sentry_test.go b/server/sentry/sentry_test.go index 4bc232d..2c9bdb7 100644 --- a/server/sentry/sentry_test.go +++ b/server/sentry/sentry_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" ) func TestNewSentry(t *testing.T) { diff --git a/server/sentry/stub_test.go b/server/sentry/stub_test.go index 7db9220..fb62989 100644 --- a/server/sentry/stub_test.go +++ b/server/sentry/stub_test.go @@ -8,7 +8,7 @@ import ( sentrygo "github.com/getsentry/sentry-go" "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/sentry" + . "github.com/m3dev/dsps/server/sentry" ) func TestStub(t *testing.T) { diff --git a/server/storage/deps/storage_deps.go b/server/storage/deps/storage_deps.go index a7c29af..6ab6bec 100644 --- a/server/storage/deps/storage_deps.go +++ b/server/storage/deps/storage_deps.go @@ -1,8 +1,8 @@ package deps import ( - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) // StorageDeps contains objects required by storage implementations. diff --git a/server/storage/deps/testing/empty_deps.go b/server/storage/deps/testing/empty_deps.go index cbcf4b9..87f90b4 100644 --- a/server/storage/deps/testing/empty_deps.go +++ b/server/storage/deps/testing/empty_deps.go @@ -3,9 +3,9 @@ package testing import ( "testing" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/storage/deps" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/storage/deps" + "github.com/m3dev/dsps/server/telemetry" ) // EmptyDeps fills stub objects diff --git a/server/storage/multiplex/ack_handle.go b/server/storage/multiplex/ack_handle.go index e63bdce..6291f70 100644 --- a/server/storage/multiplex/ack_handle.go +++ b/server/storage/multiplex/ack_handle.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // EncodeMultiplexAckHandle encapsle AckHandle of multiplex storage diff --git a/server/storage/multiplex/ack_handle_test.go b/server/storage/multiplex/ack_handle_test.go index c2b7166..8f3b526 100644 --- a/server/storage/multiplex/ack_handle_test.go +++ b/server/storage/multiplex/ack_handle_test.go @@ -3,8 +3,8 @@ package multiplex import ( "testing" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/testing" ) func TestMalformedHandle(t *testing.T) { diff --git a/server/storage/multiplex/jwt.go b/server/storage/multiplex/jwt.go index ad08732..586a055 100644 --- a/server/storage/multiplex/jwt.go +++ b/server/storage/multiplex/jwt.go @@ -3,7 +3,7 @@ package multiplex import ( "context" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func (s *storageMultiplexer) RevokeJwt(ctx context.Context, exp domain.JwtExp, jti domain.JwtJti) error { diff --git a/server/storage/multiplex/probe.go b/server/storage/multiplex/probe.go index 30274ca..d3fa414 100644 --- a/server/storage/multiplex/probe.go +++ b/server/storage/multiplex/probe.go @@ -6,7 +6,7 @@ import ( "golang.org/x/sync/errgroup" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func (s *storageMultiplexer) Liveness(ctx context.Context) (interface{}, error) { diff --git a/server/storage/multiplex/pubsub_messaging.go b/server/storage/multiplex/pubsub_messaging.go index 2e6caab..0d6c281 100644 --- a/server/storage/multiplex/pubsub_messaging.go +++ b/server/storage/multiplex/pubsub_messaging.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" ) const parallelFetchEarlyReturnWindow = 300 * time.Millisecond diff --git a/server/storage/multiplex/pubsub_subscriber.go b/server/storage/multiplex/pubsub_subscriber.go index 5a98c63..20a1ef1 100644 --- a/server/storage/multiplex/pubsub_subscriber.go +++ b/server/storage/multiplex/pubsub_subscriber.go @@ -3,7 +3,7 @@ package multiplex import ( "context" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func (s *storageMultiplexer) NewSubscriber(ctx context.Context, sl domain.SubscriberLocator) error { diff --git a/server/storage/multiplex/storage_multiplexer.go b/server/storage/multiplex/storage_multiplexer.go index d2cbcb1..2720438 100644 --- a/server/storage/multiplex/storage_multiplexer.go +++ b/server/storage/multiplex/storage_multiplexer.go @@ -7,7 +7,7 @@ import ( "golang.org/x/sync/errgroup" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // NewStorageMultiplexer creates Storage instance that wraps multiple Storage instances diff --git a/server/storage/multiplex/storage_multiplexer_generic_test.go b/server/storage/multiplex/storage_multiplexer_generic_test.go index 86f993b..dcc1a01 100644 --- a/server/storage/multiplex/storage_multiplexer_generic_test.go +++ b/server/storage/multiplex/storage_multiplexer_generic_test.go @@ -5,12 +5,12 @@ import ( "fmt" "testing" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/deps/testing" - . "github.com/saiya/dsps/server/storage/multiplex" - "github.com/saiya/dsps/server/storage/onmemory" - . "github.com/saiya/dsps/server/storage/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/deps/testing" + . "github.com/m3dev/dsps/server/storage/multiplex" + "github.com/m3dev/dsps/server/storage/onmemory" + . "github.com/m3dev/dsps/server/storage/testing" ) var onmemoryMultiplexCtor = func(t *testing.T, onmemConfigs ...config.OnmemoryStorageConfig) StorageCtor { diff --git a/server/storage/multiplex/storage_multiplexer_test.go b/server/storage/multiplex/storage_multiplexer_test.go index e8e5387..6a72ebd 100644 --- a/server/storage/multiplex/storage_multiplexer_test.go +++ b/server/storage/multiplex/storage_multiplexer_test.go @@ -10,14 +10,14 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/domain/mock" - . "github.com/saiya/dsps/server/storage/deps/testing" - . "github.com/saiya/dsps/server/storage/multiplex" - "github.com/saiya/dsps/server/storage/onmemory" - . "github.com/saiya/dsps/server/storage/testing" - . "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain/mock" + . "github.com/m3dev/dsps/server/storage/deps/testing" + . "github.com/m3dev/dsps/server/storage/multiplex" + "github.com/m3dev/dsps/server/storage/onmemory" + . "github.com/m3dev/dsps/server/storage/testing" + . "github.com/m3dev/dsps/server/testing" ) func TestLongPollingEarlyReturn(t *testing.T) { diff --git a/server/storage/multiplex/sync_utils.go b/server/storage/multiplex/sync_utils.go index f1ba424..b2a13a7 100644 --- a/server/storage/multiplex/sync_utils.go +++ b/server/storage/multiplex/sync_utils.go @@ -6,8 +6,8 @@ import ( "fmt" "sync" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" ) type childResult struct { diff --git a/server/storage/onmemory/ack_handle.go b/server/storage/onmemory/ack_handle.go index f307f44..e7447e2 100644 --- a/server/storage/onmemory/ack_handle.go +++ b/server/storage/onmemory/ack_handle.go @@ -7,7 +7,7 @@ import ( "encoding/json" "hash/crc32" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" "golang.org/x/xerrors" ) diff --git a/server/storage/onmemory/ack_handle_test.go b/server/storage/onmemory/ack_handle_test.go index 39cce9e..765695c 100644 --- a/server/storage/onmemory/ack_handle_test.go +++ b/server/storage/onmemory/ack_handle_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "testing" - "github.com/saiya/dsps/server/domain" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + dspstesting "github.com/m3dev/dsps/server/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/storage/onmemory/direct_test.go b/server/storage/onmemory/direct_test.go index 798be91..7ea6e0b 100644 --- a/server/storage/onmemory/direct_test.go +++ b/server/storage/onmemory/direct_test.go @@ -6,10 +6,10 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/deps/testing" - . "github.com/saiya/dsps/server/storage/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/deps/testing" + . "github.com/m3dev/dsps/server/storage/testing" ) func makeRawStorage(t *testing.T) *onmemoryStorage { diff --git a/server/storage/onmemory/gc.go b/server/storage/onmemory/gc.go index 9af9f0a..e7264b6 100644 --- a/server/storage/onmemory/gc.go +++ b/server/storage/onmemory/gc.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/saiya/dsps/server/sync" + "github.com/m3dev/dsps/server/sync" ) var gcInterval = 5 * time.Minute diff --git a/server/storage/onmemory/jwt.go b/server/storage/onmemory/jwt.go index cd9479e..766cb2b 100644 --- a/server/storage/onmemory/jwt.go +++ b/server/storage/onmemory/jwt.go @@ -3,7 +3,7 @@ package onmemory import ( "context" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func (s *onmemoryStorage) RevokeJwt(ctx context.Context, exp domain.JwtExp, jti domain.JwtJti) error { diff --git a/server/storage/onmemory/onmemory_storage.go b/server/storage/onmemory/onmemory_storage.go index 041da92..c77e982 100644 --- a/server/storage/onmemory/onmemory_storage.go +++ b/server/storage/onmemory/onmemory_storage.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/storage/deps" - "github.com/saiya/dsps/server/sync" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/storage/deps" + "github.com/m3dev/dsps/server/sync" ) // NewOnmemoryStorage creates Storage instance diff --git a/server/storage/onmemory/onmemory_storage_lock_test.go b/server/storage/onmemory/onmemory_storage_lock_test.go index ae478bd..a648bb5 100644 --- a/server/storage/onmemory/onmemory_storage_lock_test.go +++ b/server/storage/onmemory/onmemory_storage_lock_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/sync" - . "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/sync" + . "github.com/m3dev/dsps/server/testing" ) func TestShutdownLockFail(t *testing.T) { diff --git a/server/storage/onmemory/onmemory_storage_test.go b/server/storage/onmemory/onmemory_storage_test.go index 3358616..e6a7984 100644 --- a/server/storage/onmemory/onmemory_storage_test.go +++ b/server/storage/onmemory/onmemory_storage_test.go @@ -4,11 +4,11 @@ import ( "context" "testing" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/deps/testing" - . "github.com/saiya/dsps/server/storage/onmemory" - . "github.com/saiya/dsps/server/storage/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/deps/testing" + . "github.com/m3dev/dsps/server/storage/onmemory" + . "github.com/m3dev/dsps/server/storage/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/storage/onmemory/pubsub_messaging.go b/server/storage/onmemory/pubsub_messaging.go index 597fdda..e63e17e 100644 --- a/server/storage/onmemory/pubsub_messaging.go +++ b/server/storage/onmemory/pubsub_messaging.go @@ -8,7 +8,7 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) type onmemoryMessage struct { diff --git a/server/storage/onmemory/pubsub_subscriber.go b/server/storage/onmemory/pubsub_subscriber.go index 05330ec..59bda73 100644 --- a/server/storage/onmemory/pubsub_subscriber.go +++ b/server/storage/onmemory/pubsub_subscriber.go @@ -6,7 +6,7 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) type onmemoryChannel struct { diff --git a/server/storage/redis/ack_handle.go b/server/storage/redis/ack_handle.go index 1c929a9..3de8202 100644 --- a/server/storage/redis/ack_handle.go +++ b/server/storage/redis/ack_handle.go @@ -9,7 +9,7 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // AckHandleData represents decoded (raw) ReceiptHandle diff --git a/server/storage/redis/ack_handle_test.go b/server/storage/redis/ack_handle_test.go index 988d2d1..5c3b7e3 100644 --- a/server/storage/redis/ack_handle_test.go +++ b/server/storage/redis/ack_handle_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "testing" - "github.com/saiya/dsps/server/domain" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + dspstesting "github.com/m3dev/dsps/server/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/storage/redis/channel_ttl.go b/server/storage/redis/channel_ttl.go index 0491c88..5367546 100644 --- a/server/storage/redis/channel_ttl.go +++ b/server/storage/redis/channel_ttl.go @@ -5,7 +5,7 @@ import ( "strconv" "time" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) type channelTTLSec int64 diff --git a/server/storage/redis/internal/pubsub/awaiter_test.go b/server/storage/redis/internal/pubsub/awaiter_test.go index 2f36bb8..9eefad2 100644 --- a/server/storage/redis/internal/pubsub/awaiter_test.go +++ b/server/storage/redis/internal/pubsub/awaiter_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/storage/redis/internal/pubsub" + . "github.com/m3dev/dsps/server/storage/redis/internal/pubsub" ) func TestResolve(t *testing.T) { diff --git a/server/storage/redis/internal/pubsub/dispatcher.go b/server/storage/redis/internal/pubsub/dispatcher.go index 9204e0b..918432f 100644 --- a/server/storage/redis/internal/pubsub/dispatcher.go +++ b/server/storage/redis/internal/pubsub/dispatcher.go @@ -7,10 +7,10 @@ import ( "time" "github.com/go-redis/redis/v8" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/storage/deps" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/storage/deps" + "github.com/m3dev/dsps/server/telemetry" ) // RedisPubSubDispatcher subscribe Redis PubSub with PSUBSCRIBE (wildcard subscription), then broadcast message to redisPubsubAwaiter. diff --git a/server/storage/redis/internal/pubsub/dispatcher_test.go b/server/storage/redis/internal/pubsub/dispatcher_test.go index b438e3f..eddb7f1 100644 --- a/server/storage/redis/internal/pubsub/dispatcher_test.go +++ b/server/storage/redis/internal/pubsub/dispatcher_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" - storagetesting "github.com/saiya/dsps/server/storage/deps/testing" + storagetesting "github.com/m3dev/dsps/server/storage/deps/testing" ) func TestDispatcherParams(t *testing.T) { diff --git a/server/storage/redis/internal/pubsub/stub/dispatcher.go b/server/storage/redis/internal/pubsub/stub/dispatcher.go index f55413c..51966d8 100644 --- a/server/storage/redis/internal/pubsub/stub/dispatcher.go +++ b/server/storage/redis/internal/pubsub/stub/dispatcher.go @@ -4,7 +4,7 @@ import ( "context" "sync" - "github.com/saiya/dsps/server/storage/redis/internal/pubsub" + "github.com/m3dev/dsps/server/storage/redis/internal/pubsub" ) // RedisPubSubDispatcherStub implements RedisPubSubDispatcher diff --git a/server/storage/redis/internal/pubsub/worker.go b/server/storage/redis/internal/pubsub/worker.go index b77e540..ab3aff7 100644 --- a/server/storage/redis/internal/pubsub/worker.go +++ b/server/storage/redis/internal/pubsub/worker.go @@ -7,7 +7,7 @@ import ( "github.com/go-redis/redis/v8" "golang.org/x/xerrors" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/logger" ) type worker interface { diff --git a/server/storage/redis/internal/pubsub/worker_test.go b/server/storage/redis/internal/pubsub/worker_test.go index 78db02d..220360b 100644 --- a/server/storage/redis/internal/pubsub/worker_test.go +++ b/server/storage/redis/internal/pubsub/worker_test.go @@ -10,7 +10,7 @@ import ( "github.com/go-redis/redis/v8" "github.com/stretchr/testify/assert" - dspstesting "github.com/saiya/dsps/server/testing" + dspstesting "github.com/m3dev/dsps/server/testing" ) func TestWorkerHandlerCall(t *testing.T) { diff --git a/server/storage/redis/internal/redis_command.go b/server/storage/redis/internal/redis_command.go index 02e4a28..a5146c3 100644 --- a/server/storage/redis/internal/redis_command.go +++ b/server/storage/redis/internal/redis_command.go @@ -7,7 +7,7 @@ import ( "github.com/go-redis/redis/v8" - "github.com/saiya/dsps/server/storage/redis/internal/pubsub" + "github.com/m3dev/dsps/server/storage/redis/internal/pubsub" ) //go:generate mockgen -source=${GOFILE} -package=mock -destination=./mock/${GOFILE} diff --git a/server/storage/redis/internal/redis_connection.go b/server/storage/redis/internal/redis_connection.go index f7b8b57..a9dbf49 100644 --- a/server/storage/redis/internal/redis_connection.go +++ b/server/storage/redis/internal/redis_connection.go @@ -6,9 +6,9 @@ import ( "github.com/go-redis/redis/extra/redisotel" "github.com/go-redis/redis/v8" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/storage/redis/internal/pubsub" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/storage/redis/internal/pubsub" ) // RedisConnection represents Redis connection system diff --git a/server/storage/redis/jwt.go b/server/storage/redis/jwt.go index d19911b..91cf53f 100644 --- a/server/storage/redis/jwt.go +++ b/server/storage/redis/jwt.go @@ -3,7 +3,7 @@ package redis import ( "context" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func (s *redisStorage) RevokeJwt(ctx context.Context, exp domain.JwtExp, jti domain.JwtJti) error { diff --git a/server/storage/redis/jwt_test.go b/server/storage/redis/jwt_test.go index 1855f0b..f8c8147 100644 --- a/server/storage/redis/jwt_test.go +++ b/server/storage/redis/jwt_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/saiya/dsps/server/domain" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + dspstesting "github.com/m3dev/dsps/server/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/storage/redis/message_envelope.go b/server/storage/redis/message_envelope.go index e6aa4c8..bd9ba88 100644 --- a/server/storage/redis/message_envelope.go +++ b/server/storage/redis/message_envelope.go @@ -5,7 +5,7 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) type messageEnvelope struct { diff --git a/server/storage/redis/probe_test.go b/server/storage/redis/probe_test.go index 6e6874d..28851f7 100644 --- a/server/storage/redis/probe_test.go +++ b/server/storage/redis/probe_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/golang/mock/gomock" - dspstesting "github.com/saiya/dsps/server/testing" + dspstesting "github.com/m3dev/dsps/server/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/storage/redis/pubsub_messaging.go b/server/storage/redis/pubsub_messaging.go index 163a6c2..77473c0 100644 --- a/server/storage/redis/pubsub_messaging.go +++ b/server/storage/redis/pubsub_messaging.go @@ -7,9 +7,9 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/storage/redis/internal/pubsub" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/storage/redis/internal/pubsub" ) func (s *redisStorage) PublishMessages(ctx context.Context, msgs []domain.Message) error { diff --git a/server/storage/redis/pubsub_messaging__fetch_test.go b/server/storage/redis/pubsub_messaging__fetch_test.go index 019a890..5fddd84 100644 --- a/server/storage/redis/pubsub_messaging__fetch_test.go +++ b/server/storage/redis/pubsub_messaging__fetch_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/golang/mock/gomock" - "github.com/saiya/dsps/server/domain" - storagetesting "github.com/saiya/dsps/server/storage/testing" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + storagetesting "github.com/m3dev/dsps/server/storage/testing" + dspstesting "github.com/m3dev/dsps/server/testing" ) func TestFetchMessagesFirstPollingClockGetError(t *testing.T) { diff --git a/server/storage/redis/pubsub_messaging__oldmsg_test.go b/server/storage/redis/pubsub_messaging__oldmsg_test.go index 6336215..08444e4 100644 --- a/server/storage/redis/pubsub_messaging__oldmsg_test.go +++ b/server/storage/redis/pubsub_messaging__oldmsg_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/saiya/dsps/server/domain" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + dspstesting "github.com/m3dev/dsps/server/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/storage/redis/pubsub_messaging__publish_test.go b/server/storage/redis/pubsub_messaging__publish_test.go index 40ded24..3663183 100644 --- a/server/storage/redis/pubsub_messaging__publish_test.go +++ b/server/storage/redis/pubsub_messaging__publish_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/saiya/dsps/server/domain" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + dspstesting "github.com/m3dev/dsps/server/testing" ) func TestIsOldMessagesMGetError(t *testing.T) { diff --git a/server/storage/redis/pubsub_messaging_lua.go b/server/storage/redis/pubsub_messaging_lua.go index d7d870f..a5d5e55 100644 --- a/server/storage/redis/pubsub_messaging_lua.go +++ b/server/storage/redis/pubsub_messaging_lua.go @@ -7,9 +7,9 @@ import ( "github.com/go-redis/redis/v8" "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" - internal "github.com/saiya/dsps/server/storage/redis/internal" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" + internal "github.com/m3dev/dsps/server/storage/redis/internal" ) func (s *redisStorage) loadPubSubMessagingScripts(ctx context.Context) error { diff --git a/server/storage/redis/pubsub_messaging_lua_test.go b/server/storage/redis/pubsub_messaging_lua_test.go index f6ee131..c42903c 100644 --- a/server/storage/redis/pubsub_messaging_lua_test.go +++ b/server/storage/redis/pubsub_messaging_lua_test.go @@ -10,9 +10,9 @@ import ( "github.com/go-redis/redis/v8" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/redis/internal" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/redis/internal" + dspstesting "github.com/m3dev/dsps/server/testing" ) func TestPublishMessageScript(t *testing.T) { diff --git a/server/storage/redis/pubsub_subscriber.go b/server/storage/redis/pubsub_subscriber.go index 8b0f428..c4cecf3 100644 --- a/server/storage/redis/pubsub_subscriber.go +++ b/server/storage/redis/pubsub_subscriber.go @@ -6,7 +6,7 @@ import ( "golang.org/x/sync/errgroup" "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func (s *redisStorage) NewSubscriber(ctx context.Context, sl domain.SubscriberLocator) error { diff --git a/server/storage/redis/pubsub_subscriber_lua.go b/server/storage/redis/pubsub_subscriber_lua.go index 52026b0..760d362 100644 --- a/server/storage/redis/pubsub_subscriber_lua.go +++ b/server/storage/redis/pubsub_subscriber_lua.go @@ -7,9 +7,9 @@ import ( "github.com/go-redis/redis/v8" "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" - internal "github.com/saiya/dsps/server/storage/redis/internal" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" + internal "github.com/m3dev/dsps/server/storage/redis/internal" ) func (s *redisStorage) loadPubSubSubscriberScripts(ctx context.Context) error { diff --git a/server/storage/redis/pubsub_subscriber_lua_test.go b/server/storage/redis/pubsub_subscriber_lua_test.go index 2592f23..a312191 100644 --- a/server/storage/redis/pubsub_subscriber_lua_test.go +++ b/server/storage/redis/pubsub_subscriber_lua_test.go @@ -9,8 +9,8 @@ import ( "github.com/go-redis/redis/v8" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/redis/internal" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/redis/internal" ) func TestSubscriberScript(t *testing.T) { diff --git a/server/storage/redis/pubsub_subscriber_test.go b/server/storage/redis/pubsub_subscriber_test.go index b436529..e42dc8c 100644 --- a/server/storage/redis/pubsub_subscriber_test.go +++ b/server/storage/redis/pubsub_subscriber_test.go @@ -6,9 +6,9 @@ import ( "testing" "github.com/golang/mock/gomock" - "github.com/saiya/dsps/server/domain" - storagetesting "github.com/saiya/dsps/server/storage/testing" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + storagetesting "github.com/m3dev/dsps/server/storage/testing" + dspstesting "github.com/m3dev/dsps/server/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/storage/redis/redis_keys.go b/server/storage/redis/redis_keys.go index d1ba286..eac5580 100644 --- a/server/storage/redis/redis_keys.go +++ b/server/storage/redis/redis_keys.go @@ -3,7 +3,7 @@ package redis import ( "fmt" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) type channelKeys struct { diff --git a/server/storage/redis/redis_scripts.go b/server/storage/redis/redis_scripts.go index e0cbb88..cd89561 100644 --- a/server/storage/redis/redis_scripts.go +++ b/server/storage/redis/redis_scripts.go @@ -3,7 +3,7 @@ package redis import ( "context" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/logger" "golang.org/x/sync/errgroup" ) diff --git a/server/storage/redis/redis_storage.go b/server/storage/redis/redis_storage.go index e1e46e1..ab52c0c 100644 --- a/server/storage/redis/redis_storage.go +++ b/server/storage/redis/redis_storage.go @@ -5,13 +5,13 @@ import ( "fmt" "time" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/storage/deps" - "github.com/saiya/dsps/server/storage/redis/internal" - "github.com/saiya/dsps/server/storage/redis/internal/pubsub" - "github.com/saiya/dsps/server/sync" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/storage/deps" + "github.com/m3dev/dsps/server/storage/redis/internal" + "github.com/m3dev/dsps/server/storage/redis/internal/pubsub" + "github.com/m3dev/dsps/server/sync" ) // In case of clock drift diff --git a/server/storage/redis/redis_storage_ctor_test.go b/server/storage/redis/redis_storage_ctor_test.go index 9b9061d..8f4ad17 100644 --- a/server/storage/redis/redis_storage_ctor_test.go +++ b/server/storage/redis/redis_storage_ctor_test.go @@ -8,10 +8,10 @@ import ( "github.com/go-redis/redis/v8" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/deps/testing" - storagetesting "github.com/saiya/dsps/server/storage/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/deps/testing" + storagetesting "github.com/m3dev/dsps/server/storage/testing" ) func TestInitialConnectFailure(t *testing.T) { diff --git a/server/storage/redis/redis_storage_private_test.go b/server/storage/redis/redis_storage_private_test.go index dc3e336..e9262f3 100644 --- a/server/storage/redis/redis_storage_private_test.go +++ b/server/storage/redis/redis_storage_private_test.go @@ -9,13 +9,13 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/redis/internal" - . "github.com/saiya/dsps/server/storage/redis/internal/mock" - "github.com/saiya/dsps/server/storage/redis/internal/pubsub" - . "github.com/saiya/dsps/server/storage/redis/internal/pubsub" - . "github.com/saiya/dsps/server/storage/redis/internal/pubsub/stub" - storagetesting "github.com/saiya/dsps/server/storage/testing" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/redis/internal" + . "github.com/m3dev/dsps/server/storage/redis/internal/mock" + "github.com/m3dev/dsps/server/storage/redis/internal/pubsub" + . "github.com/m3dev/dsps/server/storage/redis/internal/pubsub" + . "github.com/m3dev/dsps/server/storage/redis/internal/pubsub/stub" + storagetesting "github.com/m3dev/dsps/server/storage/testing" ) func GetRedisAddr(_ *testing.T) string { diff --git a/server/storage/redis/redis_storage_test.go b/server/storage/redis/redis_storage_test.go index 9104974..ab77e73 100644 --- a/server/storage/redis/redis_storage_test.go +++ b/server/storage/redis/redis_storage_test.go @@ -5,12 +5,12 @@ import ( "fmt" "testing" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/deps/testing" - "github.com/saiya/dsps/server/storage/multiplex" - . "github.com/saiya/dsps/server/storage/redis" - . "github.com/saiya/dsps/server/storage/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/deps/testing" + "github.com/m3dev/dsps/server/storage/multiplex" + . "github.com/m3dev/dsps/server/storage/redis" + . "github.com/m3dev/dsps/server/storage/testing" ) var storageCtor func(t *testing.T) StorageCtor = func(t *testing.T) StorageCtor { diff --git a/server/storage/redis/test_utils.go b/server/storage/redis/test_utils.go index 1a18a1a..d8c22ae 100644 --- a/server/storage/redis/test_utils.go +++ b/server/storage/redis/test_utils.go @@ -9,8 +9,8 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - internal "github.com/saiya/dsps/server/storage/redis/internal" + "github.com/m3dev/dsps/server/domain" + internal "github.com/m3dev/dsps/server/storage/redis/internal" ) func randomChannelID(_ *testing.T) domain.ChannelID { diff --git a/server/storage/storage.go b/server/storage/storage.go index ec05416..d47302f 100644 --- a/server/storage/storage.go +++ b/server/storage/storage.go @@ -6,14 +6,14 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/storage/deps" - "github.com/saiya/dsps/server/storage/multiplex" - "github.com/saiya/dsps/server/storage/onmemory" - "github.com/saiya/dsps/server/storage/redis" - "github.com/saiya/dsps/server/storage/tracing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/storage/deps" + "github.com/m3dev/dsps/server/storage/multiplex" + "github.com/m3dev/dsps/server/storage/onmemory" + "github.com/m3dev/dsps/server/storage/redis" + "github.com/m3dev/dsps/server/storage/tracing" ) // NewStorage initialize Storage instance as per given config diff --git a/server/storage/testing/channel.go b/server/storage/testing/channel.go index 53d13b9..07f8316 100644 --- a/server/storage/testing/channel.go +++ b/server/storage/testing/channel.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/saiya/dsps/server/domain" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + dspstesting "github.com/m3dev/dsps/server/testing" ) // DisabledChannelID is ChannelID that StubChannelProvider always rejects. diff --git a/server/storage/testing/core.go b/server/storage/testing/core.go index bb201cb..3d22a5e 100644 --- a/server/storage/testing/core.go +++ b/server/storage/testing/core.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - domain "github.com/saiya/dsps/server/domain" + domain "github.com/m3dev/dsps/server/domain" ) // CoreFunctionTest tests common Storage behaviors diff --git a/server/storage/testing/jwt.go b/server/storage/testing/jwt.go index 28b420e..4536d6e 100644 --- a/server/storage/testing/jwt.go +++ b/server/storage/testing/jwt.go @@ -9,7 +9,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // JwtTest tests common Storage behaviors diff --git a/server/storage/testing/pubsub.go b/server/storage/testing/pubsub.go index 5f37901..3626b50 100644 --- a/server/storage/testing/pubsub.go +++ b/server/storage/testing/pubsub.go @@ -11,8 +11,8 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - dspstesting "github.com/saiya/dsps/server/testing" + "github.com/m3dev/dsps/server/domain" + dspstesting "github.com/m3dev/dsps/server/testing" ) // PubSubTest tests common Storage behaviors diff --git a/server/storage/testing/tests.go b/server/storage/testing/tests.go index 9160900..2a7fddc 100644 --- a/server/storage/testing/tests.go +++ b/server/storage/testing/tests.go @@ -6,7 +6,7 @@ import ( "testing" "time" - domain "github.com/saiya/dsps/server/domain" + domain "github.com/m3dev/dsps/server/domain" ) // StorageCtor should construct Storage instance to test diff --git a/server/storage/tracing/jwt.go b/server/storage/tracing/jwt.go index 4acd60f..15f0251 100644 --- a/server/storage/tracing/jwt.go +++ b/server/storage/tracing/jwt.go @@ -3,7 +3,7 @@ package tracing import ( "context" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func (ts *tracingStorage) RevokeJwt(ctx context.Context, exp domain.JwtExp, jti domain.JwtJti) error { diff --git a/server/storage/tracing/jwt_test.go b/server/storage/tracing/jwt_test.go index d45ba97..c6df105 100644 --- a/server/storage/tracing/jwt_test.go +++ b/server/storage/tracing/jwt_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/trace" ) diff --git a/server/storage/tracing/pubsub.go b/server/storage/tracing/pubsub.go index 6d6d0f9..dba11aa 100644 --- a/server/storage/tracing/pubsub.go +++ b/server/storage/tracing/pubsub.go @@ -3,7 +3,7 @@ package tracing import ( "context" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func (ts *tracingStorage) NewSubscriber(ctx context.Context, sl domain.SubscriberLocator) error { diff --git a/server/storage/tracing/pubsub_test.go b/server/storage/tracing/pubsub_test.go index ca119b7..fa359c7 100644 --- a/server/storage/tracing/pubsub_test.go +++ b/server/storage/tracing/pubsub_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/trace" ) diff --git a/server/storage/tracing/tracing_storage.go b/server/storage/tracing/tracing_storage.go index 4632fcc..5a51296 100644 --- a/server/storage/tracing/tracing_storage.go +++ b/server/storage/tracing/tracing_storage.go @@ -3,9 +3,9 @@ package tracing import ( "context" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/storage/deps" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/storage/deps" + "github.com/m3dev/dsps/server/telemetry" ) type tracingStorage struct { diff --git a/server/storage/tracing/tracing_storage_passthrough_test.go b/server/storage/tracing/tracing_storage_passthrough_test.go index 62658e9..11a012a 100644 --- a/server/storage/tracing/tracing_storage_passthrough_test.go +++ b/server/storage/tracing/tracing_storage_passthrough_test.go @@ -8,11 +8,11 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/domain/mock" - . "github.com/saiya/dsps/server/storage/deps/testing" - . "github.com/saiya/dsps/server/storage/tracing" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/domain/mock" + . "github.com/m3dev/dsps/server/storage/deps/testing" + . "github.com/m3dev/dsps/server/storage/tracing" + "github.com/m3dev/dsps/server/telemetry" ) func withMockedStorage(t *testing.T, ctrl *gomock.Controller, f func(st domain.Storage, s *MockStorage)) { diff --git a/server/storage/tracing/tracing_storage_test.go b/server/storage/tracing/tracing_storage_test.go index 5b1ca29..3fa8bd7 100644 --- a/server/storage/tracing/tracing_storage_test.go +++ b/server/storage/tracing/tracing_storage_test.go @@ -4,13 +4,13 @@ import ( "context" "testing" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - . "github.com/saiya/dsps/server/storage/deps/testing" - "github.com/saiya/dsps/server/storage/onmemory" - . "github.com/saiya/dsps/server/storage/testing" - . "github.com/saiya/dsps/server/storage/tracing" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + . "github.com/m3dev/dsps/server/storage/deps/testing" + "github.com/m3dev/dsps/server/storage/onmemory" + . "github.com/m3dev/dsps/server/storage/testing" + . "github.com/m3dev/dsps/server/storage/tracing" + "github.com/m3dev/dsps/server/telemetry" "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/trace" ) diff --git a/server/sync/daemon.go b/server/sync/daemon.go index 19982f7..a4ab241 100644 --- a/server/sync/daemon.go +++ b/server/sync/daemon.go @@ -10,8 +10,8 @@ import ( "golang.org/x/sync/errgroup" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) // DaemonSystem represents controller of daemons diff --git a/server/sync/daemon_test.go b/server/sync/daemon_test.go index 28c3d08..abbbe91 100644 --- a/server/sync/daemon_test.go +++ b/server/sync/daemon_test.go @@ -10,9 +10,9 @@ import ( "go.opentelemetry.io/otel/trace" - "github.com/saiya/dsps/server/sentry" - . "github.com/saiya/dsps/server/sync" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/sentry" + . "github.com/m3dev/dsps/server/sync" + "github.com/m3dev/dsps/server/telemetry" "github.com/stretchr/testify/assert" ) diff --git a/server/sync/lock_test.go b/server/sync/lock_test.go index ea08589..36924cf 100644 --- a/server/sync/lock_test.go +++ b/server/sync/lock_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - . "github.com/saiya/dsps/server/sync" - . "github.com/saiya/dsps/server/testing" + . "github.com/m3dev/dsps/server/sync" + . "github.com/m3dev/dsps/server/testing" ) func TestLock(t *testing.T) { diff --git a/server/telemetry/opentelemetry/exporter.go b/server/telemetry/opentelemetry/exporter.go index ab14d64..b5b0e44 100644 --- a/server/telemetry/opentelemetry/exporter.go +++ b/server/telemetry/opentelemetry/exporter.go @@ -6,7 +6,7 @@ import ( exporttrace "go.opentelemetry.io/otel/sdk/export/trace" "golang.org/x/xerrors" - "github.com/saiya/dsps/server/config" + "github.com/m3dev/dsps/server/config" ) func newExporters(config *config.OpenTelemetryConfig) ([]exporttrace.SpanExporter, error) { diff --git a/server/telemetry/opentelemetry/open_telemetry.go b/server/telemetry/opentelemetry/open_telemetry.go index f5f7c85..e41d29c 100644 --- a/server/telemetry/opentelemetry/open_telemetry.go +++ b/server/telemetry/opentelemetry/open_telemetry.go @@ -10,8 +10,8 @@ import ( ottrace "go.opentelemetry.io/otel/trace" "golang.org/x/sync/errgroup" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/logger" ) // OTFacility holds OT related objects diff --git a/server/telemetry/opentelemetry/open_telemetry_test.go b/server/telemetry/opentelemetry/open_telemetry_test.go index 35300ca..afa7b8b 100644 --- a/server/telemetry/opentelemetry/open_telemetry_test.go +++ b/server/telemetry/opentelemetry/open_telemetry_test.go @@ -5,14 +5,14 @@ import ( "errors" "testing" - "github.com/saiya/dsps/server/config" - ottesting "github.com/saiya/dsps/server/telemetry/opentelemetry/testing" + "github.com/m3dev/dsps/server/config" + ottesting "github.com/m3dev/dsps/server/telemetry/opentelemetry/testing" "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel" otsdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/trace" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/logger" ) func TestOTInitFailure(t *testing.T) { diff --git a/server/telemetry/opentelemetry/tracing.go b/server/telemetry/opentelemetry/tracing.go index b8dac06..a67de7b 100644 --- a/server/telemetry/opentelemetry/tracing.go +++ b/server/telemetry/opentelemetry/tracing.go @@ -10,7 +10,7 @@ import ( sdktrace "go.opentelemetry.io/otel/sdk/trace" ottrace "go.opentelemetry.io/otel/trace" - "github.com/saiya/dsps/server/config" + "github.com/m3dev/dsps/server/config" ) // Tracing contains OT tracing resources @@ -39,7 +39,7 @@ func newTracing(config *config.OpenTelemetryTracingConfig, injection tracingInje wrapTraceExporters(config, setup.exporters), sdktrace.WithResource(setup.resource), )...) - setup.Tracer = setup.traceProvider.Tracer("github.com/saiya/dsps") + setup.Tracer = setup.traceProvider.Tracer("github.com/m3dev/dsps") // Set global settings otel.SetTracerProvider(setup.traceProvider) diff --git a/server/telemetry/opentelemetry/tracing_test.go b/server/telemetry/opentelemetry/tracing_test.go index ebe708b..c1ab692 100644 --- a/server/telemetry/opentelemetry/tracing_test.go +++ b/server/telemetry/opentelemetry/tracing_test.go @@ -11,9 +11,9 @@ import ( "go.opentelemetry.io/otel/trace" ottrace "go.opentelemetry.io/otel/trace" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - ottesting "github.com/saiya/dsps/server/telemetry/opentelemetry/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + ottesting "github.com/m3dev/dsps/server/telemetry/opentelemetry/testing" ) func TestEmptyTracing(t *testing.T) { diff --git a/server/telemetry/telemetry.go b/server/telemetry/telemetry.go index f1ddc29..c4e6322 100644 --- a/server/telemetry/telemetry.go +++ b/server/telemetry/telemetry.go @@ -3,9 +3,9 @@ package telemetry import ( "context" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/telemetry/opentelemetry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/telemetry/opentelemetry" ) // Telemetry represents tracing/metrics system diff --git a/server/telemetry/telemetry_test.go b/server/telemetry/telemetry_test.go index 30a93f2..5c53be2 100644 --- a/server/telemetry/telemetry_test.go +++ b/server/telemetry/telemetry_test.go @@ -5,7 +5,7 @@ import ( "errors" "testing" - "github.com/saiya/dsps/server/config" + "github.com/m3dev/dsps/server/config" "github.com/stretchr/testify/assert" ) diff --git a/server/telemetry/testing.go b/server/telemetry/testing.go index ba9ea71..daa7dac 100644 --- a/server/telemetry/testing.go +++ b/server/telemetry/testing.go @@ -6,9 +6,9 @@ import ( otsdktrace "go.opentelemetry.io/otel/sdk/trace" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/telemetry/opentelemetry" - ottesting "github.com/saiya/dsps/server/telemetry/opentelemetry/testing" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/telemetry/opentelemetry" + ottesting "github.com/m3dev/dsps/server/telemetry/opentelemetry/testing" "github.com/stretchr/testify/assert" ) diff --git a/server/telemetry/tracing.go b/server/telemetry/tracing.go index bc313d1..280c63f 100644 --- a/server/telemetry/tracing.go +++ b/server/telemetry/tracing.go @@ -8,8 +8,8 @@ import ( "go.opentelemetry.io/otel/label" ottrace "go.opentelemetry.io/otel/trace" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" ) // StartHTTPSpan starts tracing span for incoming or outgoing HTTP call diff --git a/server/telemetry/tracing_test.go b/server/telemetry/tracing_test.go index 052b4c8..5c9236b 100644 --- a/server/telemetry/tracing_test.go +++ b/server/telemetry/tracing_test.go @@ -9,7 +9,7 @@ import ( ottrace "go.opentelemetry.io/otel/trace" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) func TestHTTPSpan(t *testing.T) { diff --git a/server/testing/channel.go b/server/testing/channel.go index 26dc240..d6dc2d8 100644 --- a/server/testing/channel.go +++ b/server/testing/channel.go @@ -3,7 +3,7 @@ package testing import ( "context" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // ChannelProviderFunc wraps function as ChannelProvider diff --git a/server/testing/datatype_utils.go b/server/testing/datatype_utils.go index 146fe1e..837c7d4 100644 --- a/server/testing/datatype_utils.go +++ b/server/testing/datatype_utils.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // MakeIntPtr returns *int diff --git a/server/testing/message_utils.go b/server/testing/message_utils.go index 022eb94..a3ae7f3 100644 --- a/server/testing/message_utils.go +++ b/server/testing/message_utils.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // MessagesEqual compares list of Messages by it's content diff --git a/server/testing/stub_clock.go b/server/testing/stub_clock.go index 5218f4b..38deab5 100644 --- a/server/testing/stub_clock.go +++ b/server/testing/stub_clock.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // StubClock extends domain.SystemClock interface for testing purpose. diff --git a/server/unix/check_ulimit_unix.go b/server/unix/check_ulimit_unix.go index f03e011..b742f3a 100644 --- a/server/unix/check_ulimit_unix.go +++ b/server/unix/check_ulimit_unix.go @@ -6,7 +6,7 @@ import ( "context" "syscall" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/logger" ) // NotifyUlimit generate warn logs if requirements not met. diff --git a/server/webhook/outgoing/body.go b/server/webhook/outgoing/body.go index c16982a..7e8e6bd 100644 --- a/server/webhook/outgoing/body.go +++ b/server/webhook/outgoing/body.go @@ -6,7 +6,7 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" ) // See server/doc/outgoing-webhook.md diff --git a/server/webhook/outgoing/client.go b/server/webhook/outgoing/client.go index 259fd4d..f1f937d 100644 --- a/server/webhook/outgoing/client.go +++ b/server/webhook/outgoing/client.go @@ -10,10 +10,10 @@ import ( "golang.org/x/xerrors" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) // Client is an outgoing-webhook client. diff --git a/server/webhook/outgoing/client_multiplexer.go b/server/webhook/outgoing/client_multiplexer.go index 04f35e7..7f00de7 100644 --- a/server/webhook/outgoing/client_multiplexer.go +++ b/server/webhook/outgoing/client_multiplexer.go @@ -6,8 +6,8 @@ import ( "strings" "sync" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/logger" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/logger" ) type multiplexClient struct { diff --git a/server/webhook/outgoing/client_multiplexer_test.go b/server/webhook/outgoing/client_multiplexer_test.go index 1f784bd..ab72f34 100644 --- a/server/webhook/outgoing/client_multiplexer_test.go +++ b/server/webhook/outgoing/client_multiplexer_test.go @@ -10,7 +10,7 @@ import ( "sync" "testing" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/webhook/outgoing/client_template.go b/server/webhook/outgoing/client_template.go index 2ad2726..c8df36f 100644 --- a/server/webhook/outgoing/client_template.go +++ b/server/webhook/outgoing/client_template.go @@ -4,10 +4,10 @@ import ( "context" "net/http" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) // ClientTemplate is factory object to make Client diff --git a/server/webhook/outgoing/client_template_test.go b/server/webhook/outgoing/client_template_test.go index 06c6f17..bb72432 100644 --- a/server/webhook/outgoing/client_template_test.go +++ b/server/webhook/outgoing/client_template_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) func newClientTemplateByConfig(t *testing.T, channelRegex string, json string) ClientTemplate { diff --git a/server/webhook/outgoing/client_test.go b/server/webhook/outgoing/client_test.go index 9b3a1c9..c788857 100644 --- a/server/webhook/outgoing/client_test.go +++ b/server/webhook/outgoing/client_test.go @@ -14,9 +14,9 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/otel/trace" - "github.com/saiya/dsps/server/domain" - "github.com/saiya/dsps/server/sentry" - "github.com/saiya/dsps/server/telemetry" + "github.com/m3dev/dsps/server/domain" + "github.com/m3dev/dsps/server/sentry" + "github.com/m3dev/dsps/server/telemetry" ) func newClientAndServerByConfig(t *testing.T, handler http.Handler, tplEnv domain.TemplateStringEnv, config string, h func(client *clientImpl)) { diff --git a/server/webhook/outgoing/http_client.go b/server/webhook/outgoing/http_client.go index 73fcc25..4c6aa2c 100644 --- a/server/webhook/outgoing/http_client.go +++ b/server/webhook/outgoing/http_client.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/saiya/dsps/server/config" + "github.com/m3dev/dsps/server/config" "golang.org/x/xerrors" ) diff --git a/server/webhook/outgoing/http_client_test.go b/server/webhook/outgoing/http_client_test.go index ee88eac..e1427e1 100644 --- a/server/webhook/outgoing/http_client_test.go +++ b/server/webhook/outgoing/http_client_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/domain" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/domain" "github.com/stretchr/testify/assert" ) diff --git a/server/webhook/outgoing/retry.go b/server/webhook/outgoing/retry.go index 2c43671..e1ac79b 100644 --- a/server/webhook/outgoing/retry.go +++ b/server/webhook/outgoing/retry.go @@ -14,9 +14,9 @@ import ( sentrygo "github.com/getsentry/sentry-go" "golang.org/x/xerrors" - "github.com/saiya/dsps/server/config" - "github.com/saiya/dsps/server/logger" - "github.com/saiya/dsps/server/sentry" + "github.com/m3dev/dsps/server/config" + "github.com/m3dev/dsps/server/logger" + "github.com/m3dev/dsps/server/sentry" ) type retry struct { diff --git a/server/webhook/outgoing/retry_test.go b/server/webhook/outgoing/retry_test.go index 53c77e4..b9f5439 100644 --- a/server/webhook/outgoing/retry_test.go +++ b/server/webhook/outgoing/retry_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/saiya/dsps/server/sentry" + "github.com/m3dev/dsps/server/sentry" "github.com/stretchr/testify/assert" ) From f5747da3dbd8c5c69f178dea45dffd2dbd2ef764 Mon Sep 17 00:00:00 2001 From: Makoto Toriyama Date: Fri, 24 Jun 2022 12:07:02 +0900 Subject: [PATCH 2/8] add server release action --- .github/workflows/release-latest.yaml | 32 ------- .github/workflows/release-tag.yaml | 130 +++++++------------------- server/.gitignore | 2 + server/.goreleaser.yaml | 32 +++++++ 4 files changed, 67 insertions(+), 129 deletions(-) delete mode 100644 .github/workflows/release-latest.yaml create mode 100644 server/.goreleaser.yaml diff --git a/.github/workflows/release-latest.yaml b/.github/workflows/release-latest.yaml deleted file mode 100644 index ea1a774..0000000 --- a/.github/workflows/release-latest.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Latest Release -on: - push: - branches: - - main - -jobs: - docker-images: - name: Publish docker images - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: ./server - file: ./server/Dockerfile # file is not relative to context https://github.com/docker/build-push-action/issues/51#issuecomment-702506036 - platforms: linux/amd64,linux/arm64 - push: true - tags: saiya/dsps:latest - build-args: | - DSPS_VERSION_ID=${{ github.sha }} diff --git a/.github/workflows/release-tag.yaml b/.github/workflows/release-tag.yaml index 17918b6..e227c24 100644 --- a/.github/workflows/release-tag.yaml +++ b/.github/workflows/release-tag.yaml @@ -5,107 +5,43 @@ on: - 'v*' jobs: - docker-images: - name: Publish docker images + goreleaser: runs-on: ubuntu-latest steps: - - id: get-tag - run: | - tag=$(echo "${{github.ref}}" | sed 's/^refs\/tags\/v//') - echo "::set-output name=tag::$tag" - name: Checkout - uses: actions/checkout@v2 - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 + uses: actions/checkout@v3 + - name: Setup Go + uses: actions/setup-go@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v2 + go-version: 1.18.3 + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 with: - context: ./server - file: ./server/Dockerfile # file is not relative to context https://github.com/docker/build-push-action/issues/51#issuecomment-702506036 - platforms: linux/amd64,linux/arm64 - push: true - tags: saiya/dsps:${{ steps.get-tag.outputs.tag }} - build-args: | - DSPS_VERSION_ID=${{ steps.get-tag.outputs.tag }} - - js-client-npm-release: - name: Publish JS client - runs-on: ubuntu-latest - steps: - - id: get-version - run: | - version=$(echo "${{github.ref}}" | sed 's/^refs\/tags\/v//') - echo "::set-output name=version::$version" - - name: Checkout - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: '12.x' - registry-url: 'https://registry.npmjs.org' - scope: '@dsps' - - name: Yarn publish - run: | - yarn install --frozen-lockfile - yarn publish --frozen-lockfile --non-interactive --new-version ${{ steps.get-version.outputs.version }} --no-git-tag-version - working-directory: client/js - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - github-release: - name: Create GitHub release - runs-on: ubuntu-latest - steps: - - id: get-tag - run: | - tag=$(echo "${{github.ref}}" | sed 's/^refs\/tags\/v//') - echo "::set-output name=tag::$tag" - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 - with: - go-version: '1.18.3' - - name: Build - run: | - go install - make build - working-directory: server - env: - DSPS_VERSION_ID: ${{ steps.get-tag.outputs.tag }} - - # https://zenn.dev/seita/articles/d1dba77043be8fd50eeb - - name: Get the version - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} - - name: Get commit summary - id: get_commit_summary - run: | - PREVIOUS_TAG=$(git tag --sort=-creatordate | sed -n 2p) - echo "PREVIOUS_TAG: $PREVIOUS_TAG" - COMMIT_SUMMARY="$(git log --oneline --pretty=tformat:"%h %s" $PREVIOUS_TAG..${{ github.ref }})" - COMMIT_SUMMARY="${COMMIT_SUMMARY//$'\n'/'%0A'}" - echo ::set-output name=COMMIT_SUMMARY::$COMMIT_SUMMARY - - - id: create_release - uses: actions/create-release@v1 + version: latest + workdir: server + args: release --rm-dist env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: ${{ steps.get_commit_summary.outputs.COMMIT_SUMMARY }} - draft: true - prerelease: true - - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./server/dsps.zip - asset_name: dsps.zip - asset_content_type: application/zip + + # js-client-npm-release: + # name: Publish JS client + # runs-on: ubuntu-latest + # steps: + # - id: get-version + # run: | + # version=$(echo "${{github.ref}}" | sed 's/^refs\/tags\/v//') + # echo "::set-output name=version::$version" + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: actions/setup-node@v1 + # with: + # node-version: '12.x' + # registry-url: 'https://registry.npmjs.org' + # scope: '@dsps' + # - name: Yarn publish + # run: | + # yarn install --frozen-lockfile + # yarn publish --frozen-lockfile --non-interactive --new-version ${{ steps.get-version.outputs.version }} --no-git-tag-version + # working-directory: client/js + # env: + # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/server/.gitignore b/server/.gitignore index 750ed76..f435523 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -5,3 +5,5 @@ # Temporary file in Makefile /go.mod.bak + +dist/ diff --git a/server/.goreleaser.yaml b/server/.goreleaser.yaml new file mode 100644 index 0000000..ecd11e1 --- /dev/null +++ b/server/.goreleaser.yaml @@ -0,0 +1,32 @@ +before: + hooks: + - go install github.com/golang/mock/mockgen@latest + - go generate ./... + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin +archives: + - name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' + replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +release: + prerelease: true From e8d5342e44232bbe96702b0e9d925d425558deb7 Mon Sep 17 00:00:00 2001 From: Makoto Toriyama Date: Sat, 25 Jun 2022 16:03:48 +0900 Subject: [PATCH 3/8] add CREDITS --- server/.gitignore | 1 + server/.goreleaser.yaml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/server/.gitignore b/server/.gitignore index f435523..10b04d4 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -7,3 +7,4 @@ /go.mod.bak dist/ +CREDITS diff --git a/server/.goreleaser.yaml b/server/.goreleaser.yaml index ecd11e1..329f67a 100644 --- a/server/.goreleaser.yaml +++ b/server/.goreleaser.yaml @@ -1,8 +1,10 @@ before: hooks: - go install github.com/golang/mock/mockgen@latest + - go install github.com/Songmu/gocredits/cmd/gocredits@latest - go generate ./... - go mod tidy + - gocredits -w -skip-missing . builds: - env: - CGO_ENABLED=0 @@ -18,6 +20,10 @@ archives: windows: Windows 386: i386 amd64: x86_64 + files: + - CHANGELOG* + - CREDITS + - README* checksum: name_template: 'checksums.txt' snapshot: From 4352f210d27b2bf147c340f81843793255a7af41 Mon Sep 17 00:00:00 2001 From: Makoto Toriyama Date: Sat, 25 Jun 2022 17:11:59 +0900 Subject: [PATCH 4/8] remove release tasks from Makefile --- .github/workflows/server-test.yaml | 20 -------------------- server/.gitignore | 2 -- server/Makefile | 15 +-------------- server/dsps/.gitignore | 3 +-- 4 files changed, 2 insertions(+), 38 deletions(-) diff --git a/.github/workflows/server-test.yaml b/.github/workflows/server-test.yaml index f16ec6f..5bfe4b4 100644 --- a/.github/workflows/server-test.yaml +++ b/.github/workflows/server-test.yaml @@ -81,23 +81,3 @@ jobs: with: name: coverage.html path: server/coverage.html - - build-test: - name: Server Build - - runs-on: ubuntu-latest - env: - go-version: 1.18.3 - - steps: - - uses: actions/checkout@v2 - # Note: golangci/golangci-lint-action caches. Should not use actions/cache@v2 otherwise result in so many "File exists" - - uses: actions/setup-go@v2 - with: - go-version: ${{ env.go-version }} - - name: build - shell: bash - working-directory: server - run: | - go mod download - make build diff --git a/server/.gitignore b/server/.gitignore index 10b04d4..5b3b112 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -1,5 +1,3 @@ -/dsps.zip - /coverage* /pprof diff --git a/server/Makefile b/server/Makefile index eab8c88..d54d4a9 100644 --- a/server/Makefile +++ b/server/Makefile @@ -8,9 +8,7 @@ build_deps = $(go_module_files) $(go_src_files) | $(release_dir) DSPS_VERSION_ID ?= $(shell git rev-list -1 HEAD) ldflags = "-X main.buildVersion=$(DSPS_VERSION_ID) -X main.buildAt=$(shell date +'%s')" -.PHONY: build test test.profile lint generate - -build: $(release_dir).zip +.PHONY: test test.profile lint generate test: generate GIN_MODE=release go test -v -race -timeout 30m -coverprofile=coverage.txt -covermode=atomic ./... @@ -36,17 +34,6 @@ generate: go install github.com/golang/mock/mockgen go generate ./... -$(release_dir).zip: $(release_dir)/README.md $(release_dir)/CREDITS $(release_dir)/dsps-Linux-x86_64 $(release_dir)/dsps-Linux-aarch64 $(release_dir)/dsps-Windows-x86_64.exe $(release_dir)/dsps-Darwin-x86_64 - zip -r $@ $(release_dir)/ -x '$(release_dir)/.gitignore' - -$(release_dir): - mkdir $(release_dir) - -$(release_dir)/CREDITS: $(go_module_files) | $(release_dir) - go install github.com/Songmu/gocredits/cmd/gocredits - rm -f $@ - gocredits -skip-missing . > $@ - $(release_dir)/dsps-Linux-x86_64: $(build_deps) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $@ -ldflags "-X main.BuildDist=linux-amd64" -ldflags $(ldflags) main.go diff --git a/server/dsps/.gitignore b/server/dsps/.gitignore index 5391aa3..83615fa 100644 --- a/server/dsps/.gitignore +++ b/server/dsps/.gitignore @@ -1,4 +1,3 @@ -/CREDITS /dsps-Darwin-* /dsps-Linux-* -/dsps-Windows- +/dsps-Windows-* From c722d370ee6913bb2204bd359d83a30518b2076f Mon Sep 17 00:00:00 2001 From: Makoto Toriyama Date: Sat, 25 Jun 2022 23:15:59 +0900 Subject: [PATCH 5/8] build by goreleaser --- .github/workflows/server-test.yaml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/server-test.yaml b/.github/workflows/server-test.yaml index 5bfe4b4..6c44644 100644 --- a/.github/workflows/server-test.yaml +++ b/.github/workflows/server-test.yaml @@ -22,10 +22,11 @@ jobs: go mod download make generate - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: version: v1.46.2 working-directory: server + skip-pkg-cache: true - name: Other Lint shell: bash working-directory: server @@ -81,3 +82,25 @@ jobs: with: name: coverage.html path: server/coverage.html + + build-test: + name: Server Build + + runs-on: ubuntu-latest + env: + go-version: 1.18.3 + + steps: + - uses: actions/checkout@v2 + # Note: golangci/golangci-lint-action caches. Should not use actions/cache@v2 otherwise result in so many "File exists" + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.go-version }} + - name: build + uses: goreleaser/goreleaser-action@v2 + with: + version: latest + workdir: server + args: build --rm-dist --snapshot + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From cc63f20ea58c3562b9ff69622e629dd9088814ac Mon Sep 17 00:00:00 2001 From: Makoto Toriyama Date: Tue, 28 Jun 2022 09:46:57 +0900 Subject: [PATCH 6/8] remove DockerHub budge from README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index fe87d42..23fbc1c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ [![Server Test](https://github.com/saiya/dsps/workflows/Server%20Test/badge.svg?1)](https://github.com/saiya/dsps/actions?query=workflow%3A%22Server+Test%22) [![Codecov](https://codecov.io/gh/saiya/dsps/branch/main/graph/badge.svg?token=DSSOWMB60X)](https://codecov.io/gh/saiya/dsps) [![Go Report Card](https://goreportcard.com/badge/github.com/saiya/dsps?1)](https://goreportcard.com/report/github.com/saiya/dsps) -[![DockerHub saiya/dsps](https://img.shields.io/badge/dockerhub-saiya%2Fdsps-blue)](https://hub.docker.com/r/saiya/dsps/tags?page=1&ordering=last_updated) [![npm version](https://badge.fury.io/js/%40dsps%2Fclient.svg)](https://badge.fury.io/js/%40dsps%2Fclient) --- From b8090e186c55c4a5f527f8611c2c2917ef6fb2f7 Mon Sep 17 00:00:00 2001 From: Makoto Toriyama Date: Tue, 28 Jun 2022 10:16:48 +0900 Subject: [PATCH 7/8] Fixed budge URLs and so on --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 23fbc1c..bbf7701 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ ![DSPS Banner](./img/logo/DSPS.svg) [![MIT License](https://img.shields.io/badge/LICENSE-MIT-brightgreen)](./LICENSE) -[![Server Test](https://github.com/saiya/dsps/workflows/Server%20Test/badge.svg?1)](https://github.com/saiya/dsps/actions?query=workflow%3A%22Server+Test%22) -[![Codecov](https://codecov.io/gh/saiya/dsps/branch/main/graph/badge.svg?token=DSSOWMB60X)](https://codecov.io/gh/saiya/dsps) -[![Go Report Card](https://goreportcard.com/badge/github.com/saiya/dsps?1)](https://goreportcard.com/report/github.com/saiya/dsps) +[![Server Test](https://github.com/m3dev/dsps/workflows/Server%20Test/badge.svg?1)](https://github.com/m3dev/dsps/actions?query=workflow%3A%22Server+Test%22) +[![Codecov](https://codecov.io/gh/m3dev/dsps/branch/main/graph/badge.svg)](https://codecov.io/gh/m3dev/dsps) +[![Go Report Card](https://goreportcard.com/badge/github.com/m3dev/dsps?1)](https://goreportcard.com/report/github.com/m3dev/dsps) [![npm version](https://badge.fury.io/js/%40dsps%2Fclient.svg)](https://badge.fury.io/js/%40dsps%2Fclient) --- @@ -37,8 +37,8 @@ Note that DSPS does not aim to provide followings: ## 3 minutes to getting started with DSPS ```sh -# Download & run DSPS server -docker run --rm -p 3099:3000/tcp saiya/dsps:latest +# Build & run DSPS server +docker build . -t dsps-getting-started && docker run --rm -p 3099:3000/tcp dsps-getting-started # # ... Open another terminal window to run following tutorial ... From 7371ba010e716f3fae96b91cf00789166793d2e0 Mon Sep 17 00:00:00 2001 From: Makoto Toriyama Date: Wed, 29 Jun 2022 09:44:02 +0900 Subject: [PATCH 8/8] remove dsps directory for building --- server/Dockerfile | 2 +- server/Makefile | 5 ++++- server/dsps/.gitignore | 3 --- server/dsps/README.md | 12 ------------ 4 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 server/dsps/.gitignore delete mode 100644 server/dsps/README.md diff --git a/server/Dockerfile b/server/Dockerfile index e75d85d..a1e5087 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -3,7 +3,7 @@ ARG DSPS_VERSION_ID="" WORKDIR /go/src/github.com/dsps/server COPY . . RUN go install && go install github.com/Songmu/gocredits/cmd/gocredits -RUN make dsps/dsps-$(uname -o | sed 's/GNU\///')-$(uname -m) && mv dsps/dsps-$(uname -o | sed 's/GNU\///')-$(uname -m) /dsps.bin +RUN make dist/dsps-$(uname -o | sed 's/GNU\///')-$(uname -m) && mv dist/dsps-$(uname -o | sed 's/GNU\///')-$(uname -m) /dsps.bin FROM alpine:3.12.3 # Add some utilities for convinience: gettext (contains envsubst), curl, jq diff --git a/server/Makefile b/server/Makefile index d54d4a9..f3fd886 100644 --- a/server/Makefile +++ b/server/Makefile @@ -1,6 +1,6 @@ SHELL := /bin/bash -release_dir = dsps +release_dir = dist go_module_files = go.mod go.sum go_src_files = $(shell find . -type f -name '*.go') build_deps = $(go_module_files) $(go_src_files) | $(release_dir) @@ -34,6 +34,9 @@ generate: go install github.com/golang/mock/mockgen go generate ./... +$(release_dir): + mkdir -p $(release_dir) + $(release_dir)/dsps-Linux-x86_64: $(build_deps) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $@ -ldflags "-X main.BuildDist=linux-amd64" -ldflags $(ldflags) main.go diff --git a/server/dsps/.gitignore b/server/dsps/.gitignore deleted file mode 100644 index 83615fa..0000000 --- a/server/dsps/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/dsps-Darwin-* -/dsps-Linux-* -/dsps-Windows-* diff --git a/server/dsps/README.md b/server/dsps/README.md deleted file mode 100644 index a28424a..0000000 --- a/server/dsps/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# DSPS - Durable & Simple PubSub - -Go to https://github.com/m3dev/dsps for information. - -## Which binary file to use? - -| OS | Architecture | Binary to use | -| ------- | ------------ | ----------------------- | -| Linux | x64 | dsps-Linux-x86_64 | -| Linux | arm64 | dsps-Linux-aarch64 | -| Mac | x64 | dsps-Darwin-x86_64 | -| Windows | x64 | dsps-Windows-x86_64.exe |