-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Reorganizes the StorageInteraction code plus other improvements #15841
base: dev
Are you sure you want to change the base?
Conversation
module Commands | ||
class CopyTemplateFolder | ||
using Peripherals::ServiceResultRefinements | ||
Util = Peripherals::StorageInteraction::Nextcloud::Util |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would eventually be removed when Util
gets moved (and maybe split) into support
module Storages | ||
module Adapters | ||
module Nextcloud | ||
class ManagedFolderIdentifier |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't exactly support (as in supporting code) but represents a concept that is storage dependent.
Should it go under a special namespace?
module Nextcloud | ||
module Queries | ||
class Files | ||
Auth = Peripherals::StorageInteraction::Authentication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Authentication
will probably live under Adapters::Support::Authentication
@@ -37,7 +37,7 @@ module Peripherals | |||
register(:file_ids, StorageInteraction::Nextcloud::FileIdsQuery) | |||
register(:file_info, StorageInteraction::Nextcloud::FileInfoQuery) | |||
register(:files_info, StorageInteraction::Nextcloud::FilesInfoQuery) | |||
register(:files, StorageInteraction::Nextcloud::FilesQuery) | |||
register(:files, Adapters::Nextcloud::Queries::Files) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registries
should be moved to their adapter folders (maybe we could add a way to auto-register? 🤔)
84a7096
to
bef03d0
Compare
9a613fa
to
b42de07
Compare
b42de07
to
986ec11
Compare
THIS IS AN EXPERIMENT
What?
We have a bunch of namespaces under
Storages
but some don't bring much clarity on what is their intended purpose or we gained new insight on the necessities for different service providers.Why?
All storage supporting code lives under
Peripherals
(under thecommon/storages/
folder) and has become kind of that practical drawer where you just throw anything you wanna "hide" (under the guise of organizing) and it is slowing becoming a mess.How?
First I'm introducing the Adapters namespace (under
common/storage/adapters
) where the code that is tailored goes (adapters/nextcloud
,adapters/one_drive
).Each adapter structure is identical (in an ideal world) with the following namespaces / folders:
Storage
modelsThe Adapters namespace will also have supporting code to it - Authentication Strategies, Specific Errors and also Objects defining the shape the results (success/failure) for all the required
Commands
andQueries
.The
adapters
folder/namespace also houses all the pieces used by the adapters (authentication, value objects etc)