mirror of
https://github.com/versia-pub/versia-go.git
synced 2025-12-06 06:28:18 +01:00
chore: rename everything to versia
This commit is contained in:
parent
0223ea0535
commit
3876ad2738
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
|
|
@ -9,7 +9,7 @@ on:
|
|||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: "lysand-org/versia-go"
|
||||
IMAGE_NAME: "versia-pub/versia-go"
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Go.
|
|||
### Running
|
||||
|
||||
```shell
|
||||
git clone https://github.com/lysand-org/versia-go.git
|
||||
git clone https://github.com/versia-pub/versia-go.git
|
||||
cd versia-go
|
||||
|
||||
docker compose up -d nats
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
image:
|
||||
repository: ghcr.io/lysand-org/versia-go
|
||||
repository: ghcr.io/versia-pub/versia-go
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "latest"
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// Attachment is the model entity for the Attachment schema.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// AttachmentCreate is the builder for creating a Attachment entity.
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// AttachmentDelete is the builder for deleting a Attachment entity.
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
)
|
||||
|
||||
// AttachmentQuery is the builder for querying Attachment entities.
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// AttachmentUpdate is the builder for updating Attachment entities.
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@ import (
|
|||
"reflect"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/migrate"
|
||||
"github.com/versia-pub/versia-go/ent/migrate"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
)
|
||||
|
||||
// Client is the client that holds all ent builders.
|
||||
|
|
|
|||
12
ent/ent.go
12
ent/ent.go
|
|
@ -12,12 +12,12 @@ import (
|
|||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
)
|
||||
|
||||
// ent aliases to avoid import conflicts in user's code.
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ package enttest
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
// required by schema hooks.
|
||||
_ "github.com/lysand-org/versia-go/ent/runtime"
|
||||
_ "github.com/versia-pub/versia-go/ent/runtime"
|
||||
|
||||
"entgo.io/ent/dialect/sql/schema"
|
||||
"github.com/lysand-org/versia-go/ent/migrate"
|
||||
"github.com/versia-pub/versia-go/ent/migrate"
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// Follow is the model entity for the Follow schema.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// FollowCreate is the builder for creating a Follow entity.
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// FollowDelete is the builder for deleting a Follow entity.
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
)
|
||||
|
||||
// FollowQuery is the builder for querying Follow entities.
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// FollowUpdate is the builder for updating Follow entities.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
)
|
||||
|
||||
// The AttachmentFunc type is an adapter to allow the use of ordinary
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
)
|
||||
|
||||
// Image is the model entity for the Image schema.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package image
|
|||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
)
|
||||
|
||||
// ImageCreate is the builder for creating a Image entity.
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ImageDelete is the builder for deleting a Image entity.
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ImageQuery is the builder for querying Image entities.
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ImageUpdate is the builder for updating Image entities.
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// InstanceMetadata is the model entity for the InstanceMetadata schema.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
|
|
|
|||
|
|
@ -13,9 +13,9 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// InstanceMetadataCreate is the builder for creating a InstanceMetadata entity.
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// InstanceMetadataDelete is the builder for deleting a InstanceMetadata entity.
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
)
|
||||
|
||||
// InstanceMetadataQuery is the builder for querying InstanceMetadata entities.
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqljson"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// InstanceMetadataUpdate is the builder for updating InstanceMetadata entities.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -12,14 +12,14 @@ import (
|
|||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// Note is the model entity for the Note schema.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// NoteCreate is the builder for creating a Note entity.
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// NoteDelete is the builder for deleting a Note entity.
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
)
|
||||
|
||||
// NoteQuery is the builder for querying Note entities.
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// NoteUpdate is the builder for updating Note entities.
|
||||
|
|
|
|||
|
|
@ -6,14 +6,14 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/attachment"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/schema"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/attachment"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/schema"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// The init function reads all schema descriptors with runtime code
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
package runtime
|
||||
|
||||
// The schema-stitching logic is generated in github.com/lysand-org/versia-go/ent/runtime.go
|
||||
// The schema-stitching logic is generated in github.com/versia-pub/versia-go/ent/runtime.go
|
||||
|
||||
const (
|
||||
Version = "v0.13.1" // Version of ent codegen.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"entgo.io/ent/schema/field"
|
||||
"entgo.io/ent/schema/mixin"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"entgo.io/ent/schema/edge"
|
||||
"entgo.io/ent/schema/field"
|
||||
"errors"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ import (
|
|||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// User is the model entity for the User schema.
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// UserCreate is the builder for creating a User entity.
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import (
|
|||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
)
|
||||
|
||||
// UserDelete is the builder for deleting a User entity.
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
)
|
||||
|
||||
// UserQuery is the builder for querying User entities.
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ import (
|
|||
"entgo.io/ent/dialect/sql/sqljson"
|
||||
"entgo.io/ent/schema/field"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent/image"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/ent/image"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
// UserUpdate is the builder for updating User entities.
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
func fiberErrorHandler(c *fiber.Ctx, err error) error {
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
|||
module github.com/lysand-org/versia-go
|
||||
module github.com/versia-pub/versia-go
|
||||
|
||||
go 1.22.5
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ package api_schema
|
|||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
)
|
||||
|
||||
type Note struct {
|
||||
|
|
@ -13,7 +12,7 @@ type Note struct {
|
|||
type FetchNoteResponse = APIResponse[Note]
|
||||
|
||||
type CreateNoteRequest struct {
|
||||
Content string `json:"content" validate:"required,min=1,max=1024"`
|
||||
Visibility versia.NoteVisibility `json:"visibility" validate:"required,oneof=public unlisted private direct"`
|
||||
Mentions []versiautils.URL `json:"mentions"`
|
||||
Content string `json:"content" validate:"required,min=1,max=1024"`
|
||||
Group string `json:"group" validate:"required"`
|
||||
Mentions []versiautils.URL `json:"mentions"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package api_schema
|
|||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"sync"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
)
|
||||
|
||||
func BeginTx(ctx context.Context, db *ent.Client, telemetry *unitel.Telemetry) (*Tx, error) {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package entity
|
||||
|
||||
import (
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
)
|
||||
|
||||
type Follow struct {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package entity
|
||||
|
||||
import (
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
)
|
||||
|
||||
type Note struct {
|
||||
|
|
@ -54,18 +54,18 @@ func (n Note) ToVersia() versia.Note {
|
|||
CreatedAt: versiautils.Time(n.CreatedAt),
|
||||
Extensions: n.Extensions,
|
||||
},
|
||||
Author: n.Author.URI,
|
||||
Content: n.Content,
|
||||
Category: nil,
|
||||
Device: nil,
|
||||
Previews: nil,
|
||||
Author: n.Author.URI,
|
||||
Content: n.Content,
|
||||
Category: nil,
|
||||
Device: nil,
|
||||
Previews: nil,
|
||||
// TODO: Get from database
|
||||
Group: nil,
|
||||
Attachments: nil,
|
||||
RepliesTo: nil,
|
||||
Quoting: nil,
|
||||
Quotes: nil,
|
||||
Mentions: n.MentionURIs,
|
||||
Subject: n.Subject,
|
||||
IsSensitive: &n.IsSensitive,
|
||||
Visibility: versia.NoteVisibility(n.Visibility),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
package entity
|
||||
|
||||
import (
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiacrypto "github.com/lysand-org/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
versiacrypto "github.com/versia-pub/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
)
|
||||
|
||||
type InstanceMetadata struct {
|
||||
|
|
@ -20,8 +20,8 @@ type InstanceMetadata struct {
|
|||
|
||||
PublicKey *versiacrypto.SPKIPublicKey
|
||||
|
||||
Logo *versiautils.ImageContentTypeMap
|
||||
Banner *versiautils.ImageContentTypeMap
|
||||
Logo *versiautils.ImageContentMap
|
||||
Banner *versiautils.ImageContentMap
|
||||
}
|
||||
|
||||
func NewInstanceMetadata(dbData *ent.InstanceMetadata) (*InstanceMetadata, error) {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
package entity
|
||||
|
||||
import (
|
||||
"github.com/lysand-org/versia-go/internal/helpers"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiacrypto "github.com/lysand-org/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/internal/helpers"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
versiacrypto "github.com/versia-pub/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
"net/url"
|
||||
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/internal/utils"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/internal/utils"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
|
|
@ -24,7 +24,7 @@ type User struct {
|
|||
Following *versiautils.URL
|
||||
|
||||
DisplayName string
|
||||
Avatar versiautils.ImageContentTypeMap
|
||||
Avatar versiautils.ImageContentMap
|
||||
Biography versiautils.TextContentTypeMap
|
||||
Signer versiacrypto.Signer
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ func (u User) ToVersia() *versia.User {
|
|||
Username: u.Username,
|
||||
Avatar: u.Avatar,
|
||||
Header: imageMap(u.Edges.HeaderImage),
|
||||
Indexable: u.Indexable,
|
||||
Indexable: helpers.BoolPtr(u.Indexable),
|
||||
PublicKey: versia.UserPublicKey{
|
||||
Actor: u.PKActorURI,
|
||||
Algorithm: u.PublicKeyAlgorithm,
|
||||
|
|
@ -112,13 +112,13 @@ func (u User) ToVersia() *versia.User {
|
|||
}
|
||||
}
|
||||
|
||||
func userAvatar(u *ent.User) versiautils.ImageContentTypeMap {
|
||||
func userAvatar(u *ent.User) versiautils.ImageContentMap {
|
||||
if avatar := imageMap(u.Edges.AvatarImage); avatar != nil {
|
||||
return avatar
|
||||
}
|
||||
|
||||
return versiautils.ImageContentTypeMap{
|
||||
"image/svg+xml": versiautils.ImageContent{
|
||||
return versiautils.ImageContentMap{
|
||||
"image/svg+xml": versiautils.File{
|
||||
Content: utils.DefaultAvatarURL(u.ID),
|
||||
},
|
||||
}
|
||||
|
|
@ -138,7 +138,7 @@ func userBiography(u *ent.User) versiautils.TextContentTypeMap {
|
|||
}
|
||||
}
|
||||
|
||||
func imageMap(i *ent.Image) versiautils.ImageContentTypeMap {
|
||||
func imageMap(i *ent.Image) versiautils.ImageContentMap {
|
||||
if i == nil {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -148,7 +148,7 @@ func imageMap(i *ent.Image) versiautils.ImageContentTypeMap {
|
|||
return nil
|
||||
}
|
||||
|
||||
return versiautils.ImageContentTypeMap{
|
||||
return versiautils.ImageContentMap{
|
||||
i.MimeType: {
|
||||
Content: (*versiautils.URL)(u),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ package follow_handler
|
|||
import (
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/pkg/webfinger"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/pkg/webfinger"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package follow_handler
|
|||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
func (i *Handler) GetVersiaFollow(c *fiber.Ctx) error {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ package meta_handler
|
|||
import (
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/pkg/webfinger"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/pkg/webfinger"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package note_handler
|
|||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
func (i *Handler) CreateNote(c *fiber.Ctx) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package note_handler
|
|||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
func (i *Handler) GetNote(c *fiber.Ctx) error {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ package note_handler
|
|||
import (
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/internal/validators"
|
||||
"github.com/lysand-org/versia-go/pkg/webfinger"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/internal/validators"
|
||||
"github.com/versia-pub/versia-go/pkg/webfinger"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package user_handler
|
|||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
func (i *Handler) CreateUser(c *fiber.Ctx) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package user_handler
|
|||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
func (i *Handler) GetUser(c *fiber.Ctx) error {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/lysand-org/versia-go/pkg/webfinger"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/pkg/webfinger"
|
||||
"net"
|
||||
"syscall"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package user_handler
|
|||
import (
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/internal/validators"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/internal/validators"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import (
|
|||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/lysand-org/versia-go/internal/validators/val_impls"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/internal/validators/val_impls"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
func (i *Handler) HandleVersiaInbox(c *fiber.Ctx) error {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package user_handler
|
|||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
func (i *Handler) GetVersiaUser(c *fiber.Ctx) error {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@ package user_handler
|
|||
import (
|
||||
"errors"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/lysand-org/versia-go/internal/helpers"
|
||||
"github.com/lysand-org/versia-go/pkg/webfinger"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/helpers"
|
||||
"github.com/versia-pub/versia-go/pkg/webfinger"
|
||||
)
|
||||
|
||||
func (i *Handler) Webfinger(c *fiber.Ctx) error {
|
||||
|
|
|
|||
|
|
@ -3,3 +3,7 @@ package helpers
|
|||
func StringPtr(s string) *string {
|
||||
return &s
|
||||
}
|
||||
|
||||
func BoolPtr(b bool) *bool {
|
||||
return &b
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,17 +4,17 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/ent/follow"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/lysand-org/versia-go/internal/utils"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/ent/follow"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/utils"
|
||||
)
|
||||
|
||||
var ErrFollowAlreadyExists = errors.New("follow already exists")
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import (
|
|||
"context"
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
)
|
||||
|
||||
var _ repository.InstanceMetadataRepository = (*InstanceMetadataRepositoryImpl)(nil)
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ package repo_impls
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/internal/database"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/internal/database"
|
||||
)
|
||||
|
||||
type Factory[T any] func(db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) T
|
||||
|
|
|
|||
|
|
@ -2,16 +2,16 @@ package repo_impls
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/ent/note"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/lysand-org/versia-go/internal/utils"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/ent/note"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/utils"
|
||||
)
|
||||
|
||||
var _ repository.NoteRepository = (*NoteRepositoryImpl)(nil)
|
||||
|
|
|
|||
|
|
@ -4,21 +4,21 @@ import (
|
|||
"context"
|
||||
"crypto/ed25519"
|
||||
"errors"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/lysand-org/versia-go/internal/utils"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/ent/predicate"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/utils"
|
||||
)
|
||||
|
||||
const bcryptCost = 12
|
||||
|
|
@ -106,7 +106,7 @@ func (i *UserRepositoryImpl) ImportVersiaUserByURI(ctx context.Context, uri *ver
|
|||
SetPublicKey(lUser.PublicKey.RawKey).
|
||||
SetPublicKeyAlgorithm(lUser.PublicKey.Algorithm).
|
||||
SetPublicKeyActor(lUser.PublicKey.Actor.String()).
|
||||
SetIndexable(lUser.Indexable).
|
||||
SetNillableIndexable(lUser.Indexable).
|
||||
SetFields(lUser.Fields).
|
||||
SetExtensions(lUser.Extensions).
|
||||
SetInbox(lUser.Inbox.String()).
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@ package repository
|
|||
import (
|
||||
"context"
|
||||
"crypto/ed25519"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
)
|
||||
|
||||
type UserRepository interface {
|
||||
|
|
|
|||
|
|
@ -3,15 +3,15 @@ package service
|
|||
import (
|
||||
"context"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiacrypto "github.com/lysand-org/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
versiacrypto "github.com/versia-pub/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/lysand-org/versia-go/pkg/webfinger"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/pkg/webfinger"
|
||||
)
|
||||
|
||||
type UserService interface {
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@ package svc_impls
|
|||
import (
|
||||
"context"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/ent/user"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/ent/user"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
)
|
||||
|
||||
var _ service.InboxService = (*InboxServiceImpl)(nil)
|
||||
|
|
|
|||
|
|
@ -10,13 +10,13 @@ import (
|
|||
"fmt"
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/pkg/protoretry"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
versiacrypto "github.com/lysand-org/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/lysand-org/versia-go/pkg/webfinger"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/pkg/protoretry"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
versiacrypto "github.com/versia-pub/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/pkg/webfinger"
|
||||
"net/http"
|
||||
"net/url"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ package svc_impls
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
)
|
||||
|
||||
var _ service.FollowService = (*FollowServiceImpl)(nil)
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ package svc_impls
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
)
|
||||
|
||||
var _ service.InstanceMetadataService = (*InstanceMetadataServiceImpl)(nil)
|
||||
|
|
|
|||
|
|
@ -2,17 +2,17 @@ package svc_impls
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/lysand-org/versia-go/pkg/versia"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/pkg/versia"
|
||||
"slices"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/lysand-org/versia-go/internal/tasks"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/tasks"
|
||||
)
|
||||
|
||||
var _ service.NoteService = (*NoteServiceImpl)(nil)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import (
|
|||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
versiacrypto "github.com/lysand-org/versia-go/pkg/versia/crypto"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
versiacrypto "github.com/versia-pub/versia-go/pkg/versia/crypto"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@ package svc_impls
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/lysand-org/versia-go/pkg/taskqueue"
|
||||
"github.com/versia-pub/versia-go/pkg/taskqueue"
|
||||
)
|
||||
|
||||
var _ service.TaskService = (*TaskServiceImpl)(nil)
|
||||
|
|
|
|||
|
|
@ -4,19 +4,19 @@ import (
|
|||
"context"
|
||||
"crypto/ed25519"
|
||||
"crypto/rand"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
"net/url"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
"github.com/lysand-org/versia-go/ent/schema"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/lysand-org/versia-go/internal/utils"
|
||||
"github.com/lysand-org/versia-go/pkg/webfinger"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
"github.com/versia-pub/versia-go/ent/schema"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/utils"
|
||||
"github.com/versia-pub/versia-go/pkg/webfinger"
|
||||
)
|
||||
|
||||
var _ service.UserService = (*UserServiceImpl)(nil)
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ package tasks
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/internal/entity"
|
||||
"github.com/versia-pub/versia-go/internal/entity"
|
||||
)
|
||||
|
||||
type FederateNoteData struct {
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ package tasks
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/service"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/service"
|
||||
|
||||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/lysand-org/versia-go/pkg/taskqueue"
|
||||
"github.com/versia-pub/versia-go/pkg/taskqueue"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package utils
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/google/uuid"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ package val_impls
|
|||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/lysand-org/versia-go/ent/schema"
|
||||
"github.com/lysand-org/versia-go/internal/validators"
|
||||
"github.com/versia-pub/versia-go/ent/schema"
|
||||
"github.com/versia-pub/versia-go/internal/validators"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
|
@ -13,7 +13,7 @@ import (
|
|||
universal_translator "github.com/go-playground/universal-translator"
|
||||
"github.com/go-playground/validator/v10"
|
||||
en_translations "github.com/go-playground/validator/v10/translations/en"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
)
|
||||
|
||||
type bodyValidator struct {
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ import (
|
|||
"git.devminer.xyz/devminer/unitel"
|
||||
"github.com/go-logr/logr"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/utils"
|
||||
"github.com/lysand-org/versia-go/internal/validators"
|
||||
versiacrypto "github.com/lysand-org/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/utils"
|
||||
"github.com/versia-pub/versia-go/internal/validators"
|
||||
versiacrypto "github.com/versia-pub/versia-go/pkg/versia/crypto"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
|
|
|
|||
32
main.go
32
main.go
|
|
@ -10,15 +10,15 @@ import (
|
|||
"fmt"
|
||||
"git.devminer.xyz/devminer/unitel/unitelhttp"
|
||||
"git.devminer.xyz/devminer/unitel/unitelsql"
|
||||
"github.com/lysand-org/versia-go/ent/instancemetadata"
|
||||
"github.com/lysand-org/versia-go/internal/api_schema"
|
||||
"github.com/lysand-org/versia-go/internal/handlers/follow_handler"
|
||||
"github.com/lysand-org/versia-go/internal/handlers/meta_handler"
|
||||
"github.com/lysand-org/versia-go/internal/handlers/note_handler"
|
||||
"github.com/lysand-org/versia-go/internal/repository"
|
||||
"github.com/lysand-org/versia-go/internal/repository/repo_impls"
|
||||
"github.com/lysand-org/versia-go/internal/service/svc_impls"
|
||||
"github.com/lysand-org/versia-go/internal/validators/val_impls"
|
||||
"github.com/versia-pub/versia-go/ent/instancemetadata"
|
||||
"github.com/versia-pub/versia-go/internal/api_schema"
|
||||
"github.com/versia-pub/versia-go/internal/handlers/follow_handler"
|
||||
"github.com/versia-pub/versia-go/internal/handlers/meta_handler"
|
||||
"github.com/versia-pub/versia-go/internal/handlers/note_handler"
|
||||
"github.com/versia-pub/versia-go/internal/repository"
|
||||
"github.com/versia-pub/versia-go/internal/repository/repo_impls"
|
||||
"github.com/versia-pub/versia-go/internal/service/svc_impls"
|
||||
"github.com/versia-pub/versia-go/internal/validators/val_impls"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/signal"
|
||||
|
|
@ -34,16 +34,16 @@ import (
|
|||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/fiber/v2/middleware/cors"
|
||||
pgx "github.com/jackc/pgx/v5/stdlib"
|
||||
"github.com/lysand-org/versia-go/config"
|
||||
"github.com/lysand-org/versia-go/ent"
|
||||
"github.com/lysand-org/versia-go/internal/database"
|
||||
"github.com/lysand-org/versia-go/internal/handlers/user_handler"
|
||||
"github.com/lysand-org/versia-go/internal/tasks"
|
||||
"github.com/lysand-org/versia-go/internal/utils"
|
||||
"github.com/lysand-org/versia-go/pkg/taskqueue"
|
||||
"github.com/nats-io/nats.go"
|
||||
"github.com/rs/zerolog"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/versia-pub/versia-go/config"
|
||||
"github.com/versia-pub/versia-go/ent"
|
||||
"github.com/versia-pub/versia-go/internal/database"
|
||||
"github.com/versia-pub/versia-go/internal/handlers/user_handler"
|
||||
"github.com/versia-pub/versia-go/internal/tasks"
|
||||
"github.com/versia-pub/versia-go/internal/utils"
|
||||
"github.com/versia-pub/versia-go/pkg/taskqueue"
|
||||
"modernc.org/sqlite"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package versia
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
)
|
||||
|
||||
// Delete signals the deletion of an entity. For more information, see the [Spec].
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package versia
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
versiautils "github.com/lysand-org/versia-go/pkg/versia/utils"
|
||||
versiautils "github.com/versia-pub/versia-go/pkg/versia/utils"
|
||||
)
|
||||
|
||||
// Follow defines a follow relationship between two users. For more information, see the [Spec].
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue