package
Version:
v0.0.0-...-f970054
Opens a new window with list of versions in this module.
Published: Mar 3, 2016
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type Server struct {
Database Database
}
START TYPE OMIT
type Todo struct {
ID TodoID `bson:"_id" json:"id"`
Task string `bson:"t" json:"task"`
Created time.Time `bson:"c" json:"created"`
Updated time.Time `bson:"u,omitempty" json:"updated"`
Completed time.Time `bson:"cp,omitempty" json:"completed"`
}
Todo struct defines a task
TodoID is the ID for a Todo task
NewTodoID creates a new ID
Blank determines if a Todo is blank
GetBSON defines a custom unmarshaller to convert the BSON ObjectID to a TodoID
Invalid determines if the Todo is invalid
Present determines if the Todo is present
SetBSON defines a customer marshaller to convert at TodoID to a BSON ObjectID
Valid determines if a Todo is valid (has an valid ID)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.