hyperledger-archives / aries-framework-go

Hyperledger Aries Framework Go provides packages for building Agent / DIDComm services.
https://wiki.hyperledger.org/display/ARIES/aries-framework-go
Apache License 2.0
240 stars 161 forks source link

refactor: Minimize VDResolver interface needed for did config validate #3447

Closed DRK3 closed 1 year ago

DRK3 commented 1 year ago

Currently, the DID config validate functionality has an option for injecting in a VDR, however most of the methods in the interface are not actually used.

This change switches the option to use a minimal version of that interface that is itself a subset of the full VDR interface. With this change, a caller can now use the VDR option with a more minimal implementation that only has a Resolve method. The minimal interface still lines up with the larger VDR interface, so another caller can still use a full VDR interface implementation without making any changes.

Signed-off-by: Derek Trider Derek.Trider@securekey.com

codecov[bot] commented 1 year ago

Codecov Report

Merging #3447 (c22fa84) into main (6fe06c5) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #3447   +/-   ##
=======================================
  Coverage   87.58%   87.58%           
=======================================
  Files         346      346           
  Lines       47011    47011           
=======================================
  Hits        41174    41174           
  Misses       4334     4334           
  Partials     1503     1503           
Impacted Files Coverage Δ
pkg/client/didconfig/didconfig.go 93.75% <100.00%> (ø)
pkg/doc/didconfig/didconfig.go 95.57% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

sandrask commented 1 year ago

https://github.com/hyperledger/aries-framework-go/blob/6fe06c571ddc923a943109aa6decffd9c092bf1b/pkg/doc/didconfig/didconfig.go#L72

sandrask commented 1 year ago

https://github.com/hyperledger/aries-framework-go/blob/6fe06c571ddc923a943109aa6decffd9c092bf1b/pkg/doc/didconfig/didconfig.go#L439