Skip to content

Feat: Trust Domain URI parsing, complete rest of trust domain methods#6

Merged
tjons merged 6 commits into
mainfrom
tjons/trust-domain-uri-parsing
Dec 24, 2025
Merged

Feat: Trust Domain URI parsing, complete rest of trust domain methods#6
tjons merged 6 commits into
mainfrom
tjons/trust-domain-uri-parsing

Conversation

@tjons

@tjons tjons commented Dec 21, 2025

Copy link
Copy Markdown
Owner

This PR makes a number of changes:

  • Implement code review feedback from @Coutlaw in feat: trust domain type string parsing and validation #5 by:
    • adding a well-known constant representing the spiffe protocol and the spiffe:// URI scheme,
    • refactoring the spiffeid.TrustDomain validation code to use switch() {}
  • Add new features to support generating spiffeid.TrustDomain structs from std.Uri.
  • Complete the rest of the necessary methods to provide effective parity with the Go SDK for spiffeid.TrustDomain.

After merging this PR, the spiffeid.TrustDomain type can be considered reasonably complete.

Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
Signed-off-by: tjons <tylerschade99@gmail.com>
@tjons tjons requested a review from Coutlaw December 21, 2025 17:11

@Coutlaw Coutlaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good. I had a head scratching moment with your compare() function, but we can revisit that later. 👍

@tjons tjons merged commit 8c22158 into main Dec 24, 2025
1 check 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.

2 participants