-
Notifications
You must be signed in to change notification settings - Fork 40
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
refactor: Remove DataStoreKey from (public) dockey struct #278
Conversation
Is not used, and of non-public type
Was weird, circular, and exposed an internal type
Codecov Report
@@ Coverage Diff @@
## develop #278 +/- ##
===========================================
+ Coverage 58.12% 58.28% +0.15%
===========================================
Files 103 103
Lines 10224 10200 -24
===========================================
+ Hits 5943 5945 +2
+ Misses 3647 3622 -25
+ Partials 634 633 -1
|
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.
Im a fan of the refactor.
We should prob have some utility functions to go from key.DocKey
types to core.DataStoreKey
so we're not always doing manual (error-prone) struct instanciation.
The helper func can really be placed anywhere. Either as a new constructor type on the core
package, or as a method on the key.DocKey
type. Up to you :)
Not a problem, will add (probably a new constructor)
|
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.
sweet, LGTM
…ork#278) * Remove dockey.peerId and unused functions * Remove key from field Is not used, and of non-public type * Remove DataStoreKey from dockey Was weird, circular, and exposed an internal type * Use constructor for DataStoreKey from dockey
Closes #169
Part of #200 (broken out of #277 )
Removes DataStoreKey from dockey. dockey is part of the public abi and should not expose internal types (was also quite strange and a little circular). Public
Collection
functions still takedockey
(which lacks internal stuff such as collectionId which has no reason to be a public param for these functions), internal/private functions takeDataStoreKey
allowing easier internal processing.