Closed hairizuanbinnoorazman closed 6 years ago
After initial thoughts, this is the interface that has come up along the way
type PlatformActions interface {
ListProjects() ([]Project, error)
ListTasks(projectID string) ([]Task, error)
ListUsers(projectID string) ([]User, error)
CreateTask(projectID, taskName string) (Task, error)
CompleteTask(projectID, taskID string) (Task, error)
AssignTask(projectID, taskID, userID string) (Task, error)
AssignLabel(projectID, taskID, label string) (Task, error)
}
We need to take note that if there is any new functions that is to be added on this interface, we would need to implement across all platforms (a caution)
We can probably extend interface by composing it into another interface which would allow us to slowly extend the service - once the new interface is fully adopted => We can probably reuse this interface name once more (or refactor to switch out to utilize the original name)
We can probably close this task for now -> If there is further discussions on this, we can create a new issue for it
In order to allow interoperability between the platforms, we would need to design a common task struct which would consume the other services via interfaces
As of now, the platforms should be able provide the following set of services:
(May differ in definition between platforms)