Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/model"
"github.com/h2non/filetype"
"gorm.io/gorm"
)
Expand Down
10 changes: 5 additions & 5 deletions api/application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"testing"

"github.com/gin-gonic/gin"
"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/gotify/server/v3/auth"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/test"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
4 changes: 2 additions & 2 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/model"
)

// The ClientDatabase interface for encapsulating database access.
Expand Down
10 changes: 5 additions & 5 deletions api/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
"time"

"github.com/gin-gonic/gin"
"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/gotify/server/v3/auth"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/test"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion api/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package api

import (
"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/model"
)

// The HealthDatabase interface for encapsulating database access.
Expand Down
8 changes: 4 additions & 4 deletions api/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"testing"

"github.com/gin-gonic/gin"
"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/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/test"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/suite"
)

Expand Down
4 changes: 2 additions & 2 deletions api/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin/binding"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/model"
)

// The MessageDatabase interface for encapsulating database access.
Expand Down
10 changes: 5 additions & 5 deletions api/message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"time"

"github.com/gin-gonic/gin"
"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/gotify/server/v3/auth"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/test"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
Expand Down
10 changes: 5 additions & 5 deletions api/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/config"
"github.com/gotify/server/v2/database"
"github.com/gotify/server/v2/decaymap"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/config"
"github.com/gotify/server/v3/database"
"github.com/gotify/server/v3/decaymap"
"github.com/gotify/server/v3/model"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/zitadel/oidc/v3/pkg/client/rp"
Expand Down
10 changes: 5 additions & 5 deletions api/oidc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/decaymap"
"github.com/gotify/server/v2/mode"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v2/test/testdb"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/decaymap"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/zitadel/oidc/v3/pkg/oidc"
Expand Down
8 changes: 4 additions & 4 deletions api/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (

"github.com/gin-gonic/gin"
"github.com/gotify/location"
"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"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/plugin"
"github.com/gotify/server/v3/plugin/compat"
"gopkg.in/yaml.v3"
)

Expand Down
18 changes: 9 additions & 9 deletions api/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"testing"

"github.com/gin-gonic/gin"
"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/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/plugin"
"github.com/gotify/server/v3/plugin/compat"
"github.com/gotify/server/v3/plugin/testing/mock"
"github.com/gotify/server/v3/test"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"gopkg.in/yaml.v3"
Expand Down Expand Up @@ -55,14 +55,14 @@ func (s *PluginSuite) BeforeTest(suiteName, testName string) {

s.db.CreatePluginConf(&model.PluginConf{
UserID: 1,
ModulePath: "github.com/gotify/server/v2/plugin/example/removed",
ModulePath: "github.com/gotify/server/v3/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/v2/plugin/example/removed")
conf, err := s.db.GetPluginConfByUserAndPath(uid, "github.com/gotify/server/v3/plugin/example/removed")
assert.NoError(s.T(), err)
return conf
}
Expand Down
6 changes: 3 additions & 3 deletions api/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/auth/password"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/auth/password"
"github.com/gotify/server/v3/model"
)

// SessionDatabase is the interface for session-related database access.
Expand Down
10 changes: 5 additions & 5 deletions api/session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"testing"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth"
"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/gotify/server/v3/auth"
"github.com/gotify/server/v3/auth/password"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion api/stream/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"time"

"github.com/gorilla/websocket"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/model"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin builds don't depend on gotify/server, why does the wrong module path block the plugin builds?


The build is failing because of formatting, otherwise this LGTM.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it needs a phantom dependency to gotify/server/v3 to ensure it gets built with compatible dependencies. If the import path is wrong it wont be able to reference it.

"github.com/rs/zerolog/log"
)

Expand Down
4 changes: 2 additions & 2 deletions api/stream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/model"
)

// The API provides a handler for a WebSocket stream API.
Expand Down
6 changes: 3 additions & 3 deletions api/stream/stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"github.com/fortytw2/leaktest"
"github.com/gin-gonic/gin"
"github.com/gorilla/websocket"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/mode"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion api/tokens.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v3/auth"
)

var generateApplicationToken = auth.GenerateApplicationToken
Expand Down
6 changes: 3 additions & 3 deletions api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth"
"github.com/gotify/server/v2/auth/password"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth"
"github.com/gotify/server/v3/auth/password"
"github.com/gotify/server/v3/model"
)

// The UserDatabase interface for encapsulating database access.
Expand Down
12 changes: 6 additions & 6 deletions api/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"testing"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth"
"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/gotify/server/v3/auth"
"github.com/gotify/server/v3/auth/password"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/test"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
14 changes: 7 additions & 7 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"runtime/debug"
"time"

"github.com/gotify/server/v2/config"
"github.com/gotify/server/v2/config/migrate"
"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"
"github.com/gotify/server/v3/config"
"github.com/gotify/server/v3/config/migrate"
"github.com/gotify/server/v3/database"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/router"
"github.com/gotify/server/v3/runner"
"github.com/mattn/go-isatty"
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
Expand Down
4 changes: 2 additions & 2 deletions auth/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"time"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/auth/password"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/auth/password"
"github.com/gotify/server/v3/model"
)

type authState int
Expand Down
8 changes: 4 additions & 4 deletions auth/authentication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"time"

"github.com/gin-gonic/gin"
"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/gotify/server/v3/auth/password"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/gotify/server/v3/test/testdb"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion auth/cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"time"

"github.com/gin-contrib/cors"
"github.com/gotify/server/v2/config"
"github.com/gotify/server/v3/config"
)

// CorsConfig generates a config to use in gin cors middleware based on server configuration.
Expand Down
4 changes: 2 additions & 2 deletions auth/cors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"time"

"github.com/gin-contrib/cors"
"github.com/gotify/server/v2/config"
"github.com/gotify/server/v2/mode"
"github.com/gotify/server/v3/config"
"github.com/gotify/server/v3/mode"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion auth/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package auth

import (
"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/model"
)

const authKey = "auth"
Expand Down
4 changes: 2 additions & 2 deletions auth/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"testing"

"github.com/gin-gonic/gin"
"github.com/gotify/server/v2/mode"
"github.com/gotify/server/v2/model"
"github.com/gotify/server/v3/mode"
"github.com/gotify/server/v3/model"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"testing"

"github.com/gotify/server/v2/mode"
"github.com/gotify/server/v3/mode"
"github.com/rs/zerolog"
"github.com/stretchr/testify/assert"
)
Expand Down
Loading
Loading