refactor: rename to vanity url
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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!
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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...),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user