diff --git a/api/application.go b/api/application.go index 3087a08..ec5fe7d 100644 --- a/api/application.go +++ b/api/application.go @@ -8,8 +8,8 @@ import ( "path/filepath" "github.com/gin-gonic/gin" - "github.com/gotify/server/auth" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/model" "github.com/h2non/filetype" ) diff --git a/api/application_test.go b/api/application_test.go index f3d52a5..4b77e00 100644 --- a/api/application_test.go +++ b/api/application_test.go @@ -12,10 +12,10 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/test" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test" + "github.com/gotify/server/v2/test/testdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/api/client.go b/api/client.go index b892853..a8e4219 100644 --- a/api/client.go +++ b/api/client.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/gin-gonic/gin" - "github.com/gotify/server/auth" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/model" ) // The ClientDatabase interface for encapsulating database access. diff --git a/api/client_test.go b/api/client_test.go index 084fa4f..33fccd1 100644 --- a/api/client_test.go +++ b/api/client_test.go @@ -7,10 +7,10 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/test" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test" + "github.com/gotify/server/v2/test/testdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/api/health.go b/api/health.go index 6dd5c25..ff4a3b4 100644 --- a/api/health.go +++ b/api/health.go @@ -2,7 +2,7 @@ package api import ( "github.com/gin-gonic/gin" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" ) // The HealthDatabase interface for encapsulating database access. diff --git a/api/health_test.go b/api/health_test.go index 40ad30e..e06b0f0 100644 --- a/api/health_test.go +++ b/api/health_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/test" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test" + "github.com/gotify/server/v2/test/testdb" "github.com/stretchr/testify/suite" ) diff --git a/api/message.go b/api/message.go index 77f407d..3d64882 100644 --- a/api/message.go +++ b/api/message.go @@ -10,8 +10,8 @@ import ( "github.com/gin-gonic/gin" "github.com/gin-gonic/gin/binding" "github.com/gotify/location" - "github.com/gotify/server/auth" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/model" ) // The MessageDatabase interface for encapsulating database access. diff --git a/api/message_test.go b/api/message_test.go index e1430ea..6376981 100644 --- a/api/message_test.go +++ b/api/message_test.go @@ -8,11 +8,11 @@ import ( "time" "github.com/gin-gonic/gin" - "github.com/gotify/server/auth" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/test" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test" + "github.com/gotify/server/v2/test/testdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/api/plugin.go b/api/plugin.go index dedda15..1d5b01a 100644 --- a/api/plugin.go +++ b/api/plugin.go @@ -9,10 +9,10 @@ import ( "github.com/gin-gonic/gin" "github.com/go-yaml/yaml" - "github.com/gotify/server/auth" - "github.com/gotify/server/model" - "github.com/gotify/server/plugin" - "github.com/gotify/server/plugin/compat" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/plugin" + "github.com/gotify/server/v2/plugin/compat" ) // The PluginDatabase interface for encapsulating database access. diff --git a/api/plugin_test.go b/api/plugin_test.go index 56a2a86..624302c 100644 --- a/api/plugin_test.go +++ b/api/plugin_test.go @@ -10,13 +10,13 @@ import ( "github.com/go-yaml/yaml" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/plugin" - "github.com/gotify/server/plugin/compat" - "github.com/gotify/server/plugin/testing/mock" - "github.com/gotify/server/test" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/plugin" + "github.com/gotify/server/v2/plugin/compat" + "github.com/gotify/server/v2/plugin/testing/mock" + "github.com/gotify/server/v2/test" + "github.com/gotify/server/v2/test/testdb" "github.com/gin-gonic/gin" @@ -58,14 +58,14 @@ func (s *PluginSuite) BeforeTest(suiteName, testName string) { s.db.CreatePluginConf(&model.PluginConf{ UserID: 1, - ModulePath: "github.com/gotify/server/plugin/example/removed", + ModulePath: "github.com/gotify/server/v2/plugin/example/removed", Token: "P1234", Enabled: false, }) } func (s *PluginSuite) getDanglingConf(uid uint) *model.PluginConf { - conf, err := s.db.GetPluginConfByUserAndPath(uid, "github.com/gotify/server/plugin/example/removed") + conf, err := s.db.GetPluginConfByUserAndPath(uid, "github.com/gotify/server/v2/plugin/example/removed") assert.NoError(s.T(), err) return conf } diff --git a/api/stream/client.go b/api/stream/client.go index 33bb5b9..ab9be15 100644 --- a/api/stream/client.go +++ b/api/stream/client.go @@ -5,7 +5,7 @@ import ( "time" "github.com/gorilla/websocket" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" ) const ( diff --git a/api/stream/stream.go b/api/stream/stream.go index 06aa733..797e9b1 100644 --- a/api/stream/stream.go +++ b/api/stream/stream.go @@ -10,9 +10,9 @@ import ( "github.com/gin-gonic/gin" "github.com/gorilla/websocket" - "github.com/gotify/server/auth" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" ) // The API provides a handler for a WebSocket stream API. diff --git a/api/stream/stream_test.go b/api/stream/stream_test.go index 758c4f2..41a6bd3 100644 --- a/api/stream/stream_test.go +++ b/api/stream/stream_test.go @@ -14,9 +14,9 @@ import ( "github.com/fortytw2/leaktest" "github.com/gin-gonic/gin" "github.com/gorilla/websocket" - "github.com/gotify/server/auth" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" ) diff --git a/api/tokens.go b/api/tokens.go index 11591bc..fbaf337 100644 --- a/api/tokens.go +++ b/api/tokens.go @@ -1,7 +1,7 @@ package api import ( - "github.com/gotify/server/auth" + "github.com/gotify/server/v2/auth" ) var generateApplicationToken = auth.GenerateApplicationToken diff --git a/api/user.go b/api/user.go index 109de8f..79c2f70 100644 --- a/api/user.go +++ b/api/user.go @@ -4,9 +4,9 @@ import ( "errors" "github.com/gin-gonic/gin" - "github.com/gotify/server/auth" - "github.com/gotify/server/auth/password" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/auth/password" + "github.com/gotify/server/v2/model" ) // The UserDatabase interface for encapsulating database access. diff --git a/api/user_test.go b/api/user_test.go index 4b90b14..c88d182 100644 --- a/api/user_test.go +++ b/api/user_test.go @@ -7,11 +7,11 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/auth/password" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/test" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/auth/password" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test" + "github.com/gotify/server/v2/test/testdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/app.go b/app.go index cf70403..a42221b 100644 --- a/app.go +++ b/app.go @@ -6,12 +6,12 @@ import ( "os" "time" - "github.com/gotify/server/config" - "github.com/gotify/server/database" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/router" - "github.com/gotify/server/runner" + "github.com/gotify/server/v2/config" + "github.com/gotify/server/v2/database" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/router" + "github.com/gotify/server/v2/runner" ) var ( diff --git a/auth/authentication.go b/auth/authentication.go index f7acba2..537f6f7 100644 --- a/auth/authentication.go +++ b/auth/authentication.go @@ -4,8 +4,8 @@ import ( "errors" "github.com/gin-gonic/gin" - "github.com/gotify/server/auth/password" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/auth/password" + "github.com/gotify/server/v2/model" ) const ( diff --git a/auth/authentication_test.go b/auth/authentication_test.go index 0ad7ed6..f76da34 100644 --- a/auth/authentication_test.go +++ b/auth/authentication_test.go @@ -8,10 +8,10 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/auth/password" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/auth/password" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test/testdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/auth/cors.go b/auth/cors.go index 60dfcae..095043a 100644 --- a/auth/cors.go +++ b/auth/cors.go @@ -6,8 +6,8 @@ import ( "time" "github.com/gin-contrib/cors" - "github.com/gotify/server/config" - "github.com/gotify/server/mode" + "github.com/gotify/server/v2/config" + "github.com/gotify/server/v2/mode" ) // CorsConfig generates a config to use in gin cors middleware based on server configuration diff --git a/auth/cors_test.go b/auth/cors_test.go index 966cac3..edf9209 100644 --- a/auth/cors_test.go +++ b/auth/cors_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/gin-contrib/cors" - "github.com/gotify/server/config" - "github.com/gotify/server/mode" + "github.com/gotify/server/v2/config" + "github.com/gotify/server/v2/mode" "github.com/stretchr/testify/assert" ) diff --git a/auth/token_test.go b/auth/token_test.go index 85384c8..5cc699e 100644 --- a/auth/token_test.go +++ b/auth/token_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/gotify/server/test" + "github.com/gotify/server/v2/test" "github.com/stretchr/testify/assert" ) diff --git a/auth/util.go b/auth/util.go index 428124c..5fcd057 100644 --- a/auth/util.go +++ b/auth/util.go @@ -2,7 +2,7 @@ package auth import ( "github.com/gin-gonic/gin" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" ) // RegisterAuthentication registers the user id, user and or token. diff --git a/auth/util_test.go b/auth/util_test.go index 84a5442..e2e0544 100644 --- a/auth/util_test.go +++ b/auth/util_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/config/config.go b/config/config.go index 778239e..bbf45a7 100644 --- a/config/config.go +++ b/config/config.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/gotify/configor" - "github.com/gotify/server/mode" + "github.com/gotify/server/v2/mode" ) // Configuration is stuff that can be configured externally per env variables or config file (config.yml). diff --git a/config/config_test.go b/config/config_test.go index 03105bc..3e6cc57 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -5,7 +5,7 @@ import ( "path/filepath" "testing" - "github.com/gotify/server/mode" + "github.com/gotify/server/v2/mode" "github.com/stretchr/testify/assert" ) diff --git a/database/application.go b/database/application.go index 7fa6528..090a966 100644 --- a/database/application.go +++ b/database/application.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/jinzhu/gorm" ) diff --git a/database/application_test.go b/database/application_test.go index 29e0be4..a8ac5ca 100644 --- a/database/application_test.go +++ b/database/application_test.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" ) diff --git a/database/client.go b/database/client.go index a9b186e..aa87d89 100644 --- a/database/client.go +++ b/database/client.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/jinzhu/gorm" ) diff --git a/database/client_test.go b/database/client_test.go index f343ffb..fa5d366 100644 --- a/database/client_test.go +++ b/database/client_test.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" ) diff --git a/database/database.go b/database/database.go index bd1aa84..676c252 100644 --- a/database/database.go +++ b/database/database.go @@ -4,8 +4,8 @@ import ( "os" "path/filepath" - "github.com/gotify/server/auth/password" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/auth/password" + "github.com/gotify/server/v2/model" "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" // enable the mysql dialect _ "github.com/jinzhu/gorm/dialects/postgres" // enable the postgres dialect diff --git a/database/database_test.go b/database/database_test.go index e30ebb0..331ba14 100644 --- a/database/database_test.go +++ b/database/database_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - "github.com/gotify/server/test" + "github.com/gotify/server/v2/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" diff --git a/database/message.go b/database/message.go index 72e95b9..be35144 100644 --- a/database/message.go +++ b/database/message.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/jinzhu/gorm" ) diff --git a/database/message_test.go b/database/message_test.go index 3629060..3920355 100644 --- a/database/message_test.go +++ b/database/message_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/database/migration_test.go b/database/migration_test.go index 43c3c91..4feb375 100644 --- a/database/migration_test.go +++ b/database/migration_test.go @@ -3,8 +3,8 @@ package database import ( "testing" - "github.com/gotify/server/model" - "github.com/gotify/server/test" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test" "github.com/jinzhu/gorm" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" diff --git a/database/plugin.go b/database/plugin.go index bf5b5a5..b699056 100644 --- a/database/plugin.go +++ b/database/plugin.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/jinzhu/gorm" ) diff --git a/database/plugin_test.go b/database/plugin_test.go index 9e56b20..ca58dce 100644 --- a/database/plugin_test.go +++ b/database/plugin_test.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/database/user.go b/database/user.go index 3991863..01f08ce 100644 --- a/database/user.go +++ b/database/user.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/jinzhu/gorm" ) diff --git a/database/user_test.go b/database/user_test.go index 3c96794..c665c80 100644 --- a/database/user_test.go +++ b/database/user_test.go @@ -1,7 +1,7 @@ package database import ( - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/docs/swagger_test.go b/docs/swagger_test.go index a6559d5..3665d80 100644 --- a/docs/swagger_test.go +++ b/docs/swagger_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/mode" + "github.com/gotify/server/v2/mode" "github.com/stretchr/testify/assert" ) diff --git a/docs/ui_test.go b/docs/ui_test.go index 418a676..077de81 100644 --- a/docs/ui_test.go +++ b/docs/ui_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/mode" + "github.com/gotify/server/v2/mode" "github.com/stretchr/testify/assert" ) diff --git a/error/handler.go b/error/handler.go index eebc6e3..cfd532f 100644 --- a/error/handler.go +++ b/error/handler.go @@ -7,7 +7,7 @@ import ( "unicode" "github.com/gin-gonic/gin" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" "gopkg.in/go-playground/validator.v9" ) diff --git a/error/handler_test.go b/error/handler_test.go index 571368f..fa618d4 100644 --- a/error/handler_test.go +++ b/error/handler_test.go @@ -8,8 +8,8 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" ) diff --git a/error/notfound.go b/error/notfound.go index 149bf28..ca6eaae 100644 --- a/error/notfound.go +++ b/error/notfound.go @@ -4,7 +4,7 @@ import ( "net/http" "github.com/gin-gonic/gin" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" ) // NotFound creates a gin middleware for handling page not found. diff --git a/error/notfound_test.go b/error/notfound_test.go index 00e7a3b..8ab3489 100644 --- a/error/notfound_test.go +++ b/error/notfound_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/mode" + "github.com/gotify/server/v2/mode" ) func TestNotFound(t *testing.T) { diff --git a/go.mod b/go.mod index d146987..cd6045d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/gotify/server +module github.com/gotify/server/v2 require ( github.com/Southclaws/configor v1.0.0 // indirect diff --git a/plugin/compat/plugin_test.go b/plugin/compat/plugin_test.go index 2551607..cae5672 100644 --- a/plugin/compat/plugin_test.go +++ b/plugin/compat/plugin_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" ) -const examplePluginPath = "github.com/gotify/server/plugin/example/echo" +const examplePluginPath = "github.com/gotify/server/v2/plugin/example/echo" func TestPluginInfoStringer(t *testing.T) { info := Info{ diff --git a/plugin/compat/wrap_test.go b/plugin/compat/wrap_test.go index 9565d41..04502e8 100644 --- a/plugin/compat/wrap_test.go +++ b/plugin/compat/wrap_test.go @@ -10,7 +10,7 @@ import ( "plugin" "testing" - "github.com/gotify/server/test" + "github.com/gotify/server/v2/test" "github.com/gin-gonic/gin" @@ -135,10 +135,10 @@ func TestWrapIncompatiblePlugins(t *testing.T) { tmpDir := test.NewTmpDir("gotify_testwrapincompatibleplugins") defer tmpDir.Clean() for i, modulePath := range []string{ - "github.com/gotify/server/plugin/testing/broken/noinstance", - "github.com/gotify/server/plugin/testing/broken/nothing", - "github.com/gotify/server/plugin/testing/broken/unknowninfo", - "github.com/gotify/server/plugin/testing/broken/malformedconstructor", + "github.com/gotify/server/v2/plugin/testing/broken/noinstance", + "github.com/gotify/server/v2/plugin/testing/broken/nothing", + "github.com/gotify/server/v2/plugin/testing/broken/unknowninfo", + "github.com/gotify/server/v2/plugin/testing/broken/malformedconstructor", } { fName := tmpDir.Path(fmt.Sprintf("broken_%d.so", i)) exec.Command("go", "get", "-d").Run() diff --git a/plugin/example/clock/main.go b/plugin/example/clock/main.go index dfe6329..87023ad 100644 --- a/plugin/example/clock/main.go +++ b/plugin/example/clock/main.go @@ -12,7 +12,7 @@ func GetGotifyPluginInfo() plugin.Info { return plugin.Info{ Name: "clock", Description: "Sends an hourly reminder", - ModulePath: "github.com/gotify/server/example/clock", + ModulePath: "github.com/gotify/server/v2/example/clock", } } diff --git a/plugin/example/echo/echo.go b/plugin/example/echo/echo.go index 62a2f6c..3def060 100644 --- a/plugin/example/echo/echo.go +++ b/plugin/example/echo/echo.go @@ -13,7 +13,7 @@ import ( // GetGotifyPluginInfo returns gotify plugin info. func GetGotifyPluginInfo() plugin.Info { return plugin.Info{ - ModulePath: "github.com/gotify/server/plugin/example/echo", + ModulePath: "github.com/gotify/server/v2/plugin/example/echo", Name: "test plugin", } } diff --git a/plugin/example/minimal/main.go b/plugin/example/minimal/main.go index dbc3553..7dbbde6 100644 --- a/plugin/example/minimal/main.go +++ b/plugin/example/minimal/main.go @@ -8,7 +8,7 @@ import ( func GetGotifyPluginInfo() plugin.Info { return plugin.Info{ Name: "minimal plugin", - ModulePath: "github.com/gotify/server/example/minimal", + ModulePath: "github.com/gotify/server/v2/example/minimal", } } diff --git a/plugin/manager.go b/plugin/manager.go index 9b978b6..eca9b42 100644 --- a/plugin/manager.go +++ b/plugin/manager.go @@ -16,9 +16,9 @@ import ( "github.com/gin-gonic/gin" "github.com/go-yaml/yaml" - "github.com/gotify/server/auth" - "github.com/gotify/server/model" - "github.com/gotify/server/plugin/compat" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/plugin/compat" ) // The Database interface for encapsulating database access. diff --git a/plugin/manager_test.go b/plugin/manager_test.go index 2c7dbab..3f1665c 100644 --- a/plugin/manager_test.go +++ b/plugin/manager_test.go @@ -13,12 +13,12 @@ import ( "testing" "time" - "github.com/gotify/server/auth" - "github.com/gotify/server/model" - "github.com/gotify/server/plugin/compat" - "github.com/gotify/server/plugin/testing/mock" - "github.com/gotify/server/test" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/plugin/compat" + "github.com/gotify/server/v2/plugin/testing/mock" + "github.com/gotify/server/v2/test" + "github.com/gotify/server/v2/test/testdb" "github.com/jinzhu/gorm" @@ -28,9 +28,9 @@ import ( "github.com/gin-gonic/gin" ) -const examplePluginPath = "github.com/gotify/server/plugin/example/echo" +const examplePluginPath = "github.com/gotify/server/v2/plugin/example/echo" const mockPluginPath = mock.ModulePath -const danglingPluginPath = "github.com/gotify/server/plugin/testing/removed" +const danglingPluginPath = "github.com/gotify/server/v2/plugin/testing/removed" type ManagerSuite struct { suite.Suite diff --git a/plugin/messagehandler.go b/plugin/messagehandler.go index 5b9ee03..3582697 100644 --- a/plugin/messagehandler.go +++ b/plugin/messagehandler.go @@ -3,8 +3,8 @@ package plugin import ( "time" - "github.com/gotify/server/model" - "github.com/gotify/server/plugin/compat" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/plugin/compat" ) type redirectToChannel struct { diff --git a/plugin/pluginenabled_test.go b/plugin/pluginenabled_test.go index d7f549e..b73a7ea 100644 --- a/plugin/pluginenabled_test.go +++ b/plugin/pluginenabled_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/gotify/server/model" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test/testdb" "github.com/gin-gonic/gin" ) diff --git a/plugin/testing/broken/cantinstantiate/main.go b/plugin/testing/broken/cantinstantiate/main.go index d025011..28d1dcd 100644 --- a/plugin/testing/broken/cantinstantiate/main.go +++ b/plugin/testing/broken/cantinstantiate/main.go @@ -9,7 +9,7 @@ import ( // GetGotifyPluginInfo returns gotify plugin info func GetGotifyPluginInfo() plugin.Info { return plugin.Info{ - ModulePath: "github.com/gotify/server/plugin/testing/broken/noinstance", + ModulePath: "github.com/gotify/server/v2/plugin/testing/broken/noinstance", } } diff --git a/plugin/testing/broken/malformedconstructor/main.go b/plugin/testing/broken/malformedconstructor/main.go index c1022e9..c021cf3 100644 --- a/plugin/testing/broken/malformedconstructor/main.go +++ b/plugin/testing/broken/malformedconstructor/main.go @@ -7,7 +7,7 @@ import ( // GetGotifyPluginInfo returns gotify plugin info func GetGotifyPluginInfo() plugin.Info { return plugin.Info{ - ModulePath: "github.com/gotify/server/plugin/testing/broken/malformedconstructor", + ModulePath: "github.com/gotify/server/v2/plugin/testing/broken/malformedconstructor", } } diff --git a/plugin/testing/broken/noinstance/main.go b/plugin/testing/broken/noinstance/main.go index 2385d9a..979ab5e 100644 --- a/plugin/testing/broken/noinstance/main.go +++ b/plugin/testing/broken/noinstance/main.go @@ -7,7 +7,7 @@ import ( // GetGotifyPluginInfo returns gotify plugin info func GetGotifyPluginInfo() plugin.Info { return plugin.Info{ - ModulePath: "github.com/gotify/server/plugin/testing/broken/noinstance", + ModulePath: "github.com/gotify/server/v2/plugin/testing/broken/noinstance", } } diff --git a/plugin/testing/broken/unknowninfo/main.go b/plugin/testing/broken/unknowninfo/main.go index 58d5c9a..b5d4b41 100644 --- a/plugin/testing/broken/unknowninfo/main.go +++ b/plugin/testing/broken/unknowninfo/main.go @@ -2,7 +2,7 @@ package main // GetGotifyPluginInfo returns gotify plugin info func GetGotifyPluginInfo() string { - return "github.com/gotify/server/plugin/testing/broken/unknowninfo" + return "github.com/gotify/server/v2/plugin/testing/broken/unknowninfo" } func main() { diff --git a/plugin/testing/mock/mock.go b/plugin/testing/mock/mock.go index 941e320..c416521 100644 --- a/plugin/testing/mock/mock.go +++ b/plugin/testing/mock/mock.go @@ -6,11 +6,11 @@ import ( "github.com/gin-gonic/gin" - "github.com/gotify/server/plugin/compat" + "github.com/gotify/server/v2/plugin/compat" ) // ModulePath is for convenient access of the module path of this mock plugin -const ModulePath = "github.com/gotify/server/plugin/testing/mock" +const ModulePath = "github.com/gotify/server/v2/plugin/testing/mock" // Name is for convenient access of the module path of the name of this mock plugin const Name = "mock plugin" diff --git a/router/router.go b/router/router.go index 470096b..4fdd955 100644 --- a/router/router.go +++ b/router/router.go @@ -6,16 +6,16 @@ import ( "github.com/gin-contrib/cors" "github.com/gin-gonic/gin" "github.com/gotify/location" - "github.com/gotify/server/api" - "github.com/gotify/server/api/stream" - "github.com/gotify/server/auth" - "github.com/gotify/server/config" - "github.com/gotify/server/database" - "github.com/gotify/server/docs" - "github.com/gotify/server/error" - "github.com/gotify/server/model" - "github.com/gotify/server/plugin" - "github.com/gotify/server/ui" + "github.com/gotify/server/v2/api" + "github.com/gotify/server/v2/api/stream" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/config" + "github.com/gotify/server/v2/database" + "github.com/gotify/server/v2/docs" + "github.com/gotify/server/v2/error" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/plugin" + "github.com/gotify/server/v2/ui" ) // Create creates the gin engine with all routes. diff --git a/router/router_test.go b/router/router_test.go index 46a6a66..c708255 100644 --- a/router/router_test.go +++ b/router/router_test.go @@ -9,10 +9,10 @@ import ( "strings" "testing" - "github.com/gotify/server/config" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/config" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test/testdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/runner/runner.go b/runner/runner.go index 3e5cd6f..effa35f 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -8,7 +8,7 @@ import ( "net/http" "github.com/gin-gonic/gin" - "github.com/gotify/server/config" + "github.com/gotify/server/v2/config" "golang.org/x/crypto/acme/autocert" ) diff --git a/test/asserts_test.go b/test/asserts_test.go index 74bd028..cdcbeb8 100644 --- a/test/asserts_test.go +++ b/test/asserts_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/gotify/server/test" + "github.com/gotify/server/v2/test" "github.com/stretchr/testify/assert" ) diff --git a/test/auth.go b/test/auth.go index f2886a3..fbb2e6c 100644 --- a/test/auth.go +++ b/test/auth.go @@ -2,7 +2,7 @@ package test import ( "github.com/gin-gonic/gin" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/model" ) // WithUser fake an authentication for testing. diff --git a/test/auth_test.go b/test/auth_test.go index e217c81..3257743 100644 --- a/test/auth_test.go +++ b/test/auth_test.go @@ -4,9 +4,9 @@ import ( "testing" "github.com/gin-gonic/gin" - "github.com/gotify/server/auth" - "github.com/gotify/server/mode" - "github.com/gotify/server/test" + "github.com/gotify/server/v2/auth" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/test" "github.com/stretchr/testify/assert" ) diff --git a/test/testdb/database.go b/test/testdb/database.go index d7b2dd2..781b24f 100644 --- a/test/testdb/database.go +++ b/test/testdb/database.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/gotify/server/database" - "github.com/gotify/server/model" + "github.com/gotify/server/v2/database" + "github.com/gotify/server/v2/model" "github.com/stretchr/testify/assert" ) diff --git a/test/testdb/database_test.go b/test/testdb/database_test.go index c973368..17a80ae 100644 --- a/test/testdb/database_test.go +++ b/test/testdb/database_test.go @@ -3,9 +3,9 @@ package testdb_test import ( "testing" - "github.com/gotify/server/mode" - "github.com/gotify/server/model" - "github.com/gotify/server/test/testdb" + "github.com/gotify/server/v2/mode" + "github.com/gotify/server/v2/model" + "github.com/gotify/server/v2/test/testdb" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/ui/src/tests/plugin.test.ts b/ui/src/tests/plugin.test.ts index dccd9ef..f1978a2 100644 --- a/ui/src/tests/plugin.test.ts +++ b/ui/src/tests/plugin.test.ts @@ -14,7 +14,7 @@ let gotify: GotifyTest; beforeAll(async () => { const gotifyPluginDir = pluginSupported - ? await newPluginDir(['github.com/gotify/server/plugin/example/echo']) + ? await newPluginDir(['github.com/gotify/server/v2/plugin/example/echo']) : ''; gotify = await newTest(gotifyPluginDir); page = gotify.page; @@ -118,7 +118,7 @@ describe('plugin', () => { it('has plugin info', async () => { await inDetailPage(1, async () => { expect(await pluginInfo('module-path')).toBe( - 'github.com/gotify/server/plugin/example/echo' + 'github.com/gotify/server/v2/plugin/example/echo' ); }); });