Skip to content

[RFC] DidUri improvements #3

@dhuseby

Description

@dhuseby

@mikelodder7 I like what you've done with DidUri so far. The validation is solid. However, I think we should create a trait called Did that has functions for accessing the parts of a DID string. Maybe even have traits for DidQuery and DidFragment and DidParams?

Here's why I want to make a Did trait. We can then have specific implementations for the different Did methods. I could impl Did for DidGit for instance and then I could also add functions that return libgit2 types along with the functions in the Did trait. The DidGit implementations for the DidQuery, DidFragment and DidParams also mean specialized things in the DidGit method context. The impl DidParams for DidGitParams will support the interface but also be able to return libgit2 references to specific commits in a repo and other things.

The current DidUri is a good first step, but I think making it a trait with specialized implementations for each DID method is in order.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions