Append /v2 to module

This commit is contained in:
Astra 2023-11-12 17:35:19 +00:00
parent abe7275f0c
commit 668c472ee6
63 changed files with 116 additions and 116 deletions

View file

@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/util"
"regexp"
"strings"
"unicode/utf8"

View file

@ -5,7 +5,7 @@ import (
"net/netip"
"time"
"heckel.io/ntfy/user"
"git.zio.sh/astra/ntfy/v2/user"
)
// Defines default config settings (excluding limits, see below)

View file

@ -1,8 +1,8 @@
package server_test
import (
"git.zio.sh/astra/ntfy/v2/server"
"github.com/stretchr/testify/assert"
"heckel.io/ntfy/server"
"testing"
)

View file

@ -3,7 +3,7 @@ package server
import (
"encoding/json"
"fmt"
"heckel.io/ntfy/log"
"git.zio.sh/astra/ntfy/v2/log"
"net/http"
)

View file

@ -3,8 +3,8 @@ package server
import (
"errors"
"fmt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
"io"
"os"
"path/filepath"

View file

@ -3,8 +3,8 @@ package server
import (
"bytes"
"fmt"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/util"
"os"
"strings"
"testing"

View file

@ -2,10 +2,10 @@ package server
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/emersion/go-smtp"
"github.com/gorilla/websocket"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"net/http"
"strings"
"unicode/utf8"

View file

@ -9,9 +9,9 @@ import (
"strings"
"time"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
_ "github.com/mattn/go-sqlite3" // SQLite driver
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
)
var (

View file

@ -26,13 +26,13 @@ import (
"time"
"unicode/utf8"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/emersion/go-smtp"
"github.com/gorilla/websocket"
"github.com/prometheus/client_golang/prometheus/promhttp"
"golang.org/x/sync/errgroup"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
)
// Server is the main server, providing the UI and API for ntfy

View file

@ -2,9 +2,9 @@ package server
import (
"encoding/json"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"net/http"
"net/netip"
"strings"

View file

@ -2,10 +2,10 @@ package server
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"io"
"net/netip"
"path/filepath"

View file

@ -1,7 +1,7 @@
package server
import (
"heckel.io/ntfy/user"
"git.zio.sh/astra/ntfy/v2/user"
"net/http"
)

View file

@ -1,9 +1,9 @@
package server
import (
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"sync/atomic"
"testing"
"time"

View file

@ -7,9 +7,9 @@ import (
firebase "firebase.google.com/go/v4"
"firebase.google.com/go/v4/messaging"
"fmt"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"google.golang.org/api/option"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"strings"
)

View file

@ -4,7 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"heckel.io/ntfy/user"
"git.zio.sh/astra/ntfy/v2/user"
"net/netip"
"strings"
"sync"

View file

@ -1,8 +1,8 @@
package server
import (
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
"strings"
)

View file

@ -4,7 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/util"
"io"
"net/http"
"strings"

View file

@ -3,7 +3,7 @@ package server
import (
"net/http"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/util"
)
type contextKey int

View file

@ -4,6 +4,9 @@ import (
"bytes"
"errors"
"fmt"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stripe/stripe-go/v74"
portalsession "github.com/stripe/stripe-go/v74/billingportal/session"
"github.com/stripe/stripe-go/v74/checkout/session"
@ -11,9 +14,6 @@ import (
"github.com/stripe/stripe-go/v74/price"
"github.com/stripe/stripe-go/v74/subscription"
"github.com/stripe/stripe-go/v74/webhook"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"io"
"net/http"
"net/netip"

View file

@ -2,12 +2,12 @@ package server
import (
"encoding/json"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v74"
"golang.org/x/time/rate"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"io"
"net/netip"
"path/filepath"

View file

@ -6,8 +6,8 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"git.zio.sh/astra/ntfy/v2/user"
"golang.org/x/crypto/bcrypt"
"heckel.io/ntfy/user"
"io"
"math/rand"
"net/http"
@ -22,10 +22,10 @@ import (
"testing"
"time"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/SherClockHolmes/webpush-go"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
)
func TestMain(m *testing.M) {

View file

@ -4,9 +4,9 @@ import (
"bytes"
"encoding/xml"
"fmt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"io"
"net/http"
"net/url"

View file

@ -1,9 +1,9 @@
package server
import (
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"io"
"net/http"
"net/http/httptest"

View file

@ -7,9 +7,9 @@ import (
"regexp"
"strings"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/user"
"github.com/SherClockHolmes/webpush-go"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
)
const (

View file

@ -3,9 +3,9 @@ package server
import (
"encoding/json"
"fmt"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"io"
"net/http"
"net/http/httptest"

View file

@ -11,8 +11,8 @@ import (
"sync"
"time"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
)
type mailer interface {

View file

@ -5,8 +5,8 @@ import (
"sync"
"time"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
)
const (

View file

@ -5,10 +5,10 @@ import (
"net/netip"
"time"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/user"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/util"
)
// List of possible events

View file

@ -3,7 +3,7 @@ package server
import (
"context"
"fmt"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/util"
"io"
"mime"
"net/http"

View file

@ -2,14 +2,14 @@ package server
import (
"fmt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/user"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/user"
"net/netip"
"sync"
"time"
"git.zio.sh/astra/ntfy/v2/util"
"golang.org/x/time/rate"
"heckel.io/ntfy/util"
)
const (

View file

@ -3,7 +3,7 @@ package server
import (
"database/sql"
"errors"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/util"
"net/netip"
"time"