Append /v2 to module

main v2.7.1
Astra 2023-11-12 17:35:19 +00:00
parent abe7275f0c
commit 668c472ee6
63 changed files with 116 additions and 116 deletions

View File

@ -71,7 +71,7 @@ builds:
nfpms:
-
package_name: ntfy
homepage: https://heckel.io/ntfy
homepage: https://git.zio.sh/astra/ntfy/v2
maintainer: Philipp C. Heckel <philipp.heckel@gmail.com>
description: Simple pub-sub notification service
license: Apache 2.0

View File

@ -2,7 +2,7 @@
# ntfy.sh | Send push notifications to your phone or desktop via PUT/POST
[![Release](https://img.shields.io/github/release/binwiederhier/ntfy.svg?color=success&style=flat-square)](https://github.com/binwiederhier/ntfy/releases/latest)
[![Go Reference](https://pkg.go.dev/badge/heckel.io/ntfy.svg)](https://pkg.go.dev/heckel.io/ntfy)
[![Go Reference](https://pkg.go.dev/badge/git.zio.sh/astra/ntfy/v2.svg)](https://pkg.go.dev/git.zio.sh/astra/ntfy/v2)
[![Tests](https://github.com/binwiederhier/ntfy/workflows/test/badge.svg)](https://github.com/binwiederhier/ntfy/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/binwiederhier/ntfy)](https://goreportcard.com/report/github.com/binwiederhier/ntfy)
[![codecov](https://codecov.io/gh/binwiederhier/ntfy/branch/main/graph/badge.svg?token=A597KQ463G)](https://codecov.io/gh/binwiederhier/ntfy)

View File

@ -7,8 +7,8 @@ import (
"encoding/json"
"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"
"net/http"
"regexp"

View File

@ -2,10 +2,10 @@ package client_test
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/client"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/test"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/client"
"heckel.io/ntfy/log"
"heckel.io/ntfy/test"
"os"
"testing"
"time"

View File

@ -1,8 +1,8 @@
package client_test
import (
"git.zio.sh/astra/ntfy/v2/client"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/client"
"os"
"path/filepath"
"testing"

View File

@ -2,7 +2,7 @@ package client
import (
"fmt"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/util"
"net/http"
"strings"
"time"

View File

@ -5,9 +5,9 @@ package cmd
import (
"errors"
"fmt"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
)
func init() {

View File

@ -2,10 +2,10 @@ package cmd
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/server"
"git.zio.sh/astra/ntfy/v2/test"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/test"
"testing"
)

View File

@ -3,9 +3,9 @@ package cmd
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/log"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"heckel.io/ntfy/log"
"os"
"regexp"
)

View File

@ -3,9 +3,9 @@ package cmd
import (
"bytes"
"encoding/json"
"git.zio.sh/astra/ntfy/v2/client"
"git.zio.sh/astra/ntfy/v2/log"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/client"
"heckel.io/ntfy/log"
"os"
"strings"
"testing"

View File

@ -2,10 +2,10 @@ package cmd
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"gopkg.in/yaml.v2"
"heckel.io/ntfy/util"
"os"
)

View File

@ -3,10 +3,10 @@ package cmd
import (
"errors"
"fmt"
"git.zio.sh/astra/ntfy/v2/client"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/client"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"io"
"os"
"os/exec"

View File

@ -2,9 +2,9 @@ package cmd
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/test"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/test"
"heckel.io/ntfy/util"
"net/http"
"net/http/httptest"
"os"

View File

@ -5,8 +5,8 @@ package cmd
import (
"errors"
"fmt"
"git.zio.sh/astra/ntfy/v2/user"
"github.com/stripe/stripe-go/v74"
"heckel.io/ntfy/user"
"io/fs"
"math"
"net"
@ -17,12 +17,12 @@ import (
"syscall"
"time"
"heckel.io/ntfy/log"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/server"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"heckel.io/ntfy/server"
"heckel.io/ntfy/util"
)
func init() {

View File

@ -9,12 +9,12 @@ import (
"testing"
"time"
"git.zio.sh/astra/ntfy/v2/client"
"git.zio.sh/astra/ntfy/v2/test"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/gorilla/websocket"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/client"
"heckel.io/ntfy/test"
"heckel.io/ntfy/util"
)
func init() {

View File

@ -3,10 +3,10 @@ package cmd
import (
"errors"
"fmt"
"git.zio.sh/astra/ntfy/v2/client"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/client"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"os"
"os/exec"
"os/user"

View File

@ -5,9 +5,9 @@ package cmd
import (
"errors"
"fmt"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
)
func init() {

View File

@ -1,10 +1,10 @@
package cmd
import (
"git.zio.sh/astra/ntfy/v2/server"
"git.zio.sh/astra/ntfy/v2/test"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/test"
"testing"
)

View File

@ -5,9 +5,9 @@ package cmd
import (
"errors"
"fmt"
"git.zio.sh/astra/ntfy/v2/user"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/user"
"heckel.io/ntfy/util"
"net/netip"
"time"
)

View File

@ -2,10 +2,10 @@ package cmd
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/server"
"git.zio.sh/astra/ntfy/v2/test"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/test"
"regexp"
"testing"
)

View File

@ -6,13 +6,13 @@ import (
"crypto/subtle"
"errors"
"fmt"
"heckel.io/ntfy/user"
"git.zio.sh/astra/ntfy/v2/user"
"os"
"strings"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v2/altsrc"
"heckel.io/ntfy/util"
)
const (

View File

@ -1,11 +1,11 @@
package cmd
import (
"git.zio.sh/astra/ntfy/v2/server"
"git.zio.sh/astra/ntfy/v2/test"
"git.zio.sh/astra/ntfy/v2/user"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
"heckel.io/ntfy/test"
"heckel.io/ntfy/user"
"os"
"path/filepath"
"testing"

View File

@ -3,9 +3,9 @@ package cmd
import (
"testing"
"git.zio.sh/astra/ntfy/v2/server"
"github.com/stretchr/testify/require"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/server"
)
func TestCLI_WebPush_GenerateKeys(t *testing.T) {

2
go.mod
View File

@ -1,4 +1,4 @@
module heckel.io/ntfy
module git.zio.sh/astra/ntfy/v2
go 1.18

View File

@ -3,7 +3,7 @@ package log
import (
"encoding/json"
"fmt"
"heckel.io/ntfy/util"
"git.zio.sh/astra/ntfy/v2/util"
"log"
"os"
"sort"

View File

@ -2,8 +2,8 @@ package main
import (
"fmt"
"git.zio.sh/astra/ntfy/v2/cmd"
"github.com/urfave/cli/v2"
"heckel.io/ntfy/cmd"
"os"
"runtime"
)

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"

View File

@ -2,7 +2,7 @@ package test
import (
"fmt"
"heckel.io/ntfy/server"
"git.zio.sh/astra/ntfy/v2/server"
"math/rand"
"net/http"
"path/filepath"

View File

@ -6,11 +6,11 @@ import (
"encoding/json"
"errors"
"fmt"
"git.zio.sh/astra/ntfy/v2/log"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/mattn/go-sqlite3"
"github.com/stripe/stripe-go/v74"
"golang.org/x/crypto/bcrypt"
"heckel.io/ntfy/log"
"heckel.io/ntfy/util"
"net/netip"
"strings"
"sync"

View File

@ -3,10 +3,10 @@ package user
import (
"database/sql"
"fmt"
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/require"
"github.com/stripe/stripe-go/v74"
"golang.org/x/crypto/bcrypt"
"heckel.io/ntfy/util"
"net/netip"
"path/filepath"
"strings"

View File

@ -2,8 +2,8 @@ package user
import (
"errors"
"git.zio.sh/astra/ntfy/v2/log"
"github.com/stripe/stripe-go/v74"
"heckel.io/ntfy/log"
"net/netip"
"regexp"
"strings"

View File

@ -1,8 +1,8 @@
package util_test
import (
"git.zio.sh/astra/ntfy/v2/util"
"github.com/stretchr/testify/require"
"heckel.io/ntfy/util"
"math/rand"
"sync"
"testing"

View File

@ -22,7 +22,7 @@
<!-- Previews in Google, Slack, WhatsApp, etc. -->
<meta
name="description"
content="ntfy lets you send push notifications via scripts from any computer or phone. Made with ❤ by Philipp C. Heckel, Apache License 2.0, source at https://heckel.io/ntfy."
content="ntfy lets you send push notifications via scripts from any computer or phone. Made with ❤ by Philipp C. Heckel, Apache License 2.0, source at https://git.zio.sh/astra/ntfy/v2."
/>
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
@ -30,7 +30,7 @@
<meta property="og:title" content="ntfy web" />
<meta
property="og:description"
content="ntfy lets you send push notifications via scripts from any computer or phone. Made with ❤ by Philipp C. Heckel, Apache License 2.0, source at https://heckel.io/ntfy."
content="ntfy lets you send push notifications via scripts from any computer or phone. Made with ❤ by Philipp C. Heckel, Apache License 2.0, source at https://git.zio.sh/astra/ntfy/v2."
/>
<meta property="og:image" content="/static/images/ntfy.png" />
<meta property="og:url" content="https://ntfy.sh" />