models

package
v0.0.0-...-a22ae41 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Todo

type Todo struct {
	Id      bson.ObjectId `json:"id" bson:"_id,omitempty"`
	Title   string        `json:"title" bson:"title" binding:"required,max=16"`
	DueDate int64         `json:"due_date" bson:"due_date,omitempty"`
	Color   string        `json:"color" bson:"color"`
	Marked  int8          `json:"marked" bson:"marked"`
}

func FindTodoById

func FindTodoById(db *mgo.Database, id string) (*Todo, error)

func FindTodos

func FindTodos(db *mgo.Database) ([]Todo, error)

func (*Todo) Create

func (todo *Todo) Create(db *mgo.Database) error

func (*Todo) Delete

func (todo *Todo) Delete(db *mgo.Database) error

func (*Todo) Move

func (todo *Todo) Move(db *mgo.Database, todoMove *TodoMove) error

func (*Todo) Update

func (todo *Todo) Update(db *mgo.Database) error

type TodoGroup

type TodoGroup struct {
	Id    bson.ObjectId   `json:"id" bson:"_id,omitempty"`
	Title string          `json:"title" bson:"title" binding:"required"`
	Todos []bson.ObjectId `json:"todos" bson:"todos,omitempty"`
}

type TodoMove

type TodoMove struct {
	PriorSiblingId string `json:"prior_sibling_id"`
}

Jump to

Keyboard shortcuts

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