mirror of
https://github.com/versia-pub/versia-go.git
synced 2026-03-13 04:29:15 +01:00
refactor(server): rename stuff from Lysand to Versia
Big diff energy
This commit is contained in:
parent
03e01548dc
commit
cb135706e2
29 changed files with 103 additions and 96 deletions
|
|
@ -113,7 +113,7 @@ func (i InboxServiceImpl) handleFollow(ctx context.Context, o versia.Follow, u *
|
|||
return err
|
||||
}
|
||||
|
||||
if _, err := i.federationService.SendToInbox(ctx, u, author, f.ToLysandAccept()); err != nil {
|
||||
if _, err := i.federationService.SendToInbox(ctx, u, author, f.ToVersiaAccept()); err != nil {
|
||||
i.log.Error(err, "Failed to send follow accept to inbox", "user", user.ID, "author", author.ID)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ func (i FollowServiceImpl) GetFollow(ctx context.Context, id uuid.UUID) (*entity
|
|||
return f, nil
|
||||
}
|
||||
|
||||
func (i FollowServiceImpl) ImportLysandFollow(ctx context.Context, lFollow *versia.Follow) (*entity.Follow, error) {
|
||||
s := i.telemetry.StartSpan(ctx, "function", "svc_impls/FollowServiceImpl.ImportLysandFollow").
|
||||
func (i FollowServiceImpl) ImportVersiaFollow(ctx context.Context, lFollow *versia.Follow) (*entity.Follow, error) {
|
||||
s := i.telemetry.StartSpan(ctx, "function", "svc_impls/FollowServiceImpl.ImportVersiaFollow").
|
||||
AddAttribute("uri", lFollow.URI.String())
|
||||
defer s.End()
|
||||
ctx = s.Context()
|
||||
|
|
|
|||
|
|
@ -89,10 +89,10 @@ func (i NoteServiceImpl) GetNote(ctx context.Context, id uuid.UUID) (*entity.Not
|
|||
return i.repositories.Notes().GetByID(ctx, id)
|
||||
}
|
||||
|
||||
func (i NoteServiceImpl) ImportLysandNote(ctx context.Context, lNote *versia.Note) (*entity.Note, error) {
|
||||
s := i.telemetry.StartSpan(ctx, "function", "svc_impls/NoteServiceImpl.ImportLysandNote")
|
||||
func (i NoteServiceImpl) ImportVersiaNote(ctx context.Context, lNote *versia.Note) (*entity.Note, error) {
|
||||
s := i.telemetry.StartSpan(ctx, "function", "svc_impls/NoteServiceImpl.ImportVersiaNote")
|
||||
defer s.End()
|
||||
ctx = s.Context()
|
||||
|
||||
return i.repositories.Notes().ImportLysandNote(ctx, lNote)
|
||||
return i.repositories.Notes().ImportVersiaNote(ctx, lNote)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ func NewRequestSignerImpl(telemetry *unitel.Telemetry, log logr.Logger) *Request
|
|||
}
|
||||
}
|
||||
|
||||
func (i *RequestSignerImpl) Sign(c *fiber.Ctx, signer versiacrypto.Signer, body any) error {
|
||||
s := i.telemetry.StartSpan(c.UserContext(), "function", "svc_impls/RequestSignerImpl.Sign")
|
||||
func (i *RequestSignerImpl) SignAndSend(c *fiber.Ctx, signer versiacrypto.Signer, body any) error {
|
||||
s := i.telemetry.StartSpan(c.UserContext(), "function", "svc_impls/RequestSignerImpl.SignAndSend")
|
||||
defer s.End()
|
||||
|
||||
j, err := json.Marshal(body)
|
||||
|
|
@ -58,5 +58,7 @@ func (i *RequestSignerImpl) Sign(c *fiber.Ctx, signer versiacrypto.Signer, body
|
|||
|
||||
i.log.V(2).Info("signed response", "digest", base64.StdEncoding.EncodeToString(digest), "nonce", nonce)
|
||||
|
||||
c.Set(fiber.HeaderContentType, fiber.MIMEApplicationJSONCharsetUTF8)
|
||||
|
||||
return c.Send(j)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue