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

made a new Transform which receives Req type paramter #610

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

BaekGeunYoung
Copy link

resolves #608

made a new Transform, RTransform, which embeds Req type also.

def effect[Req, Resp](
      io: (Req, ContextIn) => ZIO[Any, ErrorIn, Resp]
  ): (Req, ContextOut) => ZIO[Any, ErrorOut, Resp]

and added a codegen logic which adds a method to transform service using RTransform

* "decorated" service. This can be used for pre- or post-processing of requests/response or to transform the context.
*
* [[RTransform]] is different from [[GTransform]] in that users can access to the request body while decorating
* service using [[RTransform]]. This is especially useful for request / resposne logging.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is especially useful -> this can be used
resposne -> response

@thesamet
Copy link
Contributor

Thanks for sending the PR! The change itself looks good. Can you add:

  • a spec similar to EnvSpec (new file please) that demonstrates this change works for all 4 type of RPC methods
  • update the docs (docs/context.md) with the new transformation type.

@cipriansofronia
Copy link
Contributor

@BaekGeunYoung any progress on this one?

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.

Add Request Type into Transform trait
3 participants