Skip to content

implement default discovery handler#96

Merged
ilya-korotya merged 5 commits into
mainfrom
feature/implement-discovery-handler
Jan 21, 2026
Merged

implement default discovery handler#96
ilya-korotya merged 5 commits into
mainfrom
feature/implement-discovery-handler

Conversation

@ilya-korotya

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread handlers/discovery/discovery.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread handlers/discovery/utils.go
Comment thread handlers/discovery/discovery_test.go Outdated
Comment thread handlers/discovery/features.go Outdated
Comment thread handlers/discovery/discovery.go
Comment thread handlers/discovery/utils.go
Comment thread handlers/discovery/features.go Outdated
Comment thread handlers/discovery/features.go Outdated
Comment thread handlers/discovery/features.go Outdated
Comment thread handlers/discovery/discovery.go
Comment thread handlers/discovery/utils.go
Comment thread handlers/discovery/features.go Outdated
type HeaderFeaturer struct{}

// NewHeaderFeaturer constructor
func NewHeaderFeaturer() *HeaderFeaturer {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread handlers/discovery/features.go Outdated
type GoalCodeFeaturer struct{}

// NewGoalCodeFeaturer constructor
func NewGoalCodeFeaturer() *GoalCodeFeaturer {

@vmidyllic vmidyllic Jan 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lets's extend constructor with 'goal coad' option so we can extened handle it in the future

@ilya-korotya ilya-korotya merged commit 5010213 into main Jan 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants