Skip to content

I wanna know how to transfer the Task to internal.Task? #13

Answered by MarioCarrion
RyanChengStar asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @RyanChengStar

I assume you mean something like this? but instead returning all the records.

I'd do something similar to that method TaskHandler.search where the internal type is converted into the one in the rest package, so this means in the rest package the interface type TaskService would define a new method called All (or similar) that is implemented by postgres.Task which returns all the values from the datastore, this method would called by a new method TaskHandler.all in the rest package.

I hope that helps

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RyanChengStar
Comment options

Answer selected by MarioCarrion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants