Skip to content

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