From 45048ea814b2468072c631d7d9beca763d567a12 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 16 Jun 2024 23:17:32 +0800 Subject: [PATCH] :art: Update project structure --- .idea/workspace.xml | 162 ++++++++++++++---- pkg/{ => internal}/database/migrator.go | 0 pkg/{ => internal}/database/source.go | 0 pkg/{ => internal}/embed.go | 0 pkg/{ => internal}/gap/server.go | 0 pkg/{ => internal}/grpc/auth.go | 0 pkg/{ => internal}/grpc/client.go | 0 pkg/{ => internal}/grpc/friendships.go | 0 pkg/{ => internal}/grpc/notify.go | 0 pkg/{ => internal}/grpc/realms.go | 2 +- pkg/{ => internal}/grpc/server.go | 0 pkg/{ => internal}/i18n/bundle.go | 0 pkg/{ => internal}/i18n/embed.go | 0 pkg/{ => internal}/i18n/locale.en.json | 0 pkg/{ => internal}/i18n/locale.zh.json | 0 pkg/{ => internal}/i18n/middleware.go | 0 pkg/{ => internal}/meta.go | 0 pkg/{ => internal}/models/accounts.go | 0 pkg/{ => internal}/models/auth.go | 0 pkg/{ => internal}/models/badges.go | 0 pkg/{ => internal}/models/base.go | 0 pkg/{ => internal}/models/clients.go | 0 pkg/{ => internal}/models/events.go | 0 pkg/{ => internal}/models/friendships.go | 0 pkg/{ => internal}/models/notifications.go | 0 pkg/{ => internal}/models/profiles.go | 0 pkg/{ => internal}/models/realms.go | 0 pkg/{ => internal}/models/tokens.go | 0 pkg/{ => internal}/models/unified.go | 0 pkg/{ => internal}/server/accounts_api.go | 0 pkg/{ => internal}/server/admin/badges_api.go | 0 pkg/{ => internal}/server/admin/index.go | 0 pkg/{ => internal}/server/auth_api.go | 0 pkg/{ => internal}/server/auth_middleware.go | 0 pkg/{ => internal}/server/avatar_api.go | 0 pkg/{ => internal}/server/factors_api.go | 0 pkg/{ => internal}/server/friendships_api.go | 0 .../server/notifications_api.go | 0 pkg/{ => internal}/server/notify_api.go | 0 pkg/{ => internal}/server/page_api.go | 0 .../server/realm_members_api.go | 0 pkg/{ => internal}/server/realms_api.go | 0 pkg/{ => internal}/server/security_api.go | 0 pkg/{ => internal}/server/startup.go | 0 pkg/{ => internal}/server/ui/accounts.go | 0 pkg/{ => internal}/server/ui/index.go | 0 pkg/{ => internal}/server/ui/mfa.go | 0 pkg/{ => internal}/server/ui/oauth.go | 0 pkg/{ => internal}/server/ui/signin.go | 0 pkg/{ => internal}/server/ui/signup.go | 0 pkg/{ => internal}/server/userinfo_api.go | 0 pkg/{ => internal}/server/well_known_api.go | 0 pkg/{ => internal}/server/ws.go | 0 pkg/{ => internal}/services/accounts.go | 0 pkg/{ => internal}/services/auth.go | 0 pkg/{ => internal}/services/badges.go | 0 pkg/{ => internal}/services/cleaner.go | 0 pkg/{ => internal}/services/clients.go | 0 pkg/{ => internal}/services/connections.go | 0 pkg/{ => internal}/services/e2ee.go | 0 pkg/{ => internal}/services/encryptor.go | 0 pkg/{ => internal}/services/events.go | 0 pkg/{ => internal}/services/external_apns.go | 0 .../services/external_firebase.go | 0 pkg/{ => internal}/services/factors.go | 0 pkg/{ => internal}/services/friendships.go | 0 pkg/{ => internal}/services/jwt.go | 0 pkg/{ => internal}/services/mailer.go | 0 pkg/{ => internal}/services/mfa.go | 0 pkg/{ => internal}/services/notifications.go | 0 pkg/{ => internal}/services/perms.go | 0 pkg/{ => internal}/services/realms.go | 0 .../services/ticker_maintainer.go | 0 pkg/{ => internal}/services/ticket.go | 0 pkg/{ => internal}/services/ticket_queries.go | 0 pkg/{ => internal}/services/ticket_token.go | 0 pkg/{ => internal}/services/tokens.go | 0 pkg/{ => internal}/utils/auth.go | 0 pkg/{ => internal}/utils/request.go | 0 pkg/{ => internal}/views/authorize.gohtml | 0 pkg/{ => internal}/views/favicon.png | Bin pkg/{ => internal}/views/index.gohtml | 0 pkg/{ => internal}/views/layouts/auth.gohtml | 0 .../views/layouts/user-center.gohtml | 0 pkg/{ => internal}/views/mfa-apply.gohtml | 0 pkg/{ => internal}/views/mfa.gohtml | 0 .../views/partials/header.gohtml | 0 pkg/{ => internal}/views/signin.gohtml | 0 pkg/{ => internal}/views/signup.gohtml | 0 pkg/{ => internal}/views/users/me.gohtml | 0 pkg/{cmd => }/main.go | 14 +- pkg/{grpc => }/proto/auth.pb.go | 0 pkg/{grpc => }/proto/auth.proto | 0 pkg/{grpc => }/proto/auth_grpc.pb.go | 0 pkg/{grpc => }/proto/friendships.pb.go | 0 pkg/{grpc => }/proto/friendships.proto | 0 pkg/{grpc => }/proto/friendships_grpc.pb.go | 0 pkg/{grpc => }/proto/notify.pb.go | 0 pkg/{grpc => }/proto/notify.proto | 0 pkg/{grpc => }/proto/notify_grpc.pb.go | 0 pkg/{grpc => }/proto/realms.pb.go | 0 pkg/{grpc => }/proto/realms.proto | 0 pkg/{grpc => }/proto/realms_grpc.pb.go | 0 103 files changed, 138 insertions(+), 40 deletions(-) rename pkg/{ => internal}/database/migrator.go (100%) rename pkg/{ => internal}/database/source.go (100%) rename pkg/{ => internal}/embed.go (100%) rename pkg/{ => internal}/gap/server.go (100%) rename pkg/{ => internal}/grpc/auth.go (100%) rename pkg/{ => internal}/grpc/client.go (100%) rename pkg/{ => internal}/grpc/friendships.go (100%) rename pkg/{ => internal}/grpc/notify.go (100%) rename pkg/{ => internal}/grpc/realms.go (98%) rename pkg/{ => internal}/grpc/server.go (100%) rename pkg/{ => internal}/i18n/bundle.go (100%) rename pkg/{ => internal}/i18n/embed.go (100%) rename pkg/{ => internal}/i18n/locale.en.json (100%) rename pkg/{ => internal}/i18n/locale.zh.json (100%) rename pkg/{ => internal}/i18n/middleware.go (100%) rename pkg/{ => internal}/meta.go (100%) rename pkg/{ => internal}/models/accounts.go (100%) rename pkg/{ => internal}/models/auth.go (100%) rename pkg/{ => internal}/models/badges.go (100%) rename pkg/{ => internal}/models/base.go (100%) rename pkg/{ => internal}/models/clients.go (100%) rename pkg/{ => internal}/models/events.go (100%) rename pkg/{ => internal}/models/friendships.go (100%) rename pkg/{ => internal}/models/notifications.go (100%) rename pkg/{ => internal}/models/profiles.go (100%) rename pkg/{ => internal}/models/realms.go (100%) rename pkg/{ => internal}/models/tokens.go (100%) rename pkg/{ => internal}/models/unified.go (100%) rename pkg/{ => internal}/server/accounts_api.go (100%) rename pkg/{ => internal}/server/admin/badges_api.go (100%) rename pkg/{ => internal}/server/admin/index.go (100%) rename pkg/{ => internal}/server/auth_api.go (100%) rename pkg/{ => internal}/server/auth_middleware.go (100%) rename pkg/{ => internal}/server/avatar_api.go (100%) rename pkg/{ => internal}/server/factors_api.go (100%) rename pkg/{ => internal}/server/friendships_api.go (100%) rename pkg/{ => internal}/server/notifications_api.go (100%) rename pkg/{ => internal}/server/notify_api.go (100%) rename pkg/{ => internal}/server/page_api.go (100%) rename pkg/{ => internal}/server/realm_members_api.go (100%) rename pkg/{ => internal}/server/realms_api.go (100%) rename pkg/{ => internal}/server/security_api.go (100%) rename pkg/{ => internal}/server/startup.go (100%) rename pkg/{ => internal}/server/ui/accounts.go (100%) rename pkg/{ => internal}/server/ui/index.go (100%) rename pkg/{ => internal}/server/ui/mfa.go (100%) rename pkg/{ => internal}/server/ui/oauth.go (100%) rename pkg/{ => internal}/server/ui/signin.go (100%) rename pkg/{ => internal}/server/ui/signup.go (100%) rename pkg/{ => internal}/server/userinfo_api.go (100%) rename pkg/{ => internal}/server/well_known_api.go (100%) rename pkg/{ => internal}/server/ws.go (100%) rename pkg/{ => internal}/services/accounts.go (100%) rename pkg/{ => internal}/services/auth.go (100%) rename pkg/{ => internal}/services/badges.go (100%) rename pkg/{ => internal}/services/cleaner.go (100%) rename pkg/{ => internal}/services/clients.go (100%) rename pkg/{ => internal}/services/connections.go (100%) rename pkg/{ => internal}/services/e2ee.go (100%) rename pkg/{ => internal}/services/encryptor.go (100%) rename pkg/{ => internal}/services/events.go (100%) rename pkg/{ => internal}/services/external_apns.go (100%) rename pkg/{ => internal}/services/external_firebase.go (100%) rename pkg/{ => internal}/services/factors.go (100%) rename pkg/{ => internal}/services/friendships.go (100%) rename pkg/{ => internal}/services/jwt.go (100%) rename pkg/{ => internal}/services/mailer.go (100%) rename pkg/{ => internal}/services/mfa.go (100%) rename pkg/{ => internal}/services/notifications.go (100%) rename pkg/{ => internal}/services/perms.go (100%) rename pkg/{ => internal}/services/realms.go (100%) rename pkg/{ => internal}/services/ticker_maintainer.go (100%) rename pkg/{ => internal}/services/ticket.go (100%) rename pkg/{ => internal}/services/ticket_queries.go (100%) rename pkg/{ => internal}/services/ticket_token.go (100%) rename pkg/{ => internal}/services/tokens.go (100%) rename pkg/{ => internal}/utils/auth.go (100%) rename pkg/{ => internal}/utils/request.go (100%) rename pkg/{ => internal}/views/authorize.gohtml (100%) rename pkg/{ => internal}/views/favicon.png (100%) rename pkg/{ => internal}/views/index.gohtml (100%) rename pkg/{ => internal}/views/layouts/auth.gohtml (100%) rename pkg/{ => internal}/views/layouts/user-center.gohtml (100%) rename pkg/{ => internal}/views/mfa-apply.gohtml (100%) rename pkg/{ => internal}/views/mfa.gohtml (100%) rename pkg/{ => internal}/views/partials/header.gohtml (100%) rename pkg/{ => internal}/views/signin.gohtml (100%) rename pkg/{ => internal}/views/signup.gohtml (100%) rename pkg/{ => internal}/views/users/me.gohtml (100%) rename pkg/{cmd => }/main.go (85%) rename pkg/{grpc => }/proto/auth.pb.go (100%) rename pkg/{grpc => }/proto/auth.proto (100%) rename pkg/{grpc => }/proto/auth_grpc.pb.go (100%) rename pkg/{grpc => }/proto/friendships.pb.go (100%) rename pkg/{grpc => }/proto/friendships.proto (100%) rename pkg/{grpc => }/proto/friendships_grpc.pb.go (100%) rename pkg/{grpc => }/proto/notify.pb.go (100%) rename pkg/{grpc => }/proto/notify.proto (100%) rename pkg/{grpc => }/proto/notify_grpc.pb.go (100%) rename pkg/{grpc => }/proto/realms.pb.go (100%) rename pkg/{grpc => }/proto/realms.proto (100%) rename pkg/{grpc => }/proto/realms_grpc.pb.go (100%) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 294c3cf..fb15f36 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,13 +5,109 @@ - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - { + "keyToString": { + "DefaultGoTemplateProperty": "Go File", + "Go Build.Backend.executor": "Run", + "Go 构建.Backend.executor": "Run", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.go.formatter.settings.were.checked": "true", + "RunOnceActivity.go.migrated.go.modules.settings": "true", + "RunOnceActivity.go.modules.automatic.dependencies.download": "true", + "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true", + "git-widget-placeholder": "features/consul", + "go.import.settings.migrated": "true", + "go.sdk.automatically.set": "true", + "last_opened_file_path": "/Users/littlesheep/Documents/Projects/Hydrogen/Passport/pkg/services", + "node.js.detected.package.eslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "nodejs_package_manager_path": "npm", + "run.code.analysis.last.selected.profile": "pProject Default", + "settings.editor.selected.configurable": "preferences.pluginManager", + "vue.rearranger.settings.migration": "true" }, - "keyToStringList": { - "DatabaseDriversLRU": [ - "postgresql" + "keyToStringList": { + "DatabaseDriversLRU": [ + "postgresql" ] } -}]]> +} @@ -82,10 +178,11 @@ + + - @@ -104,8 +201,9 @@ + - + diff --git a/pkg/database/migrator.go b/pkg/internal/database/migrator.go similarity index 100% rename from pkg/database/migrator.go rename to pkg/internal/database/migrator.go diff --git a/pkg/database/source.go b/pkg/internal/database/source.go similarity index 100% rename from pkg/database/source.go rename to pkg/internal/database/source.go diff --git a/pkg/embed.go b/pkg/internal/embed.go similarity index 100% rename from pkg/embed.go rename to pkg/internal/embed.go diff --git a/pkg/gap/server.go b/pkg/internal/gap/server.go similarity index 100% rename from pkg/gap/server.go rename to pkg/internal/gap/server.go diff --git a/pkg/grpc/auth.go b/pkg/internal/grpc/auth.go similarity index 100% rename from pkg/grpc/auth.go rename to pkg/internal/grpc/auth.go diff --git a/pkg/grpc/client.go b/pkg/internal/grpc/client.go similarity index 100% rename from pkg/grpc/client.go rename to pkg/internal/grpc/client.go diff --git a/pkg/grpc/friendships.go b/pkg/internal/grpc/friendships.go similarity index 100% rename from pkg/grpc/friendships.go rename to pkg/internal/grpc/friendships.go diff --git a/pkg/grpc/notify.go b/pkg/internal/grpc/notify.go similarity index 100% rename from pkg/grpc/notify.go rename to pkg/internal/grpc/notify.go diff --git a/pkg/grpc/realms.go b/pkg/internal/grpc/realms.go similarity index 98% rename from pkg/grpc/realms.go rename to pkg/internal/grpc/realms.go index f12daee..c8330ee 100644 --- a/pkg/grpc/realms.go +++ b/pkg/internal/grpc/realms.go @@ -4,8 +4,8 @@ import ( "context" "fmt" "git.solsynth.dev/hydrogen/passport/pkg/database" - "git.solsynth.dev/hydrogen/passport/pkg/grpc/proto" "git.solsynth.dev/hydrogen/passport/pkg/models" + "git.solsynth.dev/hydrogen/passport/pkg/proto" "git.solsynth.dev/hydrogen/passport/pkg/services" "github.com/samber/lo" "google.golang.org/protobuf/types/known/emptypb" diff --git a/pkg/grpc/server.go b/pkg/internal/grpc/server.go similarity index 100% rename from pkg/grpc/server.go rename to pkg/internal/grpc/server.go diff --git a/pkg/i18n/bundle.go b/pkg/internal/i18n/bundle.go similarity index 100% rename from pkg/i18n/bundle.go rename to pkg/internal/i18n/bundle.go diff --git a/pkg/i18n/embed.go b/pkg/internal/i18n/embed.go similarity index 100% rename from pkg/i18n/embed.go rename to pkg/internal/i18n/embed.go diff --git a/pkg/i18n/locale.en.json b/pkg/internal/i18n/locale.en.json similarity index 100% rename from pkg/i18n/locale.en.json rename to pkg/internal/i18n/locale.en.json diff --git a/pkg/i18n/locale.zh.json b/pkg/internal/i18n/locale.zh.json similarity index 100% rename from pkg/i18n/locale.zh.json rename to pkg/internal/i18n/locale.zh.json diff --git a/pkg/i18n/middleware.go b/pkg/internal/i18n/middleware.go similarity index 100% rename from pkg/i18n/middleware.go rename to pkg/internal/i18n/middleware.go diff --git a/pkg/meta.go b/pkg/internal/meta.go similarity index 100% rename from pkg/meta.go rename to pkg/internal/meta.go diff --git a/pkg/models/accounts.go b/pkg/internal/models/accounts.go similarity index 100% rename from pkg/models/accounts.go rename to pkg/internal/models/accounts.go diff --git a/pkg/models/auth.go b/pkg/internal/models/auth.go similarity index 100% rename from pkg/models/auth.go rename to pkg/internal/models/auth.go diff --git a/pkg/models/badges.go b/pkg/internal/models/badges.go similarity index 100% rename from pkg/models/badges.go rename to pkg/internal/models/badges.go diff --git a/pkg/models/base.go b/pkg/internal/models/base.go similarity index 100% rename from pkg/models/base.go rename to pkg/internal/models/base.go diff --git a/pkg/models/clients.go b/pkg/internal/models/clients.go similarity index 100% rename from pkg/models/clients.go rename to pkg/internal/models/clients.go diff --git a/pkg/models/events.go b/pkg/internal/models/events.go similarity index 100% rename from pkg/models/events.go rename to pkg/internal/models/events.go diff --git a/pkg/models/friendships.go b/pkg/internal/models/friendships.go similarity index 100% rename from pkg/models/friendships.go rename to pkg/internal/models/friendships.go diff --git a/pkg/models/notifications.go b/pkg/internal/models/notifications.go similarity index 100% rename from pkg/models/notifications.go rename to pkg/internal/models/notifications.go diff --git a/pkg/models/profiles.go b/pkg/internal/models/profiles.go similarity index 100% rename from pkg/models/profiles.go rename to pkg/internal/models/profiles.go diff --git a/pkg/models/realms.go b/pkg/internal/models/realms.go similarity index 100% rename from pkg/models/realms.go rename to pkg/internal/models/realms.go diff --git a/pkg/models/tokens.go b/pkg/internal/models/tokens.go similarity index 100% rename from pkg/models/tokens.go rename to pkg/internal/models/tokens.go diff --git a/pkg/models/unified.go b/pkg/internal/models/unified.go similarity index 100% rename from pkg/models/unified.go rename to pkg/internal/models/unified.go diff --git a/pkg/server/accounts_api.go b/pkg/internal/server/accounts_api.go similarity index 100% rename from pkg/server/accounts_api.go rename to pkg/internal/server/accounts_api.go diff --git a/pkg/server/admin/badges_api.go b/pkg/internal/server/admin/badges_api.go similarity index 100% rename from pkg/server/admin/badges_api.go rename to pkg/internal/server/admin/badges_api.go diff --git a/pkg/server/admin/index.go b/pkg/internal/server/admin/index.go similarity index 100% rename from pkg/server/admin/index.go rename to pkg/internal/server/admin/index.go diff --git a/pkg/server/auth_api.go b/pkg/internal/server/auth_api.go similarity index 100% rename from pkg/server/auth_api.go rename to pkg/internal/server/auth_api.go diff --git a/pkg/server/auth_middleware.go b/pkg/internal/server/auth_middleware.go similarity index 100% rename from pkg/server/auth_middleware.go rename to pkg/internal/server/auth_middleware.go diff --git a/pkg/server/avatar_api.go b/pkg/internal/server/avatar_api.go similarity index 100% rename from pkg/server/avatar_api.go rename to pkg/internal/server/avatar_api.go diff --git a/pkg/server/factors_api.go b/pkg/internal/server/factors_api.go similarity index 100% rename from pkg/server/factors_api.go rename to pkg/internal/server/factors_api.go diff --git a/pkg/server/friendships_api.go b/pkg/internal/server/friendships_api.go similarity index 100% rename from pkg/server/friendships_api.go rename to pkg/internal/server/friendships_api.go diff --git a/pkg/server/notifications_api.go b/pkg/internal/server/notifications_api.go similarity index 100% rename from pkg/server/notifications_api.go rename to pkg/internal/server/notifications_api.go diff --git a/pkg/server/notify_api.go b/pkg/internal/server/notify_api.go similarity index 100% rename from pkg/server/notify_api.go rename to pkg/internal/server/notify_api.go diff --git a/pkg/server/page_api.go b/pkg/internal/server/page_api.go similarity index 100% rename from pkg/server/page_api.go rename to pkg/internal/server/page_api.go diff --git a/pkg/server/realm_members_api.go b/pkg/internal/server/realm_members_api.go similarity index 100% rename from pkg/server/realm_members_api.go rename to pkg/internal/server/realm_members_api.go diff --git a/pkg/server/realms_api.go b/pkg/internal/server/realms_api.go similarity index 100% rename from pkg/server/realms_api.go rename to pkg/internal/server/realms_api.go diff --git a/pkg/server/security_api.go b/pkg/internal/server/security_api.go similarity index 100% rename from pkg/server/security_api.go rename to pkg/internal/server/security_api.go diff --git a/pkg/server/startup.go b/pkg/internal/server/startup.go similarity index 100% rename from pkg/server/startup.go rename to pkg/internal/server/startup.go diff --git a/pkg/server/ui/accounts.go b/pkg/internal/server/ui/accounts.go similarity index 100% rename from pkg/server/ui/accounts.go rename to pkg/internal/server/ui/accounts.go diff --git a/pkg/server/ui/index.go b/pkg/internal/server/ui/index.go similarity index 100% rename from pkg/server/ui/index.go rename to pkg/internal/server/ui/index.go diff --git a/pkg/server/ui/mfa.go b/pkg/internal/server/ui/mfa.go similarity index 100% rename from pkg/server/ui/mfa.go rename to pkg/internal/server/ui/mfa.go diff --git a/pkg/server/ui/oauth.go b/pkg/internal/server/ui/oauth.go similarity index 100% rename from pkg/server/ui/oauth.go rename to pkg/internal/server/ui/oauth.go diff --git a/pkg/server/ui/signin.go b/pkg/internal/server/ui/signin.go similarity index 100% rename from pkg/server/ui/signin.go rename to pkg/internal/server/ui/signin.go diff --git a/pkg/server/ui/signup.go b/pkg/internal/server/ui/signup.go similarity index 100% rename from pkg/server/ui/signup.go rename to pkg/internal/server/ui/signup.go diff --git a/pkg/server/userinfo_api.go b/pkg/internal/server/userinfo_api.go similarity index 100% rename from pkg/server/userinfo_api.go rename to pkg/internal/server/userinfo_api.go diff --git a/pkg/server/well_known_api.go b/pkg/internal/server/well_known_api.go similarity index 100% rename from pkg/server/well_known_api.go rename to pkg/internal/server/well_known_api.go diff --git a/pkg/server/ws.go b/pkg/internal/server/ws.go similarity index 100% rename from pkg/server/ws.go rename to pkg/internal/server/ws.go diff --git a/pkg/services/accounts.go b/pkg/internal/services/accounts.go similarity index 100% rename from pkg/services/accounts.go rename to pkg/internal/services/accounts.go diff --git a/pkg/services/auth.go b/pkg/internal/services/auth.go similarity index 100% rename from pkg/services/auth.go rename to pkg/internal/services/auth.go diff --git a/pkg/services/badges.go b/pkg/internal/services/badges.go similarity index 100% rename from pkg/services/badges.go rename to pkg/internal/services/badges.go diff --git a/pkg/services/cleaner.go b/pkg/internal/services/cleaner.go similarity index 100% rename from pkg/services/cleaner.go rename to pkg/internal/services/cleaner.go diff --git a/pkg/services/clients.go b/pkg/internal/services/clients.go similarity index 100% rename from pkg/services/clients.go rename to pkg/internal/services/clients.go diff --git a/pkg/services/connections.go b/pkg/internal/services/connections.go similarity index 100% rename from pkg/services/connections.go rename to pkg/internal/services/connections.go diff --git a/pkg/services/e2ee.go b/pkg/internal/services/e2ee.go similarity index 100% rename from pkg/services/e2ee.go rename to pkg/internal/services/e2ee.go diff --git a/pkg/services/encryptor.go b/pkg/internal/services/encryptor.go similarity index 100% rename from pkg/services/encryptor.go rename to pkg/internal/services/encryptor.go diff --git a/pkg/services/events.go b/pkg/internal/services/events.go similarity index 100% rename from pkg/services/events.go rename to pkg/internal/services/events.go diff --git a/pkg/services/external_apns.go b/pkg/internal/services/external_apns.go similarity index 100% rename from pkg/services/external_apns.go rename to pkg/internal/services/external_apns.go diff --git a/pkg/services/external_firebase.go b/pkg/internal/services/external_firebase.go similarity index 100% rename from pkg/services/external_firebase.go rename to pkg/internal/services/external_firebase.go diff --git a/pkg/services/factors.go b/pkg/internal/services/factors.go similarity index 100% rename from pkg/services/factors.go rename to pkg/internal/services/factors.go diff --git a/pkg/services/friendships.go b/pkg/internal/services/friendships.go similarity index 100% rename from pkg/services/friendships.go rename to pkg/internal/services/friendships.go diff --git a/pkg/services/jwt.go b/pkg/internal/services/jwt.go similarity index 100% rename from pkg/services/jwt.go rename to pkg/internal/services/jwt.go diff --git a/pkg/services/mailer.go b/pkg/internal/services/mailer.go similarity index 100% rename from pkg/services/mailer.go rename to pkg/internal/services/mailer.go diff --git a/pkg/services/mfa.go b/pkg/internal/services/mfa.go similarity index 100% rename from pkg/services/mfa.go rename to pkg/internal/services/mfa.go diff --git a/pkg/services/notifications.go b/pkg/internal/services/notifications.go similarity index 100% rename from pkg/services/notifications.go rename to pkg/internal/services/notifications.go diff --git a/pkg/services/perms.go b/pkg/internal/services/perms.go similarity index 100% rename from pkg/services/perms.go rename to pkg/internal/services/perms.go diff --git a/pkg/services/realms.go b/pkg/internal/services/realms.go similarity index 100% rename from pkg/services/realms.go rename to pkg/internal/services/realms.go diff --git a/pkg/services/ticker_maintainer.go b/pkg/internal/services/ticker_maintainer.go similarity index 100% rename from pkg/services/ticker_maintainer.go rename to pkg/internal/services/ticker_maintainer.go diff --git a/pkg/services/ticket.go b/pkg/internal/services/ticket.go similarity index 100% rename from pkg/services/ticket.go rename to pkg/internal/services/ticket.go diff --git a/pkg/services/ticket_queries.go b/pkg/internal/services/ticket_queries.go similarity index 100% rename from pkg/services/ticket_queries.go rename to pkg/internal/services/ticket_queries.go diff --git a/pkg/services/ticket_token.go b/pkg/internal/services/ticket_token.go similarity index 100% rename from pkg/services/ticket_token.go rename to pkg/internal/services/ticket_token.go diff --git a/pkg/services/tokens.go b/pkg/internal/services/tokens.go similarity index 100% rename from pkg/services/tokens.go rename to pkg/internal/services/tokens.go diff --git a/pkg/utils/auth.go b/pkg/internal/utils/auth.go similarity index 100% rename from pkg/utils/auth.go rename to pkg/internal/utils/auth.go diff --git a/pkg/utils/request.go b/pkg/internal/utils/request.go similarity index 100% rename from pkg/utils/request.go rename to pkg/internal/utils/request.go diff --git a/pkg/views/authorize.gohtml b/pkg/internal/views/authorize.gohtml similarity index 100% rename from pkg/views/authorize.gohtml rename to pkg/internal/views/authorize.gohtml diff --git a/pkg/views/favicon.png b/pkg/internal/views/favicon.png similarity index 100% rename from pkg/views/favicon.png rename to pkg/internal/views/favicon.png diff --git a/pkg/views/index.gohtml b/pkg/internal/views/index.gohtml similarity index 100% rename from pkg/views/index.gohtml rename to pkg/internal/views/index.gohtml diff --git a/pkg/views/layouts/auth.gohtml b/pkg/internal/views/layouts/auth.gohtml similarity index 100% rename from pkg/views/layouts/auth.gohtml rename to pkg/internal/views/layouts/auth.gohtml diff --git a/pkg/views/layouts/user-center.gohtml b/pkg/internal/views/layouts/user-center.gohtml similarity index 100% rename from pkg/views/layouts/user-center.gohtml rename to pkg/internal/views/layouts/user-center.gohtml diff --git a/pkg/views/mfa-apply.gohtml b/pkg/internal/views/mfa-apply.gohtml similarity index 100% rename from pkg/views/mfa-apply.gohtml rename to pkg/internal/views/mfa-apply.gohtml diff --git a/pkg/views/mfa.gohtml b/pkg/internal/views/mfa.gohtml similarity index 100% rename from pkg/views/mfa.gohtml rename to pkg/internal/views/mfa.gohtml diff --git a/pkg/views/partials/header.gohtml b/pkg/internal/views/partials/header.gohtml similarity index 100% rename from pkg/views/partials/header.gohtml rename to pkg/internal/views/partials/header.gohtml diff --git a/pkg/views/signin.gohtml b/pkg/internal/views/signin.gohtml similarity index 100% rename from pkg/views/signin.gohtml rename to pkg/internal/views/signin.gohtml diff --git a/pkg/views/signup.gohtml b/pkg/internal/views/signup.gohtml similarity index 100% rename from pkg/views/signup.gohtml rename to pkg/internal/views/signup.gohtml diff --git a/pkg/views/users/me.gohtml b/pkg/internal/views/users/me.gohtml similarity index 100% rename from pkg/views/users/me.gohtml rename to pkg/internal/views/users/me.gohtml diff --git a/pkg/cmd/main.go b/pkg/main.go similarity index 85% rename from pkg/cmd/main.go rename to pkg/main.go index 8ebf047..963ac4e 100644 --- a/pkg/cmd/main.go +++ b/pkg/main.go @@ -1,20 +1,20 @@ package main import ( - "git.solsynth.dev/hydrogen/passport/pkg/gap" + "git.solsynth.dev/hydrogen/passport/pkg/internal" + "git.solsynth.dev/hydrogen/passport/pkg/internal/gap" "os" "os/signal" "syscall" - "git.solsynth.dev/hydrogen/passport/pkg" - "git.solsynth.dev/hydrogen/passport/pkg/i18n" + "git.solsynth.dev/hydrogen/passport/pkg/internal/i18n" - "git.solsynth.dev/hydrogen/passport/pkg/grpc" - "git.solsynth.dev/hydrogen/passport/pkg/server" - "git.solsynth.dev/hydrogen/passport/pkg/services" + "git.solsynth.dev/hydrogen/passport/pkg/internal/grpc" + "git.solsynth.dev/hydrogen/passport/pkg/internal/server" + "git.solsynth.dev/hydrogen/passport/pkg/internal/services" "github.com/robfig/cron/v3" - "git.solsynth.dev/hydrogen/passport/pkg/database" + "git.solsynth.dev/hydrogen/passport/pkg/internal/database" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "github.com/spf13/viper" diff --git a/pkg/grpc/proto/auth.pb.go b/pkg/proto/auth.pb.go similarity index 100% rename from pkg/grpc/proto/auth.pb.go rename to pkg/proto/auth.pb.go diff --git a/pkg/grpc/proto/auth.proto b/pkg/proto/auth.proto similarity index 100% rename from pkg/grpc/proto/auth.proto rename to pkg/proto/auth.proto diff --git a/pkg/grpc/proto/auth_grpc.pb.go b/pkg/proto/auth_grpc.pb.go similarity index 100% rename from pkg/grpc/proto/auth_grpc.pb.go rename to pkg/proto/auth_grpc.pb.go diff --git a/pkg/grpc/proto/friendships.pb.go b/pkg/proto/friendships.pb.go similarity index 100% rename from pkg/grpc/proto/friendships.pb.go rename to pkg/proto/friendships.pb.go diff --git a/pkg/grpc/proto/friendships.proto b/pkg/proto/friendships.proto similarity index 100% rename from pkg/grpc/proto/friendships.proto rename to pkg/proto/friendships.proto diff --git a/pkg/grpc/proto/friendships_grpc.pb.go b/pkg/proto/friendships_grpc.pb.go similarity index 100% rename from pkg/grpc/proto/friendships_grpc.pb.go rename to pkg/proto/friendships_grpc.pb.go diff --git a/pkg/grpc/proto/notify.pb.go b/pkg/proto/notify.pb.go similarity index 100% rename from pkg/grpc/proto/notify.pb.go rename to pkg/proto/notify.pb.go diff --git a/pkg/grpc/proto/notify.proto b/pkg/proto/notify.proto similarity index 100% rename from pkg/grpc/proto/notify.proto rename to pkg/proto/notify.proto diff --git a/pkg/grpc/proto/notify_grpc.pb.go b/pkg/proto/notify_grpc.pb.go similarity index 100% rename from pkg/grpc/proto/notify_grpc.pb.go rename to pkg/proto/notify_grpc.pb.go diff --git a/pkg/grpc/proto/realms.pb.go b/pkg/proto/realms.pb.go similarity index 100% rename from pkg/grpc/proto/realms.pb.go rename to pkg/proto/realms.pb.go diff --git a/pkg/grpc/proto/realms.proto b/pkg/proto/realms.proto similarity index 100% rename from pkg/grpc/proto/realms.proto rename to pkg/proto/realms.proto diff --git a/pkg/grpc/proto/realms_grpc.pb.go b/pkg/proto/realms_grpc.pb.go similarity index 100% rename from pkg/grpc/proto/realms_grpc.pb.go rename to pkg/proto/realms_grpc.pb.go