-
-
Notifications
You must be signed in to change notification settings - Fork 44
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 headers type #956
Add headers type #956
Conversation
e4e94db
to
b76fa35
Compare
Quite big, not sure if I have time soon for it 😞 |
Np, let's release now and have a look to this when you have time. |
@matejcerny I've updated the description. I hope it helps |
6c97ade
to
d808bd1
Compare
Here a recap of what's inside this PR:
❓Why so many files involved❓
model
object, that has grown and became too large to handle, intomodel
package, no breaking changes🔄 Changes:
Headers
type, a wrapper ofMap[String, AmqpFieldValue]
to provide utilsHeaderKey = String
type alias.AmqpFieldDecoder
andAmqpFieldEncoder
to decode and encodeAmqpFieldValue
values into scala types.:=
syntax toHeaderKey
in order to create a tuple of(HeaderKey, AmqpFieldValue)
encoding a genericT
into aAmqpFieldValue
using an implicitAmqpFieldEncoder
.asAmqpFieldValue
syntax to anyA
to encode them intoAmqpFieldValue
using an implicitAmqpFieldEncoder
.as[T]
syntax toAmqpFieldValue
to decode it to a genericT
using an implicitAmqpFieldDecoder
EnvelopeDecoder
(stringHeader, etc..) in favor ofheaderAs[IO, T]
💥 Breaking changes:
AmqpProperties
now accept and return an instance ofHeaders
instead of aMap[String, AmqpFieldValue]
. The map will be accessible in any case using the.toMap
method which exposes the underlying mapSome examples: