Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs and middleware for dynoid #204

Merged
merged 15 commits into from Mar 15, 2024
Merged

Add docs and middleware for dynoid #204

merged 15 commits into from Mar 15, 2024

Conversation

kennyp
Copy link
Member

@kennyp kennyp commented Mar 13, 2024

Rationale

Dyno identity should be easy to adopt.

Changes

  • Add docs and refactor dynoid and dynoid/dynoidtest.
  • Add http middleware to dynoid/middleware to simplify incorporating dynoid.

Meta

Work Item

@kennyp kennyp marked this pull request as ready for review March 13, 2024 23:27
Copy link
Member

@tt tt left a comment

Choose a reason for hiding this comment

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

This looks really good.

I do have one reservation about putting the middleware under the hmiddleware package even though it seems like the best fit. This module has quite a few dependencies and I think it would be great if we could eventually break it up a bit.

The dyno ID bits will need to remain together so may consider moving it to dynoid/dynoidmiddleware instead? That also prevents two packages that are named identically for import purposes.

dynoid/dynoid.go Outdated Show resolved Hide resolved
dynoid/dynoid.go Outdated Show resolved Hide resolved
dynoid/dynoid.go Outdated Show resolved Hide resolved
dynoid/dynoidtest/dynoidtest.go Outdated Show resolved Hide resolved
hmiddleware/dynoid/dynoid.go Outdated Show resolved Hide resolved
kennyp and others added 3 commits March 14, 2024 09:24
Co-authored-by: Troels Thomsen <19824+tt@users.noreply.github.com>
Co-authored-by: Troels Thomsen <19824+tt@users.noreply.github.com>
dynoid/dynoid.go Outdated Show resolved Hide resolved
@kennyp kennyp requested a review from tt March 14, 2024 13:47
Copy link

@mjrossi mjrossi left a comment

Choose a reason for hiding this comment

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

I think a readme.md with some basics on how to use this package would be really helpful. That said, the inline comments definitely help, as does having the tests nearby to use as an example.

dynoid/dynoid.go Outdated Show resolved Hide resolved
Copy link
Member

@tt tt left a comment

Choose a reason for hiding this comment

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

A few suggestions but still looks good.

dynoid/dynoid.go Outdated Show resolved Hide resolved
dynoid/dynoid.go Outdated Show resolved Hide resolved
dynoid/middleware/dynoid.go Outdated Show resolved Hide resolved
dynoid/middleware/dynoid_test.go Outdated Show resolved Hide resolved
@kennyp
Copy link
Member Author

kennyp commented Mar 15, 2024

A few suggestions but still looks good.

Thanks for the suggestions @tt. I've incorporated your feedback.

@kennyp
Copy link
Member Author

kennyp commented Mar 15, 2024

I think a readme.md with some basics on how to use this package would be really helpful. That said, the inline comments definitely help, as does having the tests nearby to use as an example.

I agree with you @mjrossi, but I figured I would hold off on that until we some devcenter articles and a blog post to link to.

@kennyp kennyp merged commit 4aec059 into master Mar 15, 2024
3 checks passed
@kennyp kennyp deleted the kp-dynoid branch March 15, 2024 16:57
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.

None yet

4 participants