From 0621e2e815c656f3b9fb3901a9d33b53b5ad536b Mon Sep 17 00:00:00 2001 From: Jon Lundy Date: Sun, 26 Feb 2023 22:33:01 -0700 Subject: [PATCH] refactor: rename to vanity url --- app/gql/resolver.go | 12 ++++----- app/msgbus/msgbus.graphqls | 2 +- app/msgbus/service.go | 8 +++--- app/peerfinder/ev-info.go | 2 +- app/peerfinder/ev-peer.go | 4 +-- app/peerfinder/ev-request.go | 4 +-- app/peerfinder/http.go | 6 ++--- app/peerfinder/jobs.go | 8 +++--- app/peerfinder/service.go | 8 +++--- app/salty/blobs.go | 4 +-- app/salty/salty-addr.go | 2 +- app/salty/salty-user.go | 4 +-- app/salty/salty.graphqls | 2 +- app/salty/service.go | 18 +++++++------- app/webfinger/events.go | 4 +-- app/webfinger/jrd.go | 16 ++++++------ app/webfinger/jrd_test.go | 12 ++++----- app/webfinger/webfinger.go | 10 ++++---- cmd/ev/app.msgbus.go | 10 ++++---- cmd/ev/app.peerfinder.go | 14 +++++------ cmd/ev/app.salty.go | 12 ++++----- cmd/ev/app.webfinger.go | 12 ++++----- cmd/ev/main.go | 4 +-- cmd/ev/svc.es.go | 22 ++++++++--------- cmd/ev/svc.gql.go | 12 ++++----- cmd/ev/svc.http.go | 14 +++++------ cmd/webfinger-cli/main.go | 4 +-- cmd/webfinger/webfinger_e2e_test.go | 4 +-- ev.go | 8 +++--- ev_test.go | 14 +++++------ go.mod | 2 +- internal/graph/generated/generated.go | 26 ++++++++++---------- internal/graph/resolver/resolver.go | 10 ++++---- pkg/authreq/authreq_test.go | 2 +- pkg/cache/cache_test.go | 2 +- pkg/cron/cron.go | 6 ++--- pkg/es/driver/disk-store/disk-store.go | 14 +++++------ pkg/es/driver/driver.go | 2 +- pkg/es/driver/mem-store/mem-store.go | 12 ++++----- pkg/es/driver/projecter/projecter.go | 8 +++--- pkg/es/driver/projecter/projector_test.go | 8 +++--- pkg/es/driver/resolve-links/resolve-links.go | 8 +++--- pkg/es/driver/streamer/streamer.go | 10 ++++---- pkg/es/es.graphqls | 4 +-- pkg/es/event/aggregate_test.go | 2 +- pkg/es/event/events_test.go | 2 +- pkg/es/event/reflect.go | 4 +-- pkg/es/graph.go | 8 +++--- pkg/gql/common.graphqls | 8 +++--- pkg/gql/connection.go | 2 +- pkg/gql/resolver/resolver.go | 6 ++--- pkg/locker/locker.go | 2 +- pkg/locker/locker_test.go | 2 +- pkg/math/math_test.go | 4 +-- pkg/mux/httpmux_test.go | 2 +- pkg/service/service.go | 4 +-- pkg/set/set.go | 4 +-- pkg/set/set_test.go | 2 +- pkg/slice/slice.go | 2 +- pkg/slice/slice_test.go | 7 +++--- 60 files changed, 214 insertions(+), 217 deletions(-) diff --git a/app/gql/resolver.go b/app/gql/resolver.go index 560af59..690d32f 100644 --- a/app/gql/resolver.go +++ b/app/gql/resolver.go @@ -4,12 +4,12 @@ import ( "context" "github.com/99designs/gqlgen/graphql" - "github.com/sour-is/ev/app/msgbus" - "github.com/sour-is/ev/app/salty" - "github.com/sour-is/ev/internal/graph/generated" - "github.com/sour-is/ev/pkg/es" - "github.com/sour-is/ev/pkg/gql" - "github.com/sour-is/ev/pkg/gql/resolver" + "go.sour.is/ev/app/msgbus" + "go.sour.is/ev/app/salty" + "go.sour.is/ev/internal/graph/generated" + "go.sour.is/ev/pkg/es" + "go.sour.is/ev/pkg/gql" + "go.sour.is/ev/pkg/gql/resolver" ) type Resolver struct { diff --git a/app/msgbus/msgbus.graphqls b/app/msgbus/msgbus.graphqls index 43358cc..97dae1e 100644 --- a/app/msgbus/msgbus.graphqls +++ b/app/msgbus/msgbus.graphqls @@ -5,7 +5,7 @@ extend type Subscription { """after == 0 start from begining, after == -1 start from end""" postAdded(streamID: String! after: Int! = -1): PostEvent } -type PostEvent implements Edge @goModel(model: "github.com/sour-is/ev/app/msgbus.PostEvent") { +type PostEvent implements Edge @goModel(model: "go.sour.is/ev/app/msgbus.PostEvent") { id: ID! payload: String! diff --git a/app/msgbus/service.go b/app/msgbus/service.go index 95580dc..8d48573 100644 --- a/app/msgbus/service.go +++ b/app/msgbus/service.go @@ -17,10 +17,10 @@ import ( "go.opentelemetry.io/otel/metric/unit" "go.uber.org/multierr" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/gql" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/gql" ) type service struct { diff --git a/app/peerfinder/ev-info.go b/app/peerfinder/ev-info.go index 6f00b92..7a8f13f 100644 --- a/app/peerfinder/ev-info.go +++ b/app/peerfinder/ev-info.go @@ -6,7 +6,7 @@ import ( "github.com/tj/go-semver" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev/pkg/es/event" ) type Info struct { diff --git a/app/peerfinder/ev-peer.go b/app/peerfinder/ev-peer.go index ac64d1e..8420651 100644 --- a/app/peerfinder/ev-peer.go +++ b/app/peerfinder/ev-peer.go @@ -7,8 +7,8 @@ import ( "time" "github.com/keys-pub/keys/json" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/set" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/set" ) type Time time.Time diff --git a/app/peerfinder/ev-request.go b/app/peerfinder/ev-request.go index 0d5484b..1f6b679 100644 --- a/app/peerfinder/ev-request.go +++ b/app/peerfinder/ev-request.go @@ -9,8 +9,8 @@ import ( "time" "github.com/oklog/ulid" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/set" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/set" ) type Request struct { diff --git a/app/peerfinder/http.go b/app/peerfinder/http.go index ce0046d..4527207 100644 --- a/app/peerfinder/http.go +++ b/app/peerfinder/http.go @@ -19,9 +19,9 @@ import ( contentnegotiation "gitlab.com/jamietanna/content-negotiation-go" "go.opentelemetry.io/otel/attribute" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/event" ) var ( diff --git a/app/peerfinder/jobs.go b/app/peerfinder/jobs.go index a8019a2..1f30094 100644 --- a/app/peerfinder/jobs.go +++ b/app/peerfinder/jobs.go @@ -9,10 +9,10 @@ import ( "net/http" "time" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/set" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/set" ) // RefreshJob retrieves peer info from the peerdb diff --git a/app/peerfinder/service.go b/app/peerfinder/service.go index 1f72912..677ab80 100644 --- a/app/peerfinder/service.go +++ b/app/peerfinder/service.go @@ -6,10 +6,10 @@ import ( "sync/atomic" "time" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/locker" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/locker" "go.uber.org/multierr" ) diff --git a/app/salty/blobs.go b/app/salty/blobs.go index 6db1120..7ab064b 100644 --- a/app/salty/blobs.go +++ b/app/salty/blobs.go @@ -11,10 +11,10 @@ import ( "path/filepath" "strings" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/authreq" "go.opentelemetry.io/otel/metric/instrument" "go.opentelemetry.io/otel/metric/instrument/syncint64" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/authreq" "go.uber.org/multierr" ) diff --git a/app/salty/salty-addr.go b/app/salty/salty-addr.go index 132c2fd..e6e3b06 100644 --- a/app/salty/salty-addr.go +++ b/app/salty/salty-addr.go @@ -11,7 +11,7 @@ import ( "github.com/keys-pub/keys" - "github.com/sour-is/ev/internal/lg" + "go.sour.is/ev/internal/lg" ) // Config represents a Salty Config for a User which at a minimum is required diff --git a/app/salty/salty-user.go b/app/salty/salty-user.go index 5a5b15b..5972cd0 100644 --- a/app/salty/salty-user.go +++ b/app/salty/salty-user.go @@ -12,8 +12,8 @@ import ( "github.com/keys-pub/keys" "github.com/oklog/ulid/v2" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/gql" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/gql" ) type SaltyUser struct { diff --git a/app/salty/salty.graphqls b/app/salty/salty.graphqls index 67089e4..b15c9a3 100644 --- a/app/salty/salty.graphqls +++ b/app/salty/salty.graphqls @@ -6,7 +6,7 @@ extend type Mutation { createSaltyUser(nick: String! pubkey: String!): SaltyUser } -type SaltyUser @goModel(model: "github.com/sour-is/ev/app/salty.SaltyUser"){ +type SaltyUser @goModel(model: "go.sour.is/ev/app/salty.SaltyUser"){ pubkey: String! inbox: String! endpoint: String! diff --git a/app/salty/service.go b/app/salty/service.go index 0445079..8657619 100644 --- a/app/salty/service.go +++ b/app/salty/service.go @@ -19,10 +19,10 @@ import ( "go.opentelemetry.io/otel/metric/unit" "go.uber.org/multierr" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/gql" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/gql" ) type DNSResolver interface { @@ -45,7 +45,7 @@ type service struct { opts []Option } -type Option interface{ +type Option interface { ApplySalty(*service) } @@ -85,7 +85,7 @@ func New(ctx context.Context, es *ev.EventStore, opts ...Option) (*service, erro for _, o := range opts { o.ApplySalty(svc) - if o, ok:=o.(interface{Setup(context.Context) error}); ok { + if o, ok := o.(interface{ Setup(context.Context) error }); ok { if err := o.Setup(ctx); err != nil { return nil, err } @@ -143,7 +143,7 @@ func (s *service) BaseURL() string { func (s *service) RegisterHTTP(mux *http.ServeMux) { for _, o := range s.opts { - if o, ok:=o.(interface{RegisterHTTP(mux *http.ServeMux)}); ok { + if o, ok := o.(interface{ RegisterHTTP(mux *http.ServeMux) }); ok { o.RegisterHTTP(mux) } } @@ -155,7 +155,7 @@ func (s *service) RegisterAPIv1(mux *http.ServeMux) { mux.HandleFunc("/send", s.apiv1) for _, o := range s.opts { - if o, ok:=o.(interface{RegisterAPIv1(mux *http.ServeMux)}); ok { + if o, ok := o.(interface{ RegisterAPIv1(mux *http.ServeMux) }); ok { o.RegisterAPIv1(mux) } } @@ -164,7 +164,7 @@ func (s *service) RegisterWellKnown(mux *http.ServeMux) { mux.Handle("/salty/", lg.Htrace(s, "lookup")) for _, o := range s.opts { - if o, ok:=o.(interface{RegisterWellKnown(mux *http.ServeMux)}); ok { + if o, ok := o.(interface{ RegisterWellKnown(mux *http.ServeMux) }); ok { o.RegisterWellKnown(mux) } } diff --git a/app/webfinger/events.go b/app/webfinger/events.go index 88987c3..9bf62a0 100644 --- a/app/webfinger/events.go +++ b/app/webfinger/events.go @@ -3,7 +3,7 @@ package webfinger import ( "encoding/json" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev/pkg/es/event" ) type SubjectSet struct { @@ -35,7 +35,7 @@ func (e *SubjectSet) UnmarshalBinary(b []byte) error { var _ event.Event = (*SubjectSet)(nil) type SubjectDeleted struct { - Subject string `json:"subject"` + Subject string `json:"subject"` eventMeta event.Meta } diff --git a/app/webfinger/jrd.go b/app/webfinger/jrd.go index 9c3cae3..be81a9a 100644 --- a/app/webfinger/jrd.go +++ b/app/webfinger/jrd.go @@ -8,9 +8,9 @@ import ( "hash/fnv" "sort" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/set" - "github.com/sour-is/ev/pkg/slice" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/set" + "go.sour.is/ev/pkg/slice" "gopkg.in/yaml.v3" ) @@ -34,14 +34,14 @@ type JRD struct { func (a *JRD) CloneValues() *JRD { m := make(map[string]*string, len(a.Properties)) - for k,v := range a.Properties { + for k, v := range a.Properties { m[k] = v } return &JRD{ - Subject: a.Subject, - Aliases: append([]string{}, a.Aliases...), - Properties: m, - Links: append([]*Link{}, a.Links...), + Subject: a.Subject, + Aliases: append([]string{}, a.Aliases...), + Properties: m, + Links: append([]*Link{}, a.Links...), } } diff --git a/app/webfinger/jrd_test.go b/app/webfinger/jrd_test.go index 108cb97..8aeefd0 100644 --- a/app/webfinger/jrd_test.go +++ b/app/webfinger/jrd_test.go @@ -14,12 +14,12 @@ import ( "github.com/matryer/is" "go.uber.org/multierr" - "github.com/sour-is/ev" - "github.com/sour-is/ev/app/webfinger" - memstore "github.com/sour-is/ev/pkg/es/driver/mem-store" - "github.com/sour-is/ev/pkg/es/driver/projecter" - "github.com/sour-is/ev/pkg/es/driver/streamer" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev" + "go.sour.is/ev/app/webfinger" + memstore "go.sour.is/ev/pkg/es/driver/mem-store" + "go.sour.is/ev/pkg/es/driver/projecter" + "go.sour.is/ev/pkg/es/driver/streamer" + "go.sour.is/ev/pkg/es/event" ) func TestParseJRD(t *testing.T) { diff --git a/app/webfinger/webfinger.go b/app/webfinger/webfinger.go index 53947a6..8fd48b4 100644 --- a/app/webfinger/webfinger.go +++ b/app/webfinger/webfinger.go @@ -13,10 +13,10 @@ import ( "strings" "github.com/golang-jwt/jwt/v4" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/set" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/set" ) type service struct { @@ -328,4 +328,4 @@ func validOptionalPort(port string) bool { } } return true -} \ No newline at end of file +} diff --git a/cmd/ev/app.msgbus.go b/cmd/ev/app.msgbus.go index 4522d25..4d033da 100644 --- a/cmd/ev/app.msgbus.go +++ b/cmd/ev/app.msgbus.go @@ -4,11 +4,11 @@ import ( "context" "fmt" - "github.com/sour-is/ev" - "github.com/sour-is/ev/app/msgbus" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/service" - "github.com/sour-is/ev/pkg/slice" + "go.sour.is/ev" + "go.sour.is/ev/app/msgbus" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/service" + "go.sour.is/ev/pkg/slice" ) var _ = apps.Register(50, func(ctx context.Context, svc *service.Harness) error { diff --git a/cmd/ev/app.peerfinder.go b/cmd/ev/app.peerfinder.go index fcef159..6a03e51 100644 --- a/cmd/ev/app.peerfinder.go +++ b/cmd/ev/app.peerfinder.go @@ -4,13 +4,13 @@ import ( "context" "fmt" - "github.com/sour-is/ev" - "github.com/sour-is/ev/app/peerfinder" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/env" - "github.com/sour-is/ev/pkg/es/driver/projecter" - "github.com/sour-is/ev/pkg/service" - "github.com/sour-is/ev/pkg/slice" + "go.sour.is/ev" + "go.sour.is/ev/app/peerfinder" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/env" + "go.sour.is/ev/pkg/es/driver/projecter" + "go.sour.is/ev/pkg/service" + "go.sour.is/ev/pkg/slice" ) var _ = apps.Register(50, func(ctx context.Context, svc *service.Harness) error { diff --git a/cmd/ev/app.salty.go b/cmd/ev/app.salty.go index c56f9e8..4a2d266 100644 --- a/cmd/ev/app.salty.go +++ b/cmd/ev/app.salty.go @@ -9,12 +9,12 @@ import ( "path/filepath" "strings" - "github.com/sour-is/ev" - "github.com/sour-is/ev/app/salty" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/env" - "github.com/sour-is/ev/pkg/service" - "github.com/sour-is/ev/pkg/slice" + "go.sour.is/ev" + "go.sour.is/ev/app/salty" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/env" + "go.sour.is/ev/pkg/service" + "go.sour.is/ev/pkg/slice" ) var _ = apps.Register(50, func(ctx context.Context, svc *service.Harness) error { diff --git a/cmd/ev/app.webfinger.go b/cmd/ev/app.webfinger.go index 6000ce0..9a4b966 100644 --- a/cmd/ev/app.webfinger.go +++ b/cmd/ev/app.webfinger.go @@ -7,12 +7,12 @@ import ( "time" "github.com/patrickmn/go-cache" - "github.com/sour-is/ev" - "github.com/sour-is/ev/app/webfinger" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/env" - "github.com/sour-is/ev/pkg/service" - "github.com/sour-is/ev/pkg/slice" + "go.sour.is/ev" + "go.sour.is/ev/app/webfinger" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/env" + "go.sour.is/ev/pkg/service" + "go.sour.is/ev/pkg/slice" ) var ( diff --git a/cmd/ev/main.go b/cmd/ev/main.go index 2c266bc..99e5d88 100644 --- a/cmd/ev/main.go +++ b/cmd/ev/main.go @@ -8,8 +8,8 @@ import ( "os" "os/signal" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/service" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/service" ) var apps service.Apps diff --git a/cmd/ev/svc.es.go b/cmd/ev/svc.es.go index 00cec22..1ade46d 100644 --- a/cmd/ev/svc.es.go +++ b/cmd/ev/svc.es.go @@ -3,17 +3,17 @@ package main import ( "context" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/env" - "github.com/sour-is/ev/pkg/es" - diskstore "github.com/sour-is/ev/pkg/es/driver/disk-store" - memstore "github.com/sour-is/ev/pkg/es/driver/mem-store" - "github.com/sour-is/ev/pkg/es/driver/projecter" - resolvelinks "github.com/sour-is/ev/pkg/es/driver/resolve-links" - "github.com/sour-is/ev/pkg/es/driver/streamer" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/service" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/env" + "go.sour.is/ev/pkg/es" + diskstore "go.sour.is/ev/pkg/es/driver/disk-store" + memstore "go.sour.is/ev/pkg/es/driver/mem-store" + "go.sour.is/ev/pkg/es/driver/projecter" + resolvelinks "go.sour.is/ev/pkg/es/driver/resolve-links" + "go.sour.is/ev/pkg/es/driver/streamer" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/service" "go.uber.org/multierr" ) diff --git a/cmd/ev/svc.gql.go b/cmd/ev/svc.gql.go index 88d4b9e..27fad66 100644 --- a/cmd/ev/svc.gql.go +++ b/cmd/ev/svc.gql.go @@ -4,12 +4,12 @@ import ( "context" "net/http" - "github.com/sour-is/ev/app/gql" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/gql/resolver" - "github.com/sour-is/ev/pkg/mux" - "github.com/sour-is/ev/pkg/service" - "github.com/sour-is/ev/pkg/slice" + "go.sour.is/ev/app/gql" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/gql/resolver" + "go.sour.is/ev/pkg/mux" + "go.sour.is/ev/pkg/service" + "go.sour.is/ev/pkg/slice" ) var _ = apps.Register(90, func(ctx context.Context, svc *service.Harness) error { diff --git a/cmd/ev/svc.http.go b/cmd/ev/svc.http.go index 6c81ff8..8fb5a93 100644 --- a/cmd/ev/svc.http.go +++ b/cmd/ev/svc.http.go @@ -7,17 +7,15 @@ import ( "strings" "github.com/rs/cors" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/env" - "github.com/sour-is/ev/pkg/mux" - "github.com/sour-is/ev/pkg/service" - "github.com/sour-is/ev/pkg/slice" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/env" + "go.sour.is/ev/pkg/mux" + "go.sour.is/ev/pkg/service" + "go.sour.is/ev/pkg/slice" ) var _ = apps.Register(20, func(ctx context.Context, svc *service.Harness) error { - s := &http.Server{ - - } + s := &http.Server{} svc.Add(s) mux := mux.New() diff --git a/cmd/webfinger-cli/main.go b/cmd/webfinger-cli/main.go index 4753c56..177d6ee 100644 --- a/cmd/webfinger-cli/main.go +++ b/cmd/webfinger-cli/main.go @@ -18,8 +18,8 @@ import ( "github.com/docopt/docopt-go" "gopkg.in/yaml.v3" - "github.com/sour-is/ev/app/webfinger" - "github.com/sour-is/ev/cmd/webfinger-cli/xdg" + "go.sour.is/ev/app/webfinger" + "go.sour.is/ev/cmd/webfinger-cli/xdg" ) var usage = `Webfinger CLI. diff --git a/cmd/webfinger/webfinger_e2e_test.go b/cmd/webfinger/webfinger_e2e_test.go index 480e444..534e86d 100644 --- a/cmd/webfinger/webfinger_e2e_test.go +++ b/cmd/webfinger/webfinger_e2e_test.go @@ -11,8 +11,8 @@ import ( "testing" "github.com/matryer/is" - "github.com/sour-is/ev/app/webfinger" - "github.com/sour-is/ev/pkg/service" + "go.sour.is/ev/app/webfinger" + "go.sour.is/ev/pkg/service" "golang.org/x/sync/errgroup" ) diff --git a/ev.go b/ev.go index cde5295..c1bd479 100644 --- a/ev.go +++ b/ev.go @@ -11,10 +11,10 @@ import ( "go.opentelemetry.io/otel/metric/instrument/syncint64" "go.uber.org/multierr" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/driver" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/locker" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/driver" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/locker" ) type config struct { diff --git a/ev_test.go b/ev_test.go index 627d8f4..118aa88 100644 --- a/ev_test.go +++ b/ev_test.go @@ -11,13 +11,13 @@ import ( "github.com/matryer/is" "go.uber.org/multierr" - "github.com/sour-is/ev" - "github.com/sour-is/ev/app/peerfinder" - memstore "github.com/sour-is/ev/pkg/es/driver/mem-store" - "github.com/sour-is/ev/pkg/es/driver/projecter" - resolvelinks "github.com/sour-is/ev/pkg/es/driver/resolve-links" - "github.com/sour-is/ev/pkg/es/driver/streamer" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev" + "go.sour.is/ev/app/peerfinder" + memstore "go.sour.is/ev/pkg/es/driver/mem-store" + "go.sour.is/ev/pkg/es/driver/projecter" + resolvelinks "go.sour.is/ev/pkg/es/driver/resolve-links" + "go.sour.is/ev/pkg/es/driver/streamer" + "go.sour.is/ev/pkg/es/event" ) var ( diff --git a/go.mod b/go.mod index 992aea0..28edb64 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/sour-is/ev +module go.sour.is/ev go 1.19 diff --git a/internal/graph/generated/generated.go b/internal/graph/generated/generated.go index d4375ee..f91fb3a 100644 --- a/internal/graph/generated/generated.go +++ b/internal/graph/generated/generated.go @@ -16,11 +16,11 @@ import ( "github.com/99designs/gqlgen/graphql" "github.com/99designs/gqlgen/graphql/introspection" "github.com/99designs/gqlgen/plugin/federation/fedruntime" - "github.com/sour-is/ev/app/msgbus" - "github.com/sour-is/ev/app/salty" - "github.com/sour-is/ev/pkg/es" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/gql" + "go.sour.is/ev/app/msgbus" + "go.sour.is/ev/app/salty" + "go.sour.is/ev/pkg/es" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/gql" gqlparser "github.com/vektah/gqlparser/v2" "github.com/vektah/gqlparser/v2/ast" ) @@ -530,7 +530,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er var sources = []*ast.Source{ {Name: "../../../pkg/es/es.graphqls", Input: ` -type Meta @goModel(model: "github.com/sour-is/ev/pkg/es/event.Meta") { +type Meta @goModel(model: "go.sour.is/ev/pkg/es/event.Meta") { eventID: String! @goField(name: "getEventID") streamID: String! @goField(name: "ActualStreamID") position: Int! @goField(name: "ActualPosition") @@ -548,7 +548,7 @@ extend type Subscription { eventAdded(streamID: String! after: Int! = -1): Event } -type Event implements Edge @goModel(model: "github.com/sour-is/ev/pkg/es.GQLEvent") { +type Event implements Edge @goModel(model: "go.sour.is/ev/pkg/es.GQLEvent") { id: ID! eventID: String! @@ -566,23 +566,23 @@ type Event implements Edge @goModel(model: "github.com/sour-is/ev/pkg/es.GQLEven {Name: "../../../pkg/gql/common.graphqls", Input: `scalar Time scalar Map -type Connection @goModel(model: "github.com/sour-is/ev/pkg/gql.Connection") { +type Connection @goModel(model: "go.sour.is/ev/pkg/gql.Connection") { paging: PageInfo! edges: [Edge!]! } -input PageInput @goModel(model: "github.com/sour-is/ev/pkg/gql.PageInput") { +input PageInput @goModel(model: "go.sour.is/ev/pkg/gql.PageInput") { after: Int = 0 before: Int count: Int = 30 } -type PageInfo @goModel(model: "github.com/sour-is/ev/pkg/gql.PageInfo") { +type PageInfo @goModel(model: "go.sour.is/ev/pkg/gql.PageInfo") { next: Boolean! prev: Boolean! begin: Int! end: Int! } -interface Edge @goModel(model: "github.com/sour-is/ev/pkg/gql.Edge"){ +interface Edge @goModel(model: "go.sour.is/ev/pkg/gql.Edge"){ id: ID! } @@ -615,7 +615,7 @@ extend type Subscription { """after == 0 start from begining, after == -1 start from end""" postAdded(streamID: String! after: Int! = -1): PostEvent } -type PostEvent implements Edge @goModel(model: "github.com/sour-is/ev/app/msgbus.PostEvent") { +type PostEvent implements Edge @goModel(model: "go.sour.is/ev/app/msgbus.PostEvent") { id: ID! payload: String! @@ -632,7 +632,7 @@ extend type Mutation { createSaltyUser(nick: String! pubkey: String!): SaltyUser } -type SaltyUser @goModel(model: "github.com/sour-is/ev/app/salty.SaltyUser"){ +type SaltyUser @goModel(model: "go.sour.is/ev/app/salty.SaltyUser"){ pubkey: String! inbox: String! endpoint: String! diff --git a/internal/graph/resolver/resolver.go b/internal/graph/resolver/resolver.go index f66016d..d0786de 100644 --- a/internal/graph/resolver/resolver.go +++ b/internal/graph/resolver/resolver.go @@ -5,11 +5,11 @@ package resolver import ( "context" - "github.com/sour-is/ev/app/msgbus" - "github.com/sour-is/ev/app/salty" - "github.com/sour-is/ev/internal/graph/generated" - "github.com/sour-is/ev/pkg/es" - "github.com/sour-is/ev/pkg/gql" + "go.sour.is/ev/app/msgbus" + "go.sour.is/ev/app/salty" + "go.sour.is/ev/internal/graph/generated" + "go.sour.is/ev/pkg/es" + "go.sour.is/ev/pkg/gql" ) type Resolver struct{} diff --git a/pkg/authreq/authreq_test.go b/pkg/authreq/authreq_test.go index 18ea867..f6c5c82 100644 --- a/pkg/authreq/authreq_test.go +++ b/pkg/authreq/authreq_test.go @@ -10,7 +10,7 @@ import ( "testing" "github.com/matryer/is" - "github.com/sour-is/ev/pkg/authreq" + "go.sour.is/ev/pkg/authreq" ) func TestGETRequest(t *testing.T) { diff --git a/pkg/cache/cache_test.go b/pkg/cache/cache_test.go index 298f406..68ee8a0 100644 --- a/pkg/cache/cache_test.go +++ b/pkg/cache/cache_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/matryer/is" - "github.com/sour-is/ev/pkg/cache" + "go.sour.is/ev/pkg/cache" ) func TestCache(t *testing.T) { diff --git a/pkg/cron/cron.go b/pkg/cron/cron.go index afe2f74..5678cef 100644 --- a/pkg/cron/cron.go +++ b/pkg/cron/cron.go @@ -8,10 +8,10 @@ import ( "strings" "time" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/locker" - "github.com/sour-is/ev/pkg/set" "go.opentelemetry.io/otel/attribute" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/locker" + "go.sour.is/ev/pkg/set" "golang.org/x/sync/errgroup" ) diff --git a/pkg/es/driver/disk-store/disk-store.go b/pkg/es/driver/disk-store/disk-store.go index 396e12b..6d696c0 100644 --- a/pkg/es/driver/disk-store/disk-store.go +++ b/pkg/es/driver/disk-store/disk-store.go @@ -16,13 +16,13 @@ import ( "go.opentelemetry.io/otel/metric/instrument/syncint64" "go.uber.org/multierr" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/cache" - "github.com/sour-is/ev/pkg/es/driver" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/locker" - "github.com/sour-is/ev/pkg/math" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/cache" + "go.sour.is/ev/pkg/es/driver" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/locker" + "go.sour.is/ev/pkg/math" ) const CachSize = 1000 diff --git a/pkg/es/driver/driver.go b/pkg/es/driver/driver.go index 8387de6..f60b135 100644 --- a/pkg/es/driver/driver.go +++ b/pkg/es/driver/driver.go @@ -4,7 +4,7 @@ package driver import ( "context" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev/pkg/es/event" ) type Driver interface { diff --git a/pkg/es/driver/mem-store/mem-store.go b/pkg/es/driver/mem-store/mem-store.go index 64478a2..a4741a4 100644 --- a/pkg/es/driver/mem-store/mem-store.go +++ b/pkg/es/driver/mem-store/mem-store.go @@ -5,12 +5,12 @@ import ( "context" "fmt" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/driver" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/locker" - "github.com/sour-is/ev/pkg/math" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/driver" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/locker" + "go.sour.is/ev/pkg/math" ) type state struct { diff --git a/pkg/es/driver/projecter/projecter.go b/pkg/es/driver/projecter/projecter.go index ea3e2bd..c537665 100644 --- a/pkg/es/driver/projecter/projecter.go +++ b/pkg/es/driver/projecter/projecter.go @@ -5,10 +5,10 @@ import ( "context" "strings" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/driver" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/driver" + "go.sour.is/ev/pkg/es/event" ) type projector struct { diff --git a/pkg/es/driver/projecter/projector_test.go b/pkg/es/driver/projecter/projector_test.go index 4e19878..3b3af3e 100644 --- a/pkg/es/driver/projecter/projector_test.go +++ b/pkg/es/driver/projecter/projector_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/matryer/is" - "github.com/sour-is/ev" - "github.com/sour-is/ev/pkg/es/driver" - "github.com/sour-is/ev/pkg/es/driver/projecter" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev" + "go.sour.is/ev/pkg/es/driver" + "go.sour.is/ev/pkg/es/driver/projecter" + "go.sour.is/ev/pkg/es/event" ) type mockDriver struct { diff --git a/pkg/es/driver/resolve-links/resolve-links.go b/pkg/es/driver/resolve-links/resolve-links.go index f079f88..3033819 100644 --- a/pkg/es/driver/resolve-links/resolve-links.go +++ b/pkg/es/driver/resolve-links/resolve-links.go @@ -4,10 +4,10 @@ import ( "context" "errors" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/driver" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/driver" + "go.sour.is/ev/pkg/es/event" ) type resolvelinks struct { diff --git a/pkg/es/driver/streamer/streamer.go b/pkg/es/driver/streamer/streamer.go index 9a4f184..2f1949a 100644 --- a/pkg/es/driver/streamer/streamer.go +++ b/pkg/es/driver/streamer/streamer.go @@ -9,11 +9,11 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/driver" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/locker" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/driver" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/locker" ) type state struct { diff --git a/pkg/es/es.graphqls b/pkg/es/es.graphqls index a98d369..86e6207 100644 --- a/pkg/es/es.graphqls +++ b/pkg/es/es.graphqls @@ -1,5 +1,5 @@ -type Meta @goModel(model: "github.com/sour-is/ev/pkg/es/event.Meta") { +type Meta @goModel(model: "go.sour.is/ev/pkg/es/event.Meta") { eventID: String! @goField(name: "getEventID") streamID: String! @goField(name: "ActualStreamID") position: Int! @goField(name: "ActualPosition") @@ -17,7 +17,7 @@ extend type Subscription { eventAdded(streamID: String! after: Int! = -1): Event } -type Event implements Edge @goModel(model: "github.com/sour-is/ev/pkg/es.GQLEvent") { +type Event implements Edge @goModel(model: "go.sour.is/ev/pkg/es.GQLEvent") { id: ID! eventID: String! diff --git a/pkg/es/event/aggregate_test.go b/pkg/es/event/aggregate_test.go index ed16082..338a13f 100644 --- a/pkg/es/event/aggregate_test.go +++ b/pkg/es/event/aggregate_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev/pkg/es/event" ) type Agg struct { diff --git a/pkg/es/event/events_test.go b/pkg/es/event/events_test.go index bee5fed..348314a 100644 --- a/pkg/es/event/events_test.go +++ b/pkg/es/event/events_test.go @@ -8,7 +8,7 @@ import ( "github.com/matryer/is" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev/pkg/es/event" ) type DummyEvent struct { diff --git a/pkg/es/event/reflect.go b/pkg/es/event/reflect.go index e62f116..afcab2c 100644 --- a/pkg/es/event/reflect.go +++ b/pkg/es/event/reflect.go @@ -9,8 +9,8 @@ import ( "reflect" "strings" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/locker" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/locker" ) type config struct { diff --git a/pkg/es/graph.go b/pkg/es/graph.go index 4d54431..622bbe3 100644 --- a/pkg/es/graph.go +++ b/pkg/es/graph.go @@ -7,10 +7,10 @@ import ( "net/http" "time" - "github.com/sour-is/ev" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/es/event" - "github.com/sour-is/ev/pkg/gql" + "go.sour.is/ev" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/es/event" + "go.sour.is/ev/pkg/gql" ) type EventResolver interface { diff --git a/pkg/gql/common.graphqls b/pkg/gql/common.graphqls index ee5dd00..8334319 100644 --- a/pkg/gql/common.graphqls +++ b/pkg/gql/common.graphqls @@ -1,23 +1,23 @@ scalar Time scalar Map -type Connection @goModel(model: "github.com/sour-is/ev/pkg/gql.Connection") { +type Connection @goModel(model: "go.sour.is/ev/pkg/gql.Connection") { paging: PageInfo! edges: [Edge!]! } -input PageInput @goModel(model: "github.com/sour-is/ev/pkg/gql.PageInput") { +input PageInput @goModel(model: "go.sour.is/ev/pkg/gql.PageInput") { after: Int = 0 before: Int count: Int = 30 } -type PageInfo @goModel(model: "github.com/sour-is/ev/pkg/gql.PageInfo") { +type PageInfo @goModel(model: "go.sour.is/ev/pkg/gql.PageInfo") { next: Boolean! prev: Boolean! begin: Int! end: Int! } -interface Edge @goModel(model: "github.com/sour-is/ev/pkg/gql.Edge"){ +interface Edge @goModel(model: "go.sour.is/ev/pkg/gql.Edge"){ id: ID! } diff --git a/pkg/gql/connection.go b/pkg/gql/connection.go index df9fb22..4ec35e0 100644 --- a/pkg/gql/connection.go +++ b/pkg/gql/connection.go @@ -4,7 +4,7 @@ import ( "context" "encoding/json" - "github.com/sour-is/ev/pkg/es/event" + "go.sour.is/ev/pkg/es/event" ) type Edge interface { diff --git a/pkg/gql/resolver/resolver.go b/pkg/gql/resolver/resolver.go index 224ad44..2881775 100644 --- a/pkg/gql/resolver/resolver.go +++ b/pkg/gql/resolver/resolver.go @@ -19,9 +19,9 @@ import ( "github.com/gorilla/websocket" "github.com/ravilushqa/otelgqlgen" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/gql/graphiql" - "github.com/sour-is/ev/pkg/gql/playground" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/gql/graphiql" + "go.sour.is/ev/pkg/gql/playground" ) type BaseResolver interface { diff --git a/pkg/locker/locker.go b/pkg/locker/locker.go index ba015b6..f2706a1 100644 --- a/pkg/locker/locker.go +++ b/pkg/locker/locker.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/sour-is/ev/internal/lg" "go.opentelemetry.io/otel/attribute" + "go.sour.is/ev/internal/lg" ) type Locked[T any] struct { diff --git a/pkg/locker/locker_test.go b/pkg/locker/locker_test.go index 387c348..a95dbd0 100644 --- a/pkg/locker/locker_test.go +++ b/pkg/locker/locker_test.go @@ -6,7 +6,7 @@ import ( "github.com/matryer/is" - "github.com/sour-is/ev/pkg/locker" + "go.sour.is/ev/pkg/locker" ) type config struct { diff --git a/pkg/math/math_test.go b/pkg/math/math_test.go index 04b179a..0537d77 100644 --- a/pkg/math/math_test.go +++ b/pkg/math/math_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/matryer/is" - "github.com/sour-is/ev" - "github.com/sour-is/ev/pkg/math" + "go.sour.is/ev" + "go.sour.is/ev/pkg/math" ) func TestMath(t *testing.T) { diff --git a/pkg/mux/httpmux_test.go b/pkg/mux/httpmux_test.go index c9b4dc5..34173d6 100644 --- a/pkg/mux/httpmux_test.go +++ b/pkg/mux/httpmux_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/matryer/is" - "github.com/sour-is/ev/pkg/mux" + "go.sour.is/ev/pkg/mux" ) type mockHTTP struct { diff --git a/pkg/service/service.go b/pkg/service/service.go index 5424216..cf6cfd9 100644 --- a/pkg/service/service.go +++ b/pkg/service/service.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "github.com/sour-is/ev/internal/lg" - "github.com/sour-is/ev/pkg/cron" "go.opentelemetry.io/otel/attribute" + "go.sour.is/ev/internal/lg" + "go.sour.is/ev/pkg/cron" "go.uber.org/multierr" "golang.org/x/sync/errgroup" ) diff --git a/pkg/set/set.go b/pkg/set/set.go index b31439f..6aaf5a7 100644 --- a/pkg/set/set.go +++ b/pkg/set/set.go @@ -5,7 +5,7 @@ import ( "sort" "strings" - "github.com/sour-is/ev/pkg/math" + "go.sour.is/ev/pkg/math" ) type Set[T comparable] map[T]struct{} @@ -36,7 +36,7 @@ func (s Set[T]) Delete(items ...T) Set[T] { func (s Set[T]) Equal(e Set[T]) bool { for k := range s { - if _, ok := e[k]; !ok{ + if _, ok := e[k]; !ok { return false } } diff --git a/pkg/set/set_test.go b/pkg/set/set_test.go index f126e1d..13af572 100644 --- a/pkg/set/set_test.go +++ b/pkg/set/set_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/matryer/is" - "github.com/sour-is/ev/pkg/set" + "go.sour.is/ev/pkg/set" ) func TestStringSet(t *testing.T) { diff --git a/pkg/slice/slice.go b/pkg/slice/slice.go index c835575..34ccd14 100644 --- a/pkg/slice/slice.go +++ b/pkg/slice/slice.go @@ -1,7 +1,7 @@ package slice import ( - "github.com/sour-is/ev/pkg/math" + "go.sour.is/ev/pkg/math" ) // FilterType returns a subset that matches the type. diff --git a/pkg/slice/slice_test.go b/pkg/slice/slice_test.go index 2ba81c7..6293b4f 100644 --- a/pkg/slice/slice_test.go +++ b/pkg/slice/slice_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/matryer/is" - "github.com/sour-is/ev/pkg/slice" + "go.sour.is/ev/pkg/slice" ) func TestAlign(t *testing.T) { @@ -27,8 +27,8 @@ func TestAlign(t *testing.T) { }, { - left: []string{"2", "3", "4"}, - right: []string{"1", "3", "5"}, + left: []string{"2", "3", "4"}, + right: []string{"1", "3", "5"}, combined: []slice.Pair[*string, *string]{ {nil, ptr("1")}, {ptr("2"), nil}, @@ -37,7 +37,6 @@ func TestAlign(t *testing.T) { {nil, ptr("5")}, }, }, - } is := is.New(t)