Skip to content

Instantly share code, notes, and snippets.

@laser
Created April 21, 2014 22:19
Show Gist options
  • Select an option

  • Save laser/11158542 to your computer and use it in GitHub Desktop.

Select an option

Save laser/11158542 to your computer and use it in GitHub Desktop.
todo manager IDL
// 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