-
Notifications
You must be signed in to change notification settings - Fork 160
feat: new component for data models - DIDs, signatures, JSON-LD #3565
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3565 +/- ##
==========================================
- Coverage 87.76% 87.24% -0.53%
==========================================
Files 351 353 +2
Lines 48627 48671 +44
==========================================
- Hits 42677 42461 -216
- Misses 4402 4673 +271
+ Partials 1548 1537 -11
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Note: Since this PR introduces a new component that afgo depends on, it needs a followup that removes the go.mod replace directives ( |
6be9993
to
ece95a7
Compare
component/models/did/doc.go
Outdated
@@ -1208,7 +1208,7 @@ func (doc *Doc) MarshalJSON() ([]byte, error) { | |||
} | |||
|
|||
// VerifyProof verifies document proofs. | |||
func (doc *Doc) VerifyProof(suites []verifier.SignatureSuite, jsonldOpts ...jsonld.ProcessorOpts) error { | |||
func (doc *Doc) VerifyProof(suites []verifier.SignatureSuite, jsonldOpts ...processor.ProcessorOpts) error { |
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.
I would suggest renaming ProcessorOpts
to just Opts
to avoid the repetition
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.
done!
"github.com/hyperledger/aries-framework-go/spi/storage" | ||
) | ||
|
||
// MockContextStore is a mock JSON-LD context store. | ||
type MockContextStore struct { | ||
type MockContextStore struct { // nolint:golint |
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.
Reason for the nolint
?
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 is for the name stuttering, but I've now fixed the stuttering instead.
"github.com/hyperledger/aries-framework-go/pkg/doc/signature/jsonld" | ||
"github.com/hyperledger/aries-framework-go/pkg/internal/ldtestutil" | ||
ldcontext "github.com/hyperledger/aries-framework-go/component/models/ld/context" | ||
"github.com/hyperledger/aries-framework-go/component/models/ld/ldtestutil" |
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.
since ldtestutil
is under ld
, you can change ldtestutil
to simply testutil
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.
done!
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.
The package name is still jsonld
- it should be changed to processor
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.
done!
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.
See my comments
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.
Package name needs to be updated to avoid weirdness when importing
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.
done!
Something else I'm wondering: do we really need individual packages for all the various pieces under |
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.
Package name should be store
instead of ld
now. Also, with that in mind - ContextStore
should then be simplified to avoid repetition. But as I'm writing this, I'm seeing some weirdness with trying to come up with an appropriate name - should this just be merged in along with the other ld
stuff into a single ld
package? Then you could have things like ld.ContextStore
, ld.DocumentLoader
instead of store.ContextStore
, documentloader.Loader
, etc
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.
fixed!
3543558
to
7248c9a
Compare
Hmm so, |
6b37f93
to
d5b1156
Compare
6b98ea7
to
fd1f3cc
Compare
* perf: remove extra parsing * fix: lint * perf: avoid one more perse
component/models/: