-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: a simple service exposing Search API #8
Conversation
|
||
trait Implicits: | ||
|
||
implicit def entityDecoder[F[_]: Async, A: AvroJsonDecoder]: EntityDecoder[F, A] = |
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.
We can now use given
:) (I might forgot to change that myself when I used code from somewhere else:))
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.
Yes, I used metrics collector as a template ;)
import org.http4s.dsl.Http4sDsl | ||
import scribe.Scribe | ||
|
||
private class SearchApiImpl[F[_]: Async: Scribe](solrClient: SearchSolrClient[F]) |
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.
I know we have it like this in graph passing in the logger from outside. I'm not sure why that is good? Why wouldn't we want to have different loggers per class?
AvroJsonEncoder.encodeList[ApiProject](ApiProject.SCHEMA$) | ||
|
||
private def toAvroResponse(entities: List[ApiProject]): Response[F] = | ||
Response[F](Ok) |
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.
with Http4sDsl
in scope, I think writing Ok(entities)
should work as well. A separate method might then not be needed?
This PR brings some initial implementation of the Search API service.