Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { Index int // The unique index of the item in the todo-list Author id.ActorID // The "Name" of the user that created this todo-item ProjectID id.ProjectID // The project in which the todo-item was created Type Type Reference itemReference // Unique reference to the item that is linked to this todo-item Deadline time.Time CreationDate time.Time Done bool }
Item is a single todo-item in the todo-list belonging to a single user
type List ¶
type List struct { Username string // The "Name" of the user this todo-list belongs to TODOs []Item }
List is a collection of todo-assignments
func NewList ¶
New List creates a new todo-list for the user with the given name. The list contains no todo-items.
Returns the created list.
func (*List) AddItem ¶
func (l *List) AddItem(author id.ActorID, projectID id.ProjectID, todoType Type, refType ReferenceType, refID string, deadline time.Time) *List
AddItem creates a new todo item and adds it to the list. The amount of todo-items is the id of the newly created item.
Returns the list
type ReferenceType ¶
type ReferenceType int
ReferenceType is the type of the entity that is referenced by the todo-item
const ( Case ReferenceType = iota Sequence )
These are the possible reference-types
Click to show internal directories.
Click to hide internal directories.