update import paths.

This commit is contained in:
fiatjaf
2025-04-15 08:51:25 -03:00
parent 76032dc089
commit f493293be2
106 changed files with 224 additions and 224 deletions

View File

@@ -6,9 +6,9 @@ import (
"log"
"github.com/dgraph-io/badger/v4"
bin "github.com/fiatjaf/eventstore/internal/binary"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip45/hyperloglog"
bin "fiatjaf.com/nostr/eventstore/internal/binary"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip45/hyperloglog"
)
func (b *BadgerBackend) CountEvents(ctx context.Context, filter nostr.Filter) (int64, error) {

View File

@@ -6,7 +6,7 @@ import (
"log"
"github.com/dgraph-io/badger/v4"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
var serialDelete uint32 = 0

View File

@@ -10,8 +10,8 @@ import (
"time"
"github.com/dgraph-io/badger/v4"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
)

View File

@@ -7,7 +7,7 @@ import (
"strconv"
"strings"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
"golang.org/x/exp/slices"
)

View File

@@ -6,8 +6,8 @@ import (
"sync/atomic"
"github.com/dgraph-io/badger/v4"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
const (

View File

@@ -9,10 +9,10 @@ import (
"log"
"github.com/dgraph-io/badger/v4"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/internal"
bin "github.com/fiatjaf/eventstore/internal/binary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/internal"
bin "fiatjaf.com/nostr/eventstore/internal/binary"
"fiatjaf.com/nostr"
"golang.org/x/exp/slices"
)

View File

@@ -5,8 +5,8 @@ import (
"encoding/hex"
"fmt"
"github.com/fiatjaf/eventstore/internal"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr"
)
type query struct {

View File

@@ -6,8 +6,8 @@ import (
"math"
"github.com/dgraph-io/badger/v4"
"github.com/fiatjaf/eventstore/internal"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr"
)
func (b *BadgerBackend) ReplaceEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -7,9 +7,9 @@ import (
"math"
"github.com/dgraph-io/badger/v4"
"github.com/fiatjaf/eventstore"
bin "github.com/fiatjaf/eventstore/internal/binary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
bin "fiatjaf.com/nostr/eventstore/internal/binary"
"fiatjaf.com/nostr"
)
func (b *BadgerBackend) SaveEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -5,8 +5,8 @@ import (
"os"
"testing"
"github.com/fiatjaf/eventstore/badger"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/badger"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/assert"
)

View File

@@ -3,7 +3,7 @@ package bluge
import (
"context"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func (b *BlugeBackend) DeleteEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -6,7 +6,7 @@ import (
"github.com/blugelabs/bluge"
"github.com/blugelabs/bluge/analysis/token"
"github.com/fiatjaf/eventstore"
"fiatjaf.com/nostr/eventstore"
"golang.org/x/text/unicode/norm"
)

View File

@@ -8,7 +8,7 @@ import (
"github.com/blugelabs/bluge"
"github.com/blugelabs/bluge/search"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func (b *BlugeBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error) {

View File

@@ -4,9 +4,9 @@ import (
"context"
"fmt"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/internal"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr"
)
func (b *BlugeBackend) ReplaceEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -6,7 +6,7 @@ import (
"strconv"
"github.com/blugelabs/bluge"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func (b *BlugeBackend) SaveEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -6,7 +6,7 @@ import (
"os"
"github.com/urfave/cli/v3"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
var delete_ = &cli.Command{

View File

@@ -9,16 +9,16 @@ import (
"os"
"strings"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/badger"
"github.com/fiatjaf/eventstore/elasticsearch"
"github.com/fiatjaf/eventstore/lmdb"
"github.com/fiatjaf/eventstore/mysql"
"github.com/fiatjaf/eventstore/postgresql"
"github.com/fiatjaf/eventstore/slicestore"
"github.com/fiatjaf/eventstore/sqlite3"
"github.com/fiatjaf/eventstore/strfry"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/badger"
"fiatjaf.com/nostr/eventstore/elasticsearch"
"fiatjaf.com/nostr/eventstore/lmdb"
"fiatjaf.com/nostr/eventstore/mysql"
"fiatjaf.com/nostr/eventstore/postgresql"
"fiatjaf.com/nostr/eventstore/slicestore"
"fiatjaf.com/nostr/eventstore/sqlite3"
"fiatjaf.com/nostr/eventstore/strfry"
"fiatjaf.com/nostr"
"github.com/urfave/cli/v3"
)

View File

@@ -7,9 +7,9 @@ import (
"os"
"path/filepath"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/mmm"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/mmm"
"fiatjaf.com/nostr"
"github.com/rs/zerolog"
)

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"runtime"
"github.com/fiatjaf/eventstore"
"fiatjaf.com/nostr/eventstore"
)
func doMmmInit(path string) (eventstore.Store, error) {

View File

@@ -10,9 +10,9 @@ import (
"github.com/urfave/cli/v3"
"github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip77/negentropy"
"github.com/nbd-wtf/go-nostr/nip77/negentropy/storage/vector"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip77/negentropy"
"fiatjaf.com/nostr/nip77/negentropy/storage/vector"
)
var neg = &cli.Command{

View File

@@ -7,7 +7,7 @@ import (
"os"
"github.com/urfave/cli/v3"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
// this is the default command when no subcommands are given, we will just try everything

View File

@@ -6,7 +6,7 @@ import (
"os"
"github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
"github.com/urfave/cli/v3"
)

View File

@@ -7,7 +7,7 @@ import (
"github.com/urfave/cli/v3"
"github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
var save = &cli.Command{

View File

@@ -7,8 +7,8 @@ import (
"io"
"os"
"github.com/fiatjaf/eventstore/internal/binary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/internal/binary"
"fiatjaf.com/nostr"
)
func main() {

View File

@@ -5,7 +5,7 @@ import (
"encoding/hex"
"fmt"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
// Deprecated -- the encoding used here is not very elegant, we'll have a better binary format later.

View File

@@ -3,7 +3,7 @@ package binary
import (
"math"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
const (

View File

@@ -1,16 +1,16 @@
package checks
import (
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/badger"
"github.com/fiatjaf/eventstore/bluge"
"github.com/fiatjaf/eventstore/edgedb"
"github.com/fiatjaf/eventstore/lmdb"
"github.com/fiatjaf/eventstore/mongo"
"github.com/fiatjaf/eventstore/mysql"
"github.com/fiatjaf/eventstore/postgresql"
"github.com/fiatjaf/eventstore/sqlite3"
"github.com/fiatjaf/eventstore/strfry"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/badger"
"fiatjaf.com/nostr/eventstore/bluge"
"fiatjaf.com/nostr/eventstore/edgedb"
"fiatjaf.com/nostr/eventstore/lmdb"
"fiatjaf.com/nostr/eventstore/mongo"
"fiatjaf.com/nostr/eventstore/mysql"
"fiatjaf.com/nostr/eventstore/postgresql"
"fiatjaf.com/nostr/eventstore/sqlite3"
"fiatjaf.com/nostr/eventstore/strfry"
)
// compile-time checks to ensure all backends implement Store

View File

@@ -7,7 +7,7 @@ import (
"strings"
mergesortedslices "fiatjaf.com/lib/merge-sorted-slices"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func IsOlder(previous, next *nostr.Event) bool {

View File

@@ -7,10 +7,10 @@ import (
"encoding/hex"
"github.com/PowerDNS/lmdb-go/lmdb"
bin "github.com/fiatjaf/eventstore/internal/binary"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip45"
"github.com/nbd-wtf/go-nostr/nip45/hyperloglog"
bin "fiatjaf.com/nostr/eventstore/internal/binary"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip45"
"fiatjaf.com/nostr/nip45/hyperloglog"
"golang.org/x/exp/slices"
)

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func (b *LMDBBackend) DeleteEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -11,8 +11,8 @@ import (
"time"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"
)

View File

@@ -10,7 +10,7 @@ import (
"strings"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
"golang.org/x/exp/slices"
)

View File

@@ -7,7 +7,7 @@ import (
"sync/atomic"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore"
"fiatjaf.com/nostr/eventstore"
)
var _ eventstore.Store = (*LMDBBackend)(nil)

View File

@@ -6,8 +6,8 @@ import (
"log"
"github.com/PowerDNS/lmdb-go/lmdb"
bin "github.com/fiatjaf/eventstore/internal/binary"
"github.com/nbd-wtf/go-nostr"
bin "fiatjaf.com/nostr/eventstore/internal/binary"
"fiatjaf.com/nostr"
)
const (

View File

@@ -9,10 +9,10 @@ import (
"slices"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/internal"
bin "github.com/fiatjaf/eventstore/internal/binary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/internal"
bin "fiatjaf.com/nostr/eventstore/internal/binary"
"fiatjaf.com/nostr"
)
func (b *LMDBBackend) QueryEvents(ctx context.Context, filter nostr.Filter) (chan *nostr.Event, error) {

View File

@@ -6,8 +6,8 @@ import (
"fmt"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore/internal"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr"
)
type query struct {

View File

@@ -6,8 +6,8 @@ import (
"math"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore/internal"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr"
)
func (b *LMDBBackend) ReplaceEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -7,9 +7,9 @@ import (
"math"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore"
bin "github.com/fiatjaf/eventstore/internal/binary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
bin "fiatjaf.com/nostr/eventstore/internal/binary"
"fiatjaf.com/nostr"
)
func (b *LMDBBackend) SaveEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -6,7 +6,7 @@ import (
"fmt"
"math"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
const (

View File

@@ -7,7 +7,7 @@ import (
"github.com/kr/pretty"
"github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func TestBaseCase(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"testing"
"github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func TestTagFiltering(t *testing.T) {

View File

@@ -7,8 +7,8 @@ import (
"slices"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore/mmm/betterbinary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/mmm/betterbinary"
"fiatjaf.com/nostr"
)
func (il *IndexingLayer) CountEvents(ctx context.Context, filter nostr.Filter) (int64, error) {

View File

@@ -8,7 +8,7 @@ import (
"slices"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func (il *IndexingLayer) DeleteEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -8,7 +8,7 @@ import (
"slices"
"testing"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
)

View File

@@ -9,7 +9,7 @@ import (
"strings"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
// this iterator always goes backwards

View File

@@ -8,8 +8,8 @@ import (
"path/filepath"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
var _ eventstore.Store = (*IndexingLayer)(nil)

View File

@@ -11,8 +11,8 @@ import (
"unsafe"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore/mmm/betterbinary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/mmm/betterbinary"
"fiatjaf.com/nostr"
"github.com/rs/zerolog"
)

View File

@@ -9,7 +9,7 @@ import (
"testing"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
"github.com/rs/zerolog"
"github.com/stretchr/testify/require"
)

View File

@@ -10,9 +10,9 @@ import (
"slices"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore/internal"
"github.com/fiatjaf/eventstore/mmm/betterbinary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr/eventstore/mmm/betterbinary"
"fiatjaf.com/nostr"
)
// GetByID returns the event -- if found in this mmm -- and all the IndexingLayers it belongs to.

View File

@@ -6,8 +6,8 @@ import (
"fmt"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore/internal"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr"
)
type query struct {

View File

@@ -6,8 +6,8 @@ import (
"math"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore/internal"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr"
)
func (il *IndexingLayer) ReplaceEvent(ctx context.Context, evt *nostr.Event) error {

View File

@@ -12,8 +12,8 @@ import (
"unsafe"
"github.com/PowerDNS/lmdb-go/lmdb"
"github.com/fiatjaf/eventstore/mmm/betterbinary"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/mmm/betterbinary"
"fiatjaf.com/nostr"
)
func (b *MultiMmapManager) StoreGlobal(ctx context.Context, evt *nostr.Event) (stored bool, err error) {

View File

@@ -3,8 +3,8 @@ package nullstore
import (
"context"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
var _ eventstore.Store = NullStore{}

View File

@@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
type RelayWrapper struct {

View File

@@ -6,9 +6,9 @@ import (
"strings"
"sync"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/internal"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/internal"
"fiatjaf.com/nostr"
"golang.org/x/exp/slices"
)

View File

@@ -4,7 +4,7 @@ import (
"context"
"testing"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func TestBasicStuff(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package eventstore
import (
"context"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
// Store is a persistence layer for nostr events handled by a relay.

View File

@@ -9,9 +9,9 @@ import (
"path/filepath"
"strings"
"github.com/fiatjaf/eventstore"
"fiatjaf.com/nostr/eventstore"
"github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
var _ eventstore.Store = (*StrfryBackend)(nil)

View File

@@ -7,12 +7,12 @@ import (
"os"
"testing"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/badger"
"github.com/fiatjaf/eventstore/lmdb"
"github.com/fiatjaf/eventstore/slicestore"
"github.com/fiatjaf/eventstore/sqlite3"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/badger"
"fiatjaf.com/nostr/eventstore/lmdb"
"fiatjaf.com/nostr/eventstore/slicestore"
"fiatjaf.com/nostr/eventstore/sqlite3"
"fiatjaf.com/nostr"
)
func BenchmarkSliceStore(b *testing.B) {

View File

@@ -6,12 +6,12 @@ import (
"testing"
embeddedpostgres "github.com/fergusstrange/embedded-postgres"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/badger"
"github.com/fiatjaf/eventstore/lmdb"
"github.com/fiatjaf/eventstore/postgresql"
"github.com/fiatjaf/eventstore/slicestore"
"github.com/fiatjaf/eventstore/sqlite3"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/badger"
"fiatjaf.com/nostr/eventstore/lmdb"
"fiatjaf.com/nostr/eventstore/postgresql"
"fiatjaf.com/nostr/eventstore/slicestore"
"fiatjaf.com/nostr/eventstore/sqlite3"
)
const (

View File

@@ -7,8 +7,8 @@ import (
"strings"
"testing"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
)

View File

@@ -7,8 +7,8 @@ import (
"slices"
"testing"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
)

View File

@@ -5,9 +5,9 @@ import (
"testing"
"time"
"github.com/fiatjaf/eventstore"
"github.com/fiatjaf/eventstore/slicestore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr/eventstore/slicestore"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
)

View File

@@ -6,8 +6,8 @@ import (
"fmt"
"testing"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
)

View File

@@ -1,7 +1,7 @@
package test
import (
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func getTimestamps(events []*nostr.Event) []nostr.Timestamp {

View File

@@ -7,8 +7,8 @@ import (
"slices"
"testing"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
)

View File

@@ -3,8 +3,8 @@ package count
import (
"context"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
type Wrapper struct {

View File

@@ -3,8 +3,8 @@ package disablesearch
import (
"context"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
type Wrapper struct {

View File

@@ -3,8 +3,8 @@ package skipevent
import (
"context"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
type Wrapper struct {

View File

@@ -5,8 +5,8 @@ import (
"errors"
"fmt"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
// AddEvent sends an event through then normal add pipeline, as if it was received from a websocket.

View File

@@ -8,7 +8,7 @@ import (
"strings"
"github.com/mailru/easyjson"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func readAuthorization(r *http.Request) (*nostr.Event, error) {

View File

@@ -3,7 +3,7 @@ package blossom
import (
"context"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
type BlobDescriptor struct {

View File

@@ -4,8 +4,8 @@ import (
"context"
"strconv"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
)
// EventStoreBlobIndexWrapper uses fake events to keep track of what blobs we have stored and who owns them

View File

@@ -12,7 +12,7 @@ import (
"time"
"github.com/liamg/magic"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func (bs BlossomServer) handleUploadCheck(w http.ResponseWriter, r *http.Request) {

View File

@@ -6,8 +6,8 @@ import (
"net/http"
"strings"
"github.com/fiatjaf/khatru"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/khatru"
"fiatjaf.com/nostr"
)
type BlossomServer struct {

View File

@@ -1,7 +1,7 @@
package khatru
import (
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
// BroadcastEvent emits an event to all listeners whose filters' match, skipping all filters and actions

View File

@@ -6,7 +6,7 @@ import (
"strconv"
"strings"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func (rl *Relay) handleDeleteRequest(ctx context.Context, evt *nostr.Event) error {

View File

@@ -4,7 +4,7 @@ import (
"context"
"errors"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func (rl *Relay) handleEphemeral(ctx context.Context, evt *nostr.Event) error {

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
"github.com/fiatjaf/eventstore/badger"
"github.com/fiatjaf/khatru"
"fiatjaf.com/nostr/eventstore/badger"
"fiatjaf.com/nostr/khatru"
)
func main() {

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
"github.com/fiatjaf/eventstore/elasticsearch"
"github.com/fiatjaf/khatru"
"fiatjaf.com/nostr/eventstore/elasticsearch"
"fiatjaf.com/nostr/khatru"
)
func main() {

View File

@@ -5,8 +5,8 @@ import (
"net/http"
"os"
"github.com/fiatjaf/eventstore/lmdb"
"github.com/fiatjaf/khatru"
"fiatjaf.com/nostr/eventstore/lmdb"
"fiatjaf.com/nostr/khatru"
)
func main() {

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
"github.com/fiatjaf/eventstore/postgresql"
"github.com/fiatjaf/khatru"
"fiatjaf.com/nostr/eventstore/postgresql"
"fiatjaf.com/nostr/khatru"
)
func main() {

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"net/http"
"github.com/fiatjaf/eventstore/sqlite3"
"github.com/fiatjaf/khatru"
"fiatjaf.com/nostr/eventstore/sqlite3"
"fiatjaf.com/nostr/khatru"
)
func main() {

View File

@@ -7,9 +7,9 @@ import (
"net/http"
"strings"
"github.com/fiatjaf/eventstore/badger"
"github.com/fiatjaf/khatru"
"github.com/fiatjaf/khatru/blossom"
"fiatjaf.com/nostr/eventstore/badger"
"fiatjaf.com/nostr/khatru"
"fiatjaf.com/nostr/khatru/blossom"
)
func main() {

View File

@@ -6,10 +6,10 @@ import (
"net/http"
"os"
"github.com/fiatjaf/eventstore/lmdb"
"github.com/fiatjaf/khatru"
"github.com/fiatjaf/khatru/policies"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/lmdb"
"fiatjaf.com/nostr/khatru"
"fiatjaf.com/nostr/khatru/policies"
"fiatjaf.com/nostr"
)
func main() {

View File

@@ -6,9 +6,9 @@ import (
"log"
"net/http"
"github.com/fiatjaf/khatru"
"github.com/fiatjaf/khatru/policies"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/khatru"
"fiatjaf.com/nostr/khatru/policies"
"fiatjaf.com/nostr"
)
func main() {

View File

@@ -5,10 +5,10 @@ import (
"net/http"
"slices"
"github.com/fiatjaf/eventstore/slicestore"
"github.com/fiatjaf/eventstore/sqlite3"
"github.com/fiatjaf/khatru"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/eventstore/slicestore"
"fiatjaf.com/nostr/eventstore/sqlite3"
"fiatjaf.com/nostr/khatru"
"fiatjaf.com/nostr"
)
func main() {

View File

@@ -6,8 +6,8 @@ import (
"sync"
"time"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip40"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip40"
)
type expiringEvent struct {

View File

@@ -14,13 +14,13 @@ import (
"github.com/bep/debounce"
"github.com/fasthttp/websocket"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip42"
"github.com/nbd-wtf/go-nostr/nip45"
"github.com/nbd-wtf/go-nostr/nip45/hyperloglog"
"github.com/nbd-wtf/go-nostr/nip70"
"github.com/nbd-wtf/go-nostr/nip77"
"github.com/nbd-wtf/go-nostr/nip77/negentropy"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip42"
"fiatjaf.com/nostr/nip45"
"fiatjaf.com/nostr/nip45/hyperloglog"
"fiatjaf.com/nostr/nip70"
"fiatjaf.com/nostr/nip77"
"fiatjaf.com/nostr/nip77/negentropy"
"github.com/puzpuzpuz/xsync/v3"
"github.com/rs/cors"
)

View File

@@ -5,7 +5,7 @@ import (
"net/http"
"strings"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func isOlder(previous, next *nostr.Event) bool {

View File

@@ -5,7 +5,7 @@ import (
"errors"
"slices"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
var ErrSubscriptionClosedByClient = errors.New("subscription closed by client")

View File

@@ -4,7 +4,7 @@ import (
"math/rand"
"testing"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
)

View File

@@ -5,7 +5,7 @@ import (
"strings"
"testing"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
"github.com/stretchr/testify/require"
)

View File

@@ -5,10 +5,10 @@ import (
"errors"
"fmt"
"github.com/fiatjaf/eventstore"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip77/negentropy"
"github.com/nbd-wtf/go-nostr/nip77/negentropy/storage/vector"
"fiatjaf.com/nostr/eventstore"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip77/negentropy"
"fiatjaf.com/nostr/nip77/negentropy/storage/vector"
)
type NegentropySession struct {

View File

@@ -13,8 +13,8 @@ import (
"reflect"
"strings"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip86"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip86"
)
type RelayManagementAPI struct {

View File

@@ -7,8 +7,8 @@ import (
"strings"
"time"
"github.com/nbd-wtf/go-nostr"
"github.com/nbd-wtf/go-nostr/nip70"
"fiatjaf.com/nostr"
"fiatjaf.com/nostr/nip70"
)
// PreventTooManyIndexableTags returns a function that can be used as a RejectFilter that will reject

View File

@@ -4,8 +4,8 @@ import (
"context"
"slices"
"github.com/fiatjaf/khatru"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/khatru"
"fiatjaf.com/nostr"
)
// NoComplexFilters disallows filters with more than 2 tags.

View File

@@ -4,7 +4,7 @@ import (
"context"
"encoding/json"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr"
)
func ValidateKind(ctx context.Context, evt *nostr.Event) (bool, string) {

View File

@@ -4,8 +4,8 @@ import (
"context"
"slices"
"github.com/fiatjaf/khatru"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/khatru"
"fiatjaf.com/nostr"
)
// RejectKind04Snoopers prevents reading NIP-04 messages from people not involved in the conversation.

View File

@@ -5,8 +5,8 @@ import (
"net/http"
"time"
"github.com/fiatjaf/khatru"
"github.com/nbd-wtf/go-nostr"
"fiatjaf.com/nostr/khatru"
"fiatjaf.com/nostr"
)
func EventIPRateLimiter(tokensPerInterval int, interval time.Duration, maxTokens int) func(ctx context.Context, _ *nostr.Event) (reject bool, msg string) {

Some files were not shown because too many files have changed in this diff Show More