From a8d919dc5b23d2430834d58076ea771d40dff7bf Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 16 Jul 2024 00:02:28 +0800 Subject: [PATCH] :recycle: Refactored relation system :arrow_up: Support new realm & relation api --- .idea/workspace.xml | 39 +- go.mod | 11 +- go.sum | 30 +- pkg/internal/database/migrator.go | 2 +- pkg/internal/grpc/auth.go | 36 +- pkg/internal/grpc/friendships.go | 46 -- pkg/internal/grpc/notifier.go | 47 ++ pkg/internal/grpc/notify.go | 57 -- pkg/internal/grpc/realms.go | 50 +- pkg/internal/grpc/server.go | 19 +- pkg/internal/models/accounts.go | 15 +- pkg/internal/models/clients.go | 18 +- pkg/internal/models/friendships.go | 20 - pkg/internal/models/notifications.go | 19 +- pkg/internal/models/relationships.go | 22 + pkg/internal/server/admin/notify_api.go | 50 +- pkg/internal/server/api/index.go | 10 +- pkg/internal/server/api/notifications_api.go | 6 +- pkg/internal/server/api/notify_api.go | 30 +- ...riendships_api.go => relationships_api.go} | 39 +- pkg/internal/services/accounts.go | 2 +- pkg/internal/services/friendships.go | 125 ---- pkg/internal/services/notifications.go | 22 +- pkg/internal/services/perms.go | 7 + pkg/internal/services/realms.go | 11 +- pkg/internal/services/relationships.go | 118 +++ pkg/proto/friendships.pb.go | 400 ---------- pkg/proto/friendships.proto | 31 - pkg/proto/friendships_grpc.pb.go | 148 ---- pkg/proto/notify.pb.go | 373 ---------- pkg/proto/notify.proto | 31 - pkg/proto/notify_grpc.pb.go | 110 --- pkg/proto/realms.pb.go | 685 ------------------ pkg/proto/realms.proto | 55 -- pkg/proto/realms_grpc.pb.go | 301 -------- 35 files changed, 426 insertions(+), 2559 deletions(-) delete mode 100644 pkg/internal/grpc/friendships.go create mode 100644 pkg/internal/grpc/notifier.go delete mode 100644 pkg/internal/grpc/notify.go delete mode 100644 pkg/internal/models/friendships.go create mode 100644 pkg/internal/models/relationships.go rename pkg/internal/server/api/{friendships_api.go => relationships_api.go} (71%) delete mode 100644 pkg/internal/services/friendships.go create mode 100644 pkg/internal/services/relationships.go delete mode 100644 pkg/proto/friendships.pb.go delete mode 100644 pkg/proto/friendships.proto delete mode 100644 pkg/proto/friendships_grpc.pb.go delete mode 100644 pkg/proto/notify.pb.go delete mode 100644 pkg/proto/notify.proto delete mode 100644 pkg/proto/notify_grpc.pb.go delete mode 100644 pkg/proto/realms.pb.go delete mode 100644 pkg/proto/realms.proto delete mode 100644 pkg/proto/realms_grpc.pb.go diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 40a2ae6..563ff1e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,9 +4,40 @@