mirror of
https://github.com/versia-pub/versia-go.git
synced 2026-03-12 20:19:15 +01:00
chore: rename everything to versia
This commit is contained in:
parent
0223ea0535
commit
3876ad2738
112 changed files with 587 additions and 576 deletions
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue