-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix(GODT-1757): Refactor code to have better data separation #91
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LBeernaertProton
force-pushed
the
fix/GODT-1757-improve-data-separation
branch
2 times, most recently
from
August 31, 2022 12:48
37a99ce
to
1131c08
Compare
Due to Go's lackluster import system we had to refactor certain types into separate packages so we can better control what each type has access to. All the database related code has been moved into the db package. All the remote user management code has been been moved into the remote package. Existing remote code has been erased. All things related to state and snapshot have been moved into the state package. To avoid cyclic imports, the state package declares two interfaces which provide access to some user specific data as well as a custom connector implementation on which metadata can be attached.
LBeernaertProton
force-pushed
the
fix/GODT-1757-improve-data-separation
branch
from
August 31, 2022 13:08
1131c08
to
764ffe8
Compare
Cleanup the code by remove the apply functions from the user interface. Common code has been put under update_mailbox.go and each separate implementation is charged with pushing the updates. Thanks to this, all the user's connector updates can just be queued as the code is no longer shared between states and user.
jameshoulahan
requested changes
Sep 1, 2022
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.
All good, just would remove a couple bits of dead code, and you were a bit heavy-handed with the find-replace :)
jameshoulahan
approved these changes
Sep 1, 2022
🎉 This PR is included in version 0.11.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to Go's lackluster import system we had to refactor certain types
into separate packages so we can better control what each type has
access to.
All the database related code has been moved into the db package.
All the remote user management code has been been moved into the remote
package. Existing remote code has been erased.
All things related to state and snapshot have been moved into the state
package.
To avoid cyclic imports, the state package declares two interfaces which
provide access to some user specific data as well as a custom connector
implementation on which metadata can be attached.