I wanna know how to transfer the Task to internal.Task? #13
-
|
Hi,Mario.I'm the beginner. I add a function to list all tasks, but i can't return [ ]internal.Task just return [ ]Task, so what can I do for transfering them? thx. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hello @RyanChengStar I assume you mean something like this? but instead returning all the records. I'd do something similar to that method I hope that helps |
Beta Was this translation helpful? Give feedback.
Hello @RyanChengStar
I assume you mean something like this? but instead returning all the records.
I'd do something similar to that method
TaskHandler.searchwhere the internal type is converted into the one in therestpackage, so this means in therestpackage the interface typeTaskServicewould define a new method calledAll(or similar) that is implemented bypostgres.Taskwhich returns all the values from the datastore, this method would called by a new methodTaskHandler.allin therestpackage.I hope that helps