Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

refactor: Moved generic utility functions out of DIDExchange #993

Merged
merged 2 commits into from
Dec 19, 2019

Conversation

Moopli
Copy link
Contributor

@Moopli Moopli commented Dec 17, 2019

Functions moved out are for DID doc parsing and destination struct construction. These functions are needed for other protocols besides DIDExchange.

Part of #725

pkg/doc/did/helpers.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 18, 2019

Codecov Report

Merging #993 into master will decrease coverage by 0.03%.
The diff coverage is 96.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #993      +/-   ##
==========================================
- Coverage   90.88%   90.84%   -0.04%     
==========================================
  Files          90       92       +2     
  Lines        5791     5791              
==========================================
- Hits         5263     5261       -2     
- Misses        286      287       +1     
- Partials      242      243       +1
Impacted Files Coverage Δ
pkg/didcomm/common/service/service.go 100% <ø> (ø) ⬆️
pkg/didcomm/protocol/didexchange/states.go 94.77% <100%> (-0.73%) ⬇️
pkg/doc/did/helpers.go 100% <100%> (ø)
pkg/didcomm/common/service/destination.go 100% <100%> (ø)
pkg/didcomm/protocol/didexchange/service.go 93.54% <33.33%> (-0.56%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd79ee1...a38a303. Read the comment docs.

pkg/doc/did/helpers.go Outdated Show resolved Hide resolved
}

// LookupRecipientKeys gets the recipient keys from the did doc which match the given parameters.
func LookupRecipientKeys(didDoc *Doc, serviceType, keyType string) ([]string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(later) we may want to think about refactoring these static accessors and the existing instance fields.

@Moopli Moopli force-pushed the 725-refactor branch 2 times, most recently from 7beaa53 to 7aed2de Compare December 19, 2019 17:13
Filip Burlacu added 2 commits December 19, 2019 13:19
- DID doc parsing
- Destination struct construction

Signed-off-by: Filip Burlacu <[email protected]>
@troyronda troyronda merged commit 9fd4dad into hyperledger-archives:master Dec 19, 2019
@Moopli Moopli deleted the 725-refactor branch December 19, 2019 18:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants