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

feat: Update Protocol Service API with Event handling functions (Register/Unregister) #335

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

rolsonquadras
Copy link
Contributor

Added Register/Unregister Action/Msg event APIs to Protocol Services. These were implemented in as part of Issue #276 and PR #327.

Closes #332

Signed-off-by: Rolson Quadras [email protected]

@codecov
Copy link

codecov bot commented Sep 24, 2019

Codecov Report

Merging #335 into master will increase coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #335      +/-   ##
==========================================
+ Coverage   89.31%   89.42%   +0.11%     
==========================================
  Files          45       44       -1     
  Lines        2479     2345     -134     
==========================================
- Hits         2214     2097     -117     
+ Misses        145      134      -11     
+ Partials      120      114       -6
Impacted Files Coverage Δ
pkg/didcomm/protocol/introduce/models.go
pkg/doc/verifiable/credential.go 91.26% <0%> (+2.2%) ⬆️

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 68260c8...46a365e. Read the comment docs.

@llorllale
Copy link
Contributor

I think the new methods should be split off into their own interface. The dispatchers certainly have no need for them.

@rolsonquadras
Copy link
Contributor Author

I think the new methods should be split off into their own interface. The dispatchers certainly have no need for them.

@llorllale moved to different interface and embedded it.

@fqutishat fqutishat requested a review from llorllale September 24, 2019 20:45
@@ -67,3 +70,22 @@ type DIDCommCallback struct {

// Callback type to pass service callbacks.
type Callback func(DIDCommCallback)

// Event related apis.
type Event interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I wasn't clear before about the embedding: I think this new interface (whatever it will be named) should embed the existing dispatcher.Service interface, not the other way around. The dispatchers have no use for these new methods.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@llorllale Created a new interface for DIDComm Services.

Copy link
Contributor

Choose a reason for hiding this comment

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

I opened #344 to consider moving this interface to a different package in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@llorllale I had already raised one for that. May be we can close #344

…ster/Unregister)

- Add Register/Unregister Action/Msg event APIs to Protocol Services

Signed-off-by: Rolson Quadras <[email protected]>
@rolsonquadras
Copy link
Contributor Author

Added a TODO to refactor the dispatcher package #342.

@troyronda troyronda merged commit bf31dc7 into hyperledger-archives:master Sep 25, 2019
@rolsonquadras rolsonquadras deleted the issue-332 branch September 25, 2019 18:52
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.

Update Protocol Service API with Event handling functions
5 participants