-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Expose event message headers, introduce a new way to read the body from an io.Reader
#1955
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
Conversation
EventTypeHeader as well as DeliveryIDHeader
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
io.Reader
io.Reader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @m19c !
LGTM.
Awaiting second LGTM before merging.
Codecov Report
@@ Coverage Diff @@
## master #1955 +/- ##
==========================================
+ Coverage 97.84% 97.87% +0.02%
==========================================
Files 105 105
Lines 6809 6809
==========================================
+ Hits 6662 6664 +2
+ Misses 80 79 -1
+ Partials 67 66 -1
Continue to review full report at Codecov.
|
@m19c - do you want to resolve the merge conflicts, or would you like me to do that? |
Thank you, @m19c ! Could you please run |
Done. Intent should be fixed now. |
@m19c - bonus points if you can increase the code coverage by writing a test for your new method (while we are waiting for a second LGTM). 😄 |
Done 👍🏽 |
I've also added another test to capture invalid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This pull request introduces the changes described in #1944.
sha1SignatureHeader
,sha256SignatureHeader
,eventTypeHeader
anddeliveryIDHeader
ValidatePayloadFromBody
to read the body directly from anio.Reader
rather than ahttp.Request
.The changes described enables the possibility to use
go-github
even with http libraries likefiber
orfasthttp
.Example A:
Example B: