Created
April 21, 2014 22:19
-
-
Save laser/11158542 to your computer and use it in GitHub Desktop.
todo manager IDL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // todo_manager.idl | |
| struct TodoProperties { | |
| title string | |
| completed bool | |
| } | |
| struct Todo extends TodoProperties { | |
| id int [optional] | |
| } | |
| interface TodoManager { | |
| // returns all Todos | |
| readTodos() []Todo | |
| // creates new Todo and returns it with an id | |
| createTodo(todo TodoProperties) Todo | |
| // updates Todo by id and returns it | |
| updateTodo(id int, props TodoProperties) Todo | |
| // deletes Todo and returns true | |
| deleteTodo(id int) bool | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment