data

package
v0.0.0-...-dee9206 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2015 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const ViewerId = "me"

Mock authenticated ID

Variables

Functions

func AddTodo

func AddTodo(text string, complete bool) string

func ChangeTodoStatus

func ChangeTodoStatus(id string, complete bool)

func MarkAllTodos

func MarkAllTodos(complete bool) []string

func RemoveCompletedTodos

func RemoveCompletedTodos() []string

func RemoveTodo

func RemoveTodo(id string)

func RenameTodo

func RenameTodo(id string, text string)

func TodosToSliceInterface

func TodosToSliceInterface(todos []*Todo) []interface{}

Types

type Todo

type Todo struct {
	ID       string `json:"id"`
	Text     string `json:"text"`
	Complete bool   `json:"complete"`
}

Model structs

func GetTodo

func GetTodo(id string) *Todo

func GetTodos

func GetTodos(status string) []*Todo

type User

type User struct {
	ID string `json:"id"`
}

func GetUser

func GetUser(id string) *User

func GetViewer

func GetViewer() *User

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL