implement default discovery handler#96
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements a default discovery handler for the iden3comm protocol. The implementation provides a mechanism for discovering supported features including accepted message formats (packers), supported protocols, goal codes, and header fields.
Changes:
- Added discovery handler with support for feature queries and disclosures
- Implemented feature parsers and handlers for accept, protocol, goal-code, and header feature types
- Added comprehensive test coverage for discovery handler functionality
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| handlers/discovery/discovery.go | Main discovery handler implementing query processing and wildcard matching |
| handlers/discovery/features.go | Feature handler implementations for different discovery protocol feature types |
| handlers/discovery/utils.go | Utility functions for parsing feature strings |
| handlers/discovery/discovery_test.go | Comprehensive tests for discovery handler with multiple scenarios |
| handlers/discovery/utils_test.go | Unit tests for ParseFeature utility function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| type HeaderFeaturer struct{} | ||
|
|
||
| // NewHeaderFeaturer constructor | ||
| func NewHeaderFeaturer() *HeaderFeaturer { |
There was a problem hiding this comment.
let's add headers arrays as options appoach to the constructor, so user can setup custom. We can keep default array if user doesn't pass anything
| type GoalCodeFeaturer struct{} | ||
|
|
||
| // NewGoalCodeFeaturer constructor | ||
| func NewGoalCodeFeaturer() *GoalCodeFeaturer { |
There was a problem hiding this comment.
lets's extend constructor with 'goal coad' option so we can extened handle it in the future
No description provided.